Skip to content

Commit 4e87f5a

Browse files
committed
Remove misleading first "Non" from getNonUrlAndNonTorrentStreams
1 parent 2019af8 commit 4e87f5a

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
import static org.schabi.newpipe.player.helper.PlayerHelper.isClearingQueueConfirmationRequired;
124124
import static org.schabi.newpipe.player.playqueue.PlayQueueItem.RECOVERY_UNSET;
125125
import static org.schabi.newpipe.util.ExtractorHelper.showMetaInfoInTextView;
126-
import static org.schabi.newpipe.util.ListHelper.getNonUrlAndNonTorrentStreams;
126+
import static org.schabi.newpipe.util.ListHelper.getUrlAndNonTorrentStreams;
127127

128128
public final class VideoDetailFragment
129129
extends BaseStateFragment<StreamInfo>
@@ -1107,7 +1107,7 @@ private void openBackgroundPlayer(final boolean append) {
11071107
if (!useExternalAudioPlayer) {
11081108
openNormalBackgroundPlayer(append);
11091109
} else {
1110-
final List<AudioStream> audioStreams = getNonUrlAndNonTorrentStreams(
1110+
final List<AudioStream> audioStreams = getUrlAndNonTorrentStreams(
11111111
currentInfo.getAudioStreams());
11121112
final int index = ListHelper.getDefaultAudioFormat(activity, audioStreams);
11131113

@@ -2157,8 +2157,8 @@ private void showExternalPlaybackDialog() {
21572157
final List<VideoStream> videoStreamsForExternalPlayers =
21582158
ListHelper.getSortedStreamVideosList(
21592159
activity,
2160-
getNonUrlAndNonTorrentStreams(currentInfo.getVideoStreams()),
2161-
getNonUrlAndNonTorrentStreams(currentInfo.getVideoOnlyStreams()),
2160+
getUrlAndNonTorrentStreams(currentInfo.getVideoStreams()),
2161+
getUrlAndNonTorrentStreams(currentInfo.getVideoOnlyStreams()),
21622162
false,
21632163
false
21642164
);

app/src/main/java/org/schabi/newpipe/player/resolver/VideoPlaybackResolver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import java.util.Optional;
2929

3030
import static com.google.android.exoplayer2.C.TIME_UNSET;
31-
import static org.schabi.newpipe.util.ListHelper.getNonUrlAndNonTorrentStreams;
31+
import static org.schabi.newpipe.util.ListHelper.getUrlAndNonTorrentStreams;
3232
import static org.schabi.newpipe.util.ListHelper.getNonTorrentStreams;
3333

3434
public class VideoPlaybackResolver implements PlaybackResolver {
@@ -131,7 +131,7 @@ public MediaSource resolve(@NonNull final StreamInfo info) {
131131
final List<SubtitlesStream> subtitlesStreams = info.getSubtitles();
132132
if (subtitlesStreams != null) {
133133
// Torrent and non URL subtitles are not supported by ExoPlayer
134-
final List<SubtitlesStream> nonTorrentAndUrlStreams = getNonUrlAndNonTorrentStreams(
134+
final List<SubtitlesStream> nonTorrentAndUrlStreams = getUrlAndNonTorrentStreams(
135135
subtitlesStreams);
136136
for (final SubtitlesStream subtitle : nonTorrentAndUrlStreams) {
137137
final MediaFormat mediaFormat = subtitle.getFormat();

app/src/main/java/org/schabi/newpipe/util/ListHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public static <S extends Stream> List<S> getStreamsOfSpecifiedDelivery(
137137
* @return a stream list which only contains URL streams and non-torrent streams
138138
*/
139139
@NonNull
140-
public static <S extends Stream> List<S> getNonUrlAndNonTorrentStreams(
140+
public static <S extends Stream> List<S> getUrlAndNonTorrentStreams(
141141
final List<S> streamList) {
142142
return getFilteredStreamList(streamList,
143143
stream -> stream.isUrl() && stream.getDeliveryMethod() != DeliveryMethod.TORRENT);

app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
import java.util.List;
6565

66-
import static org.schabi.newpipe.util.ListHelper.getNonUrlAndNonTorrentStreams;
66+
import static org.schabi.newpipe.util.ListHelper.getUrlAndNonTorrentStreams;
6767

6868
public final class NavigationHelper {
6969
public static final String MAIN_FRAGMENT_TAG = "main_fragment_tag";
@@ -227,7 +227,7 @@ public static void playOnExternalAudioPlayer(@NonNull final Context context,
227227
}
228228

229229
final List<AudioStream> audioStreamsForExternalPlayers =
230-
getNonUrlAndNonTorrentStreams(audioStreams);
230+
getUrlAndNonTorrentStreams(audioStreams);
231231
if (audioStreamsForExternalPlayers.isEmpty()) {
232232
Toast.makeText(context, R.string.no_audio_streams_available_for_external_players,
233233
Toast.LENGTH_SHORT).show();
@@ -250,7 +250,7 @@ public static void playOnExternalVideoPlayer(final Context context,
250250

251251
final List<VideoStream> videoStreamsForExternalPlayers =
252252
ListHelper.getSortedStreamVideosList(context,
253-
getNonUrlAndNonTorrentStreams(videoStreams), null, false, false);
253+
getUrlAndNonTorrentStreams(videoStreams), null, false, false);
254254
if (videoStreamsForExternalPlayers.isEmpty()) {
255255
Toast.makeText(context, R.string.no_video_streams_available_for_external_players,
256256
Toast.LENGTH_SHORT).show();

0 commit comments

Comments
 (0)