mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00
Player._playTrack not checking currentTrack.uri validity fix
This commit is contained in:
parent
799919d538
commit
25854c843f
@ -138,10 +138,11 @@ class _PlayerState extends State<Player> with WidgetsBindingObserver {
|
||||
Future _playTrack(Track currentTrack, Playback playback) async {
|
||||
try {
|
||||
if (currentTrack.id != _currentTrackId) {
|
||||
if (currentTrack.uri != null) {
|
||||
Uri? parsedUri = Uri.tryParse(currentTrack.uri!);
|
||||
if (parsedUri != null && parsedUri.hasAbsolutePath) {
|
||||
await player
|
||||
.setAudioSource(
|
||||
AudioSource.uri(Uri.parse(currentTrack.uri!)),
|
||||
AudioSource.uri(parsedUri),
|
||||
preload: true,
|
||||
)
|
||||
.then((value) async {
|
||||
|
Loading…
Reference in New Issue
Block a user