KRTirtho / spotube

🎧 Open source Spotify client that doesn't require Premium nor uses Electron! Available for both desktop & mobile!
https://spotube.krtirtho.dev/
Other
26.34k stars 1.08k forks source link

Unable to change 'Alternative Track Sources' in case a song is not found in preffered audio source and a backup audio source is used #1666

Open AniruddhaSadhukhan opened 6 days ago

AniruddhaSadhukhan commented 6 days ago

Is there an existing issue for this?

Current Behavior

Currently when a song is not found in the preffered audio source (eg. JioSaavn), it tries a backup source (eg. YouTube). Now from the player screen, if I tap the 'Alternative Track Sources' button, it will show the first currently used backup source track (YouTube in this case) and the rest will be from the preferred source (JioSaavn in this case).

Now on taping any of these primary (JS) sources, it will try to call the swapWithSibling method of the current playing backup (YT) source instead and fail.

Expected Behavior

Either show the alternative tracks from current used source instead of preffered one or make track from preffered source playable irrespective of current source

Steps to reproduce

  1. Set prefered source as JioSaavn
  2. Play a track which is not found in JioSaavn (eg. https://open.spotify.com/track/6zOccrmhbV2Scx84nMq2W3 )
  3. Click on Alternative Track Sources
  4. Click on any source other than the current one

Operating System

Android

Spotube version

3.7.1

Installation source

Play Store (Android)

Additional information

Stacktrace:

============================== CATCHER 2 LOG ============================== ------- DEVICE INFO ------- id: UKQ1.230804.001 board: marblein bootloader: unknown brand: POCO device: marblein display: UKQ1.230804.001 release-keys fingerprint: POCO/marblein/marblein:14/UKQ1.230804.001/V816.0.8.0.UMRINXM:user/release-keys hardware: qcom host: pangu-build-component-system-295061-trkc5-hzh3l-h3kb0 isPhysicalDevice: true manufacturer: Xiaomi model: 23049PCD8I product: marblein tags: release-keys type: user versionBaseOs: POCO/marblein/marblein:14/UKQ1.230804.001/V816.0.7.0.UMRINXM:user/release-keys versionCodename: REL versionIncremental: V816.0.8.0.UMRINXM versionPreviewSdk: 0 versionRelease: 14 versionSdk: 34 versionSecurityPatch: 2024-04-01 ------- APP INFO ------- environment: release version: 3.7.1 appName: Spotube buildNumber: 32 packageName: oss.krtirtho.spotube ---------- ERROR ---------- Invalid argument (idOrUrl): Invalid YouTube video ID or URL: "UxvvEhxX" ------- STACK TRACE -------

0 new VideoId (package:youtube_explode_dart/src/videos/video_id.dart:22)

1 new VideoId.fromString (package:youtube_explode_dart/src/videos/video_id.dart:44)

2 StreamClient.getManifest (package:youtube_explode_dart/src/videos/streams/stream_client.dart:33)

3 YoutubeSourcedTrack.swapWithSibling (package:spotube/services/sourced_track/sources/youtube.dart:280)

4 ActiveSourcedTrackNotifier.swapSibling (package:spotube/provider/server/active_sourced_track.dart:25)

------- CUSTOM INFO ------- ### Self grab - [ ] I'm ready to work on this issue!