Rules for smart playlists do not recognize special characters

Bug #779319 reported by Vincent Cheng
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Exaile
Fix Released
Low
Dustin Spicuzza

Bug Description

This bug was reported by a Debian user on Debian's BTS (see http://bugs.debian.org/622994):

I have a smart playlist to play random tracks from my collection, but exclude
some folders. One of the folders includes special characters (Hörspiele), but
tracks from that folder appear in the playlist.

I have verified, that I can not create a smart playlist to use only tracks from
that folder, but it works with other folders, e.g. it is possible to create a
playlist playing random tracks from the folder "Dj Mixes".

The complete rule reads

"Location" "does not contain" "Hörspiele"

This appeard after upgrading exaile from stable (0.2.14+debian-2.3) to
testing(0.3.2.0-0.1), my filesystem is ext4, locale is de_DE.UTF-8.

The file

~/.local/share/exaile/smart_playlists/name_of_playlist.playlist

prints the rule when viewing with less as

aVH<F6>rspiele

when editing with vim as

aVHörspiele

I have not set any encoding parameters in ~/.vimrc

Related branches

Revision history for this message
Thomas Mayer (elvett-semic) wrote :

Hello,

I am the original reporter of the issue.

I have no experience in Python, but I think this info may be of interest to the developers:

I have just checked out the code from Bazaar

and inserted some prints in it, i.e.:
exaile/xl/playlist.py line 1527: print "search string: %s" % search_string
exaile/xl/trax.py line 354: print "tokens: %s" % tokens

Here is the output of these prints
search_string: ! __loc="Hörspiele"
tokens: ['', u'!', u'__loc=H\xf6rspiele']

Output from bzr version-info:
revision-id: <email address hidden>
date: 2011-05-13 19:52:50 +0200
build-date: 2011-05-13 23:26:28 +0200
revno: 3833
branch-nick: exaile-0.3.x

I hope this helps,
Thomas

Revision history for this message
Thomas Mayer (elvett-semic) wrote :

Forget my comment, "u" is indicating a unicode string.

Sorry for the noise.

Revision history for this message
Justin R. Stout (justinrstout) wrote :

The problem is that the file path strings that Exaile searches are not formatted correctly. This patch should fix it.

Changed in exaile:
status: New → Confirmed
Revision history for this message
Dustin Spicuzza (dustin-virtualroadside) wrote :

I applied Justin's patch, and it doesn't seem to break anything. I tried creating a directory with that name, but it didn't fix the problem -- but I'm testing on OSX. I suspect that with the right locale settings and a bit of luck, this will fix the problem. Until we move to python 3 + GTK3 I suspect we won't have an ultimate fix.

Additionally, the unquote fixes things like having spaces in the filename.

Let me know if this works for you. Committed in r4474.

Changed in exaile:
assignee: nobody → Dustin Spicuzza (dustin-virtualroadside)
milestone: none → 3.4.0
status: Confirmed → Fix Committed
importance: Undecided → Low
Revision history for this message
Rocco Aliberti (eri.trabiccolo) wrote :
Revision history for this message
Dustin Spicuzza (dustin-virtualroadside) wrote :

I re-fixed this issue in r4495. Instead of doing the unquote in the search function, I do quote/unquote in the Smart Playlist editor for the location tag. This means any currently existing smart playlists will not be affected by this fix. If you want to use the improved fix, then the Smart Playlist will need to be edited to get the new changes.

Changed in exaile:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.