From 4e87f5aabcce455445bf1e50defedd8a07261df2 Mon Sep 17 00:00:00 2001 From: Stypox Date: Sat, 18 Jun 2022 18:52:32 +0200 Subject: [PATCH] Remove misleading first "Non" from getNonUrlAndNonTorrentStreams --- .../newpipe/fragments/detail/VideoDetailFragment.java | 8 ++++---- .../newpipe/player/resolver/VideoPlaybackResolver.java | 4 ++-- app/src/main/java/org/schabi/newpipe/util/ListHelper.java | 2 +- .../java/org/schabi/newpipe/util/NavigationHelper.java | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index cbd8b05b4..5e19f558d 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -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 @@ -1107,7 +1107,7 @@ public final class VideoDetailFragment if (!useExternalAudioPlayer) { openNormalBackgroundPlayer(append); } else { - final List audioStreams = getNonUrlAndNonTorrentStreams( + final List audioStreams = getUrlAndNonTorrentStreams( currentInfo.getAudioStreams()); final int index = ListHelper.getDefaultAudioFormat(activity, audioStreams); @@ -2157,8 +2157,8 @@ public final class VideoDetailFragment final List videoStreamsForExternalPlayers = ListHelper.getSortedStreamVideosList( activity, - getNonUrlAndNonTorrentStreams(currentInfo.getVideoStreams()), - getNonUrlAndNonTorrentStreams(currentInfo.getVideoOnlyStreams()), + getUrlAndNonTorrentStreams(currentInfo.getVideoStreams()), + getUrlAndNonTorrentStreams(currentInfo.getVideoOnlyStreams()), false, false ); diff --git a/app/src/main/java/org/schabi/newpipe/player/resolver/VideoPlaybackResolver.java b/app/src/main/java/org/schabi/newpipe/player/resolver/VideoPlaybackResolver.java index 6e18ee0cd..cf7d73558 100644 --- a/app/src/main/java/org/schabi/newpipe/player/resolver/VideoPlaybackResolver.java +++ b/app/src/main/java/org/schabi/newpipe/player/resolver/VideoPlaybackResolver.java @@ -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 subtitlesStreams = info.getSubtitles(); if (subtitlesStreams != null) { // Torrent and non URL subtitles are not supported by ExoPlayer - final List nonTorrentAndUrlStreams = getNonUrlAndNonTorrentStreams( + final List nonTorrentAndUrlStreams = getUrlAndNonTorrentStreams( subtitlesStreams); for (final SubtitlesStream subtitle : nonTorrentAndUrlStreams) { final MediaFormat mediaFormat = subtitle.getFormat(); diff --git a/app/src/main/java/org/schabi/newpipe/util/ListHelper.java b/app/src/main/java/org/schabi/newpipe/util/ListHelper.java index 33c7a2f49..eabac8330 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ListHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ListHelper.java @@ -137,7 +137,7 @@ public final class ListHelper { * @return a stream list which only contains URL streams and non-torrent streams */ @NonNull - public static List getNonUrlAndNonTorrentStreams( + public static List getUrlAndNonTorrentStreams( final List streamList) { return getFilteredStreamList(streamList, stream -> stream.isUrl() && stream.getDeliveryMethod() != DeliveryMethod.TORRENT); diff --git a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java index ffc7433a0..c40b1a430 100644 --- a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java @@ -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 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 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();