If you change the playlist near the end of a song, it should now play the correct song.
parent
c96c3448d8
commit
fda5d50712
|
@ -72,6 +72,9 @@
|
|||
- (void)playEntryAtIndex:(int)i;
|
||||
- (void)playEntry:(PlaylistEntry *)pe;
|
||||
|
||||
// Playlist notifications
|
||||
- (void)playlistDidChange:(PlaylistController *)p;
|
||||
|
||||
// For bindings
|
||||
|
||||
- (void)setPosition:(double)p;
|
||||
|
|
|
@ -549,6 +549,11 @@
|
|||
playbackStatus = status;
|
||||
}
|
||||
|
||||
- (void)playlistDidChange:(PlaylistController *)p
|
||||
{
|
||||
[audioPlayer resetNextStreams];
|
||||
}
|
||||
|
||||
- (void)setPosition:(double)p
|
||||
{
|
||||
position = p;
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
|
||||
- (void)setNextStream:(NSURL *)url;
|
||||
- (void)setNextStream:(NSURL *)url withUserInfo:(id)userInfo;
|
||||
- (void)resetNextStreams;
|
||||
|
||||
+ (NSArray *)fileTypes;
|
||||
+ (NSArray *)schemes;
|
||||
|
@ -68,6 +69,7 @@
|
|||
|
||||
- (void)requestNextStream:(id)userInfo;
|
||||
- (void)requestNextStreamMainThread:(id)userInfo;
|
||||
|
||||
- (void)notifyStreamChanged:(id)userInfo;
|
||||
- (void)notifyStreamChangedMainThread:(id)userInfo;
|
||||
|
||||
|
|
|
@ -164,6 +164,16 @@
|
|||
|
||||
}
|
||||
|
||||
// Called when the playlist changed before we actually started playing a requested stream. We will re-request.
|
||||
- (void)resetNextStreams
|
||||
{
|
||||
@synchronized (chainQueue) {
|
||||
[chainQueue removeAllObjects];
|
||||
}
|
||||
|
||||
[self endOfInputReached:bufferChain];
|
||||
}
|
||||
|
||||
|
||||
- (void)setShouldContinue:(BOOL)s
|
||||
{
|
||||
|
|
|
@ -166,6 +166,8 @@
|
|||
if (lowerIndex != NSNotFound)
|
||||
index = lowerIndex;
|
||||
}
|
||||
|
||||
[playbackController playlistDidChange:self];
|
||||
}
|
||||
|
||||
- (BOOL)tableView:(NSTableView *)aTableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard
|
||||
|
@ -308,6 +310,8 @@
|
|||
|
||||
if ([self shuffle] == YES)
|
||||
[self resetShuffleList];
|
||||
|
||||
[playbackController playlistDidChange:self];
|
||||
}
|
||||
|
||||
- (void)setSortDescriptors:(NSArray *)sortDescriptors
|
||||
|
@ -326,6 +330,8 @@
|
|||
|
||||
[super setSortDescriptors:sortDescriptors];
|
||||
[self rearrangeObjects];
|
||||
|
||||
[playbackController playlistDidChange:self];
|
||||
}
|
||||
|
||||
- (IBAction)sortByPath
|
||||
|
|
Loading…
Reference in New Issue