mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
fix: error log
This commit is contained in:
parent
94017189c6
commit
e3d8239b9f
@ -216,35 +216,29 @@ class ProxyPlaylistNotifier extends PersistedStateNotifier<ProxyPlaylist>
|
||||
int initialIndex = 0,
|
||||
bool autoPlay = false,
|
||||
}) async {
|
||||
try {
|
||||
tracks = blacklist.filter(tracks).toList() as List<Track>;
|
||||
final addableTrack = await SpotubeTrack.fetchFromTrack(
|
||||
tracks.elementAt(initialIndex),
|
||||
preferences,
|
||||
);
|
||||
tracks = blacklist.filter(tracks).toList() as List<Track>;
|
||||
final addableTrack = await SpotubeTrack.fetchFromTrack(
|
||||
tracks.elementAt(initialIndex),
|
||||
preferences,
|
||||
);
|
||||
|
||||
print('addableTrack: $addableTrack');
|
||||
state = state.copyWith(
|
||||
tracks: mergeTracks([addableTrack], tracks),
|
||||
active: initialIndex,
|
||||
);
|
||||
|
||||
state = state.copyWith(
|
||||
tracks: mergeTracks([addableTrack], tracks),
|
||||
active: initialIndex,
|
||||
);
|
||||
await notificationService.addTrack(addableTrack);
|
||||
|
||||
await notificationService.addTrack(addableTrack);
|
||||
await audioPlayer.openPlaylist(
|
||||
state.tracks.map(makeAppropriateSource).toList(),
|
||||
initialIndex: initialIndex,
|
||||
autoPlay: autoPlay,
|
||||
);
|
||||
|
||||
await audioPlayer.openPlaylist(
|
||||
state.tracks.map(makeAppropriateSource).toList(),
|
||||
initialIndex: initialIndex,
|
||||
autoPlay: autoPlay,
|
||||
);
|
||||
|
||||
await storeTrack(
|
||||
tracks.elementAt(initialIndex),
|
||||
addableTrack,
|
||||
);
|
||||
} catch (e) {
|
||||
print('Error: $e');
|
||||
}
|
||||
await storeTrack(
|
||||
tracks.elementAt(initialIndex),
|
||||
addableTrack,
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> jumpTo(int index) async {
|
||||
|
Loading…
Reference in New Issue
Block a user