feat: playback queue, preview exclusivity, player bug fixes

- PlaybackController with queue methods for albums/library/playlists
- Library tab play builds merged queue (downloaded + local together)
- Preview vs main player exclusivity
- Preview stops on bottom-nav tab switch
- Duration 0:00 fix, deleted track cleanup, Up Next sheet
- Animation utilities improvements
This commit is contained in:
zarzet
2026-06-28 22:22:51 +07:00
parent 3a2481e8b2
commit 12fb942f16
10 changed files with 585 additions and 101 deletions
+3
View File
@@ -2,6 +2,7 @@ import 'dart:io';
import 'package:open_filex/open_filex.dart';
import 'package:path_provider/path_provider.dart';
import 'package:spotiflac_android/services/music_player_service.dart';
import 'package:spotiflac_android/services/platform_bridge.dart';
import 'package:spotiflac_android/utils/mime_utils.dart';
@@ -279,11 +280,13 @@ Future<void> deleteFile(String? path) async {
if (isCueVirtualPath(path)) return;
if (isContentUri(path)) {
await PlatformBridge.safDelete(path);
await musicPlayerHandler?.onSourceDeleted(path);
return;
}
try {
await File(path).delete();
} catch (_) {}
await musicPlayerHandler?.onSourceDeleted(path);
}
Future<FileAccessStat?> fileStat(String? path) async {