Bug 799906 - Can't load XSPF playlist in amarok
Can't load XSPF playlist in amarok
Product: Fedora
Classification: Fedora
Component: amarok (Show other bugs)
i686 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Rex Dieter
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-03-05 06:54 EST by Ron Petrick
Modified: 2012-05-19 02:55 EDT (History)
3 users (show)

See Also:
Fixed In Version: amarok-2.5.0-8.fc16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-05-19 02:55:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Example XSPF playlist that won't load in amarok (299 bytes, application/xspf+xml)
2012-03-05 06:54 EST, Ron Petrick
no flags Details
Example PLS playlist with identical track that will load (150 bytes, audio/x-scpls)
2012-03-05 06:55 EST, Ron Petrick
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
KDE Software Compilation 295199 None None None Never

  None (edit)
Description Ron Petrick 2012-03-05 06:54:48 EST
Created attachment 567578 [details]
Example XSPF playlist that won't load in amarok

Description of problem:

I have an XSPF playlist that I'm unable to load in the latest version of Amarok (2.5.0-3). The playlist is correctly detected when I run "Update Collection" and appears under Media Sources Home->Playlists->Saved Playlists->Playlist Files on Disk. However, none of the tracks are actually shown when I try to expand the playlist, and I'm unable to move it to the main playlist frame. 

All the tracks are streams (from di.fm). A pls playlist with the same tracks works fine. I have a similar problem if I try to load the playlist directly using Playlist->Add Media, however, the listed streams load fine if I enter the stream addresses directly using Playlist->Add Stream.

I can confirm the problem on three seaparate systems running Fedora 16 (not all mine).

Version-Release number of selected component (if applicable):

(Also tested on binary built from 2.5-git source)

How reproducible:


Steps to Reproduce:
1. Add the playlist to the collection
2. Go to Media Sources Home->Playlists->Saved Playlists->Playlist Files on Disk
3. Select the playlist and try dragging it to the main playlist

Alternatively, select the playlist through Playlist->Add Media.
Actual results:

Nothing happens.

Expected results:

The tracks listed in the playlist should appear in the main playlist.

Additional info:

I've attached a minimal playlist which demonstrates the problem.

I also filed this bug with upstream but they can't confirm it: https://bugs.kde.org/show_bug.cgi?id=295199

After some looking at the 2.5/2.5-git source code I tracked my problem to the file src/core-impl/playlists/types/file/xspf/XSPFPlaylist.cpp and the triggerTrackLoad() method. The problem seems to be in the code block at line 259:

if( trackPtr )
   * NOTE: If this is a MetaProxy::Track, it probably isn't playable yet,
   *       but that's okay. However, it's not a good idea to get another
   *       one from the same provider, since the proxy probably means that
   *       making one involves quite a bit of work.
   *         - Andy Coder <andrew.coder@gmail.com>
   if( !trackPtr->isPlayable() && ( typeid( * trackPtr.data() ) != typeid( MetaProxy::Track ) ) )
       trackPtr = CollectionManager::instance()->trackForUrl( track.identifier );

Coming into this block, trackPtr is non-null and "if (trackPtr)" succeeds, as does the second "if", triggering an update to trackPtr. When it leaves this block, trackPtr is null. If I comment out the "trackPtr = collectionManager..." line, the streams load and play fine.

I don't know exactly what's going on here and why this is a problem for me but not for upstream. I'm hoping someone else can confirm the problem.
Comment 1 Ron Petrick 2012-03-05 06:55:34 EST
Created attachment 567579 [details]
Example PLS playlist with identical track that will load
Comment 2 Rex Dieter 2012-03-06 08:29:31 EST
I can reproduce on f17 too.  interesting.
Comment 3 Fedora Update System 2012-05-07 08:36:43 EDT
amarok-2.5.0-8.fc16 has been submitted as an update for Fedora 16.
Comment 4 Fedora Update System 2012-05-10 10:25:58 EDT
Package amarok-2.5.0-8.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing amarok-2.5.0-8.fc16'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2012-05-19 02:55:26 EDT
amarok-2.5.0-8.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.