Package: quodlibet-plugins
Version: 20051218-1
Severity: normal
Tags: patch

If you have the random album plugin enabled, you're in the album view,
and you ask for one-song playback, quodlibet finishes the current song
(if any) and then proceeds to play track 1 of a random album.  When that
track finishes, it will play track 1 of a different random album, and so
on forever.  This is not what the user wants when they select one-song
mode.

The cause is, the random album plugin assumes that if quodlibet stops
(song_started event with None for the song) it is because it reached
the end of the album.  With one-song play mode, that assumption is
not true.  A straightforward fix is below: it checks whether we are
in one-song mode and does not select a new random albom if so.

(If quodlibet ever grows a true 'stop' control, the plugin will again
have to be revised, but for now, I believe there are no other cases
to consider.)

zw

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.15-1-686-smp
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages quodlibet-plugins depends on:
ii  python                        2.3.5-5    An interactive high-level object-o
ii  quodlibet                     0.17.1-2   audio library manager and player f

quodlibet-plugins recommends no packages.

-- no debconf information

-- Patch:
--- plugins/randomalbum.py.bug  2006-01-21 19:54:38.000000000 -0800
+++ plugins/randomalbum.py      2006-01-21 19:55:28.000000000 -0800
@@ -8,6 +8,7 @@
 
 import gobject
 import library, player
+import config
 from widgets import widgets
 
 class RandomAlbum(object):
@@ -18,7 +19,8 @@ class RandomAlbum(object):
     PLUGIN_VERSION = '0.13'
 
     def plugin_on_song_started(self, song):
-        if song is None:
+        if (song is None
+            and config.get("memory", "order") != "onesong"):
             browser = widgets.main.browser
             album = library.library.random("album")
             if browser.can_filter('album') and album:


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to