Play Control: Previous track now also restarts

If the current track has played for more than 5 seconds, previous track
now restarts the current track, instead of jumping back to the previous
track.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2025-03-26 20:09:47 -07:00
parent 954cfa02d9
commit 355bdf8616

View file

@ -356,8 +356,12 @@ NSDictionary *makeRGInfo(PlaylistEntry *pe) {
} }
- (IBAction)prev:(id)sender { - (IBAction)prev:(id)sender {
if([playlistController prev] == NO) double pos = [audioPlayer amountPlayed];
return;
if(pos < 5.0) {
if([playlistController prev] == NO)
return;
}
[self playEntry:[playlistController currentEntry]]; [self playEntry:[playlistController currentEntry]];
} }