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