fix: prevent async state and platform regressions

This commit is contained in:
edde746
2026-07-13 00:03:52 +02:00
parent 26d14f7cb0
commit e03edad824
77 changed files with 1210 additions and 270 deletions
+9 -1
View File
@@ -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') {