Merge branch 'dev' of github.com:TeamNewPipe/NewPipe into alang-selector
This commit is contained in:
commit
c377ffbce8
11 changed files with 86 additions and 45 deletions
|
|
@ -1,7 +1,7 @@
|
|||
package org.schabi.newpipe.player.resolver;
|
||||
|
||||
import static org.schabi.newpipe.util.ListHelper.getFilteredAudioStreams;
|
||||
import static org.schabi.newpipe.util.ListHelper.getNonTorrentStreams;
|
||||
import static org.schabi.newpipe.util.ListHelper.getPlayableStreams;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
|
@ -64,7 +64,8 @@ public class AudioPlaybackResolver implements PlaybackResolver {
|
|||
stream = getStreamForIndex(audioIndex, audioStreams);
|
||||
tag = StreamInfoTag.of(info, audioStreams, audioIndex);
|
||||
} else {
|
||||
final List<VideoStream> videoStreams = getNonTorrentStreams(info.getVideoStreams());
|
||||
final List<VideoStream> videoStreams =
|
||||
getPlayableStreams(info.getVideoStreams(), info.getServiceId());
|
||||
if (!videoStreams.isEmpty()) {
|
||||
final int index = ListHelper.getDefaultResolutionIndex(context, videoStreams);
|
||||
stream = getStreamForIndex(index, videoStreams);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import java.util.Optional;
|
|||
import static com.google.android.exoplayer2.C.TIME_UNSET;
|
||||
import static org.schabi.newpipe.util.ListHelper.getFilteredAudioStreams;
|
||||
import static org.schabi.newpipe.util.ListHelper.getUrlAndNonTorrentStreams;
|
||||
import static org.schabi.newpipe.util.ListHelper.getNonTorrentStreams;
|
||||
import static org.schabi.newpipe.util.ListHelper.getPlayableStreams;
|
||||
|
||||
public class VideoPlaybackResolver implements PlaybackResolver {
|
||||
private static final String TAG = VideoPlaybackResolver.class.getSimpleName();
|
||||
|
|
@ -75,8 +75,8 @@ public class VideoPlaybackResolver implements PlaybackResolver {
|
|||
|
||||
// Create video stream source
|
||||
final List<VideoStream> videoStreamsList = ListHelper.getSortedStreamVideosList(context,
|
||||
getNonTorrentStreams(info.getVideoStreams()),
|
||||
getNonTorrentStreams(info.getVideoOnlyStreams()), false, true);
|
||||
getPlayableStreams(info.getVideoStreams(), info.getServiceId()),
|
||||
getPlayableStreams(info.getVideoOnlyStreams(), info.getServiceId()), false, true);
|
||||
final List<AudioStream> audioStreamsList =
|
||||
getFilteredAudioStreams(context, info.getAudioStreams());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue