Resume on restart: Only seek into seekable files

This allows streams to be resumed from the beginning when restarting.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
CQTexperiment
Christopher Snowhill 2022-02-16 13:22:53 -08:00
parent 7f3bf052ca
commit c242d53200
1 changed files with 3 additions and 1 deletions

View File

@ -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 {