]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
play: Fix next and prev on singular playlists.
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 5 Sep 2014 23:20:55 +0000 (01:20 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 5 Sep 2014 23:25:14 +0000 (01:25 +0200)
The next and prev commands do not reset the file position if
the playlist consists of one file only. This fixes it.

play.c

diff --git a/play.c b/play.c
index 01125ab647f73482bb248ecdbaac2b8b2ad13021..18bfab98ca60a5e3982b6356c76fccc9650a20d8 100644 (file)
--- a/play.c
+++ b/play.c
@@ -860,6 +860,7 @@ static int com_prev(struct play_task *pt, int argc, __a_unused char **argv)
        kill_stream(pt);
        pt->next_file = ret;
        pt->rq = CRT_FILE_CHANGE;
        kill_stream(pt);
        pt->next_file = ret;
        pt->rq = CRT_FILE_CHANGE;
+       pt->start_chunk = 0;
        return 0;
 }
 
        return 0;
 }
 
@@ -875,6 +876,7 @@ static int com_next(struct play_task *pt, int argc, __a_unused char **argv)
        kill_stream(pt);
        pt->next_file = ret;
        pt->rq = CRT_FILE_CHANGE;
        kill_stream(pt);
        pt->next_file = ret;
        pt->rq = CRT_FILE_CHANGE;
+       pt->start_chunk = 0;
        return 0;
 }
 
        return 0;
 }