=== chihchun_afk is now known as chihchun === athairus is now known as afkthairus [06:46] Good morning!! Any DownloadManager experts? === tsdgeos_ is now known as tsdgeos [08:20] Good morning!! Any DownloadManager experts? [08:44] dubstar_04: i think Elleo and kenvandine are the ones I'd point to :) [08:51] popey: Thanks [08:52] ken will be asleep right now tho [08:52] Elleo: kenvandine: I can download items using the download manager. when i select the download in the filetransfer indicator my app opens but there doesnt seem to be a way to handle the file or tell what triggered the app to open. [08:53] I was expecting this to be handled by the contentHub transfers. Am I missing something? [08:54] popey: hopefully he will see it later. [08:55] you could look at other apps which receive files like docviewer? [08:55] or music? [09:04] popey: doc viewer uses this: https://developer.ubuntu.com/api/apps/qml/sdk-15.04.4/Ubuntu.Components.UriHandler/ [09:04] thanks!! [09:21] t1mp: You need to update components.api https://code.launchpad.net/~tpeeters/ubuntu-ui-toolkit/apl-header-height/+merge/298166 [09:22] right [09:22] thanks :) [09:26] Hi, I need some help in ubuntu touch scope development in JS. [09:26] I don't get how I can add filters to the scope [09:28] http://paste.ubuntu.com/17737732/ [09:29] near line 38 [09:40] any appdevs? [09:42] davidcalle, ^^ === _salem is now known as salem_ [10:28] krampstudio: hi, let me have a look! [10:32] krampstudio: there is a pretty good example here http://bazaar.launchpad.net/~marcustomlinson/unity-js-scopes/filters_example/view/head:/examples/filters/src/filters.js [10:32] krampstudio: you can disregard lines 42>343, this part is just creating fake results to display [10:34] krampstudio: if you are still blocked with the example, try pinging marcustomlinson about it in #ubuntu-touch, he is the author of the example and maintainer of the JS api [10:44] thanks davidcalle [10:44] I'll let you know === chihchun_afk is now known as chihchun === davidcalle is now known as davidcalle_afk === afkthairus is now known as athairus === javiercrowsoft1 is now known as javiercrowsoft === javiercrowsoft1 is now known as javiercrowsoft === JanC is now known as Guest91547 === JanC_ is now known as JanC [20:14] kenvandine: are you about? [20:14] Dubstar_04, yup, what's up? [20:14] I was wondering if you could help me with some contenthub stuff? [20:15] sure [20:16] I would like to get the 'real' filename of the file being received in onImportRequested: [20:16] is that possible? [20:17] the transfer url seems to have extra formatting in. [20:17] what do you mean by "real" [20:17] it's just a QUrl [20:18] so the 'real' filename would be 'myawesomefile.ext' [20:18] ok [20:19] QUrl provides api for that kind of thing, but I don't think it's exposed via qml [20:19] the url.toString() gives the path to the file but the filename is /myawesomefile_-_3289892383879.ext [20:20] it would probably be safe to split on '/' an use the end [20:20] it would be cool if i could do url.fileName and i get the real filename [20:21] or transfer.items[i].fileName [20:21] the fileName is usually not very useful without the path [20:21] but i guess for display ? [20:22] I want to open the file in my app and display the correct name. the user can then save the file if they wish. [20:22] you could look at filemanager-app to see what they do for parsing paths/files [20:24] i could regex it but if some crazy person uses _-_ in the filename i could end up with all sorts of weird results? [20:24] it should be safe to just split on '/' [20:25] a filename won't have that [20:25] then use the last item in the array [20:26] this is the url file:///home/phablet/.cache/design.marthamengineering/HubIncoming/1/JamesLineCircle_-_360808331247353977.dxf [20:27] right [20:27] split('/') [20:27] the original filename was JamesLineCircle.dxf [20:27] oh... [20:28] contenthub didn't add the _-_360808331247353977 [20:28] oh [20:28] Dubstar_04, content-hub itself doesn't change the file name [20:28] the app creating the transfer must be [20:28] kenvandine: double oh [20:28] maybe this is coming from telegram then? [20:29] has to be [20:29] I have been sharing files using telegram and opening them from there. [20:29] content-hub isn't doing it [20:29] great!! simple solution. [20:29] :) [20:29] thanks. [20:29] next question; [20:29] np [20:30] do items clicked in the filetransfer indicator go through content hub? [20:30] Dubstar_04, depends :) [20:30] downloads from the browser? [20:30] Dubstar_04, the answer is not automatically [20:31] so i use downloadmanager to download a file. when its complete i want to click the item in the indicator, it opens my app but i dont know how to handle it. [20:32] no browser involved. [20:32] i think your app would need to create the transfer as well as the download and reference them [20:32] Elleo, ^^ [20:33] Dubstar_04, Elleo had done that work [20:33] the transfer object can have the download ID [20:33] * kenvandine doesn't remember how it works :) [20:34] Yeah its not clear in the docs and i can't find any examples. [20:34] i'm actually not sure if that is available in the QML API [20:34] it was done for the browser [20:47] kenvandine: thankyou. [20:47] Dubstar_04, sorry i couldn't help more, Elleo will be around in the morning [20:49] kenvandine: you have been a lot of help.