Add a bodge so playback status bar doesn't pop in and out repeatedly on manual track changes

CQTexperiment
Christopher Snowhill 2021-01-06 00:39:12 -08:00
parent 002fa3b63e
commit 97fee7e486
3 changed files with 11 additions and 1 deletions

View File

@ -590,6 +590,14 @@ NSDictionary * makeRGInfo(PlaylistEntry *pe)
DLog(@"PLAYING!");
[self setSeekable:YES];
}
if (status == kCogStatusStopped) {
status = kCogStatusStopping;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 3 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
if ([self playbackStatus] == kCogStatusStopping)
[self setPlaybackStatus:kCogStatusStopped];
});
}
[self setPlaybackStatus:status];
}

View File

@ -12,4 +12,5 @@ enum
kCogStatusStopped = 0,
kCogStatusPaused,
kCogStatusPlaying,
kCogStatusStopping,
};

View File

@ -21,7 +21,8 @@ class PlaybackStatusToHiddenTransformer : ValueTransformer {
case kCogStatusStopped as Int:
return true
case kCogStatusPaused as Int,
kCogStatusPlaying as Int:
kCogStatusPlaying as Int,
kCogStatusStopping as Int:
return false
case .none:
return true