broken shutdown on finish playlist feature

everything about the next not so big update

Moderator: Moderator

User avatar
castorinop
veteran
Posts: 331
Joined: Wed Jun 07, 2006 6:34 pm
Location: Argentina
Contact:

broken shutdown on finish playlist feature

Postby castorinop » Tue Feb 06, 2007 2:19 pm

when enable "shutdown on finish" only reproduces a single track and stop.

Pablito

User avatar
arj
Site Admin
Posts: 2316
Joined: Thu Dec 01, 2005 8:51 pm
Location: Denmark
Contact:

Postby arj » Wed Feb 07, 2007 7:57 pm

Please some more details. Was this using a random mode? Did you start it on the last track of the playlist? The code looks ok.

User avatar
castorinop
veteran
Posts: 331
Joined: Wed Jun 07, 2006 6:34 pm
Location: Argentina
Contact:

Postby castorinop » Wed Feb 07, 2007 9:57 pm

Steps:
1 change to
repeat off
shutdown on
random off
2 add tracks to playlist
3 press play or enter
play only one track and stop.

the idea is when play all tracks of playlist begin the regresive count for shudown the machine.

Pablito

User avatar
castorinop
veteran
Posts: 331
Joined: Wed Jun 07, 2006 6:34 pm
Location: Argentina
Contact:

Postby castorinop » Wed Feb 14, 2007 2:32 pm

this patch and testing 1.0.9-patch-29.

Code: Select all

--- ../baz-mms-1.0.9/audio.cpp  2007-02-14 11:21:35.000000000 -0500
+++ audio.cpp   2007-02-14 11:01:56.000000000 -0500
@@ -3329,7 +3329,7 @@
 
       // random modes takes care of stopping when the last track has been played
       if ((opts.shuffle() == gettext("off") && audio_state->p->p_cur_nr() != playlist.back()) ||
-         opts.shuffle() != gettext("off") || conv::stob(opts.repeat()) ||
+         opts.shuffle() != gettext("off") || conv::stob(opts.repeat()) && !conv::stob(opts.shutdown()) ||
          audio_state->queue_size() > 0) {
        // next takes care of checking random modes
        audio_state->p->next();
--- ../baz-mms-1.0.9/player.cpp 2007-02-14 11:21:27.000000000 -0500
+++ player.cpp  2007-02-14 11:03:28.000000000 -0500
@@ -288,9 +288,7 @@
   if (!audio_state->p_playing())
     return;
     
-  if (audio_state->check_shutdown())
-    audio_state->set_playing(false);
-  else if (!audio_state->check_repeat())
+  if (!audio_state->check_repeat())
     audio_state->set_playing(false);
   
   if (audio_state->p_playing()) {
@@ -336,9 +334,7 @@
 
   if (audio->opts.shuffle() != gettext("off"))
   
-  if (audio_state->check_shutdown())
-       audio_state->set_playing(false);
-  else if (!audio_state->check_repeat())
+  if (!audio_state->check_repeat())
     audio_state->set_playing(false);


TEST:
1. -
shutdown on finish = no
repeat and random = any convination
result OK

2.-
shutdown on finish = yes
repeat = any convination
random = off
result OK, when finish the las track begin regressive count

3.-
shutdown on finish = yes
repeat = on
random = winamp
result FAIL. never stop.

4.-
shutdown on finish = yes
repeat = off
random = winamp
result FAIL. when play all tracks, music stop but not begin the regressive count.

others random modes.. I think that she must happen the same as winamp mode

Pablito

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Postby Uatschitchun » Wed Feb 14, 2007 5:33 pm

Using repeat=on would make me expect to never shut down cause there is no end in playing ...

Lg
Roman

User avatar
arj
Site Admin
Posts: 2316
Joined: Thu Dec 01, 2005 8:51 pm
Location: Denmark
Contact:

Postby arj » Wed Feb 14, 2007 8:11 pm

i have to agree with Roman on that one. I've applied the patch half-way so that it should do this now.

Thanks for the report and the patch!


Return to “1.0.9”

Who is online

Users browsing this forum: No registered users and 1 guest