forked from len0rd/rockbox
Don't update runtime info when stopping playback, except when playlist ends. Fixes wrong playcounts and autoscores being generated.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12976 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1088f695a2
commit
ce35f76a53
1 changed files with 13 additions and 6 deletions
|
@ -2081,8 +2081,8 @@ static void codec_thread(void)
|
|||
|
||||
if (!codec_load_next_track())
|
||||
{
|
||||
// queue_post(&codec_queue, Q_AUDIO_STOP, 0);
|
||||
LOGFQUEUE("codec > audio Q_AUDIO_STOP");
|
||||
/* End of playlist */
|
||||
queue_post(&audio_queue, Q_AUDIO_STOP, 0);
|
||||
break;
|
||||
}
|
||||
|
@ -2101,6 +2101,7 @@ static void codec_thread(void)
|
|||
sleep(1);
|
||||
}
|
||||
LOGFQUEUE("codec > audio Q_AUDIO_STOP");
|
||||
/* End of playlist */
|
||||
queue_post(&audio_queue, Q_AUDIO_STOP, 0);
|
||||
break;
|
||||
}
|
||||
|
@ -3296,11 +3297,17 @@ static void audio_stop_playback(void)
|
|||
playlist_update_resume_info(
|
||||
(playlist_end && ci.stop_codec)?NULL:audio_current_track());
|
||||
|
||||
/* inc index so runtime info is saved in audio_clear_track_entries() */
|
||||
/* done here, as audio_stop_playback() may be called more than once */
|
||||
/* Increment index so runtime info is saved in audio_clear_track_entries().
|
||||
* Done here, as audio_stop_playback() may be called more than once.
|
||||
* Don't update runtime unless playback is stopped because of end of playlist.
|
||||
* Updating runtime when manually stopping a tracks, can destroy autoscores
|
||||
* and playcounts.
|
||||
*/
|
||||
if (playlist_end)
|
||||
{
|
||||
track_ridx++;
|
||||
track_ridx &= MAX_TRACK_MASK;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
filling = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue