diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playback.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/apps/playback.c b/apps/playback.c index 1101517aef..b145823485 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -244,7 +244,6 @@ static enum filling_state filling; | |||
244 | /* Track change controls */ | 244 | /* Track change controls */ |
245 | static bool automatic_skip = false; /* Who initiated in-progress skip? (C/A-) */ | 245 | static bool automatic_skip = false; /* Who initiated in-progress skip? (C/A-) */ |
246 | static bool playlist_end = false; /* Has the current playlist ended? (A) */ | 246 | static bool playlist_end = false; /* Has the current playlist ended? (A) */ |
247 | static bool auto_dir_skip = false; /* Have we changed dirs automatically? */ | ||
248 | static bool dir_skip = false; /* Is a directory skip pending? (A) */ | 247 | static bool dir_skip = false; /* Is a directory skip pending? (A) */ |
249 | static bool new_playlist = false; /* Are we starting a new playlist? (A) */ | 248 | static bool new_playlist = false; /* Are we starting a new playlist? (A) */ |
250 | static int wps_offset = 0; /* Pending track change offset, to keep WPS responsive (A) */ | 249 | static int wps_offset = 0; /* Pending track change offset, to keep WPS responsive (A) */ |
@@ -680,8 +679,6 @@ static void audio_skip(int direction) | |||
680 | queue_post(&audio_queue, Q_AUDIO_SKIP, direction); | 679 | queue_post(&audio_queue, Q_AUDIO_SKIP, direction); |
681 | /* Update wps while our message travels inside deep playback queues. */ | 680 | /* Update wps while our message travels inside deep playback queues. */ |
682 | wps_offset += direction; | 681 | wps_offset += direction; |
683 | /* Immediately update the playlist index */ | ||
684 | playlist_next(direction); | ||
685 | track_changed = true; | 682 | track_changed = true; |
686 | } | 683 | } |
687 | else | 684 | else |
@@ -1856,7 +1853,6 @@ static int audio_check_new_track(void) | |||
1856 | int old_track_ridx = track_ridx; | 1853 | int old_track_ridx = track_ridx; |
1857 | int i, idx; | 1854 | int i, idx; |
1858 | bool forward; | 1855 | bool forward; |
1859 | bool end_of_playlist; /* Temporary flag, not the same as playlist_end */ | ||
1860 | 1856 | ||
1861 | /* Now it's good time to send track finish events. */ | 1857 | /* Now it's good time to send track finish events. */ |
1862 | send_event(PLAYBACK_EVENT_TRACK_FINISH, &curtrack_id3); | 1858 | send_event(PLAYBACK_EVENT_TRACK_FINISH, &curtrack_id3); |
@@ -1879,9 +1875,6 @@ static int audio_check_new_track(void) | |||
1879 | if (new_playlist) | 1875 | if (new_playlist) |
1880 | ci.new_track = 0; | 1876 | ci.new_track = 0; |
1881 | 1877 | ||
1882 | end_of_playlist = !playlist_checkend(automatic_skip ? ci.new_track : 0); | ||
1883 | auto_dir_skip = end_of_playlist && global_settings.next_folder; | ||
1884 | |||
1885 | /* If the playlist isn't that big */ | 1878 | /* If the playlist isn't that big */ |
1886 | if (automatic_skip) | 1879 | if (automatic_skip) |
1887 | { | 1880 | { |
@@ -1899,15 +1892,10 @@ static int audio_check_new_track(void) | |||
1899 | /* Update the playlist */ | 1892 | /* Update the playlist */ |
1900 | last_peek_offset -= ci.new_track; | 1893 | last_peek_offset -= ci.new_track; |
1901 | 1894 | ||
1902 | if (auto_dir_skip) | 1895 | if (playlist_next(ci.new_track) < 0) |
1903 | { | 1896 | { |
1904 | /* If the track change was the result of an auto dir skip, | 1897 | LOGFQUEUE("audio >|= codec Q_CODEC_REQUEST_FAILED"); |
1905 | we need to update the playlist now */ | 1898 | return Q_CODEC_REQUEST_FAILED; |
1906 | if (playlist_next(ci.new_track) < 0) | ||
1907 | { | ||
1908 | LOGFQUEUE("audio >|= codec Q_CODEC_REQUEST_FAILED"); | ||
1909 | return Q_CODEC_REQUEST_FAILED; | ||
1910 | } | ||
1911 | } | 1899 | } |
1912 | 1900 | ||
1913 | if (new_playlist) | 1901 | if (new_playlist) |
@@ -2203,15 +2191,10 @@ static void audio_finalise_track_change(void) | |||
2203 | 2191 | ||
2204 | if (automatic_skip) | 2192 | if (automatic_skip) |
2205 | { | 2193 | { |
2206 | if (!auto_dir_skip) | ||
2207 | playlist_next(-wps_offset); | ||
2208 | |||
2209 | wps_offset = 0; | 2194 | wps_offset = 0; |
2210 | automatic_skip = false; | 2195 | automatic_skip = false; |
2211 | } | 2196 | } |
2212 | 2197 | ||
2213 | auto_dir_skip = false; | ||
2214 | |||
2215 | /* Invalidate prevtrack_id3 */ | 2198 | /* Invalidate prevtrack_id3 */ |
2216 | prevtrack_id3.path[0] = 0; | 2199 | prevtrack_id3.path[0] = 0; |
2217 | 2200 | ||