fix: prevent async state and platform regressions
This commit is contained in:
@@ -459,10 +459,18 @@ class PlayerNative extends PlayerBase {
|
||||
_armedNextUri = null;
|
||||
_armedNextFd = null;
|
||||
appLogger.d('MPV-audio: armed entry advanced → playlist-remove 0, ${_uriTail(uri ?? '')}');
|
||||
unawaited(command(['playlist-remove', '0']));
|
||||
unawaited(_removeSpentPlaylistEntry());
|
||||
if (uri != null) trackTransitionController.add(uri);
|
||||
}
|
||||
|
||||
Future<void> _removeSpentPlaylistEntry() async {
|
||||
try {
|
||||
await command(['playlist-remove', '0']);
|
||||
} catch (error, stackTrace) {
|
||||
appLogger.w('MPV-audio: failed to remove spent playlist entry', error: error, stackTrace: stackTrace);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void handlePropertyChange(String name, dynamic value) {
|
||||
if (audioOnly && name == 'playlist-pos') {
|
||||
|
||||
Reference in New Issue
Block a user