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