From c242d53200dd828fd72285a47b62c9b23325d4b9 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Wed, 16 Feb 2022 13:22:53 -0800 Subject: [PATCH] Resume on restart: Only seek into seekable files This allows streams to be resumed from the beginning when restarting. Signed-off-by: Christopher Snowhill --- Application/PlaybackController.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Application/PlaybackController.m b/Application/PlaybackController.m index 0141b5a14..e128078f0 100644 --- a/Application/PlaybackController.m +++ b/Application/PlaybackController.m @@ -210,7 +210,9 @@ NSDictionary *makeRGInfo(PlaylistEntry *pe) { [self sendMetaData]; - [audioPlayer play:[pe URL] withUserInfo:pe withRGInfo:makeRGInfo(pe) startPaused:paused andSeekTo:[offset doubleValue]]; + double seekTime = [pe seekable] ? [offset doubleValue] : 0.0; + + [audioPlayer play:[pe URL] withUserInfo:pe withRGInfo:makeRGInfo(pe) startPaused:paused andSeekTo:seekTime]; } - (IBAction)next:(id)sender {