Package: madman
Version: 0.93.0-3.1
Severity: wishlist
Tags: patch

When listening to madman for long periods of time, having to click the auto dj
command every so often is annoying. Of course you can click it many times
initially, but then you get repeated selections because it is oblivious to what
it just now added to the queue, and the recently played rules are otherwise
very good. So I thought it ought to be able to add songs to the playlist
whenever it is about to run out, and thus theoretically keep going forever.

Here is a patch which does that all the time, better would be to have a
checkbox just above the rule customisations in prefs, "add 20 more songs when
the last track starts". Probably should be off by default. Or even better,
"always keep at least [ 20] songs ahead of the current one (0 for off)" (number
configurable) so you can bump things up the queue if you want. I'll add such a
thing if I get time, but for now, here is what I'm running, because it works
for me.

diff -Naur madman-0.93.0-clean/ui/mainwin.cpp madman-0.93.0/ui/mainwin.cpp
--- madman-0.93.0-clean/ui/mainwin.cpp  2004-05-20 15:03:14.000000000 +0100
+++ madman-0.93.0/ui/mainwin.cpp        2005-05-20 00:15:56.706493310 +0100
@@ -291,6 +291,8 @@
       this, SLOT(songOrStateChanged()));
   connect(&Preferences.Player, SIGNAL(stateChanged()), 
       this, SLOT(updatePlayerStatus()));
+  connect(&Preferences.Player, SIGNAL(lastSongStarted()), 
+      &SearchViewManager, SLOT(slotAutoDJ()));
 
   realizeSystemTrayIconSettings();
   realizeHttpdSettings();
diff -Naur madman-0.93.0-clean/utility/player.cpp 
madman-0.93.0/utility/player.cpp
--- madman-0.93.0-clean/utility/player.cpp      2004-05-20 15:03:13.000000000 
+0100
+++ madman-0.93.0/utility/player.cpp    2005-05-19 23:54:59.610666975 +0100
@@ -59,6 +59,7 @@
   {
     connect(Backend.get(), SIGNAL(currentSongChanged()), this, 
SLOT(slotCurrentSongChanged()));
     connect(Backend.get(), SIGNAL(stateChanged()), this, 
SLOT(slotStateChanged()));
+    connect(Backend.get(), SIGNAL(lastSongStarted()), this, 
SLOT(slotLastSongStarted()));
   }
 }
 
@@ -157,6 +158,10 @@
 {
   emit stateChanged();
 }
+void tPlayerFacade::slotLastSongStarted()
+{
+  emit lastSongStarted();
+}
 
 
 
diff -Naur madman-0.93.0-clean/utility/player.h madman-0.93.0/utility/player.h
--- madman-0.93.0-clean/utility/player.h        2004-05-20 15:03:13.000000000 
+0100
+++ madman-0.93.0/utility/player.h      2005-05-19 23:55:16.002465562 +0100
@@ -60,6 +60,7 @@
   signals:
     void currentSongChanged();
     void stateChanged();
+    void lastSongStarted();
 };
 
 
@@ -98,6 +99,7 @@
   protected slots:
     void slotCurrentSongChanged();
     void slotStateChanged();
+    void slotLastSongStarted();
 };
 
 
diff -Naur madman-0.93.0-clean/utility/player_xmms.cpp 
madman-0.93.0/utility/player_xmms.cpp
--- madman-0.93.0-clean/utility/player_xmms.cpp 2004-05-20 15:03:13.000000000 
+0100
+++ madman-0.93.0/utility/player_xmms.cpp       2005-05-20 00:16:20.905810730 
+0100
@@ -237,6 +237,8 @@
   {
     CurrentSongFilename = song_file;
     emit currentSongChanged();
+    if (xmms_remote_get_playlist_pos(Session) == 
xmms_remote_get_playlist_length(Session) - 1)
+      emit lastSongStarted();
   }
 }
 

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-rc1
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages madman depends on:
ii  libc6               2.3.5-1              GNU C Library: Shared libraries an
ii  libgcc1             1:3.4.3-13           GCC support library
ii  libglib1.2          1.2.10-10            The GLib library of C routines
ii  libgtk1.2           1.2.10-17            The GIMP Toolkit set of widgets fo
ii  libid3tag0          0.15.1b-6            ID3 tag reading library from the M
ii  libogg0             1.1.2-1              Ogg Bitstream Library
ii  libqt3c102-mt       3:3.3.4-3            Qt GUI Library (Threaded runtime v
ii  libstdc++5          1:3.3.6-5            The GNU Standard C++ Library v3
ii  libvorbis0a         1.1.0-1              The Vorbis General Audio Compressi
ii  libvorbisfile3      1.1.0-1              The Vorbis General Audio Compressi
ii  libx11-6            4.3.0.dfsg.1-13      X Window System protocol client li
ii  libxext6            4.3.0.dfsg.1-13      X Window System miscellaneous exte
ii  libxi6              4.3.0.dfsg.1-13      X Window System Input extension li
ii  xlibs               4.3.0.dfsg.1-13      X Keyboard Extension (XKB) configu
ii  xmms                1.2.10+cvs20050509-1 Versatile X audio player that look
ii  zlib1g              1:1.2.2-4            compression library - runtime

-- no debconf information


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

Reply via email to