Only seek on restart if file is seekable
Do not restart from the last position if file isn't seekable. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
69506cd1d7
commit
d77a5472f3
1 changed files with 2 additions and 2 deletions
|
@ -757,11 +757,11 @@ NSDictionary *makeRGInfo(PlaylistEntry *pe) {
|
||||||
- (void)audioPlayer:(AudioPlayer *)player restartPlaybackAtCurrentPosition:(id)userInfo {
|
- (void)audioPlayer:(AudioPlayer *)player restartPlaybackAtCurrentPosition:(id)userInfo {
|
||||||
PlaylistEntry *pe = [playlistController currentEntry];
|
PlaylistEntry *pe = [playlistController currentEntry];
|
||||||
BOOL paused = playbackStatus == CogStatusPaused;
|
BOOL paused = playbackStatus == CogStatusPaused;
|
||||||
[player play:[pe URL] withUserInfo:pe withRGInfo:makeRGInfo(pe) startPaused:paused andSeekTo:[pe currentPosition]];
|
[player play:[pe URL] withUserInfo:pe withRGInfo:makeRGInfo(pe) startPaused:paused andSeekTo:[pe seekable] ? [pe currentPosition] : 0.0];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)audioPlayer:(AudioPlayer *)player pushInfo:(NSDictionary *)info toTrack:(id)userInfo {
|
- (void)audioPlayer:(AudioPlayer *)player pushInfo:(NSDictionary *)info toTrack:(id)userInfo {
|
||||||
PlaylistEntry *pe = (PlaylistEntry *)userInfo;
|
PlaylistEntry *pe = [playlistController currentEntry];
|
||||||
[pe setMetadata:info];
|
[pe setMetadata:info];
|
||||||
[playlistView refreshCurrentTrack:self];
|
[playlistView refreshCurrentTrack:self];
|
||||||
[self sendMetaData];
|
[self sendMetaData];
|
||||||
|
|
Loading…
Reference in a new issue