Package: orpheus
Version: 1.5-3
Severity: normal
Tags: patch

When orpheus is not playing, the command-line commando's '-r next' and
'-r prev' are not working. The reason for this is that currentrack is NULL.
Attached patch fixes this.

Thanks,
Taco.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13-1
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages orpheus depends on:
ii  libc6                         2.3.5-7    GNU C Library: Shared libraries an
ii  libgcc1                       1:4.0.2-2  GCC support library
ii  libghttp1                     1.0.9-16   original GNOME HTTP client library
ii  libncurses5                   5.5-1      Shared libraries for terminal hand
ii  libogg0                       1.1.2-1    Ogg Bitstream Library
ii  libstdc++6                    4.0.2-2    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

Versions of packages orpheus recommends:
ii  mpg321 [mpg123]               0.2.10.3   A Free command-line mp3 player, co
ii  vorbis-tools                  1.0.1-1.5  Several Ogg Vorbis Tools

-- no debconf information
diff -ur orpheus-1.5.debian/src/uitext.cc orpheus-1.5/src/uitext.cc
--- orpheus-1.5.debian/src/uitext.cc    2004-02-17 02:18:21.000000000 +0100
+++ orpheus-1.5/src/uitext.cc   2005-10-21 09:06:59.000000000 +0200
@@ -131,7 +131,12 @@
        playtrack(*(plist.begin()+k));
 
     } else {
-       OrpheusPlayList::iterator nt = find(plist.begin(), plist.end(), 
currenttrack);
+       OrpheusPlayList::iterator nt;
+       if ( !currenttrack ) {
+               nt = plist.begin()+trackm.getpos();
+       } else {
+               nt = find(plist.begin(), plist.end(), currenttrack);
+       }
 
        if(nt != plist.end()) {
            if(nt != plist.end() && ++nt != plist.end()) {
@@ -148,7 +153,11 @@
 void OrpheusTextUI::prevtrack() {
     OrpheusPlayList::iterator nt;
 
-    nt = find(plist.begin(), plist.end(), currenttrack);
+    if ( !currenttrack ) {
+       nt = plist.begin() + trackm.getpos();
+    } else {
+       nt = find(plist.begin(), plist.end(), currenttrack);
+    }
 
     if(nt != plist.end()) {
        if(nt != plist.begin()) {

Reply via email to