Skip to content

Commit

Permalink
app: MusicService: use existing playbackData to recover song if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
gechoto authored Jan 11, 2025
1 parent fee05f9 commit 64344d3
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ class MusicService : MediaLibraryService(),

private suspend fun recoverSong(mediaId: String, playbackData: YTPlayerUtils.PlaybackData? = null) {
val playbackUrl = database.format(mediaId).first()?.playbackUrl
?: playbackData?.playbackTracking?.videostatsPlaybackUrl?.baseUrl
?: YTPlayerUtils.playerResponseForMetadata(mediaId).getOrNull()?.playbackTracking?.videostatsPlaybackUrl?.baseUrl

playbackUrl?.let {
Expand Down

0 comments on commit 64344d3

Please sign in to comment.