fix: track stops at last second

This commit is contained in:
Kingkor Roy Tirtho 2023-06-30 12:10:25 +06:00
parent 0cfe430e27
commit f554f6d43b
2 changed files with 10 additions and 9 deletions

View File

@ -138,6 +138,7 @@ class SyncedLyrics extends HookConsumerWidget {
: FontWeight.normal,
fontSize: (isActive ? 28 : 26) *
(textZoomLevel.value / 100),
shadows: kElevationToShadow[9],
),
child: Text(
lyricSlice.text,

View File

@ -141,6 +141,15 @@ class ProxyPlaylistNotifier extends PersistedStateNotifier<ProxyPlaylist>
}
}
if (oldTrack != null && track != null) {
await storeTrack(
oldTrack,
track,
);
}
} finally {
isPreSearching = false;
/// Sometimes fetching can take a lot of time, so we need to check
/// if next source is playable or not at 99% progress. If not, then
/// it'll be paused automatically
@ -151,15 +160,6 @@ class ProxyPlaylistNotifier extends PersistedStateNotifier<ProxyPlaylist>
if (audioPlayer.isPaused) {
await audioPlayer.resume();
}
if (oldTrack != null && track != null) {
await storeTrack(
oldTrack,
track,
);
}
} finally {
isPreSearching = false;
}
}