Skip to content

Commit

Permalink
show currently playting tracks also if exoplayer reports that no trac…
Browse files Browse the repository at this point in the history
…ks are selected
  • Loading branch information
theScrabi committed Oct 16, 2024
1 parent b8e6a66 commit 8d099d3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ import net.newpipe.newplayer.logic.StreamExceptionResponse
import net.newpipe.newplayer.data.StreamSelection
import net.newpipe.newplayer.logic.ReplaceStreamSelectionResponse
import net.newpipe.newplayer.data.StreamTrack
import net.newpipe.newplayer.logic.ReloadItemResponse
import net.newpipe.newplayer.logic.ReplaceItemResponse
import net.newpipe.newplayer.logic.StreamSelector
import net.newpipe.newplayer.logic.TrackUtils
Expand Down Expand Up @@ -230,6 +229,9 @@ class NewPlayerImpl(
super.onTracksChanged(tracks)
val streamTracks =
TrackUtils.streamTracksFromMedia3Tracks(tracks, onlySelectedTracks = true)
.ifEmpty {
TrackUtils.streamTracksFromMedia3Tracks(tracks, onlySelectedTracks = false)
}
streamTracks.joinToString("\n") { it.toString() }
Log.d(
TAG,
Expand Down

0 comments on commit 8d099d3

Please sign in to comment.