Skip to content

Commit

Permalink
chore: fix while loading playlists/album already playing ones doesn't…
Browse files Browse the repository at this point in the history
… get cleared
  • Loading branch information
KRTirtho committed Jul 6, 2024
1 parent 2f46fa3 commit 2ce4853
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/provider/audio_player/audio_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ class AudioPlayerNotifier extends Notifier<AudioPlayerState> {
await ref.read(sourcedTrackProvider(intendedActiveTrack).future);
}

if(medias.isEmpty) return;

await removeCollections(state.collections);

await audioPlayer.openPlaylist(
medias,
initialIndex: initialIndex,
Expand Down
2 changes: 1 addition & 1 deletion lib/provider/authentication/authentication.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class AuthenticationNotifier extends AsyncNotifier<AuthenticationTableData?> {

await database
.into(database.authenticationTable)
.insert(refreshedCredentials);
.insertOnConflictUpdate(refreshedCredentials);
}

Future<AuthenticationTableCompanion> credentialsFromCookie(
Expand Down

0 comments on commit 2ce4853

Please sign in to comment.