aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/playlist.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/playlist.c b/src/playlist.c
index 31dc31fc5..a18f85dee 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -1165,14 +1165,16 @@ int setPlaylistRandomStatus(FILE * fp, int status) {
}
int previousSongInPlaylist(FILE * fp) {
+ static time_t lastTime = 0;
+ time_t diff = time(NULL) - lastTime;
+
+ lastTime += diff;
+
if(playlist_state!=PLAYLIST_STATE_PLAY) return 0;
syncPlaylistWithQueue(0);
- if (getPlayerElapsedTime()>PLAYLIST_PREV_UNLESS_ELAPSED &&
- playlist.songs[playlist.order[playlist.current]]->type
- != SONG_TYPE_URL)
- {
+ if (diff && getPlayerElapsedTime() > PLAYLIST_PREV_UNLESS_ELAPSED) {
return playPlaylistOrderNumber(fp,playlist.current);
}
else {