Modified:
trunk/quodlibet_autoqueue.py
Log:
don't return different versions of songs when searching (i.e. live
versions/remixes.)
Modified: trunk/quodlibet_autoqueue.py
==============================================================================
--- trunk/quodlibet_autoqueue.py (original)
+++ trunk/quodlibet_autoqueue.py Fri May 29 03:05:52 2009
@@ -233,10 +233,9 @@
def player_construct_track_search(self, artist, title,
restrictions=None):
"""construct a search that looks for songs with this artist
and title"""
- search = '&(artist = "%s", title = "%s")' % (
- escape(artist), escape(title))
- versioned = ""
if "(" in title:
+ search = '&(artist = "%s", title = "%s")' % (
+ escape(artist), escape(title))
split = title.split("(")
if not split[0]:
# (something) title [(version)]
@@ -250,8 +249,11 @@
escape(artist),
escape(vtitle),
escape(version))
- if versioned:
search = "|(%s, %s)" % (search, versioned)
+ else:
+ search = '&(artist = "%s", title = "%s", version="")' % (
+ escape(artist), escape(title))
+ versioned = ""
if restrictions:
search = "&(%s, %s)" % (search, restrictions)
return search