Bug 562561

Summary: Exaile does not export playlists, default playlist filename not sensible
Product: [Fedora] Fedora Reporter: James <james>
Component: exaileAssignee: Deji Akingunola <dakingun>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dakingun, dmaphy
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: exaile-0.3.1.0-1.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-10 10:17:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Rough patch to fix playlist export bailing on getting track duration none

Description James 2010-02-07 12:25:22 UTC
Description of problem:
Attempting to export the current playlist in Exaile brings up a dialogue with default filename "Playlist %d.m3u" rather than a name matching that of the playlist's tab. Clicking "Save" in the dialogue results in:


Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/exaile/xlgui/__init__.py", line 201, in export_current_playlist
    _xpl.export_playlist(pl, path)
  File "/usr/lib/python2.6/site-packages/exaile/xl/playlist.py", line 368, in export_playlist
    return save_to_m3u(playlist, path)
  File "/usr/lib/python2.6/site-packages/exaile/xl/playlist.py", line 89, in save_to_m3u
    leng = round(float(track.get('__length', -1)))
AttributeError: 'Track' object has no attribute 'get'


and an empty file is written.

Version-Release number of selected component (if applicable):
exaile-0.3.0.2-1.fc13.noarch

How reproducible:
Always.

Steps to Reproduce:
1. Select a playlist from the tabs.
2. Choose File, Export Current Playlist.
3. Click OK in "Save As" dialogue.

Expected results:
Default playlist filename matches selected playlist tab.
Exaile writes a playlist.

Comment 1 James 2010-02-07 13:18:12 UTC
Created attachment 389379 [details]
Rough patch to fix playlist export bailing on getting track duration

This is a (rough) patch that fixes:

1. the problem of Exaile writing empty playlists by using track.get_duration() rather than track.get('__length', -1); and

2. playlist track title entries looking like [u'title'] as they've been written without any encoding. (m3u doesn't support UTF-8; I chose cp1252, but I'm not convinced about this; nevertheless, it happens to work.)

Comment 2 Deji Akingunola 2010-03-20 17:20:05 UTC
Thanks for the patch James. I think it has been 'fixed' differently in exaile-3.1.0, please test it.

Comment 3 Fedora Update System 2010-03-20 17:26:26 UTC
exaile-0.3.1.0-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/exaile-0.3.1.0-1.fc11

Comment 4 Fedora Update System 2010-03-20 17:27:29 UTC
exaile-0.3.1.0-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/exaile-0.3.1.0-1.fc12

Comment 5 Fedora Update System 2010-03-23 02:12:57 UTC
exaile-0.3.1.0-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update exaile'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/exaile-0.3.1.0-1.fc11

Comment 6 Fedora Update System 2010-03-23 02:16:35 UTC
exaile-0.3.1.0-1.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update exaile'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/exaile-0.3.1.0-1.fc12

Comment 7 James 2010-03-23 14:25:48 UTC
exaile-0.3.1.0-1.fc12  only fixes the first part of this bug. The name of the file and the one recorded internally in the playlist for new, un-renamed playlists still shows up as "Playlist %d" (the %d is unsubstituted).

Comment 8 Fedora Update System 2010-04-10 10:16:10 UTC
exaile-0.3.1.0-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2010-04-10 10:20:23 UTC
exaile-0.3.1.0-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 James 2010-04-13 13:23:13 UTC
This bug is still not completely fixed. The default filename for unrenamed playlists still shows up as "Playlist %d", without the correct replacement for the number.

exaile-0.3.1.0-1.fc12.noarch