Re: Triggering Copy to Collection from within a Service
Magnatune album downloader also does a lot of work on its own. Probably it would be a good idea to generalize it as well? A small caveat, though: magnatune albums are apparently zip-archives, not just track files. -- Edward "Hades" Toroshchin dr_lepper on irc.freenode.org ___ Amarok-devel mailing list Amarok-devel@kde.org https://mail.kde.org/mailman/listinfo/amarok-devel
Re: Triggering Copy to Collection from within a Service
On 9. 8. 2013 Mark Kretschmann wrote: > Heya, > > the Jamendo service has a "Download" button that currently triggers > the download of a torrent file, and then starts a bittorrent > application (if present) to download an album. However, this function > uses a deprecated API from Jamendo, and what's worse, it barely ever > works because there are no seeders. > > Jamendo however also allows direct download of tracks. As I was > starting to implement this, I found out that the "Copy to Collection" > feature does exactly that, and it also supports Amarok's progress > logger system, and transcoding. So I want to use this same feature for > the Download function as well, but of course I'd rather do it without > duplicating the code. > > Can I trigger Copy to Collection from within the service in a clean way? I don't think we have something generic enough. See CollectionTreeView.cpp around 257 and FileView.cpp around 101. Perhaps these are candidates for some deduplication and some shared helper methods? Matěj ___ Amarok-devel mailing list Amarok-devel@kde.org https://mail.kde.org/mailman/listinfo/amarok-devel
Triggering Copy to Collection from within a Service
Heya, the Jamendo service has a "Download" button that currently triggers the download of a torrent file, and then starts a bittorrent application (if present) to download an album. However, this function uses a deprecated API from Jamendo, and what's worse, it barely ever works because there are no seeders. Jamendo however also allows direct download of tracks. As I was starting to implement this, I found out that the "Copy to Collection" feature does exactly that, and it also supports Amarok's progress logger system, and transcoding. So I want to use this same feature for the Download function as well, but of course I'd rather do it without duplicating the code. Can I trigger Copy to Collection from within the service in a clean way? -- Mark Kretschmann Amarok Developer Fellow of the Free Software Foundation Europe http://amarok.kde.org - http://fsfe.org ___ Amarok-devel mailing list Amarok-devel@kde.org https://mail.kde.org/mailman/listinfo/amarok-devel