Bug 299434

Summary: When clicking Download in the Jamendo service, it should ask to use ktorrent or download directly to the collection
Product: [Applications] amarok Reporter: Emilio <periliocastrol>
Component: Services/JamendoAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: wishlist CC: myriam
Priority: NOR    
Version: unspecified   
Target Milestone: 2.6   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Emilio 2012-05-05 11:03:46 UTC
There are two ways to download an album from Jamendo within amarok:
1- Right clicking in the album and choosing Copy to Local Collection. This way the tracks are directly copied.
2- Clicking in the Download button located at the botton of the Jamendo service, so ktorrent is opened. I've been trying this method and ktorrent is unable to find seeders for most albums, so it is imposible to download them.

I think the first one is more direct and easy, so when clicking the Download button Amarok should offer what to do, or maybe there should be two buttons at the bottom, one to copy to the collection and a different one to use ktorrent.

Reproducible: Always

Steps to Reproduce:
1. Choose any album in Jamendo and click Download
2. It opens Ktorrent but there are no seeders so it cannot be downloaded.
3. If in the same album you make right click and choose Copy to local collection, the album is directly copied to the collection
Actual Results:  
Now, if you click download, it open Ktorrent inmediately but as there are no seeders the album is not downloadable.

Expected Results:  
As there are two ways of downloading the music, Amarok should ask which one the user want to use: ktorrent or copy to local collection. Maybe it should use two different buttons or a confirmation dialog.
Comment 1 Mark Kretschmann 2013-07-28 13:07:36 UTC
*** Bug 322389 has been marked as a duplicate of this bug. ***
Comment 2 Mark Kretschmann 2013-07-28 13:08:07 UTC
Does the API even allow direct download?
Comment 3 Myriam Schweingruber 2013-07-28 13:57:34 UTC
(In reply to comment #2)
> Does the API even allow direct download?

http://developer.jamendo.com/v3.0 doesn't seem to list any possibility to do a direct download, so torrent is OK. 
It does use ktorrent automatically it that is installed, so I guess we can close this bug as the API doesn't allow direct downloads.
Comment 4 Mark Kretschmann 2013-08-06 06:41:09 UTC
Wrong. Turns out that the API does indeed offer downloading the whole album in 192 kbps mp3 format:

http://developer.jamendo.com/v3.0/albums/file
Comment 5 Mark Kretschmann 2013-08-10 14:49:03 UTC
Git commit 324189ac00fdfb5dd70dffe398916f881a8f799d by Mark Kretschmann.
Committed on 07/08/2013 at 08:20.
Pushed by markey into branch 'master'.

Jamendo service: Use direct file download instead of BitTorrent.

When pressing the "Download" button in the Jamendo service, Amarok
would download a torrent file via deprecated API and then try to open
a torrent client for downloading the album. This was brittle and barely
ever worked as there are rarely any seeders and peers.

Now the download function uses the exact same code as the "Copy to
Collection" function, including the option to transcode on-the-fly.
DIGEST: Amarok now supports direct download of Jamendo albums instead
of downloading via BitTorrent. The download is now far more reliable, and
on-the-fly transcoding to other formats is possible.

M  +3    -0    ChangeLog
M  +33   -0    src/browsers/CollectionTreeView.cpp
M  +2    -0    src/browsers/CollectionTreeView.h
M  +2    -2    src/services/jamendo/JamendoDatabaseHandler.cpp
M  +2    -28   src/services/jamendo/JamendoMeta.cpp
M  +0    -8    src/services/jamendo/JamendoMeta.h
M  +5    -42   src/services/jamendo/JamendoService.cpp
M  +0    -3    src/services/jamendo/JamendoService.h
M  +0    -5    src/services/jamendo/JamendoXmlParser.cpp

http://commits.kde.org/amarok/324189ac00fdfb5dd70dffe398916f881a8f799d