mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05:18 +00:00
fix: avoid sponsor block for first few seconds to not break the stream
This commit is contained in:
parent
dfd60bd4cc
commit
1431472f07
@ -140,6 +140,8 @@ class ProxyPlaylistNotifier extends PersistedStateNotifier<ProxyPlaylist>
|
|||||||
bool isFetchingSegments = false;
|
bool isFetchingSegments = false;
|
||||||
|
|
||||||
audioPlayer.positionStream.listen((position) async {
|
audioPlayer.positionStream.listen((position) async {
|
||||||
|
// skipping in very first second breaks stream
|
||||||
|
if (position < const Duration(seconds: 3)) return;
|
||||||
if ((preferences.youtubeApiType == YoutubeApiType.piped &&
|
if ((preferences.youtubeApiType == YoutubeApiType.piped &&
|
||||||
preferences.searchMode == SearchMode.youtubeMusic) ||
|
preferences.searchMode == SearchMode.youtubeMusic) ||
|
||||||
!preferences.skipNonMusic) return;
|
!preferences.skipNonMusic) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user