From 6b23590ac89412fc56cd18bdc139e7cef0e8410c Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Wed, 26 Mar 2025 20:09:47 -0700 Subject: [PATCH] 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 --- Application/PlaybackController.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Application/PlaybackController.m b/Application/PlaybackController.m index 58503d61c..feff2f911 100644 --- a/Application/PlaybackController.m +++ b/Application/PlaybackController.m @@ -356,8 +356,12 @@ NSDictionary *makeRGInfo(PlaylistEntry *pe) { } - (IBAction)prev:(id)sender { - if([playlistController prev] == NO) - return; + double pos = [audioPlayer amountPlayed]; + + if(pos < 5.0) { + if([playlistController prev] == NO) + return; + } [self playEntry:[playlistController currentEntry]]; }