mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-22 19:12:45 +01:00
Apply suggestions from code review
Co-Authored-By: Tobias Groza <TobiGr@users.noreply.github.com>
This commit is contained in:
parent
50b51f931e
commit
7aeb1ec8d9
@ -13,7 +13,7 @@ public class PlayQueuePlaybackController extends DefaultControlDispatcher {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean dispatchSetPlayWhenReady(Player player, boolean playWhenReady) {
|
public boolean dispatchSetPlayWhenReady(Player player, boolean playWhenReady) {
|
||||||
if(playWhenReady) {
|
if (playWhenReady) {
|
||||||
callback.onPlay();
|
callback.onPlay();
|
||||||
} else {
|
} else {
|
||||||
callback.onPause();
|
callback.onPause();
|
||||||
|
@ -68,7 +68,7 @@ public class CustomTrackSelector extends DefaultTrackSelector {
|
|||||||
TextTrackScore trackScore =
|
TextTrackScore trackScore =
|
||||||
new TextTrackScore(
|
new TextTrackScore(
|
||||||
format, params, trackFormatSupport[trackIndex], selectedAudioLanguage);
|
format, params, trackFormatSupport[trackIndex], selectedAudioLanguage);
|
||||||
if(formatHasLanguage(format, preferredTextLanguage)) {
|
if (formatHasLanguage(format, preferredTextLanguage)) {
|
||||||
selectedGroup = trackGroup;
|
selectedGroup = trackGroup;
|
||||||
selectedTrackIndex = trackIndex;
|
selectedTrackIndex = trackIndex;
|
||||||
selectedTrackScore = trackScore;
|
selectedTrackScore = trackScore;
|
||||||
@ -89,4 +89,4 @@ public class CustomTrackSelector extends DefaultTrackSelector {
|
|||||||
new TrackSelection.Definition(selectedGroup, selectedTrackIndex),
|
new TrackSelection.Definition(selectedGroup, selectedTrackIndex),
|
||||||
Assertions.checkNotNull(selectedTrackScore));
|
Assertions.checkNotNull(selectedTrackScore));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user