mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-11 19:29:25 +01:00
Remove misleading first "Non" from getNonUrlAndNonTorrentStreams
This commit is contained in:
parent
2019af831a
commit
4e87f5aabc
@ -123,7 +123,7 @@ import static org.schabi.newpipe.player.helper.PlayerHelper.globalScreenOrientat
|
||||
import static org.schabi.newpipe.player.helper.PlayerHelper.isClearingQueueConfirmationRequired;
|
||||
import static org.schabi.newpipe.player.playqueue.PlayQueueItem.RECOVERY_UNSET;
|
||||
import static org.schabi.newpipe.util.ExtractorHelper.showMetaInfoInTextView;
|
||||
import static org.schabi.newpipe.util.ListHelper.getNonUrlAndNonTorrentStreams;
|
||||
import static org.schabi.newpipe.util.ListHelper.getUrlAndNonTorrentStreams;
|
||||
|
||||
public final class VideoDetailFragment
|
||||
extends BaseStateFragment<StreamInfo>
|
||||
@ -1107,7 +1107,7 @@ public final class VideoDetailFragment
|
||||
if (!useExternalAudioPlayer) {
|
||||
openNormalBackgroundPlayer(append);
|
||||
} else {
|
||||
final List<AudioStream> audioStreams = getNonUrlAndNonTorrentStreams(
|
||||
final List<AudioStream> audioStreams = getUrlAndNonTorrentStreams(
|
||||
currentInfo.getAudioStreams());
|
||||
final int index = ListHelper.getDefaultAudioFormat(activity, audioStreams);
|
||||
|
||||
@ -2157,8 +2157,8 @@ public final class VideoDetailFragment
|
||||
final List<VideoStream> videoStreamsForExternalPlayers =
|
||||
ListHelper.getSortedStreamVideosList(
|
||||
activity,
|
||||
getNonUrlAndNonTorrentStreams(currentInfo.getVideoStreams()),
|
||||
getNonUrlAndNonTorrentStreams(currentInfo.getVideoOnlyStreams()),
|
||||
getUrlAndNonTorrentStreams(currentInfo.getVideoStreams()),
|
||||
getUrlAndNonTorrentStreams(currentInfo.getVideoOnlyStreams()),
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
@ -28,7 +28,7 @@ import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import static com.google.android.exoplayer2.C.TIME_UNSET;
|
||||
import static org.schabi.newpipe.util.ListHelper.getNonUrlAndNonTorrentStreams;
|
||||
import static org.schabi.newpipe.util.ListHelper.getUrlAndNonTorrentStreams;
|
||||
import static org.schabi.newpipe.util.ListHelper.getNonTorrentStreams;
|
||||
|
||||
public class VideoPlaybackResolver implements PlaybackResolver {
|
||||
@ -131,7 +131,7 @@ public class VideoPlaybackResolver implements PlaybackResolver {
|
||||
final List<SubtitlesStream> subtitlesStreams = info.getSubtitles();
|
||||
if (subtitlesStreams != null) {
|
||||
// Torrent and non URL subtitles are not supported by ExoPlayer
|
||||
final List<SubtitlesStream> nonTorrentAndUrlStreams = getNonUrlAndNonTorrentStreams(
|
||||
final List<SubtitlesStream> nonTorrentAndUrlStreams = getUrlAndNonTorrentStreams(
|
||||
subtitlesStreams);
|
||||
for (final SubtitlesStream subtitle : nonTorrentAndUrlStreams) {
|
||||
final MediaFormat mediaFormat = subtitle.getFormat();
|
||||
|
@ -137,7 +137,7 @@ public final class ListHelper {
|
||||
* @return a stream list which only contains URL streams and non-torrent streams
|
||||
*/
|
||||
@NonNull
|
||||
public static <S extends Stream> List<S> getNonUrlAndNonTorrentStreams(
|
||||
public static <S extends Stream> List<S> getUrlAndNonTorrentStreams(
|
||||
final List<S> streamList) {
|
||||
return getFilteredStreamList(streamList,
|
||||
stream -> stream.isUrl() && stream.getDeliveryMethod() != DeliveryMethod.TORRENT);
|
||||
|
@ -63,7 +63,7 @@ import org.schabi.newpipe.util.external_communication.ShareUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.schabi.newpipe.util.ListHelper.getNonUrlAndNonTorrentStreams;
|
||||
import static org.schabi.newpipe.util.ListHelper.getUrlAndNonTorrentStreams;
|
||||
|
||||
public final class NavigationHelper {
|
||||
public static final String MAIN_FRAGMENT_TAG = "main_fragment_tag";
|
||||
@ -227,7 +227,7 @@ public final class NavigationHelper {
|
||||
}
|
||||
|
||||
final List<AudioStream> audioStreamsForExternalPlayers =
|
||||
getNonUrlAndNonTorrentStreams(audioStreams);
|
||||
getUrlAndNonTorrentStreams(audioStreams);
|
||||
if (audioStreamsForExternalPlayers.isEmpty()) {
|
||||
Toast.makeText(context, R.string.no_audio_streams_available_for_external_players,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
@ -250,7 +250,7 @@ public final class NavigationHelper {
|
||||
|
||||
final List<VideoStream> videoStreamsForExternalPlayers =
|
||||
ListHelper.getSortedStreamVideosList(context,
|
||||
getNonUrlAndNonTorrentStreams(videoStreams), null, false, false);
|
||||
getUrlAndNonTorrentStreams(videoStreams), null, false, false);
|
||||
if (videoStreamsForExternalPlayers.isEmpty()) {
|
||||
Toast.makeText(context, R.string.no_video_streams_available_for_external_players,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
|
Loading…
Reference in New Issue
Block a user