From 772109855134f4d58483f52e2c76945340902b19 Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Tue, 8 May 2018 10:18:32 -0700 Subject: [PATCH 001/103] -Updated ExoPlayer to 2.8.0 -Updated MediaSource contracts in ManagedMediaSource. -Changed PlaceholderMediaSource and FailedMediaSource to use built-in BaseMediaSource implementation. -Changed deprecated DynamicConcatenatingMediaSource to ConcatenatingMediaSource. -Removed manual playlist media source disposal in favor of player built-in disposal. --- app/build.gradle | 2 +- .../newpipe/player/helper/PlayerHelper.java | 1 - .../player/mediasource/FailedMediaSource.java | 16 +++++---- .../player/mediasource/LoadedMediaSource.java | 19 +++++++++-- .../ManagedMediaSourcePlaylist.java | 34 ++++++++----------- .../mediasource/PlaceholderMediaSource.java | 11 +++--- .../player/playback/MediaSourceManager.java | 3 -- 7 files changed, 46 insertions(+), 40 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 83abf44ab..b04daebed 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -42,7 +42,7 @@ android { ext { supportLibVersion = '27.1.1' - exoPlayerLibVersion = '2.7.3' + exoPlayerLibVersion = '2.8.0' roomDbLibVersion = '1.1.1' leakCanaryLibVersion = '1.5.4' okHttpLibVersion = '3.10.0' diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java index f8d594114..d10b99aec 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java @@ -241,7 +241,6 @@ public class PlayerHelper { public static TrackSelection.Factory getQualitySelector(@NonNull final Context context, @NonNull final BandwidthMeter meter) { return new AdaptiveTrackSelection.Factory(meter, - AdaptiveTrackSelection.DEFAULT_MAX_INITIAL_BITRATE, /*bufferDurationRequiredForQualityIncrease=*/1000, AdaptiveTrackSelection.DEFAULT_MAX_DURATION_FOR_QUALITY_DECREASE_MS, AdaptiveTrackSelection.DEFAULT_MIN_DURATION_TO_RETAIN_AFTER_DISCARD_MS, diff --git a/app/src/main/java/org/schabi/newpipe/player/mediasource/FailedMediaSource.java b/app/src/main/java/org/schabi/newpipe/player/mediasource/FailedMediaSource.java index 8d498a9bf..2f233c464 100644 --- a/app/src/main/java/org/schabi/newpipe/player/mediasource/FailedMediaSource.java +++ b/app/src/main/java/org/schabi/newpipe/player/mediasource/FailedMediaSource.java @@ -4,6 +4,7 @@ import android.support.annotation.NonNull; import android.util.Log; import com.google.android.exoplayer2.ExoPlayer; +import com.google.android.exoplayer2.source.BaseMediaSource; import com.google.android.exoplayer2.source.MediaPeriod; import com.google.android.exoplayer2.upstream.Allocator; @@ -11,7 +12,7 @@ import org.schabi.newpipe.player.playqueue.PlayQueueItem; import java.io.IOException; -public class FailedMediaSource implements ManagedMediaSource { +public class FailedMediaSource extends BaseMediaSource implements ManagedMediaSource { private final String TAG = "FailedMediaSource@" + Integer.toHexString(hashCode()); public static class FailedMediaSourceException extends Exception { @@ -72,11 +73,6 @@ public class FailedMediaSource implements ManagedMediaSource { return System.currentTimeMillis() >= retryTimestamp; } - @Override - public void prepareSource(ExoPlayer player, boolean isTopLevelSource, Listener listener) { - Log.e(TAG, "Loading failed source: ", error); - } - @Override public void maybeThrowSourceInfoRefreshError() throws IOException { throw new IOException(error); @@ -90,8 +86,14 @@ public class FailedMediaSource implements ManagedMediaSource { @Override public void releasePeriod(MediaPeriod mediaPeriod) {} + @Override - public void releaseSource() {} + protected void prepareSourceInternal(ExoPlayer player, boolean isTopLevelSource) { + Log.e(TAG, "Loading failed source: ", error); + } + + @Override + protected void releaseSourceInternal() {} @Override public boolean shouldBeReplacedWith(@NonNull final PlayQueueItem newIdentity, diff --git a/app/src/main/java/org/schabi/newpipe/player/mediasource/LoadedMediaSource.java b/app/src/main/java/org/schabi/newpipe/player/mediasource/LoadedMediaSource.java index 1a9cfeb4d..c39b0a03d 100644 --- a/app/src/main/java/org/schabi/newpipe/player/mediasource/LoadedMediaSource.java +++ b/app/src/main/java/org/schabi/newpipe/player/mediasource/LoadedMediaSource.java @@ -1,10 +1,12 @@ package org.schabi.newpipe.player.mediasource; +import android.os.Handler; import android.support.annotation.NonNull; import com.google.android.exoplayer2.ExoPlayer; import com.google.android.exoplayer2.source.MediaPeriod; import com.google.android.exoplayer2.source.MediaSource; +import com.google.android.exoplayer2.source.MediaSourceEventListener; import com.google.android.exoplayer2.upstream.Allocator; import org.schabi.newpipe.player.playqueue.PlayQueueItem; @@ -34,7 +36,8 @@ public class LoadedMediaSource implements ManagedMediaSource { } @Override - public void prepareSource(ExoPlayer player, boolean isTopLevelSource, Listener listener) { + public void prepareSource(ExoPlayer player, boolean isTopLevelSource, + SourceInfoRefreshListener listener) { source.prepareSource(player, isTopLevelSource, listener); } @@ -54,8 +57,18 @@ public class LoadedMediaSource implements ManagedMediaSource { } @Override - public void releaseSource() { - source.releaseSource(); + public void releaseSource(SourceInfoRefreshListener listener) { + source.releaseSource(listener); + } + + @Override + public void addEventListener(Handler handler, MediaSourceEventListener eventListener) { + source.addEventListener(handler, eventListener); + } + + @Override + public void removeEventListener(MediaSourceEventListener eventListener) { + source.removeEventListener(eventListener); } @Override diff --git a/app/src/main/java/org/schabi/newpipe/player/mediasource/ManagedMediaSourcePlaylist.java b/app/src/main/java/org/schabi/newpipe/player/mediasource/ManagedMediaSourcePlaylist.java index 310f1062b..5fe107657 100644 --- a/app/src/main/java/org/schabi/newpipe/player/mediasource/ManagedMediaSourcePlaylist.java +++ b/app/src/main/java/org/schabi/newpipe/player/mediasource/ManagedMediaSourcePlaylist.java @@ -3,14 +3,14 @@ package org.schabi.newpipe.player.mediasource; import android.support.annotation.NonNull; import android.support.annotation.Nullable; -import com.google.android.exoplayer2.source.DynamicConcatenatingMediaSource; +import com.google.android.exoplayer2.source.ConcatenatingMediaSource; import com.google.android.exoplayer2.source.ShuffleOrder; public class ManagedMediaSourcePlaylist { - @NonNull private final DynamicConcatenatingMediaSource internalSource; + @NonNull private final ConcatenatingMediaSource internalSource; public ManagedMediaSourcePlaylist() { - internalSource = new DynamicConcatenatingMediaSource(/*isPlaylistAtomic=*/false, + internalSource = new ConcatenatingMediaSource(/*isPlaylistAtomic=*/false, new ShuffleOrder.UnshuffledShuffleOrder(0)); } @@ -32,12 +32,8 @@ public class ManagedMediaSourcePlaylist { null : (ManagedMediaSource) internalSource.getMediaSource(index); } - public void dispose() { - internalSource.releaseSource(); - } - @NonNull - public DynamicConcatenatingMediaSource getParentMediaSource() { + public ConcatenatingMediaSource getParentMediaSource() { return internalSource; } @@ -46,7 +42,7 @@ public class ManagedMediaSourcePlaylist { //////////////////////////////////////////////////////////////////////////*/ /** - * Expands the {@link DynamicConcatenatingMediaSource} by appending it with a + * Expands the {@link ConcatenatingMediaSource} by appending it with a * {@link PlaceholderMediaSource}. * * @see #append(ManagedMediaSource) @@ -56,17 +52,17 @@ public class ManagedMediaSourcePlaylist { } /** - * Appends a {@link ManagedMediaSource} to the end of {@link DynamicConcatenatingMediaSource}. - * @see DynamicConcatenatingMediaSource#addMediaSource + * Appends a {@link ManagedMediaSource} to the end of {@link ConcatenatingMediaSource}. + * @see ConcatenatingMediaSource#addMediaSource * */ public synchronized void append(@NonNull final ManagedMediaSource source) { internalSource.addMediaSource(source); } /** - * Removes a {@link ManagedMediaSource} from {@link DynamicConcatenatingMediaSource} + * Removes a {@link ManagedMediaSource} from {@link ConcatenatingMediaSource} * at the given index. If this index is out of bound, then the removal is ignored. - * @see DynamicConcatenatingMediaSource#removeMediaSource(int) + * @see ConcatenatingMediaSource#removeMediaSource(int) * */ public synchronized void remove(final int index) { if (index < 0 || index > internalSource.getSize()) return; @@ -75,10 +71,10 @@ public class ManagedMediaSourcePlaylist { } /** - * Moves a {@link ManagedMediaSource} in {@link DynamicConcatenatingMediaSource} + * Moves a {@link ManagedMediaSource} in {@link ConcatenatingMediaSource} * from the given source index to the target index. If either index is out of bound, * then the call is ignored. - * @see DynamicConcatenatingMediaSource#moveMediaSource(int, int) + * @see ConcatenatingMediaSource#moveMediaSource(int, int) * */ public synchronized void move(final int source, final int target) { if (source < 0 || target < 0) return; @@ -99,7 +95,7 @@ public class ManagedMediaSourcePlaylist { } /** - * Updates the {@link ManagedMediaSource} in {@link DynamicConcatenatingMediaSource} + * Updates the {@link ManagedMediaSource} in {@link ConcatenatingMediaSource} * at the given index with a given {@link ManagedMediaSource}. * @see #update(int, ManagedMediaSource, Runnable) * */ @@ -108,11 +104,11 @@ public class ManagedMediaSourcePlaylist { } /** - * Updates the {@link ManagedMediaSource} in {@link DynamicConcatenatingMediaSource} + * Updates the {@link ManagedMediaSource} in {@link ConcatenatingMediaSource} * at the given index with a given {@link ManagedMediaSource}. If the index is out of bound, * then the replacement is ignored. - * @see DynamicConcatenatingMediaSource#addMediaSource - * @see DynamicConcatenatingMediaSource#removeMediaSource(int, Runnable) + * @see ConcatenatingMediaSource#addMediaSource + * @see ConcatenatingMediaSource#removeMediaSource(int, Runnable) * */ public synchronized void update(final int index, @NonNull final ManagedMediaSource source, @Nullable final Runnable finalizingAction) { diff --git a/app/src/main/java/org/schabi/newpipe/player/mediasource/PlaceholderMediaSource.java b/app/src/main/java/org/schabi/newpipe/player/mediasource/PlaceholderMediaSource.java index 318f9a316..bfd734393 100644 --- a/app/src/main/java/org/schabi/newpipe/player/mediasource/PlaceholderMediaSource.java +++ b/app/src/main/java/org/schabi/newpipe/player/mediasource/PlaceholderMediaSource.java @@ -3,20 +3,19 @@ package org.schabi.newpipe.player.mediasource; import android.support.annotation.NonNull; import com.google.android.exoplayer2.ExoPlayer; +import com.google.android.exoplayer2.source.BaseMediaSource; import com.google.android.exoplayer2.source.MediaPeriod; import com.google.android.exoplayer2.upstream.Allocator; import org.schabi.newpipe.player.playqueue.PlayQueueItem; -import java.io.IOException; - -public class PlaceholderMediaSource implements ManagedMediaSource { +public class PlaceholderMediaSource extends BaseMediaSource implements ManagedMediaSource { // Do nothing, so this will stall the playback - @Override public void prepareSource(ExoPlayer player, boolean isTopLevelSource, Listener listener) {} - @Override public void maybeThrowSourceInfoRefreshError() throws IOException {} + @Override public void maybeThrowSourceInfoRefreshError() {} @Override public MediaPeriod createPeriod(MediaPeriodId id, Allocator allocator) { return null; } @Override public void releasePeriod(MediaPeriod mediaPeriod) {} - @Override public void releaseSource() {} + @Override protected void prepareSourceInternal(ExoPlayer player, boolean isTopLevelSource) {} + @Override protected void releaseSourceInternal() {} @Override public boolean shouldBeReplacedWith(@NonNull PlayQueueItem newIdentity, diff --git a/app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java b/app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java index 8ab3cba98..67a8debef 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java +++ b/app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java @@ -172,7 +172,6 @@ public class MediaSourceManager { playQueueReactor.cancel(); loaderReactor.dispose(); syncReactor.dispose(); - playlist.dispose(); } /*////////////////////////////////////////////////////////////////////////// @@ -481,8 +480,6 @@ public class MediaSourceManager { private void resetSources() { if (DEBUG) Log.d(TAG, "resetSources() called."); - - playlist.dispose(); playlist = new ManagedMediaSourcePlaylist(); } From 72d1e5131f526362892cc9ad6ac013210481feea Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Tue, 8 May 2018 11:24:42 -0700 Subject: [PATCH 002/103] -Added skip silence toggle to playback speed control. -Added step size selector to playback speed control. -Added skip silence flag to player intents. -Moved default preset in playback speed control to neutral dialog button, renamed as reset. -Removed nightcore preset from playback speed control. --- .../org/schabi/newpipe/player/BasePlayer.java | 23 ++- .../newpipe/player/MainVideoPlayer.java | 17 +- .../schabi/newpipe/player/PlayerState.java | 15 +- .../newpipe/player/PopupVideoPlayer.java | 1 + .../newpipe/player/ServicePlayerActivity.java | 12 +- .../helper/PlaybackParameterDialog.java | 168 ++++++++++++------ .../schabi/newpipe/util/NavigationHelper.java | 4 +- .../res/layout/dialog_playback_parameter.xml | 70 +++++++- app/src/main/res/values/strings.xml | 7 +- 9 files changed, 236 insertions(+), 81 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index 818f01bc0..525f0d258 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -115,6 +115,7 @@ public abstract class BasePlayer implements public static final String REPEAT_MODE = "repeat_mode"; public static final String PLAYBACK_PITCH = "playback_pitch"; public static final String PLAYBACK_SPEED = "playback_speed"; + public static final String PLAYBACK_SKIP_SILENCE = "playback_skip_silence"; public static final String PLAYBACK_QUALITY = "playback_quality"; public static final String PLAY_QUEUE_KEY = "play_queue_key"; public static final String APPEND_ONLY = "append_only"; @@ -235,20 +236,23 @@ public abstract class BasePlayer implements final int repeatMode = intent.getIntExtra(REPEAT_MODE, getRepeatMode()); final float playbackSpeed = intent.getFloatExtra(PLAYBACK_SPEED, getPlaybackSpeed()); final float playbackPitch = intent.getFloatExtra(PLAYBACK_PITCH, getPlaybackPitch()); + final boolean playbackSkipSilence = intent.getBooleanExtra(PLAYBACK_SKIP_SILENCE, false); // Good to go... - initPlayback(queue, repeatMode, playbackSpeed, playbackPitch, /*playOnInit=*/true); + initPlayback(queue, repeatMode, playbackSpeed, playbackPitch, playbackSkipSilence, + /*playOnInit=*/true); } protected void initPlayback(@NonNull final PlayQueue queue, @Player.RepeatMode final int repeatMode, final float playbackSpeed, final float playbackPitch, + final boolean playbackSkipSilence, final boolean playOnReady) { destroyPlayer(); initPlayer(playOnReady); setRepeatMode(repeatMode); - setPlaybackParameters(playbackSpeed, playbackPitch); + setPlaybackParameters(playbackSpeed, playbackPitch, playbackSkipSilence); playQueue = queue; playQueue.init(); @@ -1162,19 +1166,22 @@ public abstract class BasePlayer implements return getPlaybackParameters().pitch; } + public boolean getPlaybackSkipSilence() { + return getPlaybackParameters().skipSilence; + } + public void setPlaybackSpeed(float speed) { - setPlaybackParameters(speed, getPlaybackPitch()); + setPlaybackParameters(speed, getPlaybackPitch(), getPlaybackSkipSilence()); } public PlaybackParameters getPlaybackParameters() { - final PlaybackParameters defaultParameters = new PlaybackParameters(1f, 1f); - if (simpleExoPlayer == null) return defaultParameters; + if (simpleExoPlayer == null) return PlaybackParameters.DEFAULT; final PlaybackParameters parameters = simpleExoPlayer.getPlaybackParameters(); - return parameters == null ? defaultParameters : parameters; + return parameters == null ? PlaybackParameters.DEFAULT : parameters; } - public void setPlaybackParameters(float speed, float pitch) { - simpleExoPlayer.setPlaybackParameters(new PlaybackParameters(speed, pitch)); + public void setPlaybackParameters(float speed, float pitch, boolean skipSilence) { + simpleExoPlayer.setPlaybackParameters(new PlaybackParameters(speed, pitch, skipSilence)); } public PlayQueue getPlayQueue() { diff --git a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java index df9f520e9..56c8f8855 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -181,7 +181,7 @@ public final class MainVideoPlayer extends AppCompatActivity playerImpl.setPlaybackQuality(playerState.getPlaybackQuality()); playerImpl.initPlayback(playerState.getPlayQueue(), playerState.getRepeatMode(), playerState.getPlaybackSpeed(), playerState.getPlaybackPitch(), - playerState.wasPlaying()); + playerState.isPlaybackSkipSilence(), playerState.wasPlaying()); } } @@ -210,7 +210,8 @@ public final class MainVideoPlayer extends AppCompatActivity playerImpl.setRecovery(); playerState = new PlayerState(playerImpl.getPlayQueue(), playerImpl.getRepeatMode(), playerImpl.getPlaybackSpeed(), playerImpl.getPlaybackPitch(), - playerImpl.getPlaybackQuality(), playerImpl.isPlaying()); + playerImpl.getPlaybackQuality(), playerImpl.getPlaybackSkipSilence(), + playerImpl.isPlaying()); StateSaver.tryToSave(isChangingConfigurations(), null, outState, this); } @@ -352,8 +353,11 @@ public final class MainVideoPlayer extends AppCompatActivity //////////////////////////////////////////////////////////////////////////// @Override - public void onPlaybackParameterChanged(float playbackTempo, float playbackPitch) { - if (playerImpl != null) playerImpl.setPlaybackParameters(playbackTempo, playbackPitch); + public void onPlaybackParameterChanged(float playbackTempo, float playbackPitch, + boolean playbackSkipSilence) { + if (playerImpl != null) { + playerImpl.setPlaybackParameters(playbackTempo, playbackPitch, playbackSkipSilence); + } } /////////////////////////////////////////////////////////////////////////// @@ -533,6 +537,7 @@ public final class MainVideoPlayer extends AppCompatActivity this.getRepeatMode(), this.getPlaybackSpeed(), this.getPlaybackPitch(), + this.getPlaybackSkipSilence(), this.getPlaybackQuality() ); context.startService(intent); @@ -554,6 +559,7 @@ public final class MainVideoPlayer extends AppCompatActivity this.getRepeatMode(), this.getPlaybackSpeed(), this.getPlaybackPitch(), + this.getPlaybackSkipSilence(), this.getPlaybackQuality() ); context.startService(intent); @@ -649,7 +655,8 @@ public final class MainVideoPlayer extends AppCompatActivity @Override public void onPlaybackSpeedClicked() { - PlaybackParameterDialog.newInstance(getPlaybackSpeed(), getPlaybackPitch()) + PlaybackParameterDialog + .newInstance(getPlaybackSpeed(), getPlaybackPitch(), getPlaybackSkipSilence()) .show(getSupportFragmentManager(), TAG); } diff --git a/app/src/main/java/org/schabi/newpipe/player/PlayerState.java b/app/src/main/java/org/schabi/newpipe/player/PlayerState.java index 8ffcb6b29..359159809 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PlayerState.java +++ b/app/src/main/java/org/schabi/newpipe/player/PlayerState.java @@ -14,21 +14,26 @@ public class PlayerState implements Serializable { private final float playbackSpeed; private final float playbackPitch; @Nullable private final String playbackQuality; + private final boolean playbackSkipSilence; private final boolean wasPlaying; PlayerState(@NonNull final PlayQueue playQueue, final int repeatMode, - final float playbackSpeed, final float playbackPitch, final boolean wasPlaying) { - this(playQueue, repeatMode, playbackSpeed, playbackPitch, null, wasPlaying); + final float playbackSpeed, final float playbackPitch, + final boolean playbackSkipSilence, final boolean wasPlaying) { + this(playQueue, repeatMode, playbackSpeed, playbackPitch, null, + playbackSkipSilence, wasPlaying); } PlayerState(@NonNull final PlayQueue playQueue, final int repeatMode, final float playbackSpeed, final float playbackPitch, - @Nullable final String playbackQuality, final boolean wasPlaying) { + @Nullable final String playbackQuality, final boolean playbackSkipSilence, + final boolean wasPlaying) { this.playQueue = playQueue; this.repeatMode = repeatMode; this.playbackSpeed = playbackSpeed; this.playbackPitch = playbackPitch; this.playbackQuality = playbackQuality; + this.playbackSkipSilence = playbackSkipSilence; this.wasPlaying = wasPlaying; } @@ -62,6 +67,10 @@ public class PlayerState implements Serializable { return playbackQuality; } + public boolean isPlaybackSkipSilence() { + return playbackSkipSilence; + } + public boolean wasPlaying() { return wasPlaying; } diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java index 3aa8d68f3..146175fb0 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -459,6 +459,7 @@ public final class PopupVideoPlayer extends Service { this.getRepeatMode(), this.getPlaybackSpeed(), this.getPlaybackPitch(), + this.getPlaybackSkipSilence(), this.getPlaybackQuality() ); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); diff --git a/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java b/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java index 7674105e1..b57a710ed 100644 --- a/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java +++ b/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java @@ -187,6 +187,7 @@ public abstract class ServicePlayerActivity extends AppCompatActivity this.player.getRepeatMode(), this.player.getPlaybackSpeed(), this.player.getPlaybackPitch(), + this.player.getPlaybackSkipSilence(), null ).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); } @@ -466,13 +467,16 @@ public abstract class ServicePlayerActivity extends AppCompatActivity private void openPlaybackParameterDialog() { if (player == null) return; - PlaybackParameterDialog.newInstance(player.getPlaybackSpeed(), - player.getPlaybackPitch()).show(getSupportFragmentManager(), getTag()); + PlaybackParameterDialog.newInstance(player.getPlaybackSpeed(), player.getPlaybackPitch(), + player.getPlaybackSkipSilence()).show(getSupportFragmentManager(), getTag()); } @Override - public void onPlaybackParameterChanged(float playbackTempo, float playbackPitch) { - if (player != null) player.setPlaybackParameters(playbackTempo, playbackPitch); + public void onPlaybackParameterChanged(float playbackTempo, float playbackPitch, + boolean playbackSkipSilence) { + if (player != null) { + player.setPlaybackParameters(playbackTempo, playbackPitch, playbackSkipSilence); + } } //////////////////////////////////////////////////////////////////////////// diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java index 7c7d87791..60e43ff7d 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java @@ -21,25 +21,24 @@ import static org.schabi.newpipe.player.BasePlayer.DEBUG; public class PlaybackParameterDialog extends DialogFragment { @NonNull private static final String TAG = "PlaybackParameterDialog"; - public static final double MINIMUM_PLAYBACK_VALUE = 0.25f; + // Maximum allowable range in ExoPlayer + public static final double MINIMUM_PLAYBACK_VALUE = 0.10f; public static final double MAXIMUM_PLAYBACK_VALUE = 3.00f; public static final char STEP_UP_SIGN = '+'; public static final char STEP_DOWN_SIGN = '-'; - public static final double PLAYBACK_STEP_VALUE = 0.05f; - - public static final double NIGHTCORE_TEMPO = 1.20f; - public static final double NIGHTCORE_PITCH_LOWER = 1.15f; - public static final double NIGHTCORE_PITCH_UPPER = 1.25f; + public static final double DEFAULT_PLAYBACK_STEP_VALUE = 0.05f; public static final double DEFAULT_TEMPO = 1.00f; public static final double DEFAULT_PITCH = 1.00f; + public static final boolean DEFAULT_SKIP_SILENCE = false; @NonNull private static final String INITIAL_TEMPO_KEY = "initial_tempo_key"; @NonNull private static final String INITIAL_PITCH_KEY = "initial_pitch_key"; public interface Callback { - void onPlaybackParameterChanged(final float playbackTempo, final float playbackPitch); + void onPlaybackParameterChanged(final float playbackTempo, final float playbackPitch, + final boolean playbackSkipSilence); } @Nullable private Callback callback; @@ -50,6 +49,7 @@ public class PlaybackParameterDialog extends DialogFragment { private double initialTempo = DEFAULT_TEMPO; private double initialPitch = DEFAULT_PITCH; + private boolean initialSkipSilence = DEFAULT_SKIP_SILENCE; @Nullable private SeekBar tempoSlider; @Nullable private TextView tempoMinimumText; @@ -65,16 +65,22 @@ public class PlaybackParameterDialog extends DialogFragment { @Nullable private TextView pitchStepDownText; @Nullable private TextView pitchStepUpText; - @Nullable private CheckBox unhookingCheckbox; + @Nullable private TextView stepSizeOnePercentText; + @Nullable private TextView stepSizeFivePercentText; + @Nullable private TextView stepSizeTenPercentText; + @Nullable private TextView stepSizeTwentyFivePercentText; + @Nullable private TextView stepSizeOneHundredPercentText; - @Nullable private TextView nightCorePresetText; - @Nullable private TextView resetPresetText; + @Nullable private CheckBox unhookingCheckbox; + @Nullable private CheckBox skipSilenceCheckbox; public static PlaybackParameterDialog newInstance(final double playbackTempo, - final double playbackPitch) { + final double playbackPitch, + final boolean playbackSkipSilence) { PlaybackParameterDialog dialog = new PlaybackParameterDialog(); dialog.initialTempo = playbackTempo; dialog.initialPitch = playbackPitch; + dialog.initialSkipSilence = playbackSkipSilence; return dialog; } @@ -123,7 +129,9 @@ public class PlaybackParameterDialog extends DialogFragment { .setView(view) .setCancelable(true) .setNegativeButton(R.string.cancel, (dialogInterface, i) -> - setPlaybackParameters(initialTempo, initialPitch)) + setPlaybackParameters(initialTempo, initialPitch, initialSkipSilence)) + .setNeutralButton(R.string.playback_reset, (dialogInterface, i) -> + setPlaybackParameters(DEFAULT_TEMPO, DEFAULT_PITCH, DEFAULT_SKIP_SILENCE)) .setPositiveButton(R.string.finish, (dialogInterface, i) -> setCurrentPlaybackParameters()); @@ -136,9 +144,13 @@ public class PlaybackParameterDialog extends DialogFragment { private void setupControlViews(@NonNull View rootView) { setupHookingControl(rootView); + setupSkipSilenceControl(rootView); + setupTempoControl(rootView); setupPitchControl(rootView); - setupPresetControl(rootView); + setupStepSize(DEFAULT_PLAYBACK_STEP_VALUE); + + setupStepSizeSelector(rootView); } private void setupTempoControl(@NonNull View rootView) { @@ -157,17 +169,17 @@ public class PlaybackParameterDialog extends DialogFragment { tempoMinimumText.setText(PlayerHelper.formatSpeed(MINIMUM_PLAYBACK_VALUE)); if (tempoStepUpText != null) { - tempoStepUpText.setText(getStepUpPercentString(PLAYBACK_STEP_VALUE)); + tempoStepUpText.setText(getStepUpPercentString(DEFAULT_PLAYBACK_STEP_VALUE)); tempoStepUpText.setOnClickListener(view -> { - onTempoSliderUpdated(getCurrentTempo() + PLAYBACK_STEP_VALUE); + onTempoSliderUpdated(getCurrentTempo() + DEFAULT_PLAYBACK_STEP_VALUE); setCurrentPlaybackParameters(); }); } if (tempoStepDownText != null) { - tempoStepDownText.setText(getStepDownPercentString(PLAYBACK_STEP_VALUE)); + tempoStepDownText.setText(getStepDownPercentString(DEFAULT_PLAYBACK_STEP_VALUE)); tempoStepDownText.setOnClickListener(view -> { - onTempoSliderUpdated(getCurrentTempo() - PLAYBACK_STEP_VALUE); + onTempoSliderUpdated(getCurrentTempo() - DEFAULT_PLAYBACK_STEP_VALUE); setCurrentPlaybackParameters(); }); } @@ -194,22 +206,6 @@ public class PlaybackParameterDialog extends DialogFragment { if (pitchMinimumText != null) pitchMinimumText.setText(PlayerHelper.formatPitch(MINIMUM_PLAYBACK_VALUE)); - if (pitchStepUpText != null) { - pitchStepUpText.setText(getStepUpPercentString(PLAYBACK_STEP_VALUE)); - pitchStepUpText.setOnClickListener(view -> { - onPitchSliderUpdated(getCurrentPitch() + PLAYBACK_STEP_VALUE); - setCurrentPlaybackParameters(); - }); - } - - if (pitchStepDownText != null) { - pitchStepDownText.setText(getStepDownPercentString(PLAYBACK_STEP_VALUE)); - pitchStepDownText.setOnClickListener(view -> { - onPitchSliderUpdated(getCurrentPitch() - PLAYBACK_STEP_VALUE); - setCurrentPlaybackParameters(); - }); - } - if (pitchSlider != null) { pitchSlider.setMax(strategy.progressOf(MAXIMUM_PLAYBACK_VALUE)); pitchSlider.setProgress(strategy.progressOf(initialPitch)); @@ -231,24 +227,84 @@ public class PlaybackParameterDialog extends DialogFragment { } } - private void setupPresetControl(@NonNull View rootView) { - nightCorePresetText = rootView.findViewById(R.id.presetNightcore); - if (nightCorePresetText != null) { - nightCorePresetText.setOnClickListener(view -> { - final double randomPitch = NIGHTCORE_PITCH_LOWER + - Math.random() * (NIGHTCORE_PITCH_UPPER - NIGHTCORE_PITCH_LOWER); + private void setupSkipSilenceControl(@NonNull View rootView) { + skipSilenceCheckbox = rootView.findViewById(R.id.skipSilenceCheckbox); + if (skipSilenceCheckbox != null) { + skipSilenceCheckbox.setChecked(initialSkipSilence); + skipSilenceCheckbox.setOnCheckedChangeListener((compoundButton, isChecked) -> + setCurrentPlaybackParameters()); + } + } - setTempoSlider(NIGHTCORE_TEMPO); - setPitchSlider(randomPitch); + private void setupStepSizeSelector(@NonNull final View rootView) { + stepSizeOnePercentText = rootView.findViewById(R.id.stepSizeOnePercent); + stepSizeFivePercentText = rootView.findViewById(R.id.stepSizeFivePercent); + stepSizeTenPercentText = rootView.findViewById(R.id.stepSizeTenPercent); + stepSizeTwentyFivePercentText = rootView.findViewById(R.id.stepSizeTwentyFivePercent); + stepSizeOneHundredPercentText = rootView.findViewById(R.id.stepSizeOneHundredPercent); + + if (stepSizeOnePercentText != null) { + final double onePercent = 0.01f; + stepSizeOnePercentText.setText(getPercentString(onePercent)); + stepSizeOnePercentText.setOnClickListener(view -> setupStepSize(onePercent)); + } + + if (stepSizeFivePercentText != null) { + final double fivePercent = 0.05f; + stepSizeFivePercentText.setText(getPercentString(fivePercent)); + stepSizeFivePercentText.setOnClickListener(view -> setupStepSize(fivePercent)); + } + + if (stepSizeTenPercentText != null) { + final double tenPercent = 0.10f; + stepSizeTenPercentText.setText(getPercentString(tenPercent)); + stepSizeTenPercentText.setOnClickListener(view -> setupStepSize(tenPercent)); + } + + if (stepSizeTwentyFivePercentText != null) { + final double twentyFivePercent = 0.25f; + stepSizeTwentyFivePercentText.setText(getPercentString(twentyFivePercent)); + stepSizeTwentyFivePercentText.setOnClickListener(view -> + setupStepSize(twentyFivePercent)); + } + + if (stepSizeOneHundredPercentText != null) { + final double oneHundredPercent = 1.00f; + stepSizeOneHundredPercentText.setText(getPercentString(oneHundredPercent)); + stepSizeOneHundredPercentText.setOnClickListener(view -> + setupStepSize(oneHundredPercent)); + } + } + + private void setupStepSize(final double stepSize) { + if (tempoStepUpText != null) { + tempoStepUpText.setText(getStepUpPercentString(stepSize)); + tempoStepUpText.setOnClickListener(view -> { + onTempoSliderUpdated(getCurrentTempo() + stepSize); setCurrentPlaybackParameters(); }); } - resetPresetText = rootView.findViewById(R.id.presetReset); - if (resetPresetText != null) { - resetPresetText.setOnClickListener(view -> { - setTempoSlider(DEFAULT_TEMPO); - setPitchSlider(DEFAULT_PITCH); + if (tempoStepDownText != null) { + tempoStepDownText.setText(getStepDownPercentString(stepSize)); + tempoStepDownText.setOnClickListener(view -> { + onTempoSliderUpdated(getCurrentTempo() - stepSize); + setCurrentPlaybackParameters(); + }); + } + + if (pitchStepUpText != null) { + pitchStepUpText.setText(getStepUpPercentString(stepSize)); + pitchStepUpText.setOnClickListener(view -> { + onPitchSliderUpdated(getCurrentPitch() + stepSize); + setCurrentPlaybackParameters(); + }); + } + + if (pitchStepDownText != null) { + pitchStepDownText.setText(getStepDownPercentString(stepSize)); + pitchStepDownText.setOnClickListener(view -> { + onPitchSliderUpdated(getCurrentPitch() - stepSize); setCurrentPlaybackParameters(); }); } @@ -342,10 +398,11 @@ public class PlaybackParameterDialog extends DialogFragment { //////////////////////////////////////////////////////////////////////////*/ private void setCurrentPlaybackParameters() { - setPlaybackParameters(getCurrentTempo(), getCurrentPitch()); + setPlaybackParameters(getCurrentTempo(), getCurrentPitch(), getCurrentSkipSilence()); } - private void setPlaybackParameters(final double tempo, final double pitch) { + private void setPlaybackParameters(final double tempo, final double pitch, + final boolean skipSilence) { if (callback != null && tempoCurrentText != null && pitchCurrentText != null) { if (DEBUG) Log.d(TAG, "Setting playback parameters to " + "tempo=[" + tempo + "], " + @@ -353,7 +410,7 @@ public class PlaybackParameterDialog extends DialogFragment { tempoCurrentText.setText(PlayerHelper.formatSpeed(tempo)); pitchCurrentText.setText(PlayerHelper.formatPitch(pitch)); - callback.onPlaybackParameterChanged((float) tempo, (float) pitch); + callback.onPlaybackParameterChanged((float) tempo, (float) pitch, skipSilence); } } @@ -367,13 +424,22 @@ public class PlaybackParameterDialog extends DialogFragment { pitchSlider.getProgress()); } + private boolean getCurrentSkipSilence() { + return skipSilenceCheckbox != null && skipSilenceCheckbox.isChecked(); + } + @NonNull private static String getStepUpPercentString(final double percent) { - return STEP_UP_SIGN + PlayerHelper.formatPitch(percent); + return STEP_UP_SIGN + getPercentString(percent); } @NonNull private static String getStepDownPercentString(final double percent) { - return STEP_DOWN_SIGN + PlayerHelper.formatPitch(percent); + return STEP_DOWN_SIGN + getPercentString(percent); + } + + @NonNull + private static String getPercentString(final double percent) { + return PlayerHelper.formatPitch(percent); } } 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 ebbeb06f8..12f6856de 100644 --- a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java @@ -100,11 +100,13 @@ public class NavigationHelper { final int repeatMode, final float playbackSpeed, final float playbackPitch, + final boolean playbackSkipSilence, @Nullable final String playbackQuality) { return getPlayerIntent(context, targetClazz, playQueue, playbackQuality) .putExtra(BasePlayer.REPEAT_MODE, repeatMode) .putExtra(BasePlayer.PLAYBACK_SPEED, playbackSpeed) - .putExtra(BasePlayer.PLAYBACK_PITCH, playbackPitch); + .putExtra(BasePlayer.PLAYBACK_PITCH, playbackPitch) + .putExtra(BasePlayer.PLAYBACK_SKIP_SILENCE, playbackSkipSilence); } public static void playOnMainPlayer(final Context context, final PlayQueue queue) { diff --git a/app/src/main/res/layout/dialog_playback_parameter.xml b/app/src/main/res/layout/dialog_playback_parameter.xml index a8c6a5dcd..47937e882 100644 --- a/app/src/main/res/layout/dialog_playback_parameter.xml +++ b/app/src/main/res/layout/dialog_playback_parameter.xml @@ -279,30 +279,88 @@ android:layout_centerHorizontal="true" android:layout_below="@id/separatorCheckbox"/> + + + android:layout_below="@id/skipSilenceCheckbox"> + + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 5ca88bd6f..8686d21d3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -479,9 +479,10 @@ Playback Speed Controls Tempo Pitch - Unhook (may cause distortion) - Nightcore - Default + Unlink (may cause distortion) + Fast-forward during silence + Step + Reset In order to comply with the European General Data Protection Regulation (GDPR), we herby draw your attention to NewPipe\'s privacy policy. Please read it carefully.\nYou must accept it to send us the bug report. From 3194a2bf2c769fb1fe9b4365ec3da33acc93e1ae Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Wed, 9 May 2018 11:19:03 -0700 Subject: [PATCH 003/103] -Fixed skip silence state not maintained by player on new queue. -Fixed TrackSelector deprecations. --- .../java/org/schabi/newpipe/player/BasePlayer.java | 3 ++- .../org/schabi/newpipe/player/PopupVideoPlayer.java | 3 ++- .../java/org/schabi/newpipe/player/VideoPlayer.java | 13 ++++++++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index 525f0d258..11d8381dc 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -236,7 +236,8 @@ public abstract class BasePlayer implements final int repeatMode = intent.getIntExtra(REPEAT_MODE, getRepeatMode()); final float playbackSpeed = intent.getFloatExtra(PLAYBACK_SPEED, getPlaybackSpeed()); final float playbackPitch = intent.getFloatExtra(PLAYBACK_PITCH, getPlaybackPitch()); - final boolean playbackSkipSilence = intent.getBooleanExtra(PLAYBACK_SKIP_SILENCE, false); + final boolean playbackSkipSilence = intent.getBooleanExtra(PLAYBACK_SKIP_SILENCE, + getPlaybackSkipSilence()); // Good to go... initPlayback(queue, repeatMode, playbackSpeed, playbackPitch, playbackSkipSilence, diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java index 146175fb0..8b0fc0ddc 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -729,7 +729,8 @@ public final class PopupVideoPlayer extends Service { /*package-private*/ void enableVideoRenderer(final boolean enable) { final int videoRendererIndex = getRendererIndex(C.TRACK_TYPE_VIDEO); if (trackSelector != null && videoRendererIndex != RENDERER_UNAVAILABLE) { - trackSelector.setRendererDisabled(videoRendererIndex, !enable); + trackSelector.setParameters(trackSelector.buildUponParameters() + .setRendererDisabled(videoRendererIndex, !enable)); } } diff --git a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java index 5ea1c74a0..250d02b42 100644 --- a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java @@ -241,7 +241,8 @@ public abstract class VideoPlayer extends BasePlayer // Setup audio session with onboard equalizer if (Build.VERSION.SDK_INT >= 21) { - trackSelector.setTunnelingAudioSessionId(C.generateAudioSessionIdV21(context)); + trackSelector.setParameters(trackSelector.buildUponParameters() + .setTunnelingAudioSessionId(C.generateAudioSessionIdV21(context))); } } @@ -298,7 +299,8 @@ public abstract class VideoPlayer extends BasePlayer captionOffItem.setOnMenuItemClickListener(menuItem -> { final int textRendererIndex = getRendererIndex(C.TRACK_TYPE_TEXT); if (trackSelector != null && textRendererIndex != RENDERER_UNAVAILABLE) { - trackSelector.setRendererDisabled(textRendererIndex, true); + trackSelector.setParameters(trackSelector.buildUponParameters() + .setRendererDisabled(textRendererIndex, true)); } return true; }); @@ -312,7 +314,8 @@ public abstract class VideoPlayer extends BasePlayer final int textRendererIndex = getRendererIndex(C.TRACK_TYPE_TEXT); if (trackSelector != null && textRendererIndex != RENDERER_UNAVAILABLE) { trackSelector.setPreferredTextLanguage(captionLanguage); - trackSelector.setRendererDisabled(textRendererIndex, false); + trackSelector.setParameters(trackSelector.buildUponParameters() + .setRendererDisabled(textRendererIndex, false)); } return true; }); @@ -575,8 +578,8 @@ public abstract class VideoPlayer extends BasePlayer // Build UI buildCaptionMenu(availableLanguages); - if (trackSelector.getRendererDisabled(textRenderer) || preferredLanguage == null || - !availableLanguages.contains(preferredLanguage)) { + if (trackSelector.getParameters().getRendererDisabled(textRenderer) || + preferredLanguage == null || !availableLanguages.contains(preferredLanguage)) { captionTextView.setText(R.string.caption_none); } else { captionTextView.setText(preferredLanguage); From bc6fdf81d2405facccfb4e7f1230b664fd2586ad Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Thu, 10 May 2018 13:28:31 -0700 Subject: [PATCH 004/103] -Refactored player media source resolution into external helpers. -Baked resolved media metadata into media source for one-way data passing. --- .../newpipe/player/BackgroundPlayer.java | 36 ++-- .../org/schabi/newpipe/player/BasePlayer.java | 169 +++++++----------- .../newpipe/player/MainVideoPlayer.java | 29 +-- .../newpipe/player/PopupVideoPlayer.java | 35 ++-- .../schabi/newpipe/player/VideoPlayer.java | 110 ++---------- .../player/playback/MediaSourceManager.java | 28 +-- .../player/playback/PlaybackListener.java | 2 +- .../resolver/AudioPlaybackResolver.java | 39 ++++ .../player/resolver/MediaSourceTag.java | 51 ++++++ .../player/resolver/PlaybackResolver.java | 84 +++++++++ .../newpipe/player/resolver/Resolver.java | 7 + .../resolver/VideoPlaybackResolver.java | 122 +++++++++++++ 12 files changed, 436 insertions(+), 276 deletions(-) create mode 100644 app/src/main/java/org/schabi/newpipe/player/resolver/AudioPlaybackResolver.java create mode 100644 app/src/main/java/org/schabi/newpipe/player/resolver/MediaSourceTag.java create mode 100644 app/src/main/java/org/schabi/newpipe/player/resolver/PlaybackResolver.java create mode 100644 app/src/main/java/org/schabi/newpipe/player/resolver/Resolver.java create mode 100644 app/src/main/java/org/schabi/newpipe/player/resolver/VideoPlaybackResolver.java diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java index f25c20bb2..b5135bd84 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -42,14 +42,12 @@ import com.google.android.exoplayer2.source.MediaSource; import org.schabi.newpipe.BuildConfig; import org.schabi.newpipe.R; -import org.schabi.newpipe.extractor.MediaFormat; -import org.schabi.newpipe.extractor.stream.AudioStream; import org.schabi.newpipe.extractor.stream.StreamInfo; import org.schabi.newpipe.player.event.PlayerEventListener; import org.schabi.newpipe.player.helper.LockManager; -import org.schabi.newpipe.player.helper.PlayerHelper; import org.schabi.newpipe.player.playqueue.PlayQueueItem; -import org.schabi.newpipe.util.ListHelper; +import org.schabi.newpipe.player.resolver.AudioPlaybackResolver; +import org.schabi.newpipe.player.resolver.MediaSourceTag; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.ThemeHelper; @@ -279,10 +277,18 @@ public final class BackgroundPlayer extends Service { protected class BasePlayerImpl extends BasePlayer { + @Nullable private AudioPlaybackResolver resolver; + BasePlayerImpl(Context context) { super(context); } + @Override + public void initPlayer(boolean playOnReady) { + super.initPlayer(playOnReady); + resolver = new AudioPlaybackResolver(context, dataSource); + } + @Override public void handleIntent(final Intent intent) { super.handleIntent(intent); @@ -390,11 +396,9 @@ public final class BackgroundPlayer extends Service { // Playback Listener //////////////////////////////////////////////////////////////////////////*/ - protected void onMetadataChanged(@NonNull final PlayQueueItem item, - @Nullable final StreamInfo info, - final int newPlayQueueIndex, - final boolean hasPlayQueueItemChanged) { - if (shouldUpdateOnProgress || hasPlayQueueItemChanged) { + protected void onMetadataChanged(@NonNull final MediaSourceTag tag) { + super.onMetadataChanged(tag); + if (shouldUpdateOnProgress) { resetNotification(); updateNotification(-1); updateMetadata(); @@ -404,15 +408,7 @@ public final class BackgroundPlayer extends Service { @Override @Nullable public MediaSource sourceOf(final PlayQueueItem item, final StreamInfo info) { - final MediaSource liveSource = super.sourceOf(item, info); - if (liveSource != null) return liveSource; - - final int index = ListHelper.getDefaultAudioFormat(context, info.getAudioStreams()); - if (index < 0 || index >= info.getAudioStreams().size()) return null; - - final AudioStream audio = info.getAudioStreams().get(index); - return buildMediaSource(audio.getUrl(), PlayerHelper.cacheKeyOf(info, audio), - MediaFormat.getSuffixById(audio.getFormatId())); + return resolver == null ? null : resolver.resolve(info); } @Override @@ -439,8 +435,8 @@ public final class BackgroundPlayer extends Service { } private void updateMetadata() { - if (activityListener != null && currentInfo != null) { - activityListener.onMetadataUpdate(currentInfo); + if (activityListener != null && getCurrentMetadata() != null) { + activityListener.onMetadataUpdate(getCurrentMetadata().getMetadata()); } } diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index 11d8381dc..2cbef93e4 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -25,15 +25,12 @@ import android.content.Intent; import android.content.IntentFilter; import android.graphics.Bitmap; import android.media.AudioManager; -import android.net.Uri; import android.support.annotation.NonNull; import android.support.annotation.Nullable; -import android.text.TextUtils; import android.util.Log; import android.view.View; import android.widget.Toast; -import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.DefaultRenderersFactory; import com.google.android.exoplayer2.ExoPlaybackException; import com.google.android.exoplayer2.ExoPlayerFactory; @@ -49,7 +46,6 @@ import com.google.android.exoplayer2.source.TrackGroupArray; import com.google.android.exoplayer2.trackselection.TrackSelection; import com.google.android.exoplayer2.trackselection.TrackSelectionArray; import com.google.android.exoplayer2.upstream.DefaultBandwidthMeter; -import com.google.android.exoplayer2.util.Util; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.assist.FailReason; import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; @@ -57,7 +53,6 @@ import com.nostra13.universalimageloader.core.listener.ImageLoadingListener; import org.schabi.newpipe.Downloader; import org.schabi.newpipe.R; import org.schabi.newpipe.extractor.stream.StreamInfo; -import org.schabi.newpipe.extractor.stream.StreamType; import org.schabi.newpipe.local.history.HistoryRecordManager; import org.schabi.newpipe.player.helper.AudioReactor; import org.schabi.newpipe.player.helper.LoadController; @@ -72,6 +67,7 @@ import org.schabi.newpipe.player.playback.PlaybackListener; import org.schabi.newpipe.player.playqueue.PlayQueue; import org.schabi.newpipe.player.playqueue.PlayQueueAdapter; import org.schabi.newpipe.player.playqueue.PlayQueueItem; +import org.schabi.newpipe.player.resolver.MediaSourceTag; import org.schabi.newpipe.util.SerializedCache; import java.io.IOException; @@ -130,12 +126,12 @@ public abstract class BasePlayer implements protected PlayQueue playQueue; protected PlayQueueAdapter playQueueAdapter; - protected MediaSourceManager playbackManager; + @Nullable protected MediaSourceManager playbackManager; - protected StreamInfo currentInfo; - protected PlayQueueItem currentItem; + @Nullable private PlayQueueItem currentItem; + @Nullable private MediaSourceTag currentMetadata; - protected Toast errorToast; + @Nullable protected Toast errorToast; /*////////////////////////////////////////////////////////////////////////// // Player @@ -329,58 +325,6 @@ public abstract class BasePlayer implements if (DEBUG) Log.d(TAG, "Thumbnail - onLoadingCancelled() called with: " + "imageUri = [" + imageUri + "], view = [" + view + "]"); } - /*////////////////////////////////////////////////////////////////////////// - // MediaSource Building - //////////////////////////////////////////////////////////////////////////*/ - - public MediaSource buildLiveMediaSource(@NonNull final String sourceUrl, - @C.ContentType final int type) { - if (DEBUG) { - Log.d(TAG, "buildLiveMediaSource() called with: url = [" + sourceUrl + - "], content type = [" + type + "]"); - } - if (dataSource == null) return null; - - final Uri uri = Uri.parse(sourceUrl); - switch (type) { - case C.TYPE_SS: - return dataSource.getLiveSsMediaSourceFactory().createMediaSource(uri); - case C.TYPE_DASH: - return dataSource.getLiveDashMediaSourceFactory().createMediaSource(uri); - case C.TYPE_HLS: - return dataSource.getLiveHlsMediaSourceFactory().createMediaSource(uri); - default: - throw new IllegalStateException("Unsupported type: " + type); - } - } - - public MediaSource buildMediaSource(@NonNull final String sourceUrl, - @NonNull final String cacheKey, - @NonNull final String overrideExtension) { - if (DEBUG) { - Log.d(TAG, "buildMediaSource() called with: url = [" + sourceUrl + - "], cacheKey = [" + cacheKey + "]" + - "], overrideExtension = [" + overrideExtension + "]"); - } - if (dataSource == null) return null; - - final Uri uri = Uri.parse(sourceUrl); - @C.ContentType final int type = TextUtils.isEmpty(overrideExtension) ? - Util.inferContentType(uri) : Util.inferContentType("." + overrideExtension); - - switch (type) { - case C.TYPE_SS: - return dataSource.getLiveSsMediaSourceFactory().createMediaSource(uri); - case C.TYPE_DASH: - return dataSource.getDashMediaSourceFactory().createMediaSource(uri); - case C.TYPE_HLS: - return dataSource.getHlsMediaSourceFactory().createMediaSource(uri); - case C.TYPE_OTHER: - return dataSource.getExtractorMediaSourceFactory(cacheKey).createMediaSource(uri); - default: - throw new IllegalStateException("Unsupported type: " + type); - } - } /*////////////////////////////////////////////////////////////////////////// // Broadcast Receiver @@ -614,6 +558,7 @@ public abstract class BasePlayer implements } break; case Player.STATE_READY: //3 + maybeUpdateCurrentMetadata(); maybeCorrectSeekPosition(); if (!isPrepared) { isPrepared = true; @@ -630,10 +575,12 @@ public abstract class BasePlayer implements } private void maybeCorrectSeekPosition() { - if (playQueue == null || simpleExoPlayer == null || currentInfo == null) return; + if (playQueue == null || simpleExoPlayer == null || currentMetadata == null) return; final int currentSourceIndex = playQueue.getIndex(); final PlayQueueItem currentSourceItem = playQueue.getItem(); + final StreamInfo currentInfo = currentMetadata.getMetadata(); + if (currentSourceItem == null) return; final long recoveryPositionMillis = currentSourceItem.getRecoveryPosition(); @@ -649,16 +596,15 @@ public abstract class BasePlayer implements playQueue.unsetRecovery(currentSourceIndex); } else if (isSynchronizing && isLive()) { - if (DEBUG) Log.d(TAG, "Playback - Synchronizing livestream to default time"); // Is still synchronizing? + if (DEBUG) Log.d(TAG, "Playback - Synchronizing livestream to default time"); seekToDefault(); } else if (isSynchronizing && presetStartPositionMillis > 0L) { + // Has another start position? if (DEBUG) Log.d(TAG, "Playback - Seeking to preset start " + "position=[" + presetStartPositionMillis + "]"); - // Has another start position? seekTo(presetStartPositionMillis); - currentInfo.setStartPosition(0); } isSynchronizing = false; @@ -732,6 +678,9 @@ public abstract class BasePlayer implements public void onPositionDiscontinuity(@Player.DiscontinuityReason final int reason) { if (DEBUG) Log.d(TAG, "ExoPlayer - onPositionDiscontinuity() called with " + "reason = [" + reason + "]"); + + maybeUpdateCurrentMetadata(); + // Refresh the playback if there is a transition to the next video final int newPeriodIndex = simpleExoPlayer.getCurrentPeriodIndex(); @@ -793,7 +742,7 @@ public abstract class BasePlayer implements if (DEBUG) Log.d(TAG, "Playback - onPlaybackBlock() called"); currentItem = null; - currentInfo = null; + currentMetadata = null; simpleExoPlayer.stop(); isPrepared = false; @@ -810,42 +759,21 @@ public abstract class BasePlayer implements simpleExoPlayer.prepare(mediaSource); } - @Override - public void onPlaybackSynchronize(@NonNull final PlayQueueItem item, - @Nullable final StreamInfo info) { + public void onPlaybackSynchronize(@NonNull final PlayQueueItem item) { if (DEBUG) Log.d(TAG, "Playback - onPlaybackSynchronize() called with " + - (info != null ? "available" : "null") + " info, " + "item=[" + item.getTitle() + "], url=[" + item.getUrl() + "]"); if (simpleExoPlayer == null || playQueue == null) return; final boolean onPlaybackInitial = currentItem == null; final boolean hasPlayQueueItemChanged = currentItem != item; - final boolean hasStreamInfoChanged = currentInfo != info; final int currentPlayQueueIndex = playQueue.indexOf(item); final int currentPlaylistIndex = simpleExoPlayer.getCurrentWindowIndex(); final int currentPlaylistSize = simpleExoPlayer.getCurrentTimeline().getWindowCount(); - // when starting playback on the last item when not repeating, maybe auto queue - if (info != null && currentPlayQueueIndex == playQueue.size() - 1 && - getRepeatMode() == Player.REPEAT_MODE_OFF && - PlayerHelper.isAutoQueueEnabled(context)) { - final PlayQueue autoQueue = PlayerHelper.autoQueueOf(info, playQueue.getStreams()); - if (autoQueue != null) playQueue.append(autoQueue.getStreams()); - } // If nothing to synchronize - if (!hasPlayQueueItemChanged && !hasStreamInfoChanged) { - return; - } - + if (!hasPlayQueueItemChanged) return; currentItem = item; - currentInfo = info; - if (hasPlayQueueItemChanged) { - // updates only to the stream info should not trigger another view count - registerView(); - initThumbnail(info == null ? item.getThumbnailUrl() : info.getThumbnailUrl()); - } - onMetadataChanged(item, info, currentPlayQueueIndex, hasPlayQueueItemChanged); // Check if on wrong window if (currentPlayQueueIndex != playQueue.getIndex()) { @@ -873,26 +801,21 @@ public abstract class BasePlayer implements } } - abstract protected void onMetadataChanged(@NonNull final PlayQueueItem item, - @Nullable final StreamInfo info, - final int newPlayQueueIndex, - final boolean hasPlayQueueItemChanged); + protected void onMetadataChanged(@NonNull final MediaSourceTag tag) { + Log.d(TAG, "Playback - onMetadataChanged() called, " + + "playing: " + tag.getMetadata().getName()); + final StreamInfo info = tag.getMetadata(); - @Nullable - @Override - public MediaSource sourceOf(PlayQueueItem item, StreamInfo info) { - final StreamType streamType = info.getStreamType(); - if (!(streamType == StreamType.AUDIO_LIVE_STREAM || streamType == StreamType.LIVE_STREAM)) { - return null; + initThumbnail(info.getThumbnailUrl()); + registerView(); + + // when starting playback on the last item when not repeating, maybe auto queue + if (playQueue.getIndex() == playQueue.size() - 1 && + getRepeatMode() == Player.REPEAT_MODE_OFF && + PlayerHelper.isAutoQueueEnabled(context)) { + final PlayQueue autoQueue = PlayerHelper.autoQueueOf(info, playQueue.getStreams()); + if (autoQueue != null) playQueue.append(autoQueue.getStreams()); } - - if (!info.getHlsUrl().isEmpty()) { - return buildLiveMediaSource(info.getHlsUrl(), C.TYPE_HLS); - } else if (!info.getDashMpdUrl().isEmpty()) { - return buildLiveMediaSource(info.getDashMpdUrl(), C.TYPE_DASH); - } - - return null; } @Override @@ -1051,7 +974,8 @@ public abstract class BasePlayer implements //////////////////////////////////////////////////////////////////////////*/ private void registerView() { - if (databaseUpdateReactor == null || currentInfo == null) return; + if (databaseUpdateReactor == null || currentMetadata == null) return; + final StreamInfo currentInfo = currentMetadata.getMetadata(); databaseUpdateReactor.add(recordManager.onViewed(currentInfo).onErrorComplete() .subscribe( ignored -> {/* successful */}, @@ -1082,7 +1006,8 @@ public abstract class BasePlayer implements } private void savePlaybackState() { - if (simpleExoPlayer == null || currentInfo == null) return; + if (simpleExoPlayer == null || currentMetadata == null) return; + final StreamInfo currentInfo = currentMetadata.getMetadata(); if (simpleExoPlayer.getCurrentPosition() > RECOVERY_SKIP_THRESHOLD_MILLIS && simpleExoPlayer.getCurrentPosition() < @@ -1090,6 +1015,23 @@ public abstract class BasePlayer implements savePlaybackState(currentInfo, simpleExoPlayer.getCurrentPosition()); } } + + private void maybeUpdateCurrentMetadata() { + if (simpleExoPlayer == null) return; + + final MediaSourceTag metadata; + try { + metadata = (MediaSourceTag) simpleExoPlayer.getCurrentTag(); + } catch (IndexOutOfBoundsException | ClassCastException error) { + return; + } + + if (metadata == null || currentMetadata == metadata) return; + + currentMetadata = metadata; + onMetadataChanged(metadata); + } + /*////////////////////////////////////////////////////////////////////////// // Getters and Setters //////////////////////////////////////////////////////////////////////////*/ @@ -1106,19 +1048,28 @@ public abstract class BasePlayer implements return currentState; } + @Nullable + public MediaSourceTag getCurrentMetadata() { + return currentMetadata; + } + + @NonNull public String getVideoUrl() { return currentItem == null ? context.getString(R.string.unknown_content) : currentItem.getUrl(); } + @NonNull public String getVideoTitle() { return currentItem == null ? context.getString(R.string.unknown_content) : currentItem.getTitle(); } + @NonNull public String getUploaderName() { return currentItem == null ? context.getString(R.string.unknown_content) : currentItem.getUploader(); } /** Checks if the current playback is a livestream AND is playing at or beyond the live edge */ + @SuppressWarnings("BooleanMethodIsAlwaysInverted") public boolean isLiveEdge() { if (simpleExoPlayer == null || !isLive()) return false; diff --git a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java index 56c8f8855..a66906c73 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -58,7 +58,6 @@ import com.google.android.exoplayer2.ui.AspectRatioFrameLayout; import com.google.android.exoplayer2.ui.SubtitleView; import org.schabi.newpipe.R; -import org.schabi.newpipe.extractor.stream.StreamInfo; import org.schabi.newpipe.extractor.stream.VideoStream; import org.schabi.newpipe.fragments.OnScrollBelowItemsListener; import org.schabi.newpipe.player.helper.PlaybackParameterDialog; @@ -67,6 +66,8 @@ import org.schabi.newpipe.player.playqueue.PlayQueueItem; import org.schabi.newpipe.player.playqueue.PlayQueueItemBuilder; import org.schabi.newpipe.player.playqueue.PlayQueueItemHolder; import org.schabi.newpipe.player.playqueue.PlayQueueItemTouchCallback; +import org.schabi.newpipe.player.resolver.MediaSourceTag; +import org.schabi.newpipe.player.resolver.VideoPlaybackResolver; import org.schabi.newpipe.util.AnimationUtils; import org.schabi.newpipe.util.ListHelper; import org.schabi.newpipe.util.NavigationHelper; @@ -497,11 +498,8 @@ public final class MainVideoPlayer extends AppCompatActivity // Playback Listener //////////////////////////////////////////////////////////////////////////*/ - protected void onMetadataChanged(@NonNull final PlayQueueItem item, - @Nullable final StreamInfo info, - final int newPlayQueueIndex, - final boolean hasPlayQueueItemChanged) { - super.onMetadataChanged(item, info, newPlayQueueIndex, false); + protected void onMetadataChanged(@Nullable final MediaSourceTag tag) { + super.onMetadataChanged(tag); titleTextView.setText(getVideoTitle()); channelTextView.setText(getUploaderName()); @@ -686,14 +684,19 @@ public final class MainVideoPlayer extends AppCompatActivity } @Override - protected int getDefaultResolutionIndex(final List sortedVideos) { - return ListHelper.getDefaultResolutionIndex(context, sortedVideos); - } + protected VideoPlaybackResolver.QualityResolver getQualityResolver() { + return new VideoPlaybackResolver.QualityResolver() { + @Override + public int getDefaultResolutionIndex(List sortedVideos) { + return ListHelper.getDefaultResolutionIndex(context, sortedVideos); + } - @Override - protected int getOverrideResolutionIndex(final List sortedVideos, - final String playbackQuality) { - return ListHelper.getResolutionIndex(context, sortedVideos, playbackQuality); + @Override + public int getOverrideResolutionIndex(List sortedVideos, + String playbackQuality) { + return ListHelper.getResolutionIndex(context, sortedVideos, playbackQuality); + } + }; } /*////////////////////////////////////////////////////////////////////////// diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java index 8b0fc0ddc..476ad73ef 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -59,13 +59,13 @@ import com.google.android.exoplayer2.ui.SubtitleView; import org.schabi.newpipe.BuildConfig; import org.schabi.newpipe.R; -import org.schabi.newpipe.extractor.stream.StreamInfo; import org.schabi.newpipe.extractor.stream.VideoStream; import org.schabi.newpipe.player.event.PlayerEventListener; import org.schabi.newpipe.player.helper.LockManager; import org.schabi.newpipe.player.helper.PlayerHelper; import org.schabi.newpipe.player.old.PlayVideoActivity; -import org.schabi.newpipe.player.playqueue.PlayQueueItem; +import org.schabi.newpipe.player.resolver.MediaSourceTag; +import org.schabi.newpipe.player.resolver.VideoPlaybackResolver; import org.schabi.newpipe.util.ListHelper; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.ThemeHelper; @@ -511,14 +511,20 @@ public final class PopupVideoPlayer extends Service { } @Override - protected int getDefaultResolutionIndex(final List sortedVideos) { - return ListHelper.getPopupDefaultResolutionIndex(context, sortedVideos); - } + protected VideoPlaybackResolver.QualityResolver getQualityResolver() { + return new VideoPlaybackResolver.QualityResolver() { + @Override + public int getDefaultResolutionIndex(List sortedVideos) { + return ListHelper.getPopupDefaultResolutionIndex(context, sortedVideos); + } - @Override - protected int getOverrideResolutionIndex(final List sortedVideos, - final String playbackQuality) { - return ListHelper.getPopupResolutionIndex(context, sortedVideos, playbackQuality); + @Override + public int getOverrideResolutionIndex(List sortedVideos, + String playbackQuality) { + return ListHelper.getPopupResolutionIndex(context, sortedVideos, + playbackQuality); + } + }; } /*////////////////////////////////////////////////////////////////////////// @@ -539,8 +545,8 @@ public final class PopupVideoPlayer extends Service { } private void updateMetadata() { - if (activityListener != null && currentInfo != null) { - activityListener.onMetadataUpdate(currentInfo); + if (activityListener != null && getCurrentMetadata() != null) { + activityListener.onMetadataUpdate(getCurrentMetadata().getMetadata()); } } @@ -586,11 +592,8 @@ public final class PopupVideoPlayer extends Service { // Playback Listener //////////////////////////////////////////////////////////////////////////*/ - protected void onMetadataChanged(@NonNull final PlayQueueItem item, - @Nullable final StreamInfo info, - final int newPlayQueueIndex, - final boolean hasPlayQueueItemChanged) { - super.onMetadataChanged(item, info, newPlayQueueIndex, false); + protected void onMetadataChanged(@Nullable final MediaSourceTag tag) { + super.onMetadataChanged(tag); updateMetadata(); } diff --git a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java index 250d02b42..eaec59f65 100644 --- a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java @@ -29,7 +29,6 @@ import android.content.Intent; import android.graphics.Bitmap; import android.graphics.Color; import android.graphics.PorterDuff; -import android.net.Uri; import android.os.Build; import android.os.Handler; import android.support.annotation.NonNull; @@ -47,11 +46,9 @@ import android.widget.SeekBar; import android.widget.TextView; import com.google.android.exoplayer2.C; -import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.PlaybackParameters; import com.google.android.exoplayer2.Player; import com.google.android.exoplayer2.source.MediaSource; -import com.google.android.exoplayer2.source.MergingMediaSource; import com.google.android.exoplayer2.source.TrackGroup; import com.google.android.exoplayer2.source.TrackGroupArray; import com.google.android.exoplayer2.text.CaptionStyleCompat; @@ -62,21 +59,17 @@ import com.google.android.exoplayer2.video.VideoListener; import org.schabi.newpipe.R; import org.schabi.newpipe.extractor.MediaFormat; -import org.schabi.newpipe.extractor.Subtitles; -import org.schabi.newpipe.extractor.stream.AudioStream; import org.schabi.newpipe.extractor.stream.StreamInfo; -import org.schabi.newpipe.extractor.stream.StreamType; import org.schabi.newpipe.extractor.stream.VideoStream; import org.schabi.newpipe.player.helper.PlayerHelper; import org.schabi.newpipe.player.playqueue.PlayQueueItem; +import org.schabi.newpipe.player.resolver.MediaSourceTag; +import org.schabi.newpipe.player.resolver.VideoPlaybackResolver; import org.schabi.newpipe.util.AnimationUtils; -import org.schabi.newpipe.util.ListHelper; import java.util.ArrayList; import java.util.List; -import static com.google.android.exoplayer2.C.SELECTION_FLAG_AUTOSELECT; -import static com.google.android.exoplayer2.C.TIME_UNSET; import static org.schabi.newpipe.player.helper.PlayerHelper.formatSpeed; import static org.schabi.newpipe.player.helper.PlayerHelper.getTimeString; import static org.schabi.newpipe.util.AnimationUtils.animateView; @@ -105,13 +98,12 @@ public abstract class VideoPlayer extends BasePlayer public static final int DEFAULT_CONTROLS_DURATION = 300; // 300 millis public static final int DEFAULT_CONTROLS_HIDE_TIME = 2000; // 2 Seconds - private ArrayList availableStreams; + private List availableStreams; private int selectedStreamIndex; - protected String playbackQuality; - protected boolean wasPlaying = false; + @Nullable private VideoPlaybackResolver resolver; /*////////////////////////////////////////////////////////////////////////// // Views //////////////////////////////////////////////////////////////////////////*/ @@ -244,6 +236,8 @@ public abstract class VideoPlayer extends BasePlayer trackSelector.setParameters(trackSelector.buildUponParameters() .setTunnelingAudioSessionId(C.generateAudioSessionIdV21(context))); } + + resolver = new VideoPlaybackResolver(context, dataSource, getQualityResolver()); } @Override @@ -326,23 +320,18 @@ public abstract class VideoPlayer extends BasePlayer // Playback Listener //////////////////////////////////////////////////////////////////////////*/ - protected abstract int getDefaultResolutionIndex(final List sortedVideos); + protected abstract VideoPlaybackResolver.QualityResolver getQualityResolver(); - protected abstract int getOverrideResolutionIndex(final List sortedVideos, final String playbackQuality); + protected void onMetadataChanged(@NonNull final MediaSourceTag tag) { + super.onMetadataChanged(tag); - protected void onMetadataChanged(@NonNull final PlayQueueItem item, - @Nullable final StreamInfo info, - final int newPlayQueueIndex, - final boolean hasPlayQueueItemChanged) { qualityTextView.setVisibility(View.GONE); playbackSpeedTextView.setVisibility(View.GONE); playbackEndTime.setVisibility(View.GONE); playbackLiveSync.setVisibility(View.GONE); - final StreamType streamType = info == null ? StreamType.NONE : info.getStreamType(); - - switch (streamType) { + switch (tag.getMetadata().getStreamType()) { case AUDIO_STREAM: surfaceView.setVisibility(View.GONE); playbackEndTime.setVisibility(View.VISIBLE); @@ -359,20 +348,14 @@ public abstract class VideoPlayer extends BasePlayer break; case VIDEO_STREAM: + final StreamInfo info = tag.getMetadata(); if (info.getVideoStreams().size() + info.getVideoOnlyStreams().size() == 0) break; - final List videos = ListHelper.getSortedStreamVideosList(context, - info.getVideoStreams(), info.getVideoOnlyStreams(), false); - availableStreams = new ArrayList<>(videos); - if (playbackQuality == null) { - selectedStreamIndex = getDefaultResolutionIndex(videos); - } else { - selectedStreamIndex = getOverrideResolutionIndex(videos, getPlaybackQuality()); - } - + availableStreams = tag.getSortedAvailableVideoStreams(); + selectedStreamIndex = tag.getSelectedVideoStreamIndex(); buildQualityMenu(); - qualityTextView.setVisibility(View.VISIBLE); + qualityTextView.setVisibility(View.VISIBLE); surfaceView.setVisibility(View.VISIBLE); default: playbackEndTime.setVisibility(View.VISIBLE); @@ -386,65 +369,7 @@ public abstract class VideoPlayer extends BasePlayer @Override @Nullable public MediaSource sourceOf(final PlayQueueItem item, final StreamInfo info) { - final MediaSource liveSource = super.sourceOf(item, info); - if (liveSource != null) return liveSource; - - List mediaSources = new ArrayList<>(); - - // Create video stream source - final List videos = ListHelper.getSortedStreamVideosList(context, - info.getVideoStreams(), info.getVideoOnlyStreams(), false); - final int index; - if (videos.isEmpty()) { - index = -1; - } else if (playbackQuality == null) { - index = getDefaultResolutionIndex(videos); - } else { - index = getOverrideResolutionIndex(videos, getPlaybackQuality()); - } - final VideoStream video = index >= 0 && index < videos.size() ? videos.get(index) : null; - if (video != null) { - final MediaSource streamSource = buildMediaSource(video.getUrl(), - PlayerHelper.cacheKeyOf(info, video), - MediaFormat.getSuffixById(video.getFormatId())); - mediaSources.add(streamSource); - } - - // Create optional audio stream source - final List audioStreams = info.getAudioStreams(); - final AudioStream audio = audioStreams.isEmpty() ? null : audioStreams.get( - ListHelper.getDefaultAudioFormat(context, audioStreams)); - // Use the audio stream if there is no video stream, or - // Merge with audio stream in case if video does not contain audio - if (audio != null && ((video != null && video.isVideoOnly) || video == null)) { - final MediaSource audioSource = buildMediaSource(audio.getUrl(), - PlayerHelper.cacheKeyOf(info, audio), - MediaFormat.getSuffixById(audio.getFormatId())); - mediaSources.add(audioSource); - } - - // If there is no audio or video sources, then this media source cannot be played back - if (mediaSources.isEmpty()) return null; - // Below are auxiliary media sources - - // Create subtitle sources - for (final Subtitles subtitle : info.getSubtitles()) { - final String mimeType = PlayerHelper.mimeTypesOf(subtitle.getFileType()); - if (mimeType == null) continue; - - final Format textFormat = Format.createTextSampleFormat(null, mimeType, - SELECTION_FLAG_AUTOSELECT, PlayerHelper.captionLanguageOf(context, subtitle)); - final MediaSource textSource = dataSource.getSampleMediaSourceFactory() - .createMediaSource(Uri.parse(subtitle.getURL()), textFormat, TIME_UNSET); - mediaSources.add(textSource); - } - - if (mediaSources.size() == 1) { - return mediaSources.get(0); - } else { - return new MergingMediaSource(mediaSources.toArray( - new MediaSource[mediaSources.size()])); - } + return resolver == null ? null : resolver.resolve(info); } /*////////////////////////////////////////////////////////////////////////// @@ -908,11 +833,12 @@ public abstract class VideoPlayer extends BasePlayer //////////////////////////////////////////////////////////////////////////*/ public void setPlaybackQuality(final String quality) { - this.playbackQuality = quality; + if (resolver != null) resolver.setPlaybackQuality(quality); } + @Nullable public String getPlaybackQuality() { - return playbackQuality; + return resolver == null ? null : resolver.getPlaybackQuality(); } public AspectRatioFrameLayout getAspectRatioFrameLayout() { diff --git a/app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java b/app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java index 67a8debef..b27dc3dd6 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java +++ b/app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java @@ -5,12 +5,10 @@ import android.support.annotation.Nullable; import android.support.v4.util.ArraySet; import android.util.Log; -import com.google.android.exoplayer2.source.DynamicConcatenatingMediaSource; import com.google.android.exoplayer2.source.MediaSource; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; -import org.schabi.newpipe.extractor.stream.StreamInfo; import org.schabi.newpipe.player.mediasource.FailedMediaSource; import org.schabi.newpipe.player.mediasource.LoadedMediaSource; import org.schabi.newpipe.player.mediasource.ManagedMediaSource; @@ -24,10 +22,8 @@ import org.schabi.newpipe.player.playqueue.events.RemoveEvent; import org.schabi.newpipe.player.playqueue.events.ReorderEvent; import org.schabi.newpipe.util.ServiceHelper; -import java.util.ArrayList; import java.util.Collection; import java.util.Collections; -import java.util.List; import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; @@ -37,8 +33,6 @@ import io.reactivex.Single; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.CompositeDisposable; import io.reactivex.disposables.Disposable; -import io.reactivex.disposables.SerialDisposable; -import io.reactivex.functions.Consumer; import io.reactivex.internal.subscriptions.EmptySubscription; import io.reactivex.schedulers.Schedulers; import io.reactivex.subjects.PublishSubject; @@ -104,7 +98,6 @@ public class MediaSourceManager { private final static int MAXIMUM_LOADER_SIZE = WINDOW_SIZE * 2 + 1; @NonNull private final CompositeDisposable loaderReactor; @NonNull private final Set loadingItems; - @NonNull private final SerialDisposable syncReactor; @NonNull private final AtomicBoolean isBlocked; @@ -144,7 +137,6 @@ public class MediaSourceManager { this.playQueueReactor = EmptySubscription.INSTANCE; this.loaderReactor = new CompositeDisposable(); - this.syncReactor = new SerialDisposable(); this.isBlocked = new AtomicBoolean(false); @@ -171,7 +163,6 @@ public class MediaSourceManager { playQueueReactor.cancel(); loaderReactor.dispose(); - syncReactor.dispose(); } /*////////////////////////////////////////////////////////////////////////// @@ -310,21 +301,7 @@ public class MediaSourceManager { final PlayQueueItem currentItem = playQueue.getItem(); if (isBlocked.get() || currentItem == null) return; - final Consumer onSuccess = info -> syncInternal(currentItem, info); - final Consumer onError = throwable -> syncInternal(currentItem, null); - - final Disposable sync = currentItem.getStream() - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(onSuccess, onError); - syncReactor.set(sync); - } - - private void syncInternal(@NonNull final PlayQueueItem item, - @Nullable final StreamInfo info) { - // Ensure the current item is up to date with the play queue - if (playQueue.getItem() == item) { - playbackListener.onPlaybackSynchronize(item, info); - } + playbackListener.onPlaybackSynchronize(currentItem); } private synchronized void maybeSynchronizePlayer() { @@ -423,7 +400,8 @@ public class MediaSourceManager { } /** - * Checks if the corresponding MediaSource in {@link DynamicConcatenatingMediaSource} + * Checks if the corresponding MediaSource in + * {@link com.google.android.exoplayer2.source.ConcatenatingMediaSource} * for a given {@link PlayQueueItem} needs replacement, either due to gapless playback * readiness or playlist desynchronization. *

diff --git a/app/src/main/java/org/schabi/newpipe/player/playback/PlaybackListener.java b/app/src/main/java/org/schabi/newpipe/player/playback/PlaybackListener.java index 4dcb30aa3..238bdfcd0 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playback/PlaybackListener.java +++ b/app/src/main/java/org/schabi/newpipe/player/playback/PlaybackListener.java @@ -45,7 +45,7 @@ public interface PlaybackListener { * * May be called anytime at any amount once unblock is called. * */ - void onPlaybackSynchronize(@NonNull final PlayQueueItem item, @Nullable final StreamInfo info); + void onPlaybackSynchronize(@NonNull final PlayQueueItem item); /** * Requests the listener to resolve a stream info into a media source diff --git a/app/src/main/java/org/schabi/newpipe/player/resolver/AudioPlaybackResolver.java b/app/src/main/java/org/schabi/newpipe/player/resolver/AudioPlaybackResolver.java new file mode 100644 index 000000000..f95f0e3bb --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/player/resolver/AudioPlaybackResolver.java @@ -0,0 +1,39 @@ +package org.schabi.newpipe.player.resolver; + +import android.content.Context; +import android.support.annotation.NonNull; + +import com.google.android.exoplayer2.source.MediaSource; + +import org.schabi.newpipe.extractor.MediaFormat; +import org.schabi.newpipe.extractor.stream.AudioStream; +import org.schabi.newpipe.extractor.stream.StreamInfo; +import org.schabi.newpipe.player.helper.PlayerDataSource; +import org.schabi.newpipe.player.helper.PlayerHelper; +import org.schabi.newpipe.util.ListHelper; + +public class AudioPlaybackResolver implements PlaybackResolver { + + @NonNull private final Context context; + @NonNull private final PlayerDataSource dataSource; + + public AudioPlaybackResolver(@NonNull final Context context, + @NonNull final PlayerDataSource dataSource) { + this.context = context; + this.dataSource = dataSource; + } + + @Override + public MediaSource resolve(@NonNull StreamInfo info) { + final MediaSource liveSource = maybeBuildLiveMediaSource(dataSource, info); + if (liveSource != null) return liveSource; + + final int index = ListHelper.getDefaultAudioFormat(context, info.getAudioStreams()); + if (index < 0 || index >= info.getAudioStreams().size()) return null; + + final AudioStream audio = info.getAudioStreams().get(index); + final MediaSourceTag tag = new MediaSourceTag(info); + return buildMediaSource(dataSource, audio.getUrl(), PlayerHelper.cacheKeyOf(info, audio), + MediaFormat.getSuffixById(audio.getFormatId()), tag); + } +} diff --git a/app/src/main/java/org/schabi/newpipe/player/resolver/MediaSourceTag.java b/app/src/main/java/org/schabi/newpipe/player/resolver/MediaSourceTag.java new file mode 100644 index 000000000..bbe5d33ca --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/player/resolver/MediaSourceTag.java @@ -0,0 +1,51 @@ +package org.schabi.newpipe.player.resolver; + +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; + +import org.schabi.newpipe.extractor.stream.StreamInfo; +import org.schabi.newpipe.extractor.stream.VideoStream; + +import java.io.Serializable; +import java.util.Collections; +import java.util.List; + +public class MediaSourceTag implements Serializable { + @NonNull private final StreamInfo metadata; + + @NonNull private final List sortedAvailableVideoStreams; + private final int selectedVideoStreamIndex; + + public MediaSourceTag(@NonNull final StreamInfo metadata, + @NonNull final List sortedAvailableVideoStreams, + final int selectedVideoStreamIndex) { + this.metadata = metadata; + this.sortedAvailableVideoStreams = sortedAvailableVideoStreams; + this.selectedVideoStreamIndex = selectedVideoStreamIndex; + } + + public MediaSourceTag(@NonNull final StreamInfo metadata) { + this(metadata, Collections.emptyList(), /*indexNotAvailable=*/-1); + } + + @NonNull + public StreamInfo getMetadata() { + return metadata; + } + + @NonNull + public List getSortedAvailableVideoStreams() { + return sortedAvailableVideoStreams; + } + + public int getSelectedVideoStreamIndex() { + return selectedVideoStreamIndex; + } + + @Nullable + public VideoStream getSelectedVideoStream() { + return selectedVideoStreamIndex < 0 || + selectedVideoStreamIndex >= sortedAvailableVideoStreams.size() ? null : + sortedAvailableVideoStreams.get(selectedVideoStreamIndex); + } +} diff --git a/app/src/main/java/org/schabi/newpipe/player/resolver/PlaybackResolver.java b/app/src/main/java/org/schabi/newpipe/player/resolver/PlaybackResolver.java new file mode 100644 index 000000000..1da3ec211 --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/player/resolver/PlaybackResolver.java @@ -0,0 +1,84 @@ +package org.schabi.newpipe.player.resolver; + +import android.net.Uri; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import android.text.TextUtils; + +import com.google.android.exoplayer2.C; +import com.google.android.exoplayer2.source.MediaSource; +import com.google.android.exoplayer2.util.Util; + +import org.schabi.newpipe.extractor.stream.StreamInfo; +import org.schabi.newpipe.extractor.stream.StreamType; +import org.schabi.newpipe.player.helper.PlayerDataSource; + +public interface PlaybackResolver extends Resolver { + + @Nullable + default MediaSource maybeBuildLiveMediaSource(@NonNull final PlayerDataSource dataSource, + @NonNull final StreamInfo info) { + final StreamType streamType = info.getStreamType(); + if (!(streamType == StreamType.AUDIO_LIVE_STREAM || streamType == StreamType.LIVE_STREAM)) { + return null; + } + + final MediaSourceTag tag = new MediaSourceTag(info); + if (!info.getHlsUrl().isEmpty()) { + return buildLiveMediaSource(dataSource, info.getHlsUrl(), C.TYPE_HLS, tag); + } else if (!info.getDashMpdUrl().isEmpty()) { + return buildLiveMediaSource(dataSource, info.getDashMpdUrl(), C.TYPE_DASH, tag); + } + + return null; + } + + @NonNull + default MediaSource buildLiveMediaSource(@NonNull final PlayerDataSource dataSource, + @NonNull final String sourceUrl, + @C.ContentType final int type, + @NonNull final MediaSourceTag metadata) { + final Uri uri = Uri.parse(sourceUrl); + switch (type) { + case C.TYPE_SS: + return dataSource.getLiveSsMediaSourceFactory().setTag(metadata) + .createMediaSource(uri); + case C.TYPE_DASH: + return dataSource.getLiveDashMediaSourceFactory().setTag(metadata) + .createMediaSource(uri); + case C.TYPE_HLS: + return dataSource.getLiveHlsMediaSourceFactory().setTag(metadata) + .createMediaSource(uri); + default: + throw new IllegalStateException("Unsupported type: " + type); + } + } + + @NonNull + default MediaSource buildMediaSource(@NonNull final PlayerDataSource dataSource, + @NonNull final String sourceUrl, + @NonNull final String cacheKey, + @NonNull final String overrideExtension, + @NonNull final MediaSourceTag metadata) { + final Uri uri = Uri.parse(sourceUrl); + @C.ContentType final int type = TextUtils.isEmpty(overrideExtension) ? + Util.inferContentType(uri) : Util.inferContentType("." + overrideExtension); + + switch (type) { + case C.TYPE_SS: + return dataSource.getLiveSsMediaSourceFactory().setTag(metadata) + .createMediaSource(uri); + case C.TYPE_DASH: + return dataSource.getDashMediaSourceFactory().setTag(metadata) + .createMediaSource(uri); + case C.TYPE_HLS: + return dataSource.getHlsMediaSourceFactory().setTag(metadata) + .createMediaSource(uri); + case C.TYPE_OTHER: + return dataSource.getExtractorMediaSourceFactory(cacheKey).setTag(metadata) + .createMediaSource(uri); + default: + throw new IllegalStateException("Unsupported type: " + type); + } + } +} diff --git a/app/src/main/java/org/schabi/newpipe/player/resolver/Resolver.java b/app/src/main/java/org/schabi/newpipe/player/resolver/Resolver.java new file mode 100644 index 000000000..e4f81385a --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/player/resolver/Resolver.java @@ -0,0 +1,7 @@ +package org.schabi.newpipe.player.resolver; + +import android.support.annotation.NonNull; + +public interface Resolver { + Produce resolve(@NonNull Source source); +} 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 new file mode 100644 index 000000000..5aa42ce3c --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/player/resolver/VideoPlaybackResolver.java @@ -0,0 +1,122 @@ +package org.schabi.newpipe.player.resolver; + +import android.content.Context; +import android.net.Uri; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; + +import com.google.android.exoplayer2.Format; +import com.google.android.exoplayer2.source.MediaSource; +import com.google.android.exoplayer2.source.MergingMediaSource; + +import org.schabi.newpipe.extractor.MediaFormat; +import org.schabi.newpipe.extractor.Subtitles; +import org.schabi.newpipe.extractor.stream.AudioStream; +import org.schabi.newpipe.extractor.stream.StreamInfo; +import org.schabi.newpipe.extractor.stream.VideoStream; +import org.schabi.newpipe.player.helper.PlayerDataSource; +import org.schabi.newpipe.player.helper.PlayerHelper; +import org.schabi.newpipe.util.ListHelper; + +import java.util.ArrayList; +import java.util.List; + +import static com.google.android.exoplayer2.C.SELECTION_FLAG_AUTOSELECT; +import static com.google.android.exoplayer2.C.TIME_UNSET; + +public class VideoPlaybackResolver implements PlaybackResolver { + + public interface QualityResolver { + int getDefaultResolutionIndex(final List sortedVideos); + int getOverrideResolutionIndex(final List sortedVideos, + final String playbackQuality); + } + + @NonNull private final Context context; + @NonNull private final PlayerDataSource dataSource; + @NonNull private final QualityResolver qualityResolver; + + @Nullable private String playbackQuality; + + public VideoPlaybackResolver(@NonNull final Context context, + @NonNull final PlayerDataSource dataSource, + @NonNull final QualityResolver qualityResolver) { + this.context = context; + this.dataSource = dataSource; + this.qualityResolver = qualityResolver; + } + + @Override + public MediaSource resolve(@NonNull StreamInfo info) { + final MediaSource liveSource = maybeBuildLiveMediaSource(dataSource, info); + if (liveSource != null) return liveSource; + + List mediaSources = new ArrayList<>(); + + // Create video stream source + final List videos = ListHelper.getSortedStreamVideosList(context, + info.getVideoStreams(), info.getVideoOnlyStreams(), false); + final int index; + if (videos.isEmpty()) { + index = -1; + } else if (playbackQuality == null) { + index = qualityResolver.getDefaultResolutionIndex(videos); + } else { + index = qualityResolver.getOverrideResolutionIndex(videos, getPlaybackQuality()); + } + final MediaSourceTag tag = new MediaSourceTag(info, videos, index); + @Nullable final VideoStream video = tag.getSelectedVideoStream(); + + if (video != null) { + final MediaSource streamSource = buildMediaSource(dataSource, video.getUrl(), + PlayerHelper.cacheKeyOf(info, video), + MediaFormat.getSuffixById(video.getFormatId()), tag); + mediaSources.add(streamSource); + } + + // Create optional audio stream source + final List audioStreams = info.getAudioStreams(); + final AudioStream audio = audioStreams.isEmpty() ? null : audioStreams.get( + ListHelper.getDefaultAudioFormat(context, audioStreams)); + // Use the audio stream if there is no video stream, or + // Merge with audio stream in case if video does not contain audio + if (audio != null && ((video != null && video.isVideoOnly) || video == null)) { + final MediaSource audioSource = buildMediaSource(dataSource, audio.getUrl(), + PlayerHelper.cacheKeyOf(info, audio), + MediaFormat.getSuffixById(audio.getFormatId()), tag); + mediaSources.add(audioSource); + } + + // If there is no audio or video sources, then this media source cannot be played back + if (mediaSources.isEmpty()) return null; + // Below are auxiliary media sources + + // Create subtitle sources + for (final Subtitles subtitle : info.getSubtitles()) { + final String mimeType = PlayerHelper.mimeTypesOf(subtitle.getFileType()); + if (mimeType == null) continue; + + final Format textFormat = Format.createTextSampleFormat(null, mimeType, + SELECTION_FLAG_AUTOSELECT, PlayerHelper.captionLanguageOf(context, subtitle)); + final MediaSource textSource = dataSource.getSampleMediaSourceFactory() + .createMediaSource(Uri.parse(subtitle.getURL()), textFormat, TIME_UNSET); + mediaSources.add(textSource); + } + + if (mediaSources.size() == 1) { + return mediaSources.get(0); + } else { + return new MergingMediaSource(mediaSources.toArray( + new MediaSource[mediaSources.size()])); + } + } + + @Nullable + public String getPlaybackQuality() { + return playbackQuality; + } + + public void setPlaybackQuality(@Nullable String playbackQuality) { + this.playbackQuality = playbackQuality; + } +} From 5c202f04e7babd401584149bc4e92c124e484867 Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Thu, 10 May 2018 17:48:05 -0700 Subject: [PATCH 005/103] -[#1383]Fixed popup player caption selector not populating due to full width aspect ratio selector. -Fixed potential memory leak in media session connector containing player instance. --- .../org/schabi/newpipe/player/BasePlayer.java | 22 ++++--------------- .../player/helper/MediaSessionManager.java | 5 ++++- app/src/main/res/layout/player_popup.xml | 2 +- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index 2cbef93e4..a0607621e 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -285,9 +285,11 @@ public abstract class BasePlayer implements destroyPlayer(); unregisterBroadcastReceiver(); + if (mediaSessionManager != null) mediaSessionManager.dispose(); + trackSelector = null; - simpleExoPlayer = null; mediaSessionManager = null; + simpleExoPlayer = null; } /*////////////////////////////////////////////////////////////////////////// @@ -494,22 +496,6 @@ public abstract class BasePlayer implements (manifest == null ? "no manifest" : "available manifest") + ", " + "timeline size = [" + timeline.getWindowCount() + "], " + "reason = [" + reason + "]"); - if (playQueue == null) return; - - switch (reason) { - case Player.TIMELINE_CHANGE_REASON_RESET: // called after #block - case Player.TIMELINE_CHANGE_REASON_PREPARED: // called after #unblock - case Player.TIMELINE_CHANGE_REASON_DYNAMIC: // called after playlist changes - // Ensures MediaSourceManager#update is complete - final boolean isPlaylistStable = timeline.getWindowCount() == playQueue.size(); - // Ensure dynamic/livestream timeline changes does not cause negative position - if (isPlaylistStable && !isCurrentWindowValid() && !isSynchronizing) { - if (DEBUG) Log.d(TAG, "Playback - negative time position reached, " + - "clamping to default position."); - seekToDefault(); - } - break; - } } @Override @@ -598,7 +584,7 @@ public abstract class BasePlayer implements } else if (isSynchronizing && isLive()) { // Is still synchronizing? if (DEBUG) Log.d(TAG, "Playback - Synchronizing livestream to default time"); - seekToDefault(); + //seekToDefault(); } else if (isSynchronizing && presetStartPositionMillis > 0L) { // Has another start position? diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/MediaSessionManager.java b/app/src/main/java/org/schabi/newpipe/player/helper/MediaSessionManager.java index b174ed3ed..63c0bf333 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/MediaSessionManager.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/MediaSessionManager.java @@ -39,10 +39,13 @@ public class MediaSessionManager { return MediaButtonReceiver.handleIntent(mediaSession, intent); } + /** + * Should be called on player destruction to prevent leakage. + * */ public void dispose() { this.sessionConnector.setPlayer(null, null); this.sessionConnector.setQueueNavigator(null); this.mediaSession.setActive(false); this.mediaSession.release(); - } + } } diff --git a/app/src/main/res/layout/player_popup.xml b/app/src/main/res/layout/player_popup.xml index f866cf002..001d43bf6 100644 --- a/app/src/main/res/layout/player_popup.xml +++ b/app/src/main/res/layout/player_popup.xml @@ -111,7 +111,7 @@ Date: Fri, 11 May 2018 17:20:36 -0700 Subject: [PATCH 006/103] -Fixed bookmarked playlist not updating metadata when changed. --- .../newpipe/fragments/list/playlist/PlaylistFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java index ca732aa2c..161bca694 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java @@ -289,6 +289,7 @@ public class PlaylistFragment extends BaseListInfoFragment { remotePlaylistManager.getPlaylist(result) .flatMap(lists -> getUpdateProcessor(lists, result), (lists, id) -> lists) .onBackpressureLatest() + .flatMap(lists -> getUpdateProcessor(lists, result), (lists, id) -> lists) .observeOn(AndroidSchedulers.mainThread()) .subscribe(getPlaylistBookmarkSubscriber()); @@ -354,7 +355,6 @@ public class PlaylistFragment extends BaseListInfoFragment { final PlaylistRemoteEntity playlistEntity = playlists.get(0); if (playlistEntity.isIdenticalTo(result)) return noItemToUpdate; - return remotePlaylistManager.onUpdate(playlists.get(0).getUid(), result).toFlowable(); } From 19b8796cbcf827c86d69250e368cb2255869a51c Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Fri, 11 May 2018 19:21:40 -0700 Subject: [PATCH 007/103] -Fixed statistics fragment button not animating when pressed. -Removed background player notification button opacity change. --- .../newpipe/player/BackgroundPlayer.java | 27 ------------------- .../res/layout/statistic_playlist_control.xml | 5 ++-- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java index b5135bd84..37b7e4c64 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -26,9 +26,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.graphics.Bitmap; -import android.os.Build; import android.os.IBinder; -import android.support.annotation.IntRange; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.NotificationCompat; @@ -92,7 +90,6 @@ public final class BackgroundPlayer extends Service { private NotificationCompat.Builder notBuilder; private RemoteViews notRemoteView; private RemoteViews bigNotRemoteView; - private final String setAlphaMethodName = (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) ? "setImageAlpha" : "setAlpha"; private boolean shouldUpdateOnProgress; @@ -246,16 +243,6 @@ public final class BackgroundPlayer extends Service { } notificationManager.notify(NOTIFICATION_ID, notBuilder.build()); } - - private void setControlsOpacity(@IntRange(from = 0, to = 255) int opacity) { - if (notRemoteView != null) notRemoteView.setInt(R.id.notificationPlayPause, setAlphaMethodName, opacity); - if (bigNotRemoteView != null) bigNotRemoteView.setInt(R.id.notificationPlayPause, setAlphaMethodName, opacity); - if (notRemoteView != null) notRemoteView.setInt(R.id.notificationFForward, setAlphaMethodName, opacity); - if (bigNotRemoteView != null) bigNotRemoteView.setInt(R.id.notificationFForward, setAlphaMethodName, opacity); - if (notRemoteView != null) notRemoteView.setInt(R.id.notificationFRewind, setAlphaMethodName, opacity); - if (bigNotRemoteView != null) bigNotRemoteView.setInt(R.id.notificationFRewind, setAlphaMethodName, opacity); - } - /*////////////////////////////////////////////////////////////////////////// // Utils //////////////////////////////////////////////////////////////////////////*/ @@ -525,32 +512,20 @@ public final class BackgroundPlayer extends Service { public void changeState(int state) { super.changeState(state); updatePlayback(); - } - - @Override - public void onBlocked() { - super.onBlocked(); - - setControlsOpacity(77); updateNotification(-1); } @Override public void onPlaying() { super.onPlaying(); - - setControlsOpacity(255); updateNotification(R.drawable.ic_pause_white); - lockManager.acquireWifiAndCpu(); } @Override public void onPaused() { super.onPaused(); - updateNotification(R.drawable.ic_play_arrow_white); - lockManager.releaseWifiAndCpu(); } @@ -558,8 +533,6 @@ public final class BackgroundPlayer extends Service { public void onCompleted() { super.onCompleted(); - setControlsOpacity(255); - resetNotification(); if (bigNotRemoteView != null) bigNotRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 100, false); if (notRemoteView != null) notRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 100, false); diff --git a/app/src/main/res/layout/statistic_playlist_control.xml b/app/src/main/res/layout/statistic_playlist_control.xml index 8dc4e8c08..ff2b70524 100644 --- a/app/src/main/res/layout/statistic_playlist_control.xml +++ b/app/src/main/res/layout/statistic_playlist_control.xml @@ -4,7 +4,6 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/selectableItemBackground" android:orientation="vertical"> + android:focusable="true" + android:background="?attr/selectableItemBackground"> + Date: Fri, 11 May 2018 19:42:39 -0700 Subject: [PATCH 008/103] -Reduced fling speed required to close popup by 40%. --- .../java/org/schabi/newpipe/player/helper/PlayerHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java index d10b99aec..275f488e3 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java @@ -252,7 +252,7 @@ public class PlayerHelper { } public static int getShutdownFlingVelocity(@NonNull final Context context) { - return 10000; + return 6000; } public static int getTossFlingVelocity(@NonNull final Context context) { From 13587d7ab373253eae3a3f8590d9d62057e5d634 Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Fri, 11 May 2018 20:09:02 -0700 Subject: [PATCH 009/103] -Fixed some typos. --- .../schabi/newpipe/player/helper/PlaybackParameterDialog.java | 2 +- .../java/org/schabi/newpipe/player/resolver/Resolver.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java index 60e43ff7d..c53680835 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java @@ -21,7 +21,7 @@ import static org.schabi.newpipe.player.BasePlayer.DEBUG; public class PlaybackParameterDialog extends DialogFragment { @NonNull private static final String TAG = "PlaybackParameterDialog"; - // Maximum allowable range in ExoPlayer + // Minimum allowable range in ExoPlayer public static final double MINIMUM_PLAYBACK_VALUE = 0.10f; public static final double MAXIMUM_PLAYBACK_VALUE = 3.00f; diff --git a/app/src/main/java/org/schabi/newpipe/player/resolver/Resolver.java b/app/src/main/java/org/schabi/newpipe/player/resolver/Resolver.java index e4f81385a..a7d4448e4 100644 --- a/app/src/main/java/org/schabi/newpipe/player/resolver/Resolver.java +++ b/app/src/main/java/org/schabi/newpipe/player/resolver/Resolver.java @@ -2,6 +2,6 @@ package org.schabi.newpipe.player.resolver; import android.support.annotation.NonNull; -public interface Resolver { - Produce resolve(@NonNull Source source); +public interface Resolver { + Product resolve(@NonNull Source source); } From 0a2dbc468809f779edf9190bdcf18d8d4be4c9d9 Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Wed, 16 May 2018 18:08:19 -0700 Subject: [PATCH 010/103] -Fixed playlist fragment infinite update cycle. -Updated Room DB version to 1.1.0. --- .../newpipe/fragments/list/playlist/PlaylistFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java index 161bca694..ca732aa2c 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java @@ -289,7 +289,6 @@ public class PlaylistFragment extends BaseListInfoFragment { remotePlaylistManager.getPlaylist(result) .flatMap(lists -> getUpdateProcessor(lists, result), (lists, id) -> lists) .onBackpressureLatest() - .flatMap(lists -> getUpdateProcessor(lists, result), (lists, id) -> lists) .observeOn(AndroidSchedulers.mainThread()) .subscribe(getPlaylistBookmarkSubscriber()); @@ -355,6 +354,7 @@ public class PlaylistFragment extends BaseListInfoFragment { final PlaylistRemoteEntity playlistEntity = playlists.get(0); if (playlistEntity.isIdenticalTo(result)) return noItemToUpdate; + return remotePlaylistManager.onUpdate(playlists.get(0).getUid(), result).toFlowable(); } From f1f5996975cb3a5315c98dbeaa5e108105a2a4b8 Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Wed, 16 May 2018 18:18:32 -0700 Subject: [PATCH 011/103] -Refactored playback resolvers and other persistent player objects to instantiate once only during player creation to enforce non-nullity. -Fixed background and popup player service staying in foreground when playback is paused or completed. -Fixed player metadata not updating on new stream. -Fixed player intent playback quality not applied. -Fixed player auto-queue not applied after stream transition or swapping. --- .../newpipe/player/BackgroundPlayer.java | 101 +++++++++++++---- .../org/schabi/newpipe/player/BasePlayer.java | 103 ++++++++++-------- .../newpipe/player/MainVideoPlayer.java | 8 +- .../newpipe/player/PopupVideoPlayer.java | 85 +++++++++++---- .../schabi/newpipe/player/VideoPlayer.java | 18 ++- .../resolver/AudioPlaybackResolver.java | 2 + .../newpipe/player/resolver/Resolver.java | 3 +- .../resolver/VideoPlaybackResolver.java | 1 + 8 files changed, 219 insertions(+), 102 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java index 37b7e4c64..c5c9f0615 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -37,6 +37,7 @@ import android.widget.RemoteViews; import com.google.android.exoplayer2.PlaybackParameters; import com.google.android.exoplayer2.Player; import com.google.android.exoplayer2.source.MediaSource; +import com.nostra13.universalimageloader.core.assist.FailReason; import org.schabi.newpipe.BuildConfig; import org.schabi.newpipe.R; @@ -264,16 +265,16 @@ public final class BackgroundPlayer extends Service { protected class BasePlayerImpl extends BasePlayer { - @Nullable private AudioPlaybackResolver resolver; + @NonNull final private AudioPlaybackResolver resolver; BasePlayerImpl(Context context) { super(context); + this.resolver = new AudioPlaybackResolver(context, dataSource); } @Override public void initPlayer(boolean playOnReady) { super.initPlayer(playOnReady); - resolver = new AudioPlaybackResolver(context, dataSource); } @Override @@ -286,30 +287,65 @@ public final class BackgroundPlayer extends Service { startForeground(NOTIFICATION_ID, notBuilder.build()); } - @Override - public void initThumbnail(final String url) { + /*////////////////////////////////////////////////////////////////////////// + // Thumbnail Loading + //////////////////////////////////////////////////////////////////////////*/ + + private void setDummyRemoteViewThumbnail() { resetNotification(); - if (notRemoteView != null) notRemoteView.setImageViewResource(R.id.notificationCover, R.drawable.dummy_thumbnail); - if (bigNotRemoteView != null) bigNotRemoteView.setImageViewResource(R.id.notificationCover, R.drawable.dummy_thumbnail); + if (notRemoteView != null) { + notRemoteView.setImageViewResource(R.id.notificationCover, + R.drawable.dummy_thumbnail); + } + if (bigNotRemoteView != null) { + bigNotRemoteView.setImageViewResource(R.id.notificationCover, + R.drawable.dummy_thumbnail); + } updateNotification(-1); - super.initThumbnail(url); + } + + @Override + public void onLoadingStarted(String imageUri, View view) { + super.onLoadingStarted(imageUri, view); + setDummyRemoteViewThumbnail(); } @Override public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) { super.onLoadingComplete(imageUri, view, loadedImage); - - if (loadedImage != null) { - // rebuild notification here since remote view does not release bitmaps, causing memory leaks - resetNotification(); - - if (notRemoteView != null) notRemoteView.setImageViewBitmap(R.id.notificationCover, loadedImage); - if (bigNotRemoteView != null) bigNotRemoteView.setImageViewBitmap(R.id.notificationCover, loadedImage); - - updateNotification(-1); + if (loadedImage == null) { + setDummyRemoteViewThumbnail(); + return; } + + // rebuild notification here since remote view does not release bitmaps, + // causing memory leaks + resetNotification(); + if (notRemoteView != null) { + notRemoteView.setImageViewBitmap(R.id.notificationCover, loadedImage); + } + if (bigNotRemoteView != null) { + bigNotRemoteView.setImageViewBitmap(R.id.notificationCover, loadedImage); + } + updateNotification(-1); } + @Override + public void onLoadingFailed(String imageUri, View view, FailReason failReason) { + super.onLoadingFailed(imageUri, view, failReason); + setDummyRemoteViewThumbnail(); + } + + @Override + public void onLoadingCancelled(String imageUri, View view) { + super.onLoadingCancelled(imageUri, view); + setDummyRemoteViewThumbnail(); + } + + /*////////////////////////////////////////////////////////////////////////// + // States Implementation + //////////////////////////////////////////////////////////////////////////*/ + @Override public void onPrepared(boolean playWhenReady) { super.onPrepared(playWhenReady); @@ -385,17 +421,15 @@ public final class BackgroundPlayer extends Service { protected void onMetadataChanged(@NonNull final MediaSourceTag tag) { super.onMetadataChanged(tag); - if (shouldUpdateOnProgress) { - resetNotification(); - updateNotification(-1); - updateMetadata(); - } + resetNotification(); + updateNotification(-1); + updateMetadata(); } @Override @Nullable public MediaSource sourceOf(final PlayQueueItem item, final StreamInfo info) { - return resolver == null ? null : resolver.resolve(info); + return resolver.resolve(info); } @Override @@ -515,18 +549,40 @@ public final class BackgroundPlayer extends Service { updateNotification(-1); } + @Override + public void onBlocked() { + super.onBlocked(); + startForeground(NOTIFICATION_ID, notBuilder.build()); + } + + @Override + public void onBuffering() { + super.onBuffering(); + startForeground(NOTIFICATION_ID, notBuilder.build()); + } + + @Override + public void onPausedSeek() { + super.onPausedSeek(); + startForeground(NOTIFICATION_ID, notBuilder.build()); + } + @Override public void onPlaying() { super.onPlaying(); updateNotification(R.drawable.ic_pause_white); + lockManager.acquireWifiAndCpu(); + startForeground(NOTIFICATION_ID, notBuilder.build()); } @Override public void onPaused() { super.onPaused(); updateNotification(R.drawable.ic_play_arrow_white); + lockManager.releaseWifiAndCpu(); + stopForeground(false); } @Override @@ -539,6 +595,7 @@ public final class BackgroundPlayer extends Service { updateNotification(R.drawable.ic_replay_white); lockManager.releaseWifiAndCpu(); + stopForeground(false); } } } diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index a0607621e..3f50cf149 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -68,6 +68,7 @@ import org.schabi.newpipe.player.playqueue.PlayQueue; import org.schabi.newpipe.player.playqueue.PlayQueueAdapter; import org.schabi.newpipe.player.playqueue.PlayQueueItem; import org.schabi.newpipe.player.resolver.MediaSourceTag; +import org.schabi.newpipe.util.ImageDisplayConstants; import org.schabi.newpipe.util.SerializedCache; import java.io.IOException; @@ -78,6 +79,7 @@ import io.reactivex.Observable; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.CompositeDisposable; import io.reactivex.disposables.Disposable; +import io.reactivex.disposables.SerialDisposable; import static com.google.android.exoplayer2.Player.DISCONTINUITY_REASON_INTERNAL; import static com.google.android.exoplayer2.Player.DISCONTINUITY_REASON_PERIOD_TRANSITION; @@ -104,6 +106,14 @@ public abstract class BasePlayer implements @NonNull final protected HistoryRecordManager recordManager; + @NonNull final protected CustomTrackSelector trackSelector; + @NonNull final protected PlayerDataSource dataSource; + + @NonNull final private LoadControl loadControl; + @NonNull final private RenderersFactory renderFactory; + + @NonNull final private SerialDisposable progressUpdateReactor; + @NonNull final private CompositeDisposable databaseUpdateReactor; /*////////////////////////////////////////////////////////////////////////// // Intent //////////////////////////////////////////////////////////////////////////*/ @@ -142,9 +152,6 @@ public abstract class BasePlayer implements protected final static int PROGRESS_LOOP_INTERVAL_MILLIS = 500; protected final static int RECOVERY_SKIP_THRESHOLD_MILLIS = 3000; // 3 seconds - protected CustomTrackSelector trackSelector; - protected PlayerDataSource dataSource; - protected SimpleExoPlayer simpleExoPlayer; protected AudioReactor audioReactor; protected MediaSessionManager mediaSessionManager; @@ -152,9 +159,6 @@ public abstract class BasePlayer implements private boolean isPrepared = false; private boolean isSynchronizing = false; - protected Disposable progressUpdateReactor; - protected CompositeDisposable databaseUpdateReactor; - //////////////////////////////////////////////////////////////////////////*/ public BasePlayer(@NonNull final Context context) { @@ -171,29 +175,32 @@ public abstract class BasePlayer implements context.registerReceiver(broadcastReceiver, intentFilter); this.recordManager = new HistoryRecordManager(context); + + this.progressUpdateReactor = new SerialDisposable(); + this.databaseUpdateReactor = new CompositeDisposable(); + + final String userAgent = Downloader.USER_AGENT; + final DefaultBandwidthMeter bandwidthMeter = new DefaultBandwidthMeter(); + this.dataSource = new PlayerDataSource(context, userAgent, bandwidthMeter); + + final TrackSelection.Factory trackSelectionFactory = + PlayerHelper.getQualitySelector(context, bandwidthMeter); + this.trackSelector = new CustomTrackSelector(trackSelectionFactory); + + this.loadControl = new LoadController(context); + this.renderFactory = new DefaultRenderersFactory(context); } public void setup() { - if (simpleExoPlayer == null) initPlayer(/*playOnInit=*/true); + if (simpleExoPlayer == null) { + initPlayer(/*playOnInit=*/true); + } initListeners(); } public void initPlayer(final boolean playOnReady) { if (DEBUG) Log.d(TAG, "initPlayer() called with: context = [" + context + "]"); - if (databaseUpdateReactor != null) databaseUpdateReactor.dispose(); - databaseUpdateReactor = new CompositeDisposable(); - - final String userAgent = Downloader.USER_AGENT; - final DefaultBandwidthMeter bandwidthMeter = new DefaultBandwidthMeter(); - dataSource = new PlayerDataSource(context, userAgent, bandwidthMeter); - - final TrackSelection.Factory trackSelectionFactory = - PlayerHelper.getQualitySelector(context, bandwidthMeter); - trackSelector = new CustomTrackSelector(trackSelectionFactory); - - final LoadControl loadControl = new LoadController(context); - final RenderersFactory renderFactory = new DefaultRenderersFactory(context); simpleExoPlayer = ExoPlayerFactory.newSimpleInstance(renderFactory, trackSelector, loadControl); simpleExoPlayer.addListener(this); simpleExoPlayer.setPlayWhenReady(playOnReady); @@ -287,7 +294,6 @@ public abstract class BasePlayer implements if (mediaSessionManager != null) mediaSessionManager.dispose(); - trackSelector = null; mediaSessionManager = null; simpleExoPlayer = null; } @@ -296,11 +302,12 @@ public abstract class BasePlayer implements // Thumbnail Loading //////////////////////////////////////////////////////////////////////////*/ - public void initThumbnail(final String url) { + private void initThumbnail(final String url) { if (DEBUG) Log.d(TAG, "Thumbnail - initThumbnail() called"); if (url == null || url.isEmpty()) return; ImageLoader.getInstance().resume(); - ImageLoader.getInstance().loadImage(url, this); + ImageLoader.getInstance().loadImage(url, ImageDisplayConstants.DISPLAY_THUMBNAIL_OPTIONS, + this); } @Override @@ -461,13 +468,11 @@ public abstract class BasePlayer implements public abstract void onUpdateProgress(int currentProgress, int duration, int bufferPercent); protected void startProgressLoop() { - if (progressUpdateReactor != null) progressUpdateReactor.dispose(); - progressUpdateReactor = getProgressReactor(); + progressUpdateReactor.set(getProgressReactor()); } protected void stopProgressLoop() { - if (progressUpdateReactor != null) progressUpdateReactor.dispose(); - progressUpdateReactor = null; + progressUpdateReactor.set(null); } public void triggerProgressUpdate() { @@ -482,7 +487,8 @@ public abstract class BasePlayer implements private Disposable getProgressReactor() { return Observable.interval(PROGRESS_LOOP_INTERVAL_MILLIS, TimeUnit.MILLISECONDS) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(ignored -> triggerProgressUpdate()); + .subscribe(ignored -> triggerProgressUpdate(), + error -> Log.e(TAG, "Progress update failure: ", error)); } /*////////////////////////////////////////////////////////////////////////// @@ -496,12 +502,16 @@ public abstract class BasePlayer implements (manifest == null ? "no manifest" : "available manifest") + ", " + "timeline size = [" + timeline.getWindowCount() + "], " + "reason = [" + reason + "]"); + + maybeUpdateCurrentMetadata(); } @Override public void onTracksChanged(TrackGroupArray trackGroups, TrackSelectionArray trackSelections) { if (DEBUG) Log.d(TAG, "ExoPlayer - onTracksChanged(), " + "track group size = " + trackGroups.length); + + maybeUpdateCurrentMetadata(); } @Override @@ -521,6 +531,8 @@ public abstract class BasePlayer implements } else if (isLoading && !isProgressLoopRunning()) { startProgressLoop(); } + + maybeUpdateCurrentMetadata(); } @Override @@ -665,24 +677,22 @@ public abstract class BasePlayer implements if (DEBUG) Log.d(TAG, "ExoPlayer - onPositionDiscontinuity() called with " + "reason = [" + reason + "]"); - maybeUpdateCurrentMetadata(); - // Refresh the playback if there is a transition to the next video final int newPeriodIndex = simpleExoPlayer.getCurrentPeriodIndex(); - - /* Discontinuity reasons!! Thank you ExoPlayer lords */ switch (reason) { case DISCONTINUITY_REASON_PERIOD_TRANSITION: if (newPeriodIndex == playQueue.getIndex()) { registerView(); } else { - playQueue.offsetIndex(+1); + playQueue.setIndex(newPeriodIndex); } case DISCONTINUITY_REASON_SEEK: case DISCONTINUITY_REASON_SEEK_ADJUSTMENT: case DISCONTINUITY_REASON_INTERNAL: break; } + + maybeUpdateCurrentMetadata(); } @Override @@ -794,14 +804,6 @@ public abstract class BasePlayer implements initThumbnail(info.getThumbnailUrl()); registerView(); - - // when starting playback on the last item when not repeating, maybe auto queue - if (playQueue.getIndex() == playQueue.size() - 1 && - getRepeatMode() == Player.REPEAT_MODE_OFF && - PlayerHelper.isAutoQueueEnabled(context)) { - final PlayQueue autoQueue = PlayerHelper.autoQueueOf(info, playQueue.getStreams()); - if (autoQueue != null) playQueue.append(autoQueue.getStreams()); - } } @Override @@ -960,7 +962,7 @@ public abstract class BasePlayer implements //////////////////////////////////////////////////////////////////////////*/ private void registerView() { - if (databaseUpdateReactor == null || currentMetadata == null) return; + if (currentMetadata == null) return; final StreamInfo currentInfo = currentMetadata.getMetadata(); databaseUpdateReactor.add(recordManager.onViewed(currentInfo).onErrorComplete() .subscribe( @@ -980,7 +982,7 @@ public abstract class BasePlayer implements } protected void savePlaybackState(final StreamInfo info, final long progress) { - if (info == null || databaseUpdateReactor == null) return; + if (info == null) return; final Disposable stateSaver = recordManager.saveStreamState(info, progress) .observeOn(AndroidSchedulers.mainThread()) .onErrorComplete() @@ -1012,12 +1014,23 @@ public abstract class BasePlayer implements return; } - if (metadata == null || currentMetadata == metadata) return; + if (metadata == null) return; + maybeAutoQueueNextStream(metadata); + if (currentMetadata == metadata) return; currentMetadata = metadata; onMetadataChanged(metadata); } + private void maybeAutoQueueNextStream(@NonNull final MediaSourceTag currentMetadata) { + if (playQueue == null || playQueue.getIndex() != playQueue.size() - 1 || + getRepeatMode() != Player.REPEAT_MODE_OFF || + !PlayerHelper.isAutoQueueEnabled(context)) return; + // auto queue when starting playback on the last item when not repeating + final PlayQueue autoQueue = PlayerHelper.autoQueueOf(currentMetadata.getMetadata(), + playQueue.getStreams()); + if (autoQueue != null) playQueue.append(autoQueue.getStreams()); + } /*////////////////////////////////////////////////////////////////////////// // Getters and Setters //////////////////////////////////////////////////////////////////////////*/ @@ -1135,7 +1148,7 @@ public abstract class BasePlayer implements } public boolean isProgressLoopRunning() { - return progressUpdateReactor != null && !progressUpdateReactor.isDisposed(); + return progressUpdateReactor.get() != null; } public void setRecovery() { diff --git a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java index a66906c73..9130ea009 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -127,7 +127,7 @@ public final class MainVideoPlayer extends AppCompatActivity hideSystemUi(); setContentView(R.layout.activity_main_player); - playerImpl = new VideoPlayerImpl(this); + playerImpl = new VideoPlayerImpl(this); playerImpl.setup(findViewById(android.R.id.content)); if (savedInstanceState != null && savedInstanceState.get(KEY_SAVED_STATE) != null) { @@ -498,11 +498,11 @@ public final class MainVideoPlayer extends AppCompatActivity // Playback Listener //////////////////////////////////////////////////////////////////////////*/ - protected void onMetadataChanged(@Nullable final MediaSourceTag tag) { + protected void onMetadataChanged(@NonNull final MediaSourceTag tag) { super.onMetadataChanged(tag); - titleTextView.setText(getVideoTitle()); - channelTextView.setText(getUploaderName()); + titleTextView.setText(tag.getMetadata().getName()); + channelTextView.setText(tag.getMetadata().getUploaderName()); } @Override diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java index 476ad73ef..0426525a4 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -56,6 +56,7 @@ import com.google.android.exoplayer2.Player; import com.google.android.exoplayer2.text.CaptionStyleCompat; import com.google.android.exoplayer2.ui.AspectRatioFrameLayout; import com.google.android.exoplayer2.ui.SubtitleView; +import com.nostra13.universalimageloader.core.assist.FailReason; import org.schabi.newpipe.BuildConfig; import org.schabi.newpipe.R; @@ -428,21 +429,6 @@ public final class PopupVideoPlayer extends Service { super.destroy(); } - @Override - public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) { - super.onLoadingComplete(imageUri, view, loadedImage); - if (loadedImage != null) { - // rebuild notification here since remote view does not release bitmaps, causing memory leaks - notBuilder = createNotification(); - - if (notRemoteView != null) { - notRemoteView.setImageViewBitmap(R.id.notificationCover, loadedImage); - } - - updateNotification(-1); - } - } - @Override public void onFullScreenButtonClicked() { super.onFullScreenButtonClicked(); @@ -527,6 +513,54 @@ public final class PopupVideoPlayer extends Service { }; } + /*////////////////////////////////////////////////////////////////////////// + // Thumbnail Loading + //////////////////////////////////////////////////////////////////////////*/ + + private void setDummyRemoteViewThumbnail() { + resetNotification(); + if (notRemoteView != null) { + notRemoteView.setImageViewResource(R.id.notificationCover, + R.drawable.dummy_thumbnail); + } + updateNotification(-1); + } + + @Override + public void onLoadingStarted(String imageUri, View view) { + super.onLoadingStarted(imageUri, view); + setDummyRemoteViewThumbnail(); + } + + @Override + public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) { + super.onLoadingComplete(imageUri, view, loadedImage); + if (loadedImage == null) { + setDummyRemoteViewThumbnail(); + return; + } + + // rebuild notification here since remote view does not release bitmaps, + // causing memory leaks + resetNotification(); + if (notRemoteView != null) { + notRemoteView.setImageViewBitmap(R.id.notificationCover, loadedImage); + } + updateNotification(-1); + } + + @Override + public void onLoadingFailed(String imageUri, View view, FailReason failReason) { + super.onLoadingFailed(imageUri, view, failReason); + setDummyRemoteViewThumbnail(); + } + + @Override + public void onLoadingCancelled(String imageUri, View view) { + super.onLoadingCancelled(imageUri, view); + setDummyRemoteViewThumbnail(); + } + /*////////////////////////////////////////////////////////////////////////// // Activity Event Listener //////////////////////////////////////////////////////////////////////////*/ @@ -578,8 +612,8 @@ public final class PopupVideoPlayer extends Service { public void onRepeatModeChanged(int i) { super.onRepeatModeChanged(i); setRepeatModeRemote(notRemoteView, i); - updateNotification(-1); updatePlayback(); + updateNotification(-1); } @Override @@ -592,7 +626,7 @@ public final class PopupVideoPlayer extends Service { // Playback Listener //////////////////////////////////////////////////////////////////////////*/ - protected void onMetadataChanged(@Nullable final MediaSourceTag tag) { + protected void onMetadataChanged(@NonNull final MediaSourceTag tag) { super.onMetadataChanged(tag); updateMetadata(); } @@ -651,12 +685,14 @@ public final class PopupVideoPlayer extends Service { public void changeState(int state) { super.changeState(state); updatePlayback(); + updateNotification(-1); } @Override public void onBlocked() { super.onBlocked(); updateNotification(R.drawable.ic_play_arrow_white); + startForeground(NOTIFICATION_ID, notBuilder.build()); } @Override @@ -664,19 +700,21 @@ public final class PopupVideoPlayer extends Service { super.onPlaying(); updateNotification(R.drawable.ic_pause_white); videoPlayPause.setBackgroundResource(R.drawable.ic_pause_white); - lockManager.acquireWifiAndCpu(); - hideControls(DEFAULT_CONTROLS_DURATION, DEFAULT_CONTROLS_HIDE_TIME); windowLayoutParams.flags = WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; windowManager.updateViewLayout(playerImpl.getRootView(), windowLayoutParams); + + startForeground(NOTIFICATION_ID, notBuilder.build()); + lockManager.acquireWifiAndCpu(); } @Override public void onBuffering() { super.onBuffering(); updateNotification(R.drawable.ic_play_arrow_white); + startForeground(NOTIFICATION_ID, notBuilder.build()); } @Override @@ -684,10 +722,13 @@ public final class PopupVideoPlayer extends Service { super.onPaused(); updateNotification(R.drawable.ic_play_arrow_white); videoPlayPause.setBackgroundResource(R.drawable.ic_play_arrow_white); + lockManager.releaseWifiAndCpu(); windowLayoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; windowManager.updateViewLayout(playerImpl.getRootView(), windowLayoutParams); + + stopForeground(false); } @Override @@ -695,6 +736,7 @@ public final class PopupVideoPlayer extends Service { super.onPausedSeek(); videoPlayPause.setBackgroundResource(R.drawable.ic_pause_white); updateNotification(R.drawable.ic_play_arrow_white); + startForeground(NOTIFICATION_ID, notBuilder.build()); } @Override @@ -702,10 +744,13 @@ public final class PopupVideoPlayer extends Service { super.onCompleted(); updateNotification(R.drawable.ic_replay_white); videoPlayPause.setBackgroundResource(R.drawable.ic_replay_white); + lockManager.releaseWifiAndCpu(); windowLayoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; windowManager.updateViewLayout(playerImpl.getRootView(), windowLayoutParams); + + stopForeground(false); } @Override @@ -731,7 +776,7 @@ public final class PopupVideoPlayer extends Service { /*package-private*/ void enableVideoRenderer(final boolean enable) { final int videoRendererIndex = getRendererIndex(C.TRACK_TYPE_VIDEO); - if (trackSelector != null && videoRendererIndex != RENDERER_UNAVAILABLE) { + if (videoRendererIndex != RENDERER_UNAVAILABLE) { trackSelector.setParameters(trackSelector.buildUponParameters() .setRendererDisabled(videoRendererIndex, !enable)); } diff --git a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java index eaec59f65..1ca0ff4ee 100644 --- a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java @@ -103,7 +103,7 @@ public abstract class VideoPlayer extends BasePlayer protected boolean wasPlaying = false; - @Nullable private VideoPlaybackResolver resolver; + @NonNull final private VideoPlaybackResolver resolver; /*////////////////////////////////////////////////////////////////////////// // Views //////////////////////////////////////////////////////////////////////////*/ @@ -154,6 +154,7 @@ public abstract class VideoPlayer extends BasePlayer public VideoPlayer(String debugTag, Context context) { super(context); this.TAG = debugTag; + this.resolver = new VideoPlaybackResolver(context, dataSource, getQualityResolver()); } public void setup(View rootView) { @@ -236,8 +237,6 @@ public abstract class VideoPlayer extends BasePlayer trackSelector.setParameters(trackSelector.buildUponParameters() .setTunnelingAudioSessionId(C.generateAudioSessionIdV21(context))); } - - resolver = new VideoPlaybackResolver(context, dataSource, getQualityResolver()); } @Override @@ -292,7 +291,7 @@ public abstract class VideoPlayer extends BasePlayer 0, Menu.NONE, R.string.caption_none); captionOffItem.setOnMenuItemClickListener(menuItem -> { final int textRendererIndex = getRendererIndex(C.TRACK_TYPE_TEXT); - if (trackSelector != null && textRendererIndex != RENDERER_UNAVAILABLE) { + if (textRendererIndex != RENDERER_UNAVAILABLE) { trackSelector.setParameters(trackSelector.buildUponParameters() .setRendererDisabled(textRendererIndex, true)); } @@ -306,7 +305,7 @@ public abstract class VideoPlayer extends BasePlayer i + 1, Menu.NONE, captionLanguage); captionItem.setOnMenuItemClickListener(menuItem -> { final int textRendererIndex = getRendererIndex(C.TRACK_TYPE_TEXT); - if (trackSelector != null && textRendererIndex != RENDERER_UNAVAILABLE) { + if (textRendererIndex != RENDERER_UNAVAILABLE) { trackSelector.setPreferredTextLanguage(captionLanguage); trackSelector.setParameters(trackSelector.buildUponParameters() .setRendererDisabled(textRendererIndex, false)); @@ -369,7 +368,7 @@ public abstract class VideoPlayer extends BasePlayer @Override @Nullable public MediaSource sourceOf(final PlayQueueItem item, final StreamInfo info) { - return resolver == null ? null : resolver.resolve(info); + return resolver.resolve(info); } /*////////////////////////////////////////////////////////////////////////// @@ -480,8 +479,7 @@ public abstract class VideoPlayer extends BasePlayer final int textRenderer = getRendererIndex(C.TRACK_TYPE_TEXT); if (captionTextView == null) return; - if (trackSelector == null || trackSelector.getCurrentMappedTrackInfo() == null || - textRenderer == RENDERER_UNAVAILABLE) { + if (trackSelector.getCurrentMappedTrackInfo() == null || textRenderer == RENDERER_UNAVAILABLE) { captionTextView.setVisibility(View.GONE); return; } @@ -833,12 +831,12 @@ public abstract class VideoPlayer extends BasePlayer //////////////////////////////////////////////////////////////////////////*/ public void setPlaybackQuality(final String quality) { - if (resolver != null) resolver.setPlaybackQuality(quality); + this.resolver.setPlaybackQuality(quality); } @Nullable public String getPlaybackQuality() { - return resolver == null ? null : resolver.getPlaybackQuality(); + return resolver.getPlaybackQuality(); } public AspectRatioFrameLayout getAspectRatioFrameLayout() { diff --git a/app/src/main/java/org/schabi/newpipe/player/resolver/AudioPlaybackResolver.java b/app/src/main/java/org/schabi/newpipe/player/resolver/AudioPlaybackResolver.java index f95f0e3bb..6bb556850 100644 --- a/app/src/main/java/org/schabi/newpipe/player/resolver/AudioPlaybackResolver.java +++ b/app/src/main/java/org/schabi/newpipe/player/resolver/AudioPlaybackResolver.java @@ -2,6 +2,7 @@ package org.schabi.newpipe.player.resolver; import android.content.Context; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import com.google.android.exoplayer2.source.MediaSource; @@ -24,6 +25,7 @@ public class AudioPlaybackResolver implements PlaybackResolver { } @Override + @Nullable public MediaSource resolve(@NonNull StreamInfo info) { final MediaSource liveSource = maybeBuildLiveMediaSource(dataSource, info); if (liveSource != null) return liveSource; diff --git a/app/src/main/java/org/schabi/newpipe/player/resolver/Resolver.java b/app/src/main/java/org/schabi/newpipe/player/resolver/Resolver.java index a7d4448e4..4bd795574 100644 --- a/app/src/main/java/org/schabi/newpipe/player/resolver/Resolver.java +++ b/app/src/main/java/org/schabi/newpipe/player/resolver/Resolver.java @@ -1,7 +1,8 @@ package org.schabi.newpipe.player.resolver; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; public interface Resolver { - Product resolve(@NonNull Source source); + @Nullable Product resolve(@NonNull Source source); } 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 5aa42ce3c..8f91f4886 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 @@ -47,6 +47,7 @@ public class VideoPlaybackResolver implements PlaybackResolver { } @Override + @Nullable public MediaSource resolve(@NonNull StreamInfo info) { final MediaSource liveSource = maybeBuildLiveMediaSource(dataSource, info); if (liveSource != null) return liveSource; From 0ece4851d24f3962827ab33ccd359a781478add5 Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Wed, 23 May 2018 19:56:43 -0700 Subject: [PATCH 012/103] -Updated ExoPlayer to 2.8.1, fixing livestream with long duration not loading. -Updated OkHttp to 3.10.0 and RxJava to 2.1.14. -Changed player recovery seek to use ExoPlayer built-in window seeking instead of seeking after stream window starts playing. -Changed playback speed changer default step size to 25%. -Changed player notification to reset on all state changes. -Fixed gradle dependency version incorrect variable names. -Fixed video player double tap not working during pause. -[#1412] Fixed NPE when sharing video to main video activity when it was playing but is out of focus: Reset main player state when new intent is received. -[#1410] Fixed fast forwarding and rewinding not working within 10 seconds from beginning or end of a stream window. --- app/build.gradle | 2 +- .../newpipe/player/BackgroundPlayer.java | 6 ++- .../org/schabi/newpipe/player/BasePlayer.java | 42 +++++-------------- .../newpipe/player/MainVideoPlayer.java | 1 - .../newpipe/player/PopupVideoPlayer.java | 2 +- .../helper/PlaybackParameterDialog.java | 36 +++++++++------- 6 files changed, 36 insertions(+), 53 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index b04daebed..6410cb823 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -42,7 +42,7 @@ android { ext { supportLibVersion = '27.1.1' - exoPlayerLibVersion = '2.8.0' + exoPlayerLibVersion = '2.8.1' roomDbLibVersion = '1.1.1' leakCanaryLibVersion = '1.5.4' okHttpLibVersion = '3.10.0' diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java index c5c9f0615..231163b7b 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -544,26 +544,29 @@ public final class BackgroundPlayer extends Service { @Override public void changeState(int state) { + resetNotification(); super.changeState(state); updatePlayback(); - updateNotification(-1); } @Override public void onBlocked() { super.onBlocked(); + updateNotification(-1); startForeground(NOTIFICATION_ID, notBuilder.build()); } @Override public void onBuffering() { super.onBuffering(); + updateNotification(-1); startForeground(NOTIFICATION_ID, notBuilder.build()); } @Override public void onPausedSeek() { super.onPausedSeek(); + updateNotification(-1); startForeground(NOTIFICATION_ID, notBuilder.build()); } @@ -589,7 +592,6 @@ public final class BackgroundPlayer extends Service { public void onCompleted() { super.onCompleted(); - resetNotification(); if (bigNotRemoteView != null) bigNotRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 100, false); if (notRemoteView != null) notRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 100, false); updateNotification(R.drawable.ic_replay_white); diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index 3f50cf149..113ccbf68 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -85,7 +85,6 @@ import static com.google.android.exoplayer2.Player.DISCONTINUITY_REASON_INTERNAL import static com.google.android.exoplayer2.Player.DISCONTINUITY_REASON_PERIOD_TRANSITION; import static com.google.android.exoplayer2.Player.DISCONTINUITY_REASON_SEEK; import static com.google.android.exoplayer2.Player.DISCONTINUITY_REASON_SEEK_ADJUSTMENT; -import static org.schabi.newpipe.player.helper.PlayerHelper.getTimeString; /** * Base for the players, joining the common properties @@ -157,7 +156,6 @@ public abstract class BasePlayer implements protected MediaSessionManager mediaSessionManager; private boolean isPrepared = false; - private boolean isSynchronizing = false; //////////////////////////////////////////////////////////////////////////*/ @@ -575,37 +573,17 @@ public abstract class BasePlayer implements private void maybeCorrectSeekPosition() { if (playQueue == null || simpleExoPlayer == null || currentMetadata == null) return; - final int currentSourceIndex = playQueue.getIndex(); final PlayQueueItem currentSourceItem = playQueue.getItem(); - final StreamInfo currentInfo = currentMetadata.getMetadata(); - if (currentSourceItem == null) return; - final long recoveryPositionMillis = currentSourceItem.getRecoveryPosition(); - final boolean isCurrentWindowCorrect = - simpleExoPlayer.getCurrentPeriodIndex() == currentSourceIndex; + final StreamInfo currentInfo = currentMetadata.getMetadata(); final long presetStartPositionMillis = currentInfo.getStartPosition() * 1000; - - if (recoveryPositionMillis != PlayQueueItem.RECOVERY_UNSET && isCurrentWindowCorrect) { - // Is recovering previous playback? - if (DEBUG) Log.d(TAG, "Playback - Rewinding to recovery time=" + - "[" + getTimeString((int)recoveryPositionMillis) + "]"); - seekTo(recoveryPositionMillis); - playQueue.unsetRecovery(currentSourceIndex); - - } else if (isSynchronizing && isLive()) { - // Is still synchronizing? - if (DEBUG) Log.d(TAG, "Playback - Synchronizing livestream to default time"); - //seekToDefault(); - - } else if (isSynchronizing && presetStartPositionMillis > 0L) { + if (presetStartPositionMillis > 0L) { // Has another start position? if (DEBUG) Log.d(TAG, "Playback - Seeking to preset start " + "position=[" + presetStartPositionMillis + "]"); seekTo(presetStartPositionMillis); } - - isSynchronizing = false; } /** @@ -784,16 +762,18 @@ public abstract class BasePlayer implements "index=[" + currentPlayQueueIndex + "] with " + "playlist length=[" + currentPlaylistSize + "]"); - // If not playing correct stream, change window position and sets flag - // for synchronizing once window position is corrected - // @see maybeCorrectSeekPosition() } else if (currentPlaylistIndex != currentPlayQueueIndex || onPlaybackInitial || !isPlaying()) { if (DEBUG) Log.d(TAG, "Playback - Rewinding to correct" + " index=[" + currentPlayQueueIndex + "]," + " from=[" + currentPlaylistIndex + "], size=[" + currentPlaylistSize + "]."); - isSynchronizing = true; - simpleExoPlayer.seekToDefaultPosition(currentPlayQueueIndex); + + if (item.getRecoveryPosition() != PlayQueueItem.RECOVERY_UNSET) { + simpleExoPlayer.seekTo(currentPlayQueueIndex, item.getRecoveryPosition()); + playQueue.unsetRecovery(currentPlayQueueIndex); + } else { + simpleExoPlayer.seekToDefaultPosition(currentPlayQueueIndex); + } } } @@ -936,9 +916,7 @@ public abstract class BasePlayer implements public void seekTo(long positionMillis) { if (DEBUG) Log.d(TAG, "seekBy() called with: position = [" + positionMillis + "]"); - if (simpleExoPlayer == null || positionMillis < 0 || - positionMillis > simpleExoPlayer.getDuration()) return; - simpleExoPlayer.seekTo(positionMillis); + if (simpleExoPlayer != null) simpleExoPlayer.seekTo(positionMillis); } public void seekBy(long offsetMillis) { diff --git a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java index 9130ea009..bf728f9d5 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -896,7 +896,6 @@ public final class MainVideoPlayer extends AppCompatActivity @Override public boolean onDoubleTap(MotionEvent e) { if (DEBUG) Log.d(TAG, "onDoubleTap() called with: e = [" + e + "]" + "rawXy = " + e.getRawX() + ", " + e.getRawY() + ", xy = " + e.getX() + ", " + e.getY()); - if (!playerImpl.isPlaying()) return false; if (e.getX() > playerImpl.getRootView().getWidth() * 2 / 3) { playerImpl.onFastForward(); diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java index 0426525a4..e2929d26f 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -683,9 +683,9 @@ public final class PopupVideoPlayer extends Service { @Override public void changeState(int state) { + resetNotification(); super.changeState(state); updatePlayback(); - updateNotification(-1); } @Override diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java index c53680835..c184da0a5 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java @@ -27,7 +27,13 @@ public class PlaybackParameterDialog extends DialogFragment { public static final char STEP_UP_SIGN = '+'; public static final char STEP_DOWN_SIGN = '-'; - public static final double DEFAULT_PLAYBACK_STEP_VALUE = 0.05f; + + public static final double STEP_ONE_PERCENT_VALUE = 0.01f; + public static final double STEP_FIVE_PERCENT_VALUE = 0.05f; + public static final double STEP_TEN_PERCENT_VALUE = 0.10f; + public static final double STEP_TWENTY_FIVE_PERCENT_VALUE = 0.25f; + public static final double STEP_ONE_HUNDRED_PERCENT_VALUE = 1.00f; + public static final double DEFAULT_PLAYBACK_STEP_VALUE = STEP_TWENTY_FIVE_PERCENT_VALUE; public static final double DEFAULT_TEMPO = 1.00f; public static final double DEFAULT_PITCH = 1.00f; @@ -244,35 +250,33 @@ public class PlaybackParameterDialog extends DialogFragment { stepSizeOneHundredPercentText = rootView.findViewById(R.id.stepSizeOneHundredPercent); if (stepSizeOnePercentText != null) { - final double onePercent = 0.01f; - stepSizeOnePercentText.setText(getPercentString(onePercent)); - stepSizeOnePercentText.setOnClickListener(view -> setupStepSize(onePercent)); + stepSizeOnePercentText.setText(getPercentString(STEP_ONE_PERCENT_VALUE)); + stepSizeOnePercentText.setOnClickListener(view -> + setupStepSize(STEP_ONE_PERCENT_VALUE)); } if (stepSizeFivePercentText != null) { - final double fivePercent = 0.05f; - stepSizeFivePercentText.setText(getPercentString(fivePercent)); - stepSizeFivePercentText.setOnClickListener(view -> setupStepSize(fivePercent)); + stepSizeFivePercentText.setText(getPercentString(STEP_FIVE_PERCENT_VALUE)); + stepSizeFivePercentText.setOnClickListener(view -> + setupStepSize(STEP_FIVE_PERCENT_VALUE)); } if (stepSizeTenPercentText != null) { - final double tenPercent = 0.10f; - stepSizeTenPercentText.setText(getPercentString(tenPercent)); - stepSizeTenPercentText.setOnClickListener(view -> setupStepSize(tenPercent)); + stepSizeTenPercentText.setText(getPercentString(STEP_TEN_PERCENT_VALUE)); + stepSizeTenPercentText.setOnClickListener(view -> + setupStepSize(STEP_TEN_PERCENT_VALUE)); } if (stepSizeTwentyFivePercentText != null) { - final double twentyFivePercent = 0.25f; - stepSizeTwentyFivePercentText.setText(getPercentString(twentyFivePercent)); + stepSizeTwentyFivePercentText.setText(getPercentString(STEP_TWENTY_FIVE_PERCENT_VALUE)); stepSizeTwentyFivePercentText.setOnClickListener(view -> - setupStepSize(twentyFivePercent)); + setupStepSize(STEP_TWENTY_FIVE_PERCENT_VALUE)); } if (stepSizeOneHundredPercentText != null) { - final double oneHundredPercent = 1.00f; - stepSizeOneHundredPercentText.setText(getPercentString(oneHundredPercent)); + stepSizeOneHundredPercentText.setText(getPercentString(STEP_ONE_HUNDRED_PERCENT_VALUE)); stepSizeOneHundredPercentText.setOnClickListener(view -> - setupStepSize(oneHundredPercent)); + setupStepSize(STEP_ONE_HUNDRED_PERCENT_VALUE)); } } From 157b0642145623c45a545af72f74f3bab2d68620 Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Wed, 23 May 2018 20:18:48 -0700 Subject: [PATCH 013/103] -Fixed player database and progress disposable disposed when destroying exoplayer. -Fixed livestream not reloading on behind live window exception. -Added nonnull annotation to player intent strings. --- .../org/schabi/newpipe/player/BasePlayer.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index 113ccbf68..ad62c71c3 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -117,14 +117,14 @@ public abstract class BasePlayer implements // Intent //////////////////////////////////////////////////////////////////////////*/ - public static final String REPEAT_MODE = "repeat_mode"; - public static final String PLAYBACK_PITCH = "playback_pitch"; - public static final String PLAYBACK_SPEED = "playback_speed"; - public static final String PLAYBACK_SKIP_SILENCE = "playback_skip_silence"; - public static final String PLAYBACK_QUALITY = "playback_quality"; - public static final String PLAY_QUEUE_KEY = "play_queue_key"; - public static final String APPEND_ONLY = "append_only"; - public static final String SELECT_ON_APPEND = "select_on_append"; + @NonNull public static final String REPEAT_MODE = "repeat_mode"; + @NonNull public static final String PLAYBACK_PITCH = "playback_pitch"; + @NonNull public static final String PLAYBACK_SPEED = "playback_speed"; + @NonNull public static final String PLAYBACK_SKIP_SILENCE = "playback_skip_silence"; + @NonNull public static final String PLAYBACK_QUALITY = "playback_quality"; + @NonNull public static final String PLAY_QUEUE_KEY = "play_queue_key"; + @NonNull public static final String APPEND_ONLY = "append_only"; + @NonNull public static final String SELECT_ON_APPEND = "select_on_append"; /*////////////////////////////////////////////////////////////////////////// // Playback @@ -276,7 +276,6 @@ public abstract class BasePlayer implements if (playQueue != null) playQueue.dispose(); if (audioReactor != null) audioReactor.dispose(); if (playbackManager != null) playbackManager.dispose(); - if (databaseUpdateReactor != null) databaseUpdateReactor.dispose(); if (mediaSessionManager != null) mediaSessionManager.dispose(); if (playQueueAdapter != null) { @@ -290,9 +289,9 @@ public abstract class BasePlayer implements destroyPlayer(); unregisterBroadcastReceiver(); - if (mediaSessionManager != null) mediaSessionManager.dispose(); + databaseUpdateReactor.clear(); + progressUpdateReactor.set(null); - mediaSessionManager = null; simpleExoPlayer = null; } @@ -635,7 +634,7 @@ public abstract class BasePlayer implements setRecovery(); final Throwable cause = error.getCause(); - if (cause instanceof BehindLiveWindowException) { + if (error instanceof BehindLiveWindowException) { reload(); } else if (cause instanceof UnknownHostException) { playQueue.error(/*isNetworkProblem=*/true); @@ -942,11 +941,12 @@ public abstract class BasePlayer implements private void registerView() { if (currentMetadata == null) return; final StreamInfo currentInfo = currentMetadata.getMetadata(); - databaseUpdateReactor.add(recordManager.onViewed(currentInfo).onErrorComplete() + final Disposable viewRegister = recordManager.onViewed(currentInfo).onErrorComplete() .subscribe( ignored -> {/* successful */}, error -> Log.e(TAG, "Player onViewed() failure: ", error) - )); + ); + databaseUpdateReactor.add(viewRegister); } protected void reload() { From 2d6317bd24d76d34f561600f25fd152f6bd2cc6d Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Mon, 28 May 2018 19:51:41 -0700 Subject: [PATCH 014/103] -Fixed audio-only streams thumbnail not displaying on video players. -Fixed potential play queue desynchronization due to fast forwarding on silence. -Added current thumbnail storing in base player to allow immediate retrieval for notification building. -Removed video player buffer spinner during interim buffering but not initial buffering. -Reverted foreground notification stopping on pause and on complete. --- .../newpipe/player/BackgroundPlayer.java | 85 ++++--------------- .../org/schabi/newpipe/player/BasePlayer.java | 31 +++++-- .../newpipe/player/MainVideoPlayer.java | 1 - .../newpipe/player/PopupVideoPlayer.java | 52 ++++-------- .../schabi/newpipe/player/VideoPlayer.java | 7 +- 5 files changed, 64 insertions(+), 112 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java index 231163b7b..805326abd 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -188,7 +188,9 @@ public final class BackgroundPlayer extends Service { .setVisibility(NotificationCompat.VISIBILITY_PUBLIC) .setCustomContentView(notRemoteView) .setCustomBigContentView(bigNotRemoteView); - if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) builder.setPriority(NotificationCompat.PRIORITY_MAX); + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) { + builder.setPriority(NotificationCompat.PRIORITY_MAX); + } return builder; } @@ -197,6 +199,7 @@ public final class BackgroundPlayer extends Service { remoteViews.setTextViewText(R.id.notificationSongName, basePlayerImpl.getVideoTitle()); remoteViews.setTextViewText(R.id.notificationArtist, basePlayerImpl.getUploaderName()); + remoteViews.setImageViewBitmap(R.id.notificationCover, basePlayerImpl.getThumbnail()); remoteViews.setOnClickPendingIntent(R.id.notificationPlayPause, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_PLAY_PAUSE), PendingIntent.FLAG_UPDATE_CURRENT)); @@ -244,6 +247,7 @@ public final class BackgroundPlayer extends Service { } notificationManager.notify(NOTIFICATION_ID, notBuilder.build()); } + /*////////////////////////////////////////////////////////////////////////// // Utils //////////////////////////////////////////////////////////////////////////*/ @@ -291,57 +295,26 @@ public final class BackgroundPlayer extends Service { // Thumbnail Loading //////////////////////////////////////////////////////////////////////////*/ - private void setDummyRemoteViewThumbnail() { - resetNotification(); - if (notRemoteView != null) { - notRemoteView.setImageViewResource(R.id.notificationCover, - R.drawable.dummy_thumbnail); - } - if (bigNotRemoteView != null) { - bigNotRemoteView.setImageViewResource(R.id.notificationCover, - R.drawable.dummy_thumbnail); - } - updateNotification(-1); - } - - @Override - public void onLoadingStarted(String imageUri, View view) { - super.onLoadingStarted(imageUri, view); - setDummyRemoteViewThumbnail(); - } - @Override public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) { super.onLoadingComplete(imageUri, view, loadedImage); - if (loadedImage == null) { - setDummyRemoteViewThumbnail(); - return; - } - - // rebuild notification here since remote view does not release bitmaps, - // causing memory leaks resetNotification(); - if (notRemoteView != null) { - notRemoteView.setImageViewBitmap(R.id.notificationCover, loadedImage); - } - if (bigNotRemoteView != null) { - bigNotRemoteView.setImageViewBitmap(R.id.notificationCover, loadedImage); - } updateNotification(-1); } @Override public void onLoadingFailed(String imageUri, View view, FailReason failReason) { super.onLoadingFailed(imageUri, view, failReason); - setDummyRemoteViewThumbnail(); + resetNotification(); + updateNotification(-1); } @Override public void onLoadingCancelled(String imageUri, View view) { super.onLoadingCancelled(imageUri, view); - setDummyRemoteViewThumbnail(); + resetNotification(); + updateNotification(-1); } - /*////////////////////////////////////////////////////////////////////////// // States Implementation //////////////////////////////////////////////////////////////////////////*/ @@ -544,60 +517,38 @@ public final class BackgroundPlayer extends Service { @Override public void changeState(int state) { - resetNotification(); super.changeState(state); updatePlayback(); } - @Override - public void onBlocked() { - super.onBlocked(); - updateNotification(-1); - startForeground(NOTIFICATION_ID, notBuilder.build()); - } - - @Override - public void onBuffering() { - super.onBuffering(); - updateNotification(-1); - startForeground(NOTIFICATION_ID, notBuilder.build()); - } - - @Override - public void onPausedSeek() { - super.onPausedSeek(); - updateNotification(-1); - startForeground(NOTIFICATION_ID, notBuilder.build()); - } - @Override public void onPlaying() { super.onPlaying(); + resetNotification(); updateNotification(R.drawable.ic_pause_white); - lockManager.acquireWifiAndCpu(); - startForeground(NOTIFICATION_ID, notBuilder.build()); } @Override public void onPaused() { super.onPaused(); + resetNotification(); updateNotification(R.drawable.ic_play_arrow_white); - lockManager.releaseWifiAndCpu(); - stopForeground(false); } @Override public void onCompleted() { super.onCompleted(); - - if (bigNotRemoteView != null) bigNotRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 100, false); - if (notRemoteView != null) notRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 100, false); + resetNotification(); + if (bigNotRemoteView != null) { + bigNotRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 100, false); + } + if (notRemoteView != null) { + notRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 100, false); + } updateNotification(R.drawable.ic_replay_white); - lockManager.releaseWifiAndCpu(); - stopForeground(false); } } } diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index ad62c71c3..12e65cba1 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -24,6 +24,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.graphics.Bitmap; +import android.graphics.BitmapFactory; import android.media.AudioManager; import android.support.annotation.NonNull; import android.support.annotation.Nullable; @@ -139,6 +140,7 @@ public abstract class BasePlayer implements @Nullable private PlayQueueItem currentItem; @Nullable private MediaSourceTag currentMetadata; + @Nullable private Bitmap currentThumbnail; @Nullable protected Toast errorToast; @@ -317,6 +319,7 @@ public abstract class BasePlayer implements public void onLoadingFailed(String imageUri, View view, FailReason failReason) { Log.e(TAG, "Thumbnail - onLoadingFailed() called on imageUri = [" + imageUri + "]", failReason.getCause()); + currentThumbnail = null; } @Override @@ -324,12 +327,14 @@ public abstract class BasePlayer implements if (DEBUG) Log.d(TAG, "Thumbnail - onLoadingComplete() called with: " + "imageUri = [" + imageUri + "], view = [" + view + "], " + "loadedImage = [" + loadedImage + "]"); + currentThumbnail = loadedImage; } @Override public void onLoadingCancelled(String imageUri, View view) { if (DEBUG) Log.d(TAG, "Thumbnail - onLoadingCancelled() called with: " + "imageUri = [" + imageUri + "], view = [" + view + "]"); + currentThumbnail = null; } /*////////////////////////////////////////////////////////////////////////// @@ -653,19 +658,25 @@ public abstract class BasePlayer implements public void onPositionDiscontinuity(@Player.DiscontinuityReason final int reason) { if (DEBUG) Log.d(TAG, "ExoPlayer - onPositionDiscontinuity() called with " + "reason = [" + reason + "]"); + if (playQueue == null) return; // Refresh the playback if there is a transition to the next video - final int newPeriodIndex = simpleExoPlayer.getCurrentPeriodIndex(); + final int newWindowIndex = simpleExoPlayer.getCurrentWindowIndex(); switch (reason) { case DISCONTINUITY_REASON_PERIOD_TRANSITION: - if (newPeriodIndex == playQueue.getIndex()) { + // When player is in single repeat mode and a period transition occurs, + // we need to register a view count here since no metadata has changed + if (getRepeatMode() == Player.REPEAT_MODE_ONE && + newWindowIndex == playQueue.getIndex()) { registerView(); - } else { - playQueue.setIndex(newPeriodIndex); + break; } case DISCONTINUITY_REASON_SEEK: case DISCONTINUITY_REASON_SEEK_ADJUSTMENT: case DISCONTINUITY_REASON_INTERNAL: + if (playQueue.getIndex() != newWindowIndex) { + playQueue.setIndex(newWindowIndex); + } break; } @@ -777,9 +788,10 @@ public abstract class BasePlayer implements } protected void onMetadataChanged(@NonNull final MediaSourceTag tag) { - Log.d(TAG, "Playback - onMetadataChanged() called, " + - "playing: " + tag.getMetadata().getName()); final StreamInfo info = tag.getMetadata(); + if (DEBUG) { + Log.d(TAG, "Playback - onMetadataChanged() called, playing: " + info.getName()); + } initThumbnail(info.getThumbnailUrl()); registerView(); @@ -1045,6 +1057,13 @@ public abstract class BasePlayer implements return currentItem == null ? context.getString(R.string.unknown_content) : currentItem.getUploader(); } + @Nullable + public Bitmap getThumbnail() { + return currentThumbnail == null ? + BitmapFactory.decodeResource(context.getResources(), R.drawable.dummy_thumbnail) : + currentThumbnail; + } + /** Checks if the current playback is a livestream AND is playing at or beyond the live edge */ @SuppressWarnings("BooleanMethodIsAlwaysInverted") public boolean isLiveEdge() { diff --git a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java index bf728f9d5..9f3b5d020 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -720,7 +720,6 @@ public final class MainVideoPlayer extends AppCompatActivity @Override public void onBuffering() { super.onBuffering(); - animatePlayButtons(false, 100); getRootView().setKeepScreenOn(true); } diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java index e2929d26f..3bee984a8 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -34,7 +34,6 @@ import android.os.Build; import android.os.IBinder; import android.preference.PreferenceManager; import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.support.v4.app.NotificationCompat; import android.util.DisplayMetrics; import android.util.Log; @@ -229,6 +228,7 @@ public final class PopupVideoPlayer extends Service { notRemoteView.setTextViewText(R.id.notificationSongName, playerImpl.getVideoTitle()); notRemoteView.setTextViewText(R.id.notificationArtist, playerImpl.getUploaderName()); + notRemoteView.setImageViewBitmap(R.id.notificationCover, playerImpl.getThumbnail()); notRemoteView.setOnClickPendingIntent(R.id.notificationPlayPause, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_PLAY_PAUSE), PendingIntent.FLAG_UPDATE_CURRENT)); @@ -517,48 +517,27 @@ public final class PopupVideoPlayer extends Service { // Thumbnail Loading //////////////////////////////////////////////////////////////////////////*/ - private void setDummyRemoteViewThumbnail() { - resetNotification(); - if (notRemoteView != null) { - notRemoteView.setImageViewResource(R.id.notificationCover, - R.drawable.dummy_thumbnail); - } - updateNotification(-1); - } - - @Override - public void onLoadingStarted(String imageUri, View view) { - super.onLoadingStarted(imageUri, view); - setDummyRemoteViewThumbnail(); - } - @Override public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) { super.onLoadingComplete(imageUri, view, loadedImage); - if (loadedImage == null) { - setDummyRemoteViewThumbnail(); - return; - } - // rebuild notification here since remote view does not release bitmaps, // causing memory leaks resetNotification(); - if (notRemoteView != null) { - notRemoteView.setImageViewBitmap(R.id.notificationCover, loadedImage); - } updateNotification(-1); } @Override public void onLoadingFailed(String imageUri, View view, FailReason failReason) { super.onLoadingFailed(imageUri, view, failReason); - setDummyRemoteViewThumbnail(); + resetNotification(); + updateNotification(-1); } @Override public void onLoadingCancelled(String imageUri, View view) { super.onLoadingCancelled(imageUri, view); - setDummyRemoteViewThumbnail(); + resetNotification(); + updateNotification(-1); } /*////////////////////////////////////////////////////////////////////////// @@ -613,6 +592,7 @@ public final class PopupVideoPlayer extends Service { super.onRepeatModeChanged(i); setRepeatModeRemote(notRemoteView, i); updatePlayback(); + resetNotification(); updateNotification(-1); } @@ -683,7 +663,6 @@ public final class PopupVideoPlayer extends Service { @Override public void changeState(int state) { - resetNotification(); super.changeState(state); updatePlayback(); } @@ -691,14 +670,16 @@ public final class PopupVideoPlayer extends Service { @Override public void onBlocked() { super.onBlocked(); + resetNotification(); updateNotification(R.drawable.ic_play_arrow_white); - startForeground(NOTIFICATION_ID, notBuilder.build()); } @Override public void onPlaying() { super.onPlaying(); + resetNotification(); updateNotification(R.drawable.ic_pause_white); + videoPlayPause.setBackgroundResource(R.drawable.ic_pause_white); hideControls(DEFAULT_CONTROLS_DURATION, DEFAULT_CONTROLS_HIDE_TIME); @@ -713,16 +694,17 @@ public final class PopupVideoPlayer extends Service { @Override public void onBuffering() { super.onBuffering(); + resetNotification(); updateNotification(R.drawable.ic_play_arrow_white); - startForeground(NOTIFICATION_ID, notBuilder.build()); } @Override public void onPaused() { super.onPaused(); + resetNotification(); updateNotification(R.drawable.ic_play_arrow_white); - videoPlayPause.setBackgroundResource(R.drawable.ic_play_arrow_white); + videoPlayPause.setBackgroundResource(R.drawable.ic_play_arrow_white); lockManager.releaseWifiAndCpu(); windowLayoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; @@ -734,17 +716,19 @@ public final class PopupVideoPlayer extends Service { @Override public void onPausedSeek() { super.onPausedSeek(); - videoPlayPause.setBackgroundResource(R.drawable.ic_pause_white); + resetNotification(); updateNotification(R.drawable.ic_play_arrow_white); - startForeground(NOTIFICATION_ID, notBuilder.build()); + + videoPlayPause.setBackgroundResource(R.drawable.ic_pause_white); } @Override public void onCompleted() { super.onCompleted(); + resetNotification(); updateNotification(R.drawable.ic_replay_white); - videoPlayPause.setBackgroundResource(R.drawable.ic_replay_white); + videoPlayPause.setBackgroundResource(R.drawable.ic_replay_white); lockManager.releaseWifiAndCpu(); windowLayoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; @@ -768,8 +752,6 @@ public final class PopupVideoPlayer extends Service { super.hideControlsAndButton(duration, delay, videoPlayPause); } - - /*////////////////////////////////////////////////////////////////////////// // Utils //////////////////////////////////////////////////////////////////////////*/ diff --git a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java index 1ca0ff4ee..73f5e94b1 100644 --- a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java @@ -333,16 +333,19 @@ public abstract class VideoPlayer extends BasePlayer switch (tag.getMetadata().getStreamType()) { case AUDIO_STREAM: surfaceView.setVisibility(View.GONE); + endScreen.setVisibility(View.VISIBLE); playbackEndTime.setVisibility(View.VISIBLE); break; case AUDIO_LIVE_STREAM: surfaceView.setVisibility(View.GONE); + endScreen.setVisibility(View.VISIBLE); playbackLiveSync.setVisibility(View.VISIBLE); break; case LIVE_STREAM: surfaceView.setVisibility(View.VISIBLE); + endScreen.setVisibility(View.GONE); playbackLiveSync.setVisibility(View.VISIBLE); break; @@ -357,6 +360,7 @@ public abstract class VideoPlayer extends BasePlayer qualityTextView.setVisibility(View.VISIBLE); surfaceView.setVisibility(View.VISIBLE); default: + endScreen.setVisibility(View.GONE); playbackEndTime.setVisibility(View.VISIBLE); break; } @@ -387,7 +391,6 @@ public abstract class VideoPlayer extends BasePlayer if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) playbackSeekBar.getThumb().setColorFilter(Color.RED, PorterDuff.Mode.SRC_IN); - animateView(endScreen, false, 0); loadingPanel.setBackgroundColor(Color.BLACK); animateView(loadingPanel, true, 0); animateView(surfaceForeground, true, 100); @@ -407,14 +410,12 @@ public abstract class VideoPlayer extends BasePlayer loadingPanel.setVisibility(View.GONE); animateView(currentDisplaySeek, AnimationUtils.Type.SCALE_AND_ALPHA, false, 200); - animateView(endScreen, false, 0); } @Override public void onBuffering() { if (DEBUG) Log.d(TAG, "onBuffering() called"); loadingPanel.setBackgroundColor(Color.TRANSPARENT); - animateView(loadingPanel, true, 500); } @Override From 8efcc8f80fbec871b959af4cdfd931371533dba2 Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Tue, 5 Jun 2018 23:47:13 -0700 Subject: [PATCH 015/103] -Fixed main video player end screen thumbnail not fitting screen aspect ratio. --- app/src/main/res/layout/activity_main_player.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/res/layout/activity_main_player.xml b/app/src/main/res/layout/activity_main_player.xml index f2cf85802..27aa56025 100644 --- a/app/src/main/res/layout/activity_main_player.xml +++ b/app/src/main/res/layout/activity_main_player.xml @@ -41,7 +41,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center" - android:scaleType="centerInside" android:visibility="gone" tools:background="@android:color/white" tools:ignore="ContentDescription" From 06374c82fd920bdc340e3e3fd66ba23b55eea887 Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Tue, 5 Jun 2018 23:48:44 -0700 Subject: [PATCH 016/103] -Fixed video players end screen not cleared on restarting playback after single stream play queue is completed. --- .../schabi/newpipe/player/VideoPlayer.java | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java index 73f5e94b1..679fc6645 100644 --- a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java @@ -315,14 +315,13 @@ public abstract class VideoPlayer extends BasePlayer } captionPopupMenu.setOnDismissListener(this); } - /*////////////////////////////////////////////////////////////////////////// - // Playback Listener - //////////////////////////////////////////////////////////////////////////*/ - protected abstract VideoPlaybackResolver.QualityResolver getQualityResolver(); - protected void onMetadataChanged(@NonNull final MediaSourceTag tag) { - super.onMetadataChanged(tag); + private void updateStreamRelatedViews() { + if (getCurrentMetadata() == null) return; + + final MediaSourceTag tag = getCurrentMetadata(); + final StreamInfo metadata = tag.getMetadata(); qualityTextView.setVisibility(View.GONE); playbackSpeedTextView.setVisibility(View.GONE); @@ -330,7 +329,7 @@ public abstract class VideoPlayer extends BasePlayer playbackEndTime.setVisibility(View.GONE); playbackLiveSync.setVisibility(View.GONE); - switch (tag.getMetadata().getStreamType()) { + switch (metadata.getStreamType()) { case AUDIO_STREAM: surfaceView.setVisibility(View.GONE); endScreen.setVisibility(View.VISIBLE); @@ -350,8 +349,8 @@ public abstract class VideoPlayer extends BasePlayer break; case VIDEO_STREAM: - final StreamInfo info = tag.getMetadata(); - if (info.getVideoStreams().size() + info.getVideoOnlyStreams().size() == 0) break; + if (metadata.getVideoStreams().size() + metadata.getVideoOnlyStreams().size() == 0) + break; availableStreams = tag.getSortedAvailableVideoStreams(); selectedStreamIndex = tag.getSelectedVideoStreamIndex(); @@ -368,6 +367,16 @@ public abstract class VideoPlayer extends BasePlayer buildPlaybackSpeedMenu(); playbackSpeedTextView.setVisibility(View.VISIBLE); } + /*////////////////////////////////////////////////////////////////////////// + // Playback Listener + //////////////////////////////////////////////////////////////////////////*/ + + protected abstract VideoPlaybackResolver.QualityResolver getQualityResolver(); + + protected void onMetadataChanged(@NonNull final MediaSourceTag tag) { + super.onMetadataChanged(tag); + updateStreamRelatedViews(); + } @Override @Nullable @@ -400,6 +409,8 @@ public abstract class VideoPlayer extends BasePlayer public void onPlaying() { super.onPlaying(); + updateStreamRelatedViews(); + showAndAnimateControl(-1, true); playbackSeekBar.setEnabled(true); From 31218c2a8c8e29a7152bf56463ba2dc1d39a304a Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Tue, 5 Jun 2018 23:50:42 -0700 Subject: [PATCH 017/103] -Fixed popup player notification metadata not updated on stream change. -Fixed popup player window not clipped to above soft input keyboard upon expansion. --- .../org/schabi/newpipe/player/PopupVideoPlayer.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java index 3bee984a8..c53685afa 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -191,14 +191,19 @@ public final class PopupVideoPlayer extends Service { SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); popupWidth = popupRememberSizeAndPos ? sharedPreferences.getFloat(POPUP_SAVED_WIDTH, defaultSize) : defaultSize; - final int layoutParamType = Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.O ? WindowManager.LayoutParams.TYPE_PHONE : WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY; + final int layoutParamType = Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.O ? + WindowManager.LayoutParams.TYPE_PHONE : + WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY; + final int interactiveInputMethodLayout = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | + WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM; windowLayoutParams = new WindowManager.LayoutParams( (int) popupWidth, (int) getMinimumVideoHeight(popupWidth), layoutParamType, - WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, + interactiveInputMethodLayout, PixelFormat.TRANSLUCENT); windowLayoutParams.gravity = Gravity.LEFT | Gravity.TOP; + windowLayoutParams.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; int centerX = (int) (screenWidth / 2f - popupWidth / 2f); int centerY = (int) (screenHeight / 2f - popupHeight / 2f); @@ -608,6 +613,8 @@ public final class PopupVideoPlayer extends Service { protected void onMetadataChanged(@NonNull final MediaSourceTag tag) { super.onMetadataChanged(tag); + resetNotification(); + updateNotification(-1); updateMetadata(); } From e7d23176b70abe07f11e2e433237d829daabf209 Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Tue, 5 Jun 2018 23:52:34 -0700 Subject: [PATCH 018/103] -Fixed database backup failing due to journal file name change after Room DB version update. --- .../org/schabi/newpipe/settings/ContentSettingsFragment.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java index 3894c421f..8f4e6d471 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java @@ -277,6 +277,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment { newpipe_db_shm.delete(); } else { + Toast.makeText(getContext(), R.string.could_not_import_all_files, Toast.LENGTH_LONG) .show(); } From aa1878c15aafad7fb6340472a098175dc102f1cf Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Tue, 26 Jun 2018 10:16:54 -0700 Subject: [PATCH 019/103] -Changed baseplayer metadata getters to use media tag as source. -Changed background player notification to no longer update bitmap on progress time change. -Changed popup player to move above soft keyboard when it is opened. --- .../newpipe/player/BackgroundPlayer.java | 25 ++++++++---- .../org/schabi/newpipe/player/BasePlayer.java | 6 +-- .../newpipe/player/PopupVideoPlayer.java | 40 ++++++++++++------- 3 files changed, 46 insertions(+), 25 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java index 805326abd..dd70ea354 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -199,7 +199,6 @@ public final class BackgroundPlayer extends Service { remoteViews.setTextViewText(R.id.notificationSongName, basePlayerImpl.getVideoTitle()); remoteViews.setTextViewText(R.id.notificationArtist, basePlayerImpl.getUploaderName()); - remoteViews.setImageViewBitmap(R.id.notificationCover, basePlayerImpl.getThumbnail()); remoteViews.setOnClickPendingIntent(R.id.notificationPlayPause, PendingIntent.getBroadcast(this, NOTIFICATION_ID, new Intent(ACTION_PLAY_PAUSE), PendingIntent.FLAG_UPDATE_CURRENT)); @@ -295,10 +294,22 @@ public final class BackgroundPlayer extends Service { // Thumbnail Loading //////////////////////////////////////////////////////////////////////////*/ + private void updateNotificationThumbnail() { + if (notRemoteView != null) { + notRemoteView.setImageViewBitmap(R.id.notificationCover, + basePlayerImpl.getThumbnail()); + } + if (bigNotRemoteView != null) { + bigNotRemoteView.setImageViewBitmap(R.id.notificationCover, + basePlayerImpl.getThumbnail()); + } + } + @Override public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) { super.onLoadingComplete(imageUri, view, loadedImage); resetNotification(); + updateNotificationThumbnail(); updateNotification(-1); } @@ -306,13 +317,7 @@ public final class BackgroundPlayer extends Service { public void onLoadingFailed(String imageUri, View view, FailReason failReason) { super.onLoadingFailed(imageUri, view, failReason); resetNotification(); - updateNotification(-1); - } - - @Override - public void onLoadingCancelled(String imageUri, View view) { - super.onLoadingCancelled(imageUri, view); - resetNotification(); + updateNotificationThumbnail(); updateNotification(-1); } /*////////////////////////////////////////////////////////////////////////// @@ -395,6 +400,7 @@ public final class BackgroundPlayer extends Service { protected void onMetadataChanged(@NonNull final MediaSourceTag tag) { super.onMetadataChanged(tag); resetNotification(); + updateNotificationThumbnail(); updateNotification(-1); updateMetadata(); } @@ -525,6 +531,7 @@ public final class BackgroundPlayer extends Service { public void onPlaying() { super.onPlaying(); resetNotification(); + updateNotificationThumbnail(); updateNotification(R.drawable.ic_pause_white); lockManager.acquireWifiAndCpu(); } @@ -533,6 +540,7 @@ public final class BackgroundPlayer extends Service { public void onPaused() { super.onPaused(); resetNotification(); + updateNotificationThumbnail(); updateNotification(R.drawable.ic_play_arrow_white); lockManager.releaseWifiAndCpu(); } @@ -547,6 +555,7 @@ public final class BackgroundPlayer extends Service { if (notRemoteView != null) { notRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 100, false); } + updateNotificationThumbnail(); updateNotification(R.drawable.ic_replay_white); lockManager.releaseWifiAndCpu(); } diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index 12e65cba1..7339dd50f 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -1044,17 +1044,17 @@ public abstract class BasePlayer implements @NonNull public String getVideoUrl() { - return currentItem == null ? context.getString(R.string.unknown_content) : currentItem.getUrl(); + return currentMetadata == null ? context.getString(R.string.unknown_content) : currentMetadata.getMetadata().getUrl(); } @NonNull public String getVideoTitle() { - return currentItem == null ? context.getString(R.string.unknown_content) : currentItem.getTitle(); + return currentMetadata == null ? context.getString(R.string.unknown_content) : currentMetadata.getMetadata().getName(); } @NonNull public String getUploaderName() { - return currentItem == null ? context.getString(R.string.unknown_content) : currentItem.getUploader(); + return currentMetadata == null ? context.getString(R.string.unknown_content) : currentMetadata.getMetadata().getUploaderName(); } @Nullable diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java index c53685afa..86998e0ea 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -98,6 +98,11 @@ public final class PopupVideoPlayer extends Service { private static final int MINIMUM_SHOW_EXTRA_WIDTH_DP = 300; + private static final int IDLE_WINDOW_FLAGS = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | + WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM; + private static final int ONGOING_PLAYBACK_WINDOW_FLAGS = IDLE_WINDOW_FLAGS | + WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON; + private WindowManager windowManager; private WindowManager.LayoutParams windowLayoutParams; private GestureDetector gestureDetector; @@ -194,13 +199,11 @@ public final class PopupVideoPlayer extends Service { final int layoutParamType = Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.O ? WindowManager.LayoutParams.TYPE_PHONE : WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY; - final int interactiveInputMethodLayout = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | - WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM; windowLayoutParams = new WindowManager.LayoutParams( (int) popupWidth, (int) getMinimumVideoHeight(popupWidth), layoutParamType, - interactiveInputMethodLayout, + IDLE_WINDOW_FLAGS, PixelFormat.TRANSLUCENT); windowLayoutParams.gravity = Gravity.LEFT | Gravity.TOP; windowLayoutParams.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; @@ -249,11 +252,15 @@ public final class PopupVideoPlayer extends Service { setRepeatModeRemote(notRemoteView, playerImpl.getRepeatMode()); - return new NotificationCompat.Builder(this, getString(R.string.notification_channel_id)) + NotificationCompat.Builder builder = new NotificationCompat.Builder(this, getString(R.string.notification_channel_id)) .setOngoing(true) .setSmallIcon(R.drawable.ic_newpipe_triangle_white) .setVisibility(NotificationCompat.VISIBILITY_PUBLIC) .setContent(notRemoteView); + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) { + builder.setPriority(NotificationCompat.PRIORITY_MAX); + } + return builder; } /** @@ -372,6 +379,12 @@ public final class PopupVideoPlayer extends Service { } } + private void updateWindowFlags(final int flags) { + if (windowLayoutParams == null || windowManager == null || playerImpl == null) return; + + windowLayoutParams.flags = flags; + windowManager.updateViewLayout(playerImpl.getRootView(), windowLayoutParams); + } /////////////////////////////////////////////////////////////////////////// protected class VideoPlayerImpl extends VideoPlayer implements View.OnLayoutChangeListener { @@ -684,16 +697,15 @@ public final class PopupVideoPlayer extends Service { @Override public void onPlaying() { super.onPlaying(); + + updateWindowFlags(ONGOING_PLAYBACK_WINDOW_FLAGS); + resetNotification(); updateNotification(R.drawable.ic_pause_white); videoPlayPause.setBackgroundResource(R.drawable.ic_pause_white); hideControls(DEFAULT_CONTROLS_DURATION, DEFAULT_CONTROLS_HIDE_TIME); - windowLayoutParams.flags = WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON - | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; - windowManager.updateViewLayout(playerImpl.getRootView(), windowLayoutParams); - startForeground(NOTIFICATION_ID, notBuilder.build()); lockManager.acquireWifiAndCpu(); } @@ -708,15 +720,15 @@ public final class PopupVideoPlayer extends Service { @Override public void onPaused() { super.onPaused(); + + updateWindowFlags(IDLE_WINDOW_FLAGS); + resetNotification(); updateNotification(R.drawable.ic_play_arrow_white); videoPlayPause.setBackgroundResource(R.drawable.ic_play_arrow_white); lockManager.releaseWifiAndCpu(); - windowLayoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; - windowManager.updateViewLayout(playerImpl.getRootView(), windowLayoutParams); - stopForeground(false); } @@ -732,15 +744,15 @@ public final class PopupVideoPlayer extends Service { @Override public void onCompleted() { super.onCompleted(); + + updateWindowFlags(IDLE_WINDOW_FLAGS); + resetNotification(); updateNotification(R.drawable.ic_replay_white); videoPlayPause.setBackgroundResource(R.drawable.ic_replay_white); lockManager.releaseWifiAndCpu(); - windowLayoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; - windowManager.updateViewLayout(playerImpl.getRootView(), windowLayoutParams); - stopForeground(false); } From 7f7145e8deb7cd46e1e520a7796559258557e87a Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Tue, 26 Jun 2018 10:18:01 -0700 Subject: [PATCH 020/103] -Fixed playback parameter dialog settings not persisting through rotation. -Moved playback parameter dialog step size selector to below pitch slider. --- .../helper/PlaybackParameterDialog.java | 72 +++++++++++-------- .../res/layout/dialog_playback_parameter.xml | 60 +++++++++------- 2 files changed, 75 insertions(+), 57 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java index c184da0a5..d6453f579 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java @@ -33,15 +33,19 @@ public class PlaybackParameterDialog extends DialogFragment { public static final double STEP_TEN_PERCENT_VALUE = 0.10f; public static final double STEP_TWENTY_FIVE_PERCENT_VALUE = 0.25f; public static final double STEP_ONE_HUNDRED_PERCENT_VALUE = 1.00f; - public static final double DEFAULT_PLAYBACK_STEP_VALUE = STEP_TWENTY_FIVE_PERCENT_VALUE; public static final double DEFAULT_TEMPO = 1.00f; public static final double DEFAULT_PITCH = 1.00f; + public static final double DEFAULT_STEP = STEP_TWENTY_FIVE_PERCENT_VALUE; public static final boolean DEFAULT_SKIP_SILENCE = false; @NonNull private static final String INITIAL_TEMPO_KEY = "initial_tempo_key"; @NonNull private static final String INITIAL_PITCH_KEY = "initial_pitch_key"; + @NonNull private static final String TEMPO_KEY = "tempo_key"; + @NonNull private static final String PITCH_KEY = "pitch_key"; + @NonNull private static final String STEP_SIZE_KEY = "step_size_key"; + public interface Callback { void onPlaybackParameterChanged(final float playbackTempo, final float playbackPitch, final boolean playbackSkipSilence); @@ -57,6 +61,10 @@ public class PlaybackParameterDialog extends DialogFragment { private double initialPitch = DEFAULT_PITCH; private boolean initialSkipSilence = DEFAULT_SKIP_SILENCE; + private double tempo = DEFAULT_TEMPO; + private double pitch = DEFAULT_PITCH; + private double stepSize = DEFAULT_STEP; + @Nullable private SeekBar tempoSlider; @Nullable private TextView tempoMinimumText; @Nullable private TextView tempoMaximumText; @@ -86,6 +94,10 @@ public class PlaybackParameterDialog extends DialogFragment { PlaybackParameterDialog dialog = new PlaybackParameterDialog(); dialog.initialTempo = playbackTempo; dialog.initialPitch = playbackPitch; + + dialog.tempo = playbackTempo; + dialog.pitch = playbackPitch; + dialog.initialSkipSilence = playbackSkipSilence; return dialog; } @@ -110,6 +122,10 @@ public class PlaybackParameterDialog extends DialogFragment { if (savedInstanceState != null) { initialTempo = savedInstanceState.getDouble(INITIAL_TEMPO_KEY, DEFAULT_TEMPO); initialPitch = savedInstanceState.getDouble(INITIAL_PITCH_KEY, DEFAULT_PITCH); + + tempo = savedInstanceState.getDouble(TEMPO_KEY, DEFAULT_TEMPO); + pitch = savedInstanceState.getDouble(PITCH_KEY, DEFAULT_PITCH); + stepSize = savedInstanceState.getDouble(STEP_SIZE_KEY, DEFAULT_STEP); } } @@ -118,6 +134,10 @@ public class PlaybackParameterDialog extends DialogFragment { super.onSaveInstanceState(outState); outState.putDouble(INITIAL_TEMPO_KEY, initialTempo); outState.putDouble(INITIAL_PITCH_KEY, initialPitch); + + outState.putDouble(TEMPO_KEY, getCurrentTempo()); + outState.putDouble(PITCH_KEY, getCurrentPitch()); + outState.putDouble(STEP_SIZE_KEY, getCurrentStepSize()); } /*////////////////////////////////////////////////////////////////////////// @@ -154,8 +174,8 @@ public class PlaybackParameterDialog extends DialogFragment { setupTempoControl(rootView); setupPitchControl(rootView); - setupStepSize(DEFAULT_PLAYBACK_STEP_VALUE); + changeStepSize(stepSize); setupStepSizeSelector(rootView); } @@ -168,31 +188,15 @@ public class PlaybackParameterDialog extends DialogFragment { tempoStepDownText = rootView.findViewById(R.id.tempoStepDown); if (tempoCurrentText != null) - tempoCurrentText.setText(PlayerHelper.formatSpeed(initialTempo)); + tempoCurrentText.setText(PlayerHelper.formatSpeed(tempo)); if (tempoMaximumText != null) tempoMaximumText.setText(PlayerHelper.formatSpeed(MAXIMUM_PLAYBACK_VALUE)); if (tempoMinimumText != null) tempoMinimumText.setText(PlayerHelper.formatSpeed(MINIMUM_PLAYBACK_VALUE)); - if (tempoStepUpText != null) { - tempoStepUpText.setText(getStepUpPercentString(DEFAULT_PLAYBACK_STEP_VALUE)); - tempoStepUpText.setOnClickListener(view -> { - onTempoSliderUpdated(getCurrentTempo() + DEFAULT_PLAYBACK_STEP_VALUE); - setCurrentPlaybackParameters(); - }); - } - - if (tempoStepDownText != null) { - tempoStepDownText.setText(getStepDownPercentString(DEFAULT_PLAYBACK_STEP_VALUE)); - tempoStepDownText.setOnClickListener(view -> { - onTempoSliderUpdated(getCurrentTempo() - DEFAULT_PLAYBACK_STEP_VALUE); - setCurrentPlaybackParameters(); - }); - } - if (tempoSlider != null) { tempoSlider.setMax(strategy.progressOf(MAXIMUM_PLAYBACK_VALUE)); - tempoSlider.setProgress(strategy.progressOf(initialTempo)); + tempoSlider.setProgress(strategy.progressOf(tempo)); tempoSlider.setOnSeekBarChangeListener(getOnTempoChangedListener()); } } @@ -206,7 +210,7 @@ public class PlaybackParameterDialog extends DialogFragment { pitchStepUpText = rootView.findViewById(R.id.pitchStepUp); if (pitchCurrentText != null) - pitchCurrentText.setText(PlayerHelper.formatPitch(initialPitch)); + pitchCurrentText.setText(PlayerHelper.formatPitch(pitch)); if (pitchMaximumText != null) pitchMaximumText.setText(PlayerHelper.formatPitch(MAXIMUM_PLAYBACK_VALUE)); if (pitchMinimumText != null) @@ -214,7 +218,7 @@ public class PlaybackParameterDialog extends DialogFragment { if (pitchSlider != null) { pitchSlider.setMax(strategy.progressOf(MAXIMUM_PLAYBACK_VALUE)); - pitchSlider.setProgress(strategy.progressOf(initialPitch)); + pitchSlider.setProgress(strategy.progressOf(pitch)); pitchSlider.setOnSeekBarChangeListener(getOnPitchChangedListener()); } } @@ -222,7 +226,7 @@ public class PlaybackParameterDialog extends DialogFragment { private void setupHookingControl(@NonNull View rootView) { unhookingCheckbox = rootView.findViewById(R.id.unhookCheckbox); if (unhookingCheckbox != null) { - unhookingCheckbox.setChecked(initialPitch != initialTempo); + unhookingCheckbox.setChecked(pitch != tempo); unhookingCheckbox.setOnCheckedChangeListener((compoundButton, isChecked) -> { if (isChecked) return; // When unchecked, slide back to the minimum of current tempo or pitch @@ -252,35 +256,37 @@ public class PlaybackParameterDialog extends DialogFragment { if (stepSizeOnePercentText != null) { stepSizeOnePercentText.setText(getPercentString(STEP_ONE_PERCENT_VALUE)); stepSizeOnePercentText.setOnClickListener(view -> - setupStepSize(STEP_ONE_PERCENT_VALUE)); + changeStepSize(STEP_ONE_PERCENT_VALUE)); } if (stepSizeFivePercentText != null) { stepSizeFivePercentText.setText(getPercentString(STEP_FIVE_PERCENT_VALUE)); stepSizeFivePercentText.setOnClickListener(view -> - setupStepSize(STEP_FIVE_PERCENT_VALUE)); + changeStepSize(STEP_FIVE_PERCENT_VALUE)); } if (stepSizeTenPercentText != null) { stepSizeTenPercentText.setText(getPercentString(STEP_TEN_PERCENT_VALUE)); stepSizeTenPercentText.setOnClickListener(view -> - setupStepSize(STEP_TEN_PERCENT_VALUE)); + changeStepSize(STEP_TEN_PERCENT_VALUE)); } if (stepSizeTwentyFivePercentText != null) { stepSizeTwentyFivePercentText.setText(getPercentString(STEP_TWENTY_FIVE_PERCENT_VALUE)); stepSizeTwentyFivePercentText.setOnClickListener(view -> - setupStepSize(STEP_TWENTY_FIVE_PERCENT_VALUE)); + changeStepSize(STEP_TWENTY_FIVE_PERCENT_VALUE)); } if (stepSizeOneHundredPercentText != null) { stepSizeOneHundredPercentText.setText(getPercentString(STEP_ONE_HUNDRED_PERCENT_VALUE)); stepSizeOneHundredPercentText.setOnClickListener(view -> - setupStepSize(STEP_ONE_HUNDRED_PERCENT_VALUE)); + changeStepSize(STEP_ONE_HUNDRED_PERCENT_VALUE)); } } - private void setupStepSize(final double stepSize) { + private void changeStepSize(final double stepSize) { + this.stepSize = stepSize; + if (tempoStepUpText != null) { tempoStepUpText.setText(getStepUpPercentString(stepSize)); tempoStepUpText.setOnClickListener(view -> { @@ -419,15 +425,19 @@ public class PlaybackParameterDialog extends DialogFragment { } private double getCurrentTempo() { - return tempoSlider == null ? initialTempo : strategy.valueOf( + return tempoSlider == null ? tempo : strategy.valueOf( tempoSlider.getProgress()); } private double getCurrentPitch() { - return pitchSlider == null ? initialPitch : strategy.valueOf( + return pitchSlider == null ? pitch : strategy.valueOf( pitchSlider.getProgress()); } + private double getCurrentStepSize() { + return stepSize; + } + private boolean getCurrentSkipSilence() { return skipSilenceCheckbox != null && skipSilenceCheckbox.isChecked(); } diff --git a/app/src/main/res/layout/dialog_playback_parameter.xml b/app/src/main/res/layout/dialog_playback_parameter.xml index 47937e882..a5933397e 100644 --- a/app/src/main/res/layout/dialog_playback_parameter.xml +++ b/app/src/main/res/layout/dialog_playback_parameter.xml @@ -260,43 +260,19 @@ - - - - + android:layout_below="@id/separatorStepSizeSelector"> + + + + + + From ca679f5932b8ac6c118ec24108af9b013d927b60 Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Thu, 28 Jun 2018 12:18:02 -0700 Subject: [PATCH 021/103] -Fixed potential NPE when updating thumbnail in background player. --- .../main/java/org/schabi/newpipe/player/BackgroundPlayer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java index dd70ea354..8594ca395 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -295,6 +295,7 @@ public final class BackgroundPlayer extends Service { //////////////////////////////////////////////////////////////////////////*/ private void updateNotificationThumbnail() { + if (basePlayerImpl == null) return; if (notRemoteView != null) { notRemoteView.setImageViewBitmap(R.id.notificationCover, basePlayerImpl.getThumbnail()); From 644766b5a67873d079e25986132f944e6705030f Mon Sep 17 00:00:00 2001 From: John Zhen Mo Date: Thu, 28 Jun 2018 12:21:03 -0700 Subject: [PATCH 022/103] -Updated exoplayer lib to 2.8.2. --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 6410cb823..c41535163 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -42,7 +42,7 @@ android { ext { supportLibVersion = '27.1.1' - exoPlayerLibVersion = '2.8.1' + exoPlayerLibVersion = '2.8.2' roomDbLibVersion = '1.1.1' leakCanaryLibVersion = '1.5.4' okHttpLibVersion = '3.10.0' From a208a22bc287a0a9d8c7a9015b3bcfce204b9922 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Fri, 29 Jun 2018 14:03:15 +0200 Subject: [PATCH 023/103] add link to the incredible bugreport converter --- .github/ISSUE_TEMPLATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 985223881..8073503ad 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,2 +1,3 @@ - [ ] I carefully read the [contribution guidelines](https://github.com/TeamNewPipe/NewPipe/blob/HEAD/.github/CONTRIBUTING.md) and agree to them. - [ ] I checked if the issue/feature exists in the latest version. +- [ ] I did use the [incredible bugreport to markdown converter](https://teamnewpipe.github.io/CrashReportToMarkdown/) to paste bug reports. From e85e91183ef35483d22eaba5741bd312702843a9 Mon Sep 17 00:00:00 2001 From: Anton Shestakov Date: Sat, 30 Jun 2018 05:51:41 +0000 Subject: [PATCH 024/103] Translated using Weblate (Russian) Currently translated at 99.4% (371 of 373 strings) --- app/src/main/res/values-ru/strings.xml | 28 +++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index e5394b4ed..9549749cb 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -1,7 +1,7 @@ %1$s просмотров - Опубликован в %1$s + Опубликовано %1$s Потоковый плеер не найден. Установить VLC? Установить Отмена @@ -125,7 +125,7 @@ В фоне В окне - Только некоторые устройства могут воспроизводить 2K/4K видео + Только некоторые устройства могут воспроизводить видео в 2K/4K Формат видео по умолчанию Чёрная Запоминать размер и положение всплывающего окна @@ -311,10 +311,10 @@ Потоки аудио не найдены Пожертвовать - NewPipe разрабатывается волонтерами, которые проводят время, принося вам лучший опыт. Вернитесь, чтобы помочь разработчикам сделать NewPipe еще лучше, наслаждаясь чашечкой кофе. + NewPipe разрабатывается добровольцами в свободное время ради вашего удобства использования программы. Пора воздать должное, разработчики могут сделать NewPipe ещё лучше с чашечкой кофе! Воздать должное Веб-сайт - Посетите сайт NewPipe для большей информации и новостей. + Для получения более подробной информации и последних новостей о NewPipe посетите наш веб-сайт. Открыть лоток Закрыть лоток @@ -368,7 +368,7 @@ Предупреждение: нет возможности импорта всех файлов. Это перезапишет вашу текущую установку. - Скоро что-то тут появится ;D + Скоро тут что-то будет ;D Всегда спрашивать @@ -387,7 +387,7 @@ Плейлист создан Добавлено в плейлист Иконка плейлиста изменена - Нельзя удалить плейлист + Не удалось удалить плейлист Без титров @@ -407,7 +407,7 @@ Мониторинг утечки памяти может привести к зависанию приложения Ошибки отчёта вне очереди - Принудительная отчетность об исключении исключаемых Rx исключений за пределами фрагмента или жизненного цикла деятельности после удаления + Импорт/Экспорт Импорт @@ -420,8 +420,8 @@ Импорт файла Предыдущий экспорт - Нельзя импортировать подписки - Нельзя экспортировать подписки + Не удалось импортировать подписки + Не удалось экспортировать подписки Импорт подписок из YouTube загрузкой файла экспорта: \n @@ -447,7 +447,7 @@ Управление скоростью воспроизведения Темп Тон - Независимо (может вызвать искажение) + Независимо (возможны искажения) Nightcore По умолчанию Удалить все загруженные данные веб-страниц @@ -458,14 +458,14 @@ Титры Нет приложения, установленного для воспроизведения этого файла - Изменить размер заголовка и фоновые стили. Требуется перезапуск приложения для изменений. + Изменить размер и фон титров. Требуется перезапуск приложения для вступления изменений в силу. Очистить историю просмотров Удалить всю историю просмотров. История просмотров была удалена. Очистить историю поиска Удалить историю поисковых запросов. - Удаляет историю воспроизведенных потоков. + Удаляет историю воспроизведённых потоков. Удалить всю историю поиска. Удалить историю поиска. 1 элемент удалён. @@ -483,6 +483,6 @@ Принять Отклонить - Безлимитный - Предельное разрешение при использовании мобильных данных + Без ограничения + Ограничить разрешение при использовании мобильных данных From 26d07ea2c67a6e517a9dfe39a4a8e815765eeef7 Mon Sep 17 00:00:00 2001 From: Heimen Stoffels Date: Sun, 1 Jul 2018 09:39:16 +0000 Subject: [PATCH 025/103] Translated using Weblate (Dutch) Currently translated at 100.0% (378 of 378 strings) --- app/src/main/res/values-nl/strings.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 3d0b552af..8616079ed 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -485,4 +485,10 @@ te openen in pop-upmodus Weigeren Ongelimiteerd Resolutie beperken bij gebruik van mobiele gegevens - + Minimaliseren bij overschakelen naar andere app + Actie bij overschakelen van videospeler naar andere app — %s + Geen + Afspelen op achtergrond + Afspelen in pop-upvenster + + From bc4acbb7e1f864f409b878b869a98820828f7c5b Mon Sep 17 00:00:00 2001 From: Marc Riera Date: Sun, 1 Jul 2018 10:39:10 +0000 Subject: [PATCH 026/103] Translated using Weblate (Catalan) Currently translated at 100,0% (378 of 378 strings) --- app/src/main/res/values-ca/strings.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index b8b7dd699..d230f40bb 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -452,4 +452,10 @@ Rebutja Sense restriccions Restringeix la resolució quan es facin servir dades mòbils - + Minimitza en canviar d\'aplicació + Acció en canviar a una altra aplicació des del reproductor de vídeo principal — %s + Cap + Minimitza al reproductor en segon pla + Minimitza al reproductor emergent + + From 73f81c5b52b58feacc02f9ee6fbf97b78066eb2f Mon Sep 17 00:00:00 2001 From: monolifed Date: Sun, 1 Jul 2018 12:45:49 +0000 Subject: [PATCH 027/103] Translated using Weblate (Turkish) Currently translated at 100.0% (378 of 378 strings) --- app/src/main/res/values-tr/strings.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 924b2c6bf..c240dbec5 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -481,4 +481,10 @@ Kabul etme Sınırsız Mobil veri kullanırken çözünürlüğü sınırla - + Uygulama geçişinde küçült + Ana video oynatıcıdan başka bir uygulamaya geçişteki eylem — %s + Yok + Arka plan oynatıcıya küçült + Açılır oynatıcıya küçült + + From 0a023a61f90b15624a40be8b09194afb137fda88 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Sun, 1 Jul 2018 13:19:20 +0000 Subject: [PATCH 028/103] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (378 of 378 strings) --- app/src/main/res/values-zh-rTW/strings.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 1d0ce7ac0..bea3c11e7 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -468,4 +468,10 @@ 下降 沒有限制 當您使用行動網路時限制解析度 - + 在應用程式切換時最小化 + 當從主影片播放器切換到其他應用程式時要進行的動作 — %s + + 最小化為背景播放器 + 最小化為彈出式播放器 + + From 3cdc1fcaeedabddc7a844e46d80e6edae5dcb990 Mon Sep 17 00:00:00 2001 From: Eduardo Caron Date: Sun, 1 Jul 2018 20:41:42 +0000 Subject: [PATCH 029/103] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (378 of 378 strings) --- app/src/main/res/values-pt-rBR/strings.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index b958caaa5..76fb93d13 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -467,4 +467,10 @@ abrir em modo popup Recusar Ilimitado Limitar resolução quando dados móveis estiverem em uso - + Minimizar ao trocar de aplicativo + Ação ao trocar de aplicativo quando estiver no reprodutor de vídeo principal — %s + "Nenhuma " + Minimizar para reprodutor em plano de fundo + Minimizar para reprodutor popup + + From ee417e41eac0313b4906e8f6f27e7b351112068c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20Tapia=20Ram=C3=ADrez?= Date: Sun, 1 Jul 2018 22:03:46 +0000 Subject: [PATCH 030/103] Translated using Weblate (Spanish) Currently translated at 100,0% (378 of 378 strings) --- app/src/main/res/values-es/strings.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index bfd0f3e6e..e7ca95673 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -488,4 +488,10 @@ abrir en modo popup Sin límite Limitar resolución cuando se use Datos Móviles - + Mimimizar al cambiar de aplicación + Acción de cambiar a otra aplicación desde el reproductor principal + Ninguna + Minimizar al reproductor de fondo + Minimizar el reproductor popup + + From 4a484c535bd566769bf4fccd7419efa6933ee07a Mon Sep 17 00:00:00 2001 From: Nathan Follens Date: Mon, 2 Jul 2018 07:25:55 +0000 Subject: [PATCH 031/103] Translated using Weblate (Flemish) Currently translated at 100,0% (378 of 378 strings) --- app/src/main/res/values-nl-rBE/strings.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-nl-rBE/strings.xml b/app/src/main/res/values-nl-rBE/strings.xml index b4c378fc4..ed431ae0a 100644 --- a/app/src/main/res/values-nl-rBE/strings.xml +++ b/app/src/main/res/values-nl-rBE/strings.xml @@ -448,4 +448,10 @@ Weigeren Onbeperkt Resolutie beperken bij gebruik van mobiele gegevens - + Minimaliseren bij overschakelen naar anderen app + Actie bij overschakelen van videospeler naar anderen app — %s + Geen + Afspelen in achtergrond + Afspelen in pop-upspeler + + From cb8545e33d7433d0f175ea4eebb1548cbd1c0209 Mon Sep 17 00:00:00 2001 From: Marian Hanzel Date: Sun, 1 Jul 2018 07:12:03 +0000 Subject: [PATCH 032/103] Translated using Weblate (Slovak) Currently translated at 96.0% (363 of 378 strings) --- app/src/main/res/values-sk/strings.xml | 38 +++++++++++++++++--------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 6358190ef..6204e5fba 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -361,7 +361,7 @@ Vždy sa opýtať Získavajú sa informácie… - Požadovaný obsah sa načítava + Načítanie požadované obsahu Vytvoriť nový zoznam skladieb Vymazať zoznam skladieb @@ -374,7 +374,7 @@ Odstrániť Záložku Chcete odstrániť tento zoznam skladieb? - Zoznam skladieb bol vytvorený + Zoznam skladieb vytvorený Pridané do zoznamu skladieb Miniatúra zoznamu skladieb bola zmenená Nemožno odstrániť zoznam skladieb @@ -414,18 +414,18 @@ Čoskoro sa tu niečo objaví ;D - Preferovaná akcia pri otvorení + Preferovaná akcia \'otvoriť\' Predvolená akcia pri otváraní obsahu — %s Automaticky vygenerované Nastavenie titulkov - Upravte mierku textu titulkov a štýly pozadia. Vyžaduje reštartovanie prehrávača. + Upravte mierku textu titulkov a štýly pozadia. Vyžaduje reštart prehrávača. Povoliť službu LeakCanary Monitorovanie pretečenia pamäte môže spôsobiť, že aplikácia nebude reagovať - Nahlásiť mimocyklické chyby + Nahlásiť mimo-cyklické chyby Vynútenie hlásenia nedodržateľných výnimiek Rx, ktoré sa vyskytnú mimo časového cyklu fragmentu alebo aktivity po zlikvidovaní Import/Export @@ -451,14 +451,14 @@ \n2. Po výzve sa prihláste do svojho účtu \n3. Sťahovanie by malo začať (to je exportovaný zoznam) \n - "Pre importovanie vašich SoundCloud dát, musíte poznať adresu URL alebo ID vašeho profilu. Ak poznáte jedno alebo druhé, zadajte ho do nižšie uvedeného vstupu a ste pripravení ísť. -\n -\nAk nepoznáte ani URL ani ID vašeho profilu, môžete postupovať nasledovne: -\n -\n1. V niektorom prehliadači povoľte režim \"desktop\" (web nie je dostupný pre mobilné zariadenia) -\n2. Prejdite na túto adresu URL: %1$s -\n3. Po výzve sa prihláste do svojho účtu -\n4. Skopírujte adresu URL, na ktorú ste boli presmerovaní (to je adresa vášho profilu) + "Importovať SoundCloud profil zadaním URL adresy alebo vášho ID: +\n +\nAk nepoznáte ani URL ani ID vašeho profilu, môžete postupovať nasledovne: +\n +\n1. V niektorom prehliadači povoľte režim \"desktop\" (web nie je dostupný pre mobilné zariadenia) +\n2. Prejdite na túto adresu URL: %1$s +\n3. Po výzve sa prihláste do svojho účtu +\n4. Skopírujte adresu URL, na ktorú ste boli presmerovaní (to je adresa vášho profilu). \n" ID,soundcloud.com/ID @@ -483,4 +483,16 @@ 1 položka bola vymazaná. "NewPipe je slobodný softvér pod licenciou copyleft. Môžete ho používať, študovať a vylepšovať ako len chcete. Konkrétne ho môžete šíriť a/alebo upravovať pod podmienkami Všeobecnej verejnej licencie GNU, ako ju publikuje Free Software Foundation, buď verzia 3 licencie, alebo (podľa vašej voľby) ktorákoľvek neskoršia verzia." + Ochrana osobných údajov v NewPipe + NewPipe projekt berie vaše súkromie vážne. Preto aplikácia nezhromažďuje žiadne údaje bez vášho súhlasu. +\nNewPipe v ochrane súkromia podrobne vysvetľuje, aké údaje budú odoslané a uložené pri hlásení o páde. + Prečítajte si pravidlá ochrany osobných údajov + Chcete zároveň importovať aj nastavenia? + + V súlade s Európskym Všeobecným Nariadením o Ochrane Údajov (GDPR), chceme upriamiť vašu pozornosť na ochranu osobných údajov v NewPipe. Starostlivo si ich prečítajte. Musíte ich prijať pred nahlásením chyby. + Prijať + Odmietnuť + + Bez limitu + Limitovať rozlíšenie pri použití mobilných dát From 1e79c146a7547b6f01296fb4e25b43e002ea8108 Mon Sep 17 00:00:00 2001 From: monolifed Date: Sun, 1 Jul 2018 12:49:08 +0000 Subject: [PATCH 033/103] Translated using Weblate (Turkish) Currently translated at 100.0% (378 of 378 strings) --- app/src/main/res/values-tr/strings.xml | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index c240dbec5..0b62bd755 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -119,16 +119,16 @@ İndirme menüsü ayarlanamadı - Açılır pencere kipinde aç - NewPipe açılır pencere kipi + Açılır oynatıcı kipinde aç + NewPipe açılır oynatıcı kipi - Öntanımlı açılır pencere çözünürlüğü + Öntanımlı açılır oynatıcı çözünürlüğü Daha yüksek çözünürlükleri göster Yalnızca bazı aygıtlar 2K/4K video oynatmayı destekler Öntanımlı video biçimi Siyah - Açılır pencere kipinde oynatılıyor + Açılır oynatıcı kipinde oynatılıyor Tümü Kanal Evet @@ -148,7 +148,7 @@ M B - Bu izin açılır pencere kipinde + Bu izin açılır oynatıcı kipinde \naçmak için gerekli reCAPTCHA @@ -156,16 +156,16 @@ reCAPTCHA Formu istendi Arka Plan - Açılır Pencere + Açılır Oynatıcı Süz Yenile Temizle - Açılır pencere boyutunu ve konumunu hatırla - Açılır pencerenin ayarlandığı son boyutu ve konumu hatırla + Açılır oynatıcı boyutunu ve konumunu hatırla + Açılır oynatıcının ayarlandığı son boyutu ve konumu hatırla - Açılır Pencere + Açılır Oynatıcı Boyutlandırılıyor Bu seçenek etkinken bazı çözünürlüklerin sesi olmayacaktır @@ -224,7 +224,7 @@ Geri Al NewPipe Bildirimi - NewPipe Arka Plan ve Açılır Pencere Oynatıcıları için Bildirimler + NewPipe Arka Plan ve Açılır Oynatıcılar için Bildirimler Sonuç yok Burada Cırcır Böceklerinden Başka Şey Yok @@ -257,9 +257,9 @@ Öge silindi Bu içeriği arama geçmişinden silmek istiyor musunuz? \"Kuyruğa almak İçin bas\" ipucunu göster - Video ayrıntıları sayfasında arka plan veya açılır pencere düğmesine basıldığında ipucu göster + Video ayrıntıları sayfasında arka plan veya açılır oynatıcı düğmesine basıldığında ipucu göster Arka plan oynatıcıda kuyruğa eklendi - Açılır pencere oynatıcıda kuyruğa eklendi + Açılır oynatıcıda kuyruğa eklendi Tümünü Oynat [Bilinmeyen] @@ -283,16 +283,16 @@ En İyi 50 Yeni ve sıcak Arka Plan Oynatıcı - Açılır Pencere Oynatıcı + Açılır Oynatıcı Kaldır Ayrıntılar Ses Ayarları Kuyruğa Almak İçin Bas Arka Planda Kuyruğa Al - Açılır Pencerede Kuyruğa Al + Açılır Oynatıcıda Kuyruğa Al Burada Oynatmaya Başla Burada Arka Planda Başlat - Burada Açılır Pencerede Başlat + Burada Açılır Oynatıcıda Başlat Bağış yapın NewPipe, size en iyi deneyimi sunmak için zamanını harcayan gönüllüler tarafından geliştirilmiştir. Bir fincan kahveyi yudumlarken NewPipe\'ı daha da iyi yapmaları için geliştiricilere yardımcı olun. Geri ver @@ -302,7 +302,7 @@ Hizmet Yönelimi Değiştir Arka Plana Geç - Açılır Pencereye Geç + Açılır Oynatıcıya Geç Ana Görünüme Geç Çekmeceyi Aç @@ -318,7 +318,7 @@ Video oynatıcı Arka plan oynatıcı - Açılır pencere oynatıcı + Açılır oynatıcı Her zaman sor Bilgi alınıyor… From aa9018b97bf587263acc6f5b5cff6fc4f188ebc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20Tapia=20Ram=C3=ADrez?= Date: Sun, 1 Jul 2018 22:18:24 +0000 Subject: [PATCH 034/103] Translated using Weblate (Spanish) Currently translated at 100.0% (378 of 378 strings) --- app/src/main/res/values-es/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index e7ca95673..bd39ba9f3 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -492,6 +492,6 @@ abrir en modo popup Acción de cambiar a otra aplicación desde el reproductor principal Ninguna Minimizar al reproductor de fondo - Minimizar el reproductor popup + Minimizar el reproductor emergente From 55c84192beb3e4c8749f047d50d0ea0d90a7e05f Mon Sep 17 00:00:00 2001 From: Nathan Follens Date: Mon, 2 Jul 2018 07:27:27 +0000 Subject: [PATCH 035/103] Translated using Weblate (Flemish) Currently translated at 100.0% (378 of 378 strings) --- app/src/main/res/values-nl-rBE/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-nl-rBE/strings.xml b/app/src/main/res/values-nl-rBE/strings.xml index ed431ae0a..65781b6a3 100644 --- a/app/src/main/res/values-nl-rBE/strings.xml +++ b/app/src/main/res/values-nl-rBE/strings.xml @@ -452,6 +452,6 @@ Actie bij overschakelen van videospeler naar anderen app — %s Geen Afspelen in achtergrond - Afspelen in pop-upspeler + Afspelen in pop-up From a3cd531cc8d4b66d827cb4887d57b7fe7b6dfebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Mon, 2 Jul 2018 21:46:43 +0000 Subject: [PATCH 036/103] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegi?= =?UTF-8?q?an=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 96.0% (363 of 378 strings) --- app/src/main/res/values-nb-rNO/strings.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index af771c971..34fa54b1a 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -477,4 +477,10 @@ Avslå Ubegrenset Begrens oppløsning når mobildata brukes - + Minimer ved programbytte + Handling ved bytting til annet program fra hovedspiller — %s + Ingen + Minimer til bakgrunnsspiller + Minimer til oppsprettsspiller + + From 1fb30bc3d9c825aef403ed991838a3ffe016bcdc Mon Sep 17 00:00:00 2001 From: ssantos Date: Sat, 7 Jul 2018 05:38:50 +0000 Subject: [PATCH 037/103] Translated using Weblate (German) Currently translated at 100,0% (378 of 378 strings) --- app/src/main/res/values-de/strings.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index fb15ff659..5698d6eb8 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -483,4 +483,10 @@ \nDu musst den Datenschutzrichtlinien zustimmen, um den Fehlerbericht an uns zu senden. Unbegrenzt Auflösung bei Verwendung mobiler Daten begrenzen - + Minimieren beim Anwendungswechsel + Aktion beim Umschalten auf eine andere Anwendung vom Haupt-Videoplayer - %s + Keine + Zum Hintergrund-Player minimieren + Zum Popup-Player minimieren + + From 4eaff51ba24473191f484724ca85bbff97990f30 Mon Sep 17 00:00:00 2001 From: D D Date: Fri, 6 Jul 2018 11:17:51 +0000 Subject: [PATCH 038/103] Translated using Weblate (Bulgarian) Currently translated at 61,9% (234 of 378 strings) --- app/src/main/res/values-bg/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index de171538a..03c210679 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -236,7 +236,7 @@ Файл Смени ориентацията - Мини към фонов режим + Мини във фонов режим Мини към изкачащ прозорец Мини в основен режим From 639ad7698de2ad164954a6a6de637b6c5e05ed85 Mon Sep 17 00:00:00 2001 From: cxj Date: Sat, 7 Jul 2018 03:03:48 +0000 Subject: [PATCH 039/103] Translated using Weblate (Chinese (Mandarin)) Currently translated at 15,6% (59 of 378 strings) --- app/src/main/res/values-cmn/strings.xml | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/app/src/main/res/values-cmn/strings.xml b/app/src/main/res/values-cmn/strings.xml index 5013b74eb..ee13afdb7 100644 --- a/app/src/main/res/values-cmn/strings.xml +++ b/app/src/main/res/values-cmn/strings.xml @@ -23,4 +23,45 @@ NewPipe弹出模式 订阅 订阅 + 取消订阅成功 + 无法更改订阅 + 无法更新订阅 + 显示详情 + + 主页 + 订阅 + 书签 + + 新功能 + + 后台 + 弹出窗口 + 添加到 + + 视频下载路径 + 储存视频文件的路径 + 输入视频的下载地址 + + 音频下载路径 + 储存音频的路径 + 输入音频的下载路径 + + 自动播放 + NewPipes被其它程序调用时播放视频 + 默认分辨率 + 默认弹出窗口分辨率 + 显示更高的分辨率 + 只有部分设备支持播放 2K/4K 视频 + 用 Kodi 播放 + 没找到 Kore 应用,需要安装它吗? + 显示“用 Kodi 播放”选项 + 显示用 Kodi媒体中心 播放视频的选项 + 音频 + 默认音频格式 + 默认视频格式 + 主题 + 亮色 + 酷黑 + 黑色 + 记住弹出窗口的尺寸与位置 From 3364bf268b56f09141f983b1e26d4531f84974a2 Mon Sep 17 00:00:00 2001 From: ssantos Date: Sat, 7 Jul 2018 05:51:23 +0000 Subject: [PATCH 040/103] Translated using Weblate (German) Currently translated at 100,0% (379 of 379 strings) --- app/src/main/res/values-de/strings.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 5698d6eb8..1ffdb4992 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -418,7 +418,7 @@ Wiedergabegeschwindigkeitsregler Geschwindigkeit Tonhöhe - Aushaken (kann zu Verzerrungen führen) + Verknüpfung aufheben (kann zu Verzerrungen führen) Nightcore Standard Deaktiviere diese Option, um das Laden aller Miniaturansichten zu stoppen und Daten und Speicherverbrauch zu sparen. Wenn du dies änderst, wird sowohl der In-Memory- als auch der On-Disk-Image-Cache gelöscht. @@ -489,4 +489,8 @@ Zum Hintergrund-Player minimieren Zum Popup-Player minimieren - +Vorspulen während der Stille + Schritt + Zurücksetzen + + From 23143797f952286fee02ff73f3cfe0943c2c7963 Mon Sep 17 00:00:00 2001 From: Marc Riera Date: Sat, 7 Jul 2018 08:22:44 +0000 Subject: [PATCH 041/103] Translated using Weblate (Catalan) Currently translated at 100,0% (379 of 379 strings) --- app/src/main/res/values-ca/strings.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index d230f40bb..e1bf62601 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -458,4 +458,8 @@ Minimitza al reproductor en segon pla Minimitza al reproductor emergent - +Avança ràpid durant el silenci + Pas + Reinicialitza + + From 1acdefd358ea17c91e2393601e1a843cc89b7d04 Mon Sep 17 00:00:00 2001 From: Heimen Stoffels Date: Sat, 7 Jul 2018 09:06:25 +0000 Subject: [PATCH 042/103] Translated using Weblate (Dutch) Currently translated at 100.0% (379 of 379 strings) --- app/src/main/res/values-nl/strings.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 8616079ed..7be3e0160 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -449,7 +449,7 @@ te openen in pop-upmodus Afspeelsnelheidbesturing Tempo Toon - Ontkoppelen (kan ruis veroorzaken) + Ontlinken (kan ruis veroorzaken) Nightcore Standaard Voorkeursactie voor openen @@ -491,4 +491,8 @@ te openen in pop-upmodus Afspelen op achtergrond Afspelen in pop-upvenster - +Vooruitspoelen tijdens stilte + Stap + Standaardwaarden + + From 3e05508cf91a596a711349a0872da41082b687f6 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Sat, 7 Jul 2018 13:09:46 +0000 Subject: [PATCH 043/103] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (379 of 379 strings) --- app/src/main/res/values-zh-rTW/strings.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index bea3c11e7..0dfb82955 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -432,7 +432,7 @@ 播放速度控制 節拍 間距 - 解除 (可能導致失真) + 解除連結(可能導致失真) Nightcore 預設 偏好的「開啟」動作 @@ -474,4 +474,8 @@ 最小化為背景播放器 最小化為彈出式播放器 - +在靜音時快轉 + 步進 + 重設 + + From d1dbcda88e3f2f1c9e26eba5ddcc3b2d469e2cd2 Mon Sep 17 00:00:00 2001 From: Ali Demirtas Date: Sat, 7 Jul 2018 17:02:41 +0000 Subject: [PATCH 044/103] Translated using Weblate (Turkish) Currently translated at 100,0% (379 of 379 strings) --- app/src/main/res/values-tr/strings.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 0b62bd755..4441ee6b1 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -446,7 +446,7 @@ Hız Öntanımlı Ses titreşimi - Çengeli Çıkar (bozukluğa neden olabilir) + Bağlantıyı kes (bozulmalara neden olabilir) Nightcore İndirmeye uygun akış yok @@ -487,4 +487,8 @@ Arka plan oynatıcıya küçült Açılır oynatıcıya küçült - +Sessizlik sırasında hızlı ileri + Adım + Sıfırla + + From 7c2aa6e69da5a3c0c3f367d5e17e7fe68fcd5323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Freddy=20Mor=C3=A1n=20Jr?= Date: Sat, 7 Jul 2018 16:28:20 +0000 Subject: [PATCH 045/103] Translated using Weblate (Spanish) Currently translated at 100,0% (379 of 379 strings) --- app/src/main/res/values-es/strings.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index bd39ba9f3..696398f37 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -453,7 +453,7 @@ abrir en modo popup Controles de velocidad de reproducción Tiempo Tono - Desenganchar (puede casusar distorsión) + Desenganchar (puede causar distorsión) Nightcore (tipo de música) Reproducción por defecto No hay streams disponibles para descargar @@ -494,4 +494,5 @@ abrir en modo popup Minimizar al reproductor de fondo Minimizar el reproductor emergente - +Avance rápido durante el silencio + From 22774592db663163ebb621ad59c4c0b345b56501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20Tapia=20Ram=C3=ADrez?= Date: Sat, 7 Jul 2018 19:06:26 +0000 Subject: [PATCH 046/103] Translated using Weblate (Spanish) Currently translated at 100,0% (379 of 379 strings) --- app/src/main/res/values-es/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 696398f37..8e91794e8 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -495,4 +495,7 @@ abrir en modo popup Minimizar el reproductor emergente Avance rápido durante el silencio + Paso + Reiniciar + From 17e7214d25a0c59663d932e32240b0a3c41e6002 Mon Sep 17 00:00:00 2001 From: AB Date: Sun, 8 Jul 2018 07:20:24 +0000 Subject: [PATCH 047/103] Translated using Weblate (Ukrainian) Currently translated at 100.0% (379 of 379 strings) --- app/src/main/res/values-uk/strings.xml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 755b447c9..08ece56de 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -473,4 +473,14 @@ Відхилити Безмежно Обмежити роздільну здатність під час користування мобільним інтернетом - + Перемотувати підчас тиші + Крок + Скинути + + Зменшити при перемкненні застосунку + Дія при перемкненні до інших застосунків з головного відео-програвачу — %s + Жодних + Зменшити до фонового програвачу + Зменшити до віконного програвачу + + From d10f9a5f25e7acac7f089f2492c8e9b7d036579b Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Sun, 8 Jul 2018 14:27:12 +0200 Subject: [PATCH 048/103] add getMoreInfo to SearchInfo --- app/build.gradle | 2 +- .../fragments/list/search/SearchFragment.java | 295 ++++++++++-------- .../schabi/newpipe/util/ExtractorHelper.java | 30 +- 3 files changed, 175 insertions(+), 152 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c41535163..503a3e469 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -54,7 +54,7 @@ dependencies { exclude module: 'support-annotations' } - implementation 'com.github.TeamNewPipe:NewPipeExtractor:bf1c771' + implementation 'com.github.TeamNewPipe:NewPipeExtractor:39332a283b1c911' testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:2.8.9' diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java index d07ff6448..e57cdbd31 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java @@ -38,10 +38,13 @@ import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.StreamingService; import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.search.SearchEngine; +import org.schabi.newpipe.extractor.search.SearchInfo; import org.schabi.newpipe.extractor.search.SearchResult; +import org.schabi.newpipe.extractor.uih.SearchQIHandler; import org.schabi.newpipe.fragments.BackPressable; import org.schabi.newpipe.fragments.list.BaseListFragment; import org.schabi.newpipe.local.history.HistoryRecordManager; +import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.report.UserAction; import org.schabi.newpipe.util.Constants; import org.schabi.newpipe.util.AnimationUtils; @@ -56,7 +59,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Queue; -import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import icepick.State; @@ -65,14 +68,13 @@ import io.reactivex.Observable; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.CompositeDisposable; import io.reactivex.disposables.Disposable; -import io.reactivex.functions.Consumer; import io.reactivex.schedulers.Schedulers; import io.reactivex.subjects.PublishSubject; import static org.schabi.newpipe.util.AnimationUtils.animateView; public class SearchFragment - extends BaseListFragment + extends BaseListFragment implements BackPressable { /*////////////////////////////////////////////////////////////////////////// @@ -92,19 +94,21 @@ public class SearchFragment @State protected int filterItemCheckedId = -1; - private SearchEngine.Filter filter = SearchEngine.Filter.ANY; @State protected int serviceId = Constants.NO_SERVICE_ID; @State - protected String searchQuery; + protected SearchQIHandler searchQuery; @State - protected String lastSearchedQuery; + protected SearchQIHandler lastSearchedQuery; @State protected boolean wasSearchFocused = false; + @State + List contentFilter; - private int currentPage = 0; - private int currentNextPage = 0; + private StreamingService service; + private String currentPageUrl; + private String nextPageUrl; private String contentCountry; private boolean isSuggestionsEnabled = true; private boolean isSearchHistoryEnabled = true; @@ -130,11 +134,11 @@ public class SearchFragment /*////////////////////////////////////////////////////////////////////////*/ - public static SearchFragment getInstance(int serviceId, String query) { + public static SearchFragment getInstance(int serviceId, SearchQIHandler query) { SearchFragment searchFragment = new SearchFragment(); searchFragment.setQuery(serviceId, query); - if (!TextUtils.isEmpty(query)) { + if (!TextUtils.isEmpty(query.getSearchString())) { searchFragment.setSearchOnResume(); } @@ -202,10 +206,19 @@ public class SearchFragment if (DEBUG) Log.d(TAG, "onResume() called"); super.onResume(); - if (!TextUtils.isEmpty(searchQuery)) { + try { + service = NewPipe.getService(serviceId); + } catch (Exception e) { + ErrorActivity.reportError(getActivity(), e, getActivity().getClass(), + getActivity().findViewById(android.R.id.content), + ErrorActivity.ErrorInfo.make(UserAction.UI_ERROR, + "", + "", R.string.general_error)); + } + + if (!TextUtils.isEmpty(searchQuery.getSearchString())) { if (wasLoading.getAndSet(false)) { - if (currentNextPage > currentPage) loadMoreItems(); - else search(searchQuery); + search(searchQuery); } else if (infoListAdapter.getItemsList().size() == 0) { if (savedState == null) { search(searchQuery); @@ -218,7 +231,7 @@ public class SearchFragment if (suggestionDisposable == null || suggestionDisposable.isDisposed()) initSuggestionObserver(); - if (TextUtils.isEmpty(searchQuery) || wasSearchFocused) { + if (TextUtils.isEmpty(searchQuery.getSearchString()) || wasSearchFocused) { showKeyboardSearch(); showSuggestionsPanel(); } else { @@ -247,7 +260,8 @@ public class SearchFragment public void onActivityResult(int requestCode, int resultCode, Intent data) { switch (requestCode) { case ReCaptchaActivity.RECAPTCHA_REQUEST: - if (resultCode == Activity.RESULT_OK && !TextUtils.isEmpty(searchQuery)) { + if (resultCode == Activity.RESULT_OK + && !TextUtils.isEmpty(searchQuery.getSearchString())) { search(searchQuery); } else Log.e(TAG, "ReCaptcha failed"); break; @@ -282,20 +296,31 @@ public class SearchFragment @Override public void writeTo(Queue objectsToSave) { super.writeTo(objectsToSave); - objectsToSave.add(currentPage); - objectsToSave.add(currentNextPage); + objectsToSave.add(currentPageUrl); + objectsToSave.add(nextPageUrl); } @Override public void readFrom(@NonNull Queue savedObjects) throws Exception { super.readFrom(savedObjects); - currentPage = (int) savedObjects.poll(); - currentNextPage = (int) savedObjects.poll(); + currentPageUrl = (String) savedObjects.poll(); + nextPageUrl = (String) savedObjects.poll(); } @Override public void onSaveInstanceState(Bundle bundle) { - searchQuery = searchEditText != null ? searchEditText.getText().toString() : searchQuery; + try { + searchQuery = searchEditText != null + ? NewPipe.getService(serviceId).getSearchQIHFactory().fromQuery( + searchEditText.getText().toString()) + : searchQuery; + } catch (Exception e) { + ErrorActivity.reportError(getActivity(), e, getActivity().getClass(), + getActivity().findViewById(android.R.id.content), + ErrorActivity.ErrorInfo.make(UserAction.UI_ERROR, + "", + "", R.string.general_error)); + } super.onSaveInstanceState(bundle); } @@ -305,8 +330,12 @@ public class SearchFragment @Override public void reloadContent() { - if (!TextUtils.isEmpty(searchQuery) || (searchEditText != null && !TextUtils.isEmpty(searchEditText.getText()))) { - search(!TextUtils.isEmpty(searchQuery) ? searchQuery : searchEditText.getText().toString()); + if (!TextUtils.isEmpty(searchQuery.getSearchString()) + || (searchEditText != null && !TextUtils.isEmpty(searchEditText.getText()))) { + search(!TextUtils.isEmpty(searchQuery.getSearchString()) + ? searchQuery + : getSearchQuery(searchEditText.getText().toString(), + new ArrayList<>(0), "")); } else { if (searchEditText != null) { searchEditText.setText(""); @@ -330,22 +359,20 @@ public class SearchFragment supportActionBar.setDisplayHomeAsUpEnabled(true); } - inflater.inflate(R.menu.menu_search, menu); + for(String filter : service.getSearchQIHFactory().getAvailableContentFilter()) { + menu.add(filter); + } restoreFilterChecked(menu, filterItemCheckedId); } @Override public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case R.id.menu_filter_all: - case R.id.menu_filter_video: - case R.id.menu_filter_channel: - case R.id.menu_filter_playlist: - changeFilter(item, getFilterFromMenuId(item.getItemId())); - return true; - default: - return super.onOptionsItemSelected(item); - } + + List contentFilter = new ArrayList<>(1); + contentFilter.add(item.getTitle().toString()); + changeContentFilter(item, contentFilter); + + return true; } private void restoreFilterChecked(Menu menu, int itemId) { @@ -354,21 +381,8 @@ public class SearchFragment if (item == null) return; item.setChecked(true); - filter = getFilterFromMenuId(itemId); - } - } - - private SearchEngine.Filter getFilterFromMenuId(int itemId) { - switch (itemId) { - case R.id.menu_filter_video: - return SearchEngine.Filter.STREAM; - case R.id.menu_filter_channel: - return SearchEngine.Filter.CHANNEL; - case R.id.menu_filter_playlist: - return SearchEngine.Filter.PLAYLIST; - case R.id.menu_filter_all: - default: - return SearchEngine.Filter.ANY; + contentFilter.clear(); + contentFilter.add(menu.getItem(itemId).getTitle().toString()); } } @@ -380,9 +394,9 @@ public class SearchFragment private void showSearchOnStart() { if (DEBUG) Log.d(TAG, "showSearchOnStart() called, searchQuery → " + searchQuery+", lastSearchedQuery → " + lastSearchedQuery); - searchEditText.setText(searchQuery); + searchEditText.setText(searchQuery.getSearchString()); - if (TextUtils.isEmpty(searchQuery) || TextUtils.isEmpty(searchEditText.getText())) { + if (TextUtils.isEmpty(searchQuery.getSearchString()) || TextUtils.isEmpty(searchEditText.getText())) { searchToolbarContainer.setTranslationX(100); searchToolbarContainer.setAlpha(0f); searchToolbarContainer.setVisibility(View.VISIBLE); @@ -396,47 +410,38 @@ public class SearchFragment private void initSearchListeners() { if (DEBUG) Log.d(TAG, "initSearchListeners() called"); - searchClear.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - if (DEBUG) Log.d(TAG, "onClick() called with: v = [" + v + "]"); - if (TextUtils.isEmpty(searchEditText.getText())) { - NavigationHelper.gotoMainFragment(getFragmentManager()); - return; - } - - searchEditText.setText(""); - suggestionListAdapter.setItems(new ArrayList()); - showKeyboardSearch(); + searchClear.setOnClickListener(v -> { + if (DEBUG) Log.d(TAG, "onClick() called with: v = [" + v + "]"); + if (TextUtils.isEmpty(searchEditText.getText())) { + NavigationHelper.gotoMainFragment(getFragmentManager()); + return; } + + searchEditText.setText(""); + suggestionListAdapter.setItems(new ArrayList<>()); + showKeyboardSearch(); }); TooltipCompat.setTooltipText(searchClear, getString(R.string.clear)); - searchEditText.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - if (DEBUG) Log.d(TAG, "onClick() called with: v = [" + v + "]"); - if (isSuggestionsEnabled && errorPanelRoot.getVisibility() != View.VISIBLE) { - showSuggestionsPanel(); - } + searchEditText.setOnClickListener(v -> { + if (DEBUG) Log.d(TAG, "onClick() called with: v = [" + v + "]"); + if (isSuggestionsEnabled && errorPanelRoot.getVisibility() != View.VISIBLE) { + showSuggestionsPanel(); } }); - searchEditText.setOnFocusChangeListener(new View.OnFocusChangeListener() { - @Override - public void onFocusChange(View v, boolean hasFocus) { - if (DEBUG) Log.d(TAG, "onFocusChange() called with: v = [" + v + "], hasFocus = [" + hasFocus + "]"); - if (isSuggestionsEnabled && hasFocus && errorPanelRoot.getVisibility() != View.VISIBLE) { - showSuggestionsPanel(); - } + searchEditText.setOnFocusChangeListener((View v, boolean hasFocus) -> { + if (DEBUG) Log.d(TAG, "onFocusChange() called with: v = [" + v + "], hasFocus = [" + hasFocus + "]"); + if (isSuggestionsEnabled && hasFocus && errorPanelRoot.getVisibility() != View.VISIBLE) { + showSuggestionsPanel(); } }); suggestionListAdapter.setListener(new SuggestionListAdapter.OnSuggestionItemSelected() { @Override public void onSuggestionItemSelected(SuggestionItem item) { - search(item.query); + search(getSearchQuery(item.query, new ArrayList<>(), "")); searchEditText.setText(item.query); } @@ -469,21 +474,22 @@ public class SearchFragment } }; searchEditText.addTextChangedListener(textWatcher); - searchEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() { - @Override - public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { - if (DEBUG) { - Log.d(TAG, "onEditorAction() called with: v = [" + v + "], actionId = [" + actionId + "], event = [" + event + "]"); - } - if (event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER || event.getAction() == EditorInfo.IME_ACTION_SEARCH)) { - search(searchEditText.getText().toString()); - return true; - } - return false; - } - }); + searchEditText.setOnEditorActionListener( + (TextView v, int actionId, KeyEvent event) -> { + if (DEBUG) { + Log.d(TAG, "onEditorAction() called with: v = [" + v + "], actionId = [" + actionId + "], event = [" + event + "]"); + } + if (event != null + && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER + || event.getAction() == EditorInfo.IME_ACTION_SEARCH)) { + search(getSearchQuery(searchEditText.getText().toString(), new ArrayList<>(), "")); + return true; + } + return false; + }); - if (suggestionDisposable == null || suggestionDisposable.isDisposed()) initSuggestionObserver(); + if (suggestionDisposable == null || suggestionDisposable.isDisposed()) + initSuggestionObserver(); } private void unsetSearchListeners() { @@ -513,7 +519,8 @@ public class SearchFragment if (searchEditText == null) return; if (searchEditText.requestFocus()) { - InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE); + InputMethodManager imm = (InputMethodManager) activity.getSystemService( + Context.INPUT_METHOD_SERVICE); imm.showSoftInput(searchEditText, InputMethodManager.SHOW_IMPLICIT); } } @@ -522,8 +529,10 @@ public class SearchFragment if (DEBUG) Log.d(TAG, "hideKeyboardSearch() called"); if (searchEditText == null) return; - InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE); - imm.hideSoftInputFromWindow(searchEditText.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); + InputMethodManager imm = (InputMethodManager) activity.getSystemService( + Context.INPUT_METHOD_SERVICE); + imm.hideSoftInputFromWindow(searchEditText.getWindowToken(), + InputMethodManager.HIDE_NOT_ALWAYS); searchEditText.clearFocus(); } @@ -557,7 +566,7 @@ public class SearchFragment if (suggestionsPanel.getVisibility() == View.VISIBLE && infoListAdapter.getItemsList().size() > 0 && !isLoading.get()) { hideSuggestionsPanel(); hideKeyboardSearch(); - searchEditText.setText(lastSearchedQuery); + searchEditText.setText(lastSearchedQuery.getSearchString()); return true; } return false; @@ -573,8 +582,10 @@ public class SearchFragment final Observable observable = suggestionPublisher .debounce(SUGGESTIONS_DEBOUNCE, TimeUnit.MILLISECONDS) - .startWith(searchQuery != null ? searchQuery : "") - .filter(query -> isSuggestionsEnabled); + .startWith(searchQuery != null + ? searchQuery.getSearchString() + : "") + .filter(searchString -> isSuggestionsEnabled); suggestionDisposable = observable .switchMap(query -> { @@ -645,35 +656,24 @@ public class SearchFragment // no-op } - private void search(final String query) { + private void search(final SearchQIHandler query) { if (DEBUG) Log.d(TAG, "search() called with: query = [" + query + "]"); - if (query.isEmpty()) return; + if (query.getSearchString().isEmpty()) return; try { - final StreamingService service = NewPipe.getServiceByUrl(query); + final StreamingService service = NewPipe.getServiceByUrl(query.getUrl()); if (service != null) { showLoading(); disposables.add(Observable - .fromCallable(new Callable() { - @Override - public Intent call() throws Exception { - return NavigationHelper.getIntentByLink(activity, service, query); - } - }) + .fromCallable(() -> + NavigationHelper.getIntentByLink(activity, service, query.getUrl())) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new Consumer() { - @Override - public void accept(Intent intent) throws Exception { - getFragmentManager().popBackStackImmediate(); - activity.startActivity(intent); - } - }, new Consumer() { - @Override - public void accept(Throwable throwable) throws Exception { - showError(getString(R.string.url_not_supported_toast), false); - } - })); + .subscribe(intent -> { + getFragmentManager().popBackStackImmediate(); + activity.startActivity(intent); + }, throwable -> + showError(getString(R.string.url_not_supported_toast), false))); return; } } catch (Exception e) { @@ -682,19 +682,19 @@ public class SearchFragment lastSearchedQuery = query; searchQuery = query; - currentPage = 0; + currentPageUrl = ""; infoListAdapter.clearStreamItemList(); hideSuggestionsPanel(); hideKeyboardSearch(); - historyRecordManager.onSearched(serviceId, query) + historyRecordManager.onSearched(serviceId, query.getSearchString()) .observeOn(AndroidSchedulers.mainThread()) .subscribe( ignored -> {}, error -> showSnackBarError(error, UserAction.SEARCHED, - NewPipe.getNameOfService(serviceId), query, 0) + NewPipe.getNameOfService(serviceId), query.getSearchString(), 0) ); - suggestionPublisher.onNext(query); + suggestionPublisher.onNext(query.getSearchString()); startLoading(false); } @@ -703,7 +703,8 @@ public class SearchFragment super.startLoading(forceLoad); if (disposables != null) disposables.clear(); if (searchDisposable != null) searchDisposable.dispose(); - searchDisposable = ExtractorHelper.searchFor(serviceId, searchQuery, currentPage, contentCountry, filter) + searchDisposable = ExtractorHelper.searchFor(serviceId, + searchQuery, currentPageUrl, contentCountry, contentFilter, "") .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .doOnEvent((searchResult, throwable) -> isLoading.set(false)) @@ -716,7 +717,8 @@ public class SearchFragment showListFooter(true); if (searchDisposable != null) searchDisposable.dispose(); currentNextPage = currentPage + 1; - searchDisposable = ExtractorHelper.getMoreSearchItems(serviceId, searchQuery, currentNextPage, contentCountry, filter) + searchDisposable = ExtractorHelper.getMoreSearchItems(serviceId, + searchQuery, currentNextPage, contentCountry, filter) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .doOnEvent((nextItemsResult, throwable) -> isLoading.set(false)) @@ -739,21 +741,38 @@ public class SearchFragment // Utils //////////////////////////////////////////////////////////////////////////*/ - private void changeFilter(MenuItem item, SearchEngine.Filter filter) { - this.filter = filter; + private void changeContentFilter(MenuItem item, List contentFilter) { this.filterItemCheckedId = item.getItemId(); item.setChecked(true); - if (!TextUtils.isEmpty(searchQuery)) { + this.contentFilter = contentFilter; + searchQuery = getSearchQuery(searchQuery.getSearchString(), contentFilter, ""); + + if (!TextUtils.isEmpty(searchQuery.getSearchString())) { search(searchQuery); } } - private void setQuery(int serviceId, String searchQuery) { + private void setQuery(int serviceId, SearchQIHandler searchQuery) { this.serviceId = serviceId; this.searchQuery = searchQuery; } + private SearchQIHandler getSearchQuery(String searchString, + List contentFilter, + String sortFilter) { + try { + return service.getSearchQIHFactory() + .fromQuery(searchString, contentFilter, sortFilter); + } catch (Exception e) { + ErrorActivity.reportError(getActivity(), e, getActivity().getClass(), + getActivity().findViewById(android.R.id.content), + ErrorActivity.ErrorInfo.make(UserAction.UI_ERROR, + "", + "", R.string.general_error)); + } + } + /*////////////////////////////////////////////////////////////////////////// // Suggestion Results //////////////////////////////////////////////////////////////////////////*/ @@ -772,8 +791,11 @@ public class SearchFragment if (DEBUG) Log.d(TAG, "onSuggestionError() called with: exception = [" + exception + "]"); if (super.onError(exception)) return; - int errorId = exception instanceof ParsingException ? R.string.parsing_error : R.string.general_error; - onUnrecoverableError(exception, UserAction.GET_SUGGESTIONS, NewPipe.getNameOfService(serviceId), searchQuery, errorId); + int errorId = exception instanceof ParsingException + ? R.string.parsing_error + : R.string.general_error; + onUnrecoverableError(exception, UserAction.GET_SUGGESTIONS, + NewPipe.getNameOfService(serviceId), searchQuery, errorId); } /*////////////////////////////////////////////////////////////////////////// @@ -800,7 +822,8 @@ public class SearchFragment @Override public void handleResult(@NonNull SearchResult result) { if (!result.errors.isEmpty()) { - showSnackBarError(result.errors, UserAction.SEARCHED, NewPipe.getNameOfService(serviceId), searchQuery, 0); + showSnackBarError(result.errors, UserAction.SEARCHED, + NewPipe.getNameOfService(serviceId), searchQuery, 0); } lastSearchedQuery = searchQuery; @@ -825,7 +848,8 @@ public class SearchFragment infoListAdapter.addInfoItemList(result.getItems()); if (!result.getErrors().isEmpty()) { - showSnackBarError(result.getErrors(), UserAction.SEARCHED, NewPipe.getNameOfService(serviceId) + showSnackBarError(result.getErrors(), UserAction.SEARCHED, + NewPipe.getNameOfService(serviceId) , "\"" + searchQuery + "\" → page " + currentPage, 0); } super.handleNextItems(result); @@ -839,8 +863,11 @@ public class SearchFragment infoListAdapter.clearStreamItemList(); showEmptyState(); } else { - int errorId = exception instanceof ParsingException ? R.string.parsing_error : R.string.general_error; - onUnrecoverableError(exception, UserAction.SEARCHED, NewPipe.getNameOfService(serviceId), searchQuery, errorId); + int errorId = exception instanceof ParsingException + ? R.string.parsing_error + : R.string.general_error; + onUnrecoverableError(exception, UserAction.SEARCHED, + NewPipe.getNameOfService(serviceId), searchQuery, errorId); } return true; diff --git a/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java b/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java index 1897589c6..9cbedff23 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java @@ -38,9 +38,11 @@ import org.schabi.newpipe.extractor.exceptions.ReCaptchaException; import org.schabi.newpipe.extractor.kiosk.KioskInfo; import org.schabi.newpipe.extractor.playlist.PlaylistInfo; import org.schabi.newpipe.extractor.search.SearchEngine; +import org.schabi.newpipe.extractor.search.SearchInfo; import org.schabi.newpipe.extractor.search.SearchResult; import org.schabi.newpipe.extractor.services.youtube.YoutubeStreamExtractor; import org.schabi.newpipe.extractor.stream.StreamInfo; +import org.schabi.newpipe.extractor.uih.SearchQIHandler; import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.report.UserAction; @@ -66,29 +68,23 @@ public final class ExtractorHelper { } } - public static Single searchFor(final int serviceId, - final String query, - final int pageNumber, - final String contentCountry, - final SearchEngine.Filter filter) { + public static Single searchFor(final int serviceId, + final SearchQIHandler query, + final String contentCountry) { checkServiceId(serviceId); return Single.fromCallable(() -> - SearchResult.getSearchResult(NewPipe.getService(serviceId).getSearchEngine(), - query, pageNumber, contentCountry, filter) - ); + SearchInfo.getInfo(NewPipe.getService(serviceId).getSearchExtractor(query, contentCountry))); } public static Single getMoreSearchItems(final int serviceId, - final String query, - final int nextPageNumber, - final String searchLanguage, - final SearchEngine.Filter filter) { + final SearchQIHandler query, + final String pageUrl, + final String contentCountry) { checkServiceId(serviceId); - return searchFor(serviceId, query, nextPageNumber, searchLanguage, filter) - .map((@NonNull SearchResult searchResult) -> - new InfoItemsPage(searchResult.resultList, - nextPageNumber + "", - searchResult.errors)); + return Single.fromCallable(() -> + SearchInfo.get + NewPipe.getService(serviceId).getSearchExtractor(query, contentCountry)) + } public static Single> suggestionsFor(final int serviceId, From 3e02c65bc084d24c2db3e25cd8981abb14c9e2b3 Mon Sep 17 00:00:00 2001 From: Eduardo Caron Date: Sun, 8 Jul 2018 13:21:05 +0000 Subject: [PATCH 049/103] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (379 of 379 strings) --- app/src/main/res/values-pt-rBR/strings.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 76fb93d13..670b23002 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -429,7 +429,7 @@ abrir em modo popup "Tempo " Desabilite para para de carregar todas as miniaturas e economizar dados e uso de memória. Alterar esta configuração irá limpar o cache de imagens na memória e em disco. Passo - Desenganchar + Desvincular (pode causar distorção) Padrão Ação de \'abrir\' preferida Ação padrão quando abrir conteúdo — %s @@ -473,4 +473,9 @@ abrir em modo popup Minimizar para reprodutor em plano de fundo Minimizar para reprodutor popup - +Avançar rapidamente durante silêncio + Parar +\n + Reiniciar + + From d5a500c0372a36db37ff92fbce465ff166026cf0 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Sun, 8 Jul 2018 17:46:21 +0200 Subject: [PATCH 050/103] bring everything to compile and run --- app/build.gradle | 2 +- .../java/org/schabi/newpipe/MainActivity.java | 69 ++++++++++++------- .../newpipe/fragments/MainFragment.java | 27 +++++--- .../fragments/detail/VideoDetailFragment.java | 20 ++++-- .../fragments/list/BaseListFragment.java | 38 ++++++++-- .../fragments/list/BaseListInfoFragment.java | 10 +-- .../list/channel/ChannelFragment.java | 21 +++--- .../fragments/list/kiosk/KioskFragment.java | 26 ++++--- .../list/playlist/PlaylistFragment.java | 39 +++++++---- .../fragments/list/search/SearchFragment.java | 47 +++++-------- .../local/bookmark/BookmarkFragment.java | 34 ++++++--- .../subscription/SubscriptionFragment.java | 16 ++++- .../org/schabi/newpipe/util/Constants.java | 2 +- .../schabi/newpipe/util/ExtractorHelper.java | 8 +-- .../schabi/newpipe/util/NavigationHelper.java | 17 +++-- 15 files changed, 238 insertions(+), 138 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 503a3e469..396b79459 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -54,7 +54,7 @@ dependencies { exclude module: 'support-annotations' } - implementation 'com.github.TeamNewPipe:NewPipeExtractor:39332a283b1c911' + implementation 'com.github.TeamNewPipe:NewPipeExtractor:4746a1c48a8682' testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:2.8.9' diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 61b430c27..38ee4a1f8 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -49,6 +49,7 @@ import android.widget.TextView; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.StreamingService; +import org.schabi.newpipe.extractor.uih.SearchQIHandler; import org.schabi.newpipe.fragments.BackPressable; import org.schabi.newpipe.fragments.MainFragment; import org.schabi.newpipe.fragments.detail.VideoDetailFragment; @@ -61,6 +62,8 @@ import org.schabi.newpipe.util.ServiceHelper; import org.schabi.newpipe.util.StateSaver; import org.schabi.newpipe.util.ThemeHelper; +import static org.schabi.newpipe.extractor.InfoItem.InfoType.PLAYLIST; + public class MainActivity extends AppCompatActivity { private static final String TAG = "MainActivity"; public static final boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release"); @@ -392,31 +395,51 @@ public class MainActivity extends AppCompatActivity { } private void handleIntent(Intent intent) { - if (DEBUG) Log.d(TAG, "handleIntent() called with: intent = [" + intent + "]"); + try { + if (DEBUG) Log.d(TAG, "handleIntent() called with: intent = [" + intent + "]"); - if (intent.hasExtra(Constants.KEY_LINK_TYPE)) { - String url = intent.getStringExtra(Constants.KEY_URL); - int serviceId = intent.getIntExtra(Constants.KEY_SERVICE_ID, 0); - String title = intent.getStringExtra(Constants.KEY_TITLE); - switch (((StreamingService.LinkType) intent.getSerializableExtra(Constants.KEY_LINK_TYPE))) { - case STREAM: - boolean autoPlay = intent.getBooleanExtra(VideoDetailFragment.AUTO_PLAY, false); - NavigationHelper.openVideoDetailFragment(getSupportFragmentManager(), serviceId, url, title, autoPlay); - break; - case CHANNEL: - NavigationHelper.openChannelFragment(getSupportFragmentManager(), serviceId, url, title); - break; - case PLAYLIST: - NavigationHelper.openPlaylistFragment(getSupportFragmentManager(), serviceId, url, title); - break; + if (intent.hasExtra(Constants.KEY_LINK_TYPE)) { + String url = intent.getStringExtra(Constants.KEY_URL); + int serviceId = intent.getIntExtra(Constants.KEY_SERVICE_ID, 0); + String title = intent.getStringExtra(Constants.KEY_TITLE); + switch (((StreamingService.LinkType) intent.getSerializableExtra(Constants.KEY_LINK_TYPE))) { + case STREAM: + boolean autoPlay = intent.getBooleanExtra(VideoDetailFragment.AUTO_PLAY, false); + NavigationHelper.openVideoDetailFragment(getSupportFragmentManager(), serviceId, url, title, autoPlay); + break; + case CHANNEL: + NavigationHelper.openChannelFragment(getSupportFragmentManager(), + serviceId, + NewPipe.getService(serviceId) + .getChannelUIHFactory() + .fromUrl(url), + title); + break; + case PLAYLIST: + NavigationHelper.openPlaylistFragment(getSupportFragmentManager(), + serviceId, + NewPipe.getService(serviceId) + .getChannelUIHFactory() + .fromUrl(url), + title); + break; + } + } else if (intent.hasExtra(Constants.KEY_OPEN_SEARCH)) { + String searchString = intent.getStringExtra(Constants.KEY_SEARCH_STRING); + if (searchString == null) searchString = ""; + int serviceId = intent.getIntExtra(Constants.KEY_SERVICE_ID, 0); + NavigationHelper.openSearchFragment( + getSupportFragmentManager(), + serviceId, + NewPipe.getService(serviceId) + .getSearchQIHFactory() + .fromQuery(searchString)); + + } else { + NavigationHelper.gotoMainFragment(getSupportFragmentManager()); } - } else if (intent.hasExtra(Constants.KEY_OPEN_SEARCH)) { - String searchQuery = intent.getStringExtra(Constants.KEY_QUERY); - if (searchQuery == null) searchQuery = ""; - int serviceId = intent.getIntExtra(Constants.KEY_SERVICE_ID, 0); - NavigationHelper.openSearchFragment(getSupportFragmentManager(), serviceId, searchQuery); - } else { - NavigationHelper.gotoMainFragment(getSupportFragmentManager()); + } catch (Exception e) { + ErrorActivity.reportUiError(this, e); } } } diff --git a/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java index 31092d3e6..cd4fc1baf 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java @@ -10,6 +10,7 @@ import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.view.ViewPager; import android.support.v7.app.ActionBar; +import android.support.v7.app.AppCompatActivity; import android.support.v7.preference.PreferenceManager; import android.util.Log; import android.view.LayoutInflater; @@ -127,7 +128,16 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.action_search: - NavigationHelper.openSearchFragment(getFragmentManager(), ServiceHelper.getSelectedServiceId(activity), ""); + try { + NavigationHelper.openSearchFragment( + getFragmentManager(), + ServiceHelper.getSelectedServiceId(activity), + NewPipe.getService(currentServiceId) + .getSearchQIHFactory() + .fromQuery("")); + } catch (Exception e) { + ErrorActivity.reportUiError((AppCompatActivity) getActivity(), e); + } return true; } return super.onOptionsItemSelected(item); @@ -226,7 +236,9 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte FALLBACK_CHANNEL_URL); String name = preferences.getString(getString(R.string.main_page_selected_channel_name), FALLBACK_CHANNEL_NAME); - ChannelFragment fragment = ChannelFragment.getInstance(serviceId, url, name); + ChannelFragment fragment = ChannelFragment.getInstance(serviceId, + NewPipe.getService(currentServiceId).getPlaylistUIHFactory().fromUrl(url), + name); fragment.useAsFrontPage(true); return fragment; } else { @@ -255,20 +267,13 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte for (final String ks : kl.getAvailableKiosks()) { menu.add(0, KIOSK_MENU_OFFSET + i, Menu.NONE, KioskTranslator.getTranslatedKioskName(ks, getContext())) - .setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { - @Override - public boolean onMenuItemClick(MenuItem menuItem) { + .setOnMenuItemClickListener(menuItem -> { try { NavigationHelper.openKioskFragment(getFragmentManager(), currentServiceId, ks); } catch (Exception e) { - ErrorActivity.reportError(activity, e, - activity.getClass(), - null, - ErrorActivity.ErrorInfo.make(UserAction.UI_ERROR, - "none", "", R.string.app_ui_crash)); + ErrorActivity.reportUiError((AppCompatActivity) getActivity(), e); } return true; - } }); i++; } 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 5aef21f39..fac6435dd 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 @@ -17,6 +17,7 @@ import android.support.v4.content.ContextCompat; import android.support.v4.view.animation.FastOutSlowInInterpolator; import android.support.v7.app.ActionBar; import android.support.v7.app.AlertDialog; +import android.support.v7.app.AppCompatActivity; import android.text.Html; import android.text.Spanned; import android.text.TextUtils; @@ -54,7 +55,7 @@ import org.schabi.newpipe.extractor.InfoItem; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.exceptions.ContentNotAvailableException; import org.schabi.newpipe.extractor.exceptions.ParsingException; -import org.schabi.newpipe.extractor.services.youtube.YoutubeStreamExtractor; +import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor; import org.schabi.newpipe.extractor.stream.AudioStream; import org.schabi.newpipe.extractor.stream.Stream; import org.schabi.newpipe.extractor.stream.StreamInfo; @@ -64,6 +65,7 @@ import org.schabi.newpipe.extractor.stream.VideoStream; import org.schabi.newpipe.fragments.BackPressable; import org.schabi.newpipe.fragments.BaseStateFragment; import org.schabi.newpipe.local.history.HistoryRecordManager; +import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.util.StreamItemAdapter; import org.schabi.newpipe.util.StreamItemAdapter.StreamSizeWrapper; import org.schabi.newpipe.local.dialog.PlaylistAppendDialog; @@ -365,11 +367,17 @@ public class VideoDetailFragment if (TextUtils.isEmpty(currentInfo.getUploaderUrl())) { Log.w(TAG, "Can't open channel because we got no channel URL"); } else { - NavigationHelper.openChannelFragment( - getFragmentManager(), - currentInfo.getServiceId(), - currentInfo.getUploaderUrl(), - currentInfo.getUploaderName()); + try { + NavigationHelper.openChannelFragment( + getFragmentManager(), + currentInfo.getServiceId(), + NewPipe.getService(currentInfo.getServiceId()) + .getChannelUIHFactory() + .fromUrl(currentInfo.getUploaderUrl()), + currentInfo.getUploaderName()); + } catch (Exception e) { + ErrorActivity.reportUiError((AppCompatActivity) getActivity(), e); + } } break; case R.id.detail_thumbnail_root_layout: diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java index c4b341aae..adf419795 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java @@ -6,6 +6,7 @@ import android.content.DialogInterface; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v7.app.ActionBar; +import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; @@ -15,15 +16,18 @@ import android.view.View; import org.schabi.newpipe.R; import org.schabi.newpipe.extractor.InfoItem; +import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.channel.ChannelInfoItem; import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem; import org.schabi.newpipe.extractor.stream.StreamInfoItem; +import org.schabi.newpipe.extractor.uih.ListUIHandler; import org.schabi.newpipe.fragments.BaseStateFragment; import org.schabi.newpipe.fragments.OnScrollBelowItemsListener; import org.schabi.newpipe.local.dialog.PlaylistAppendDialog; import org.schabi.newpipe.info_list.InfoItemDialog; import org.schabi.newpipe.info_list.InfoListAdapter; import org.schabi.newpipe.player.playqueue.SinglePlayQueue; +import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.OnClickGesture; import org.schabi.newpipe.util.StateSaver; @@ -152,18 +156,40 @@ public abstract class BaseListFragment extends BaseStateFragment implem infoListAdapter.setOnChannelSelectedListener(new OnClickGesture() { @Override public void selected(ChannelInfoItem selectedItem) { - onItemSelected(selectedItem); - NavigationHelper.openChannelFragment(useAsFrontPage ? getParentFragment().getFragmentManager() : getFragmentManager(), - selectedItem.getServiceId(), selectedItem.getUrl(), selectedItem.getName()); + try { + onItemSelected(selectedItem); + NavigationHelper.openChannelFragment(useAsFrontPage ? + getParentFragment().getFragmentManager() + : getFragmentManager(), + selectedItem.getServiceId(), + NewPipe.getService(selectedItem + .getServiceId()) + .getChannelUIHFactory() + .fromUrl(selectedItem.getUrl()), + selectedItem.getName()); + } catch (Exception e) { + ErrorActivity.reportUiError((AppCompatActivity) getActivity(), e); + } } }); infoListAdapter.setOnPlaylistSelectedListener(new OnClickGesture() { @Override public void selected(PlaylistInfoItem selectedItem) { - onItemSelected(selectedItem); - NavigationHelper.openPlaylistFragment(useAsFrontPage ? getParentFragment().getFragmentManager() : getFragmentManager(), - selectedItem.getServiceId(), selectedItem.getUrl(), selectedItem.getName()); + try { + onItemSelected(selectedItem); + NavigationHelper.openPlaylistFragment( + useAsFrontPage + ? getParentFragment().getFragmentManager() + : getFragmentManager(), + selectedItem.getServiceId(), + NewPipe.getService(selectedItem.getServiceId()) + .getPlaylistUIHFactory() + .fromUrl(selectedItem.getUrl()), + selectedItem.getName()); + } catch (Exception e) { + ErrorActivity.reportUiError((AppCompatActivity) getActivity(), e); + } } }); diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java index a132213bf..270ba5550 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java @@ -8,6 +8,9 @@ import android.view.View; import org.schabi.newpipe.extractor.ListExtractor; import org.schabi.newpipe.extractor.ListInfo; +import org.schabi.newpipe.extractor.NewPipe; +import org.schabi.newpipe.extractor.uih.ListUIHandler; +import org.schabi.newpipe.extractor.uih.UIHandler; import org.schabi.newpipe.util.Constants; import java.util.Queue; @@ -27,7 +30,7 @@ public abstract class BaseListInfoFragment @State protected String name; @State - protected String url; + protected ListUIHandler uiHandler; protected I currentInfo; protected String currentNextPageUrl; @@ -166,7 +169,6 @@ public abstract class BaseListInfoFragment public void handleResult(@NonNull I result) { super.handleResult(result); - url = result.getUrl(); name = result.getName(); setTitle(name); @@ -185,9 +187,9 @@ public abstract class BaseListInfoFragment // Utils //////////////////////////////////////////////////////////////////////////*/ - protected void setInitialData(int serviceId, String url, String name) { + protected void setInitialData(int serviceId, ListUIHandler uiHandler, String name) { this.serviceId = serviceId; - this.url = url; + this.uiHandler = uiHandler; this.name = !TextUtils.isEmpty(name) ? name : ""; } } diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java index b56692877..758b6506c 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java @@ -33,6 +33,7 @@ import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.channel.ChannelInfo; import org.schabi.newpipe.extractor.exceptions.ExtractionException; import org.schabi.newpipe.extractor.stream.StreamInfoItem; +import org.schabi.newpipe.extractor.uih.ListUIHandler; import org.schabi.newpipe.fragments.list.BaseListInfoFragment; import org.schabi.newpipe.info_list.InfoItemDialog; import org.schabi.newpipe.local.dialog.PlaylistAppendDialog; @@ -90,9 +91,9 @@ public class ChannelFragment extends BaseListInfoFragment { private MenuItem menuRssButton; - public static ChannelFragment getInstance(int serviceId, String url, String name) { + public static ChannelFragment getInstance(int serviceId, ListUIHandler uiHandler, String name) { ChannelFragment instance = new ChannelFragment(); - instance.setInitialData(serviceId, url, name); + instance.setInitialData(serviceId, uiHandler, name); return instance; } @@ -236,10 +237,10 @@ public class ChannelFragment extends BaseListInfoFragment { openRssFeed(); break; case R.id.menu_item_openInBrowser: - openUrlInBrowser(url); + openUrlInBrowser(uiHandler.getUrl()); break; case R.id.menu_item_share: - shareUrl(name, url); + shareUrl(name, uiHandler.getUrl()); break; default: return super.onOptionsItemSelected(item); @@ -405,12 +406,12 @@ public class ChannelFragment extends BaseListInfoFragment { @Override protected Single loadMoreItemsLogic() { - return ExtractorHelper.getMoreChannelItems(serviceId, url, currentNextPageUrl); + return ExtractorHelper.getMoreChannelItems(serviceId, uiHandler.getUrl(), currentNextPageUrl); } @Override protected Single loadResult(boolean forceLoad) { - return ExtractorHelper.getChannelInfo(serviceId, url, forceLoad); + return ExtractorHelper.getChannelInfo(serviceId, uiHandler.getUrl(), forceLoad); } /*////////////////////////////////////////////////////////////////////////// @@ -488,7 +489,7 @@ public class ChannelFragment extends BaseListInfoFragment { if (!result.getErrors().isEmpty()) { showSnackBarError(result.getErrors(), UserAction.REQUESTED_CHANNEL, NewPipe.getNameOfService(serviceId), - "Get next page of: " + url, R.string.general_error); + "Get next page of: " + uiHandler.getUrl(), R.string.general_error); } } @@ -501,7 +502,11 @@ public class ChannelFragment extends BaseListInfoFragment { if (super.onError(exception)) return true; int errorId = exception instanceof ExtractionException ? R.string.parsing_error : R.string.general_error; - onUnrecoverableError(exception, UserAction.REQUESTED_CHANNEL, NewPipe.getNameOfService(serviceId), url, errorId); + onUnrecoverableError(exception, + UserAction.REQUESTED_CHANNEL, + NewPipe.getNameOfService(serviceId), + uiHandler.getUrl(), + errorId); return true; } diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java index 5dfdcd655..97e35f4c2 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java @@ -11,22 +11,20 @@ import android.view.Menu; import android.view.MenuInflater; import android.view.View; import android.view.ViewGroup; -import android.widget.TextView; import org.schabi.newpipe.R; import org.schabi.newpipe.extractor.ListExtractor; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.StreamingService; -import org.schabi.newpipe.extractor.UrlIdHandler; import org.schabi.newpipe.extractor.exceptions.ExtractionException; import org.schabi.newpipe.extractor.kiosk.KioskInfo; -import org.schabi.newpipe.extractor.stream.StreamInfoItem; +import org.schabi.newpipe.extractor.uih.ListUIHFactory; +import org.schabi.newpipe.extractor.uih.ListUIHandler; +import org.schabi.newpipe.extractor.uih.UIHFactory; import org.schabi.newpipe.fragments.list.BaseListInfoFragment; -import org.schabi.newpipe.info_list.InfoItemBuilder; import org.schabi.newpipe.report.UserAction; import org.schabi.newpipe.util.ExtractorHelper; import org.schabi.newpipe.util.KioskTranslator; -import org.schabi.newpipe.util.NavigationHelper; import icepick.State; import io.reactivex.Single; @@ -74,10 +72,10 @@ public class KioskFragment extends BaseListInfoFragment { throws ExtractionException { KioskFragment instance = new KioskFragment(); StreamingService service = NewPipe.getService(serviceId); - UrlIdHandler kioskTypeUrlIdHandler = service.getKioskList() - .getUrlIdHandlerByType(kioskId); + ListUIHFactory kioskUIHFactory = service.getKioskList() + .getUIHFactoryByType(kioskId); instance.setInitialData(serviceId, - kioskTypeUrlIdHandler.getUrl(kioskId), kioskId); + kioskUIHFactory.fromId(kioskId), kioskId); instance.kioskId = kioskId; return instance; } @@ -136,7 +134,10 @@ public class KioskFragment extends BaseListInfoFragment { .getDefaultSharedPreferences(activity) .getString(getString(R.string.content_country_key), getString(R.string.default_country_value)); - return ExtractorHelper.getKioskInfo(serviceId, url, contentCountry, forceReload); + return ExtractorHelper.getKioskInfo(serviceId, + uiHandler.getUrl(), + contentCountry, + forceReload); } @Override @@ -145,7 +146,10 @@ public class KioskFragment extends BaseListInfoFragment { .getDefaultSharedPreferences(activity) .getString(getString(R.string.content_country_key), getString(R.string.default_country_value)); - return ExtractorHelper.getMoreKioskItems(serviceId, url, currentNextPageUrl, contentCountry); + return ExtractorHelper.getMoreKioskItems(serviceId, + uiHandler.getUrl(), + currentNextPageUrl, + contentCountry); } /*////////////////////////////////////////////////////////////////////////// @@ -179,7 +183,7 @@ public class KioskFragment extends BaseListInfoFragment { if (!result.getErrors().isEmpty()) { showSnackBarError(result.getErrors(), UserAction.REQUESTED_PLAYLIST, NewPipe.getNameOfService(serviceId) - , "Get next page of: " + url, 0); + , "Get next page of: " + uiHandler.getUrl(), 0); } } } diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java index ca732aa2c..b7df1e0c3 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java @@ -6,6 +6,7 @@ import android.content.DialogInterface; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.v7.app.AppCompatActivity; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; @@ -19,6 +20,7 @@ import android.widget.TextView; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; +import org.schabi.newpipe.App; import org.schabi.newpipe.NewPipeDatabase; import org.schabi.newpipe.R; import org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity; @@ -28,12 +30,14 @@ import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.exceptions.ExtractionException; import org.schabi.newpipe.extractor.playlist.PlaylistInfo; import org.schabi.newpipe.extractor.stream.StreamInfoItem; +import org.schabi.newpipe.extractor.uih.ListUIHandler; import org.schabi.newpipe.fragments.list.BaseListInfoFragment; import org.schabi.newpipe.info_list.InfoItemDialog; import org.schabi.newpipe.local.playlist.RemotePlaylistManager; import org.schabi.newpipe.player.playqueue.PlayQueue; import org.schabi.newpipe.player.playqueue.PlaylistPlayQueue; import org.schabi.newpipe.player.playqueue.SinglePlayQueue; +import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.report.UserAction; import org.schabi.newpipe.util.ExtractorHelper; import org.schabi.newpipe.util.ImageDisplayConstants; @@ -79,9 +83,9 @@ public class PlaylistFragment extends BaseListInfoFragment { private MenuItem playlistBookmarkButton; - public static PlaylistFragment getInstance(int serviceId, String url, String name) { + public static PlaylistFragment getInstance(int serviceId, ListUIHandler uiHandler, String name) { PlaylistFragment instance = new PlaylistFragment(); - instance.setInitialData(serviceId, url, name); + instance.setInitialData(serviceId, uiHandler, name); return instance; } @@ -216,22 +220,22 @@ public class PlaylistFragment extends BaseListInfoFragment { @Override protected Single loadMoreItemsLogic() { - return ExtractorHelper.getMorePlaylistItems(serviceId, url, currentNextPageUrl); + return ExtractorHelper.getMorePlaylistItems(serviceId, uiHandler.getUrl(), currentNextPageUrl); } @Override protected Single loadResult(boolean forceLoad) { - return ExtractorHelper.getPlaylistInfo(serviceId, url, forceLoad); + return ExtractorHelper.getPlaylistInfo(serviceId, uiHandler.getUrl(), forceLoad); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_item_openInBrowser: - openUrlInBrowser(url); + openUrlInBrowser(uiHandler.getUrl()); break; case R.id.menu_item_share: - shareUrl(name, url); + shareUrl(name, uiHandler.getUrl()); break; case R.id.menu_item_bookmark: onBookmarkClicked(); @@ -267,11 +271,18 @@ public class PlaylistFragment extends BaseListInfoFragment { if (!TextUtils.isEmpty(result.getUploaderName())) { headerUploaderName.setText(result.getUploaderName()); if (!TextUtils.isEmpty(result.getUploaderUrl())) { - headerUploaderLayout.setOnClickListener(v -> + headerUploaderLayout.setOnClickListener(v -> { + try { NavigationHelper.openChannelFragment(getFragmentManager(), - result.getServiceId(), result.getUploaderUrl(), - result.getUploaderName()) - ); + result.getServiceId(), + NewPipe.getService(serviceId) + .getChannelUIHFactory() + .fromUrl(result.getUploaderUrl()), + result.getUploaderName()); + } catch (Exception e) { + ErrorActivity.reportUiError((AppCompatActivity) getActivity(), e); + } + }); } } @@ -326,7 +337,7 @@ public class PlaylistFragment extends BaseListInfoFragment { if (!result.getErrors().isEmpty()) { showSnackBarError(result.getErrors(), UserAction.REQUESTED_PLAYLIST, NewPipe.getNameOfService(serviceId) - , "Get next page of: " + url, 0); + , "Get next page of: " + uiHandler.getUrl(), 0); } } @@ -339,7 +350,11 @@ public class PlaylistFragment extends BaseListInfoFragment { if (super.onError(exception)) return true; int errorId = exception instanceof ExtractionException ? R.string.parsing_error : R.string.general_error; - onUnrecoverableError(exception, UserAction.REQUESTED_PLAYLIST, NewPipe.getNameOfService(serviceId), url, errorId); + onUnrecoverableError(exception, + UserAction.REQUESTED_PLAYLIST, + NewPipe.getNameOfService(serviceId), + uiHandler.getUrl(), + errorId); return true; } diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java index e57cdbd31..ee76966ff 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java @@ -37,9 +37,8 @@ import org.schabi.newpipe.extractor.ListExtractor; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.StreamingService; import org.schabi.newpipe.extractor.exceptions.ParsingException; -import org.schabi.newpipe.extractor.search.SearchEngine; +import org.schabi.newpipe.extractor.search.SearchExtractor; import org.schabi.newpipe.extractor.search.SearchInfo; -import org.schabi.newpipe.extractor.search.SearchResult; import org.schabi.newpipe.extractor.uih.SearchQIHandler; import org.schabi.newpipe.fragments.BackPressable; import org.schabi.newpipe.fragments.list.BaseListFragment; @@ -59,7 +58,6 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Queue; -import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import icepick.State; @@ -103,8 +101,6 @@ public class SearchFragment protected SearchQIHandler lastSearchedQuery; @State protected boolean wasSearchFocused = false; - @State - List contentFilter; private StreamingService service; private String currentPageUrl; @@ -381,8 +377,6 @@ public class SearchFragment if (item == null) return; item.setChecked(true); - contentFilter.clear(); - contentFilter.add(menu.getItem(itemId).getTitle().toString()); } } @@ -703,8 +697,7 @@ public class SearchFragment super.startLoading(forceLoad); if (disposables != null) disposables.clear(); if (searchDisposable != null) searchDisposable.dispose(); - searchDisposable = ExtractorHelper.searchFor(serviceId, - searchQuery, currentPageUrl, contentCountry, contentFilter, "") + searchDisposable = ExtractorHelper.searchFor(serviceId, searchQuery, contentCountry) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .doOnEvent((searchResult, throwable) -> isLoading.set(false)) @@ -716,9 +709,8 @@ public class SearchFragment isLoading.set(true); showListFooter(true); if (searchDisposable != null) searchDisposable.dispose(); - currentNextPage = currentPage + 1; searchDisposable = ExtractorHelper.getMoreSearchItems(serviceId, - searchQuery, currentNextPage, contentCountry, filter) + searchQuery, nextPageUrl, contentCountry) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .doOnEvent((nextItemsResult, throwable) -> isLoading.set(false)) @@ -745,7 +737,6 @@ public class SearchFragment this.filterItemCheckedId = item.getItemId(); item.setChecked(true); - this.contentFilter = contentFilter; searchQuery = getSearchQuery(searchQuery.getSearchString(), contentFilter, ""); if (!TextUtils.isEmpty(searchQuery.getSearchString())) { @@ -765,12 +756,12 @@ public class SearchFragment return service.getSearchQIHFactory() .fromQuery(searchString, contentFilter, sortFilter); } catch (Exception e) { - ErrorActivity.reportError(getActivity(), e, getActivity().getClass(), - getActivity().findViewById(android.R.id.content), - ErrorActivity.ErrorInfo.make(UserAction.UI_ERROR, - "", - "", R.string.general_error)); + onUnrecoverableError(e, UserAction.SEARCHED, + service.getServiceInfo().getName(), + searchQuery.getSearchString(), + R.string.general_error); } + return searchQuery; } /*////////////////////////////////////////////////////////////////////////// @@ -795,7 +786,7 @@ public class SearchFragment ? R.string.parsing_error : R.string.general_error; onUnrecoverableError(exception, UserAction.GET_SUGGESTIONS, - NewPipe.getNameOfService(serviceId), searchQuery, errorId); + NewPipe.getNameOfService(serviceId), searchQuery.getSearchString(), errorId); } /*////////////////////////////////////////////////////////////////////////// @@ -820,17 +811,17 @@ public class SearchFragment //////////////////////////////////////////////////////////////////////////*/ @Override - public void handleResult(@NonNull SearchResult result) { - if (!result.errors.isEmpty()) { - showSnackBarError(result.errors, UserAction.SEARCHED, - NewPipe.getNameOfService(serviceId), searchQuery, 0); + public void handleResult(@NonNull SearchInfo result) { + if (!result.getErrors().isEmpty()) { + showSnackBarError(result.getErrors(), UserAction.SEARCHED, + NewPipe.getNameOfService(serviceId), searchQuery.getSearchString(), 0); } lastSearchedQuery = searchQuery; if (infoListAdapter.getItemsList().size() == 0) { - if (!result.getResults().isEmpty()) { - infoListAdapter.addInfoItemList(result.getResults()); + if (!result.getRelatedItems().isEmpty()) { + infoListAdapter.addInfoItemList(result.getRelatedItems()); } else { infoListAdapter.clearStreamItemList(); showEmptyState(); @@ -844,13 +835,13 @@ public class SearchFragment @Override public void handleNextItems(ListExtractor.InfoItemsPage result) { showListFooter(false); - currentPage = Integer.parseInt(result.getNextPageUrl()); + currentPageUrl = result.getNextPageUrl(); infoListAdapter.addInfoItemList(result.getItems()); if (!result.getErrors().isEmpty()) { showSnackBarError(result.getErrors(), UserAction.SEARCHED, NewPipe.getNameOfService(serviceId) - , "\"" + searchQuery + "\" → page " + currentPage, 0); + , "\"" + searchQuery + "\" → page: " + nextPageUrl, 0); } super.handleNextItems(result); } @@ -859,7 +850,7 @@ public class SearchFragment protected boolean onError(Throwable exception) { if (super.onError(exception)) return true; - if (exception instanceof SearchEngine.NothingFoundException) { + if (exception instanceof SearchExtractor.NothingFoundException) { infoListAdapter.clearStreamItemList(); showEmptyState(); } else { @@ -867,7 +858,7 @@ public class SearchFragment ? R.string.parsing_error : R.string.general_error; onUnrecoverableError(exception, UserAction.SEARCHED, - NewPipe.getNameOfService(serviceId), searchQuery, errorId); + NewPipe.getNameOfService(serviceId), searchQuery.getSearchString(), errorId); } return true; diff --git a/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java b/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java index f3f390c4d..a7e16a5f1 100644 --- a/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java @@ -6,6 +6,7 @@ import android.os.Parcelable; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.FragmentManager; +import android.support.v7.app.AppCompatActivity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -19,9 +20,11 @@ import org.schabi.newpipe.database.LocalItem; import org.schabi.newpipe.database.playlist.PlaylistLocalItem; import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry; import org.schabi.newpipe.database.playlist.model.PlaylistRemoteEntity; +import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.local.BaseLocalListFragment; import org.schabi.newpipe.local.playlist.LocalPlaylistManager; import org.schabi.newpipe.local.playlist.RemotePlaylistManager; +import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.report.UserAction; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.OnClickGesture; @@ -99,19 +102,28 @@ public final class BookmarkFragment itemListAdapter.setSelectedListener(new OnClickGesture() { @Override public void selected(LocalItem selectedItem) { - // Requires the parent fragment to find holder for fragment replacement - if (getParentFragment() == null) return; - final FragmentManager fragmentManager = getParentFragment().getFragmentManager(); + try { + // Requires the parent fragment to find holder for fragment replacement + if (getParentFragment() == null) return; + final FragmentManager fragmentManager = getParentFragment().getFragmentManager(); - if (selectedItem instanceof PlaylistMetadataEntry) { - final PlaylistMetadataEntry entry = ((PlaylistMetadataEntry) selectedItem); - NavigationHelper.openLocalPlaylistFragment(fragmentManager, entry.uid, - entry.name); + if (selectedItem instanceof PlaylistMetadataEntry) { + final PlaylistMetadataEntry entry = ((PlaylistMetadataEntry) selectedItem); + NavigationHelper.openLocalPlaylistFragment(fragmentManager, entry.uid, + entry.name); - } else if (selectedItem instanceof PlaylistRemoteEntity) { - final PlaylistRemoteEntity entry = ((PlaylistRemoteEntity) selectedItem); - NavigationHelper.openPlaylistFragment(fragmentManager, entry.getServiceId(), - entry.getUrl(), entry.getName()); + } else if (selectedItem instanceof PlaylistRemoteEntity) { + final PlaylistRemoteEntity entry = ((PlaylistRemoteEntity) selectedItem); + NavigationHelper.openPlaylistFragment( + fragmentManager, + entry.getServiceId(), + NewPipe.getService(entry.getServiceId()) + .getPlaylistUIHFactory() + .fromUrl(entry.getUrl()), + entry.getName()); + } + } catch (Exception e) { + ErrorActivity.reportUiError((AppCompatActivity) getActivity(), e); } } diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index 5f6ea42ee..9bbb5f517 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -15,6 +15,7 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.content.LocalBroadcastManager; import android.support.v7.app.ActionBar; +import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; @@ -38,6 +39,7 @@ import org.schabi.newpipe.extractor.exceptions.ExtractionException; import org.schabi.newpipe.extractor.subscription.SubscriptionExtractor; import org.schabi.newpipe.fragments.BaseStateFragment; import org.schabi.newpipe.info_list.InfoListAdapter; +import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.report.UserAction; import org.schabi.newpipe.local.subscription.services.SubscriptionsExportService; import org.schabi.newpipe.local.subscription.services.SubscriptionsImportService; @@ -318,9 +320,17 @@ public class SubscriptionFragment extends BaseStateFragment() { @Override public void selected(ChannelInfoItem selectedItem) { - // Requires the parent fragment to find holder for fragment replacement - NavigationHelper.openChannelFragment(getParentFragment().getFragmentManager(), - selectedItem.getServiceId(), selectedItem.getUrl(), selectedItem.getName()); + try { + // Requires the parent fragment to find holder for fragment replacement + NavigationHelper.openChannelFragment(getParentFragment().getFragmentManager(), + selectedItem.getServiceId(), + NewPipe.getService(selectedItem.getServiceId()) + .getChannelUIHFactory() + .fromUrl(selectedItem.getUrl()), + selectedItem.getName()); + } catch (Exception e) { + ErrorActivity.reportUiError((AppCompatActivity) getActivity(), e); + } } }); diff --git a/app/src/main/java/org/schabi/newpipe/util/Constants.java b/app/src/main/java/org/schabi/newpipe/util/Constants.java index a6aec96e2..b01b6df6a 100644 --- a/app/src/main/java/org/schabi/newpipe/util/Constants.java +++ b/app/src/main/java/org/schabi/newpipe/util/Constants.java @@ -6,7 +6,7 @@ public class Constants { public static final String KEY_TITLE = "key_title"; public static final String KEY_LINK_TYPE = "key_link_type"; public static final String KEY_OPEN_SEARCH = "key_open_search"; - public static final String KEY_QUERY = "key_query"; + public static final String KEY_SEARCH_STRING = "key_search_string"; public static final String KEY_THEME_CHANGE = "key_theme_change"; public static final String KEY_MAIN_PAGE_CHANGE = "key_main_page_change"; diff --git a/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java b/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java index 9cbedff23..2e4ef84e1 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java @@ -37,10 +37,8 @@ import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.exceptions.ReCaptchaException; import org.schabi.newpipe.extractor.kiosk.KioskInfo; import org.schabi.newpipe.extractor.playlist.PlaylistInfo; -import org.schabi.newpipe.extractor.search.SearchEngine; import org.schabi.newpipe.extractor.search.SearchInfo; -import org.schabi.newpipe.extractor.search.SearchResult; -import org.schabi.newpipe.extractor.services.youtube.YoutubeStreamExtractor; +import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor; import org.schabi.newpipe.extractor.stream.StreamInfo; import org.schabi.newpipe.extractor.uih.SearchQIHandler; import org.schabi.newpipe.report.ErrorActivity; @@ -52,7 +50,6 @@ import java.util.List; import io.reactivex.Maybe; import io.reactivex.Single; -import io.reactivex.annotations.NonNull; public final class ExtractorHelper { private static final String TAG = ExtractorHelper.class.getSimpleName(); @@ -82,8 +79,7 @@ public final class ExtractorHelper { final String contentCountry) { checkServiceId(serviceId); return Single.fromCallable(() -> - SearchInfo.get - NewPipe.getService(serviceId).getSearchExtractor(query, contentCountry)) + SearchInfo.getMoreItems(NewPipe.getService(serviceId), query, contentCountry, pageUrl)); } 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 12f6856de..0344e5e79 100644 --- a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java @@ -26,10 +26,13 @@ import org.schabi.newpipe.download.DownloadActivity; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.StreamingService; import org.schabi.newpipe.extractor.exceptions.ExtractionException; +import org.schabi.newpipe.extractor.search.SearchExtractor; import org.schabi.newpipe.extractor.stream.AudioStream; import org.schabi.newpipe.extractor.stream.Stream; import org.schabi.newpipe.extractor.stream.StreamInfo; import org.schabi.newpipe.extractor.stream.VideoStream; +import org.schabi.newpipe.extractor.uih.ListUIHandler; +import org.schabi.newpipe.extractor.uih.SearchQIHandler; import org.schabi.newpipe.fragments.MainFragment; import org.schabi.newpipe.fragments.detail.VideoDetailFragment; import org.schabi.newpipe.fragments.list.channel.ChannelFragment; @@ -283,7 +286,7 @@ public class NavigationHelper { return fragmentManager.popBackStackImmediate(SEARCH_FRAGMENT_TAG, 0); } - public static void openSearchFragment(FragmentManager fragmentManager, int serviceId, String query) { + public static void openSearchFragment(FragmentManager fragmentManager, int serviceId, SearchQIHandler query) { defaultTransaction(fragmentManager) .replace(R.id.fragment_holder, SearchFragment.getInstance(serviceId, query)) .addToBackStack(SEARCH_FRAGMENT_TAG) @@ -314,18 +317,18 @@ public class NavigationHelper { .commit(); } - public static void openChannelFragment(FragmentManager fragmentManager, int serviceId, String url, String name) { + public static void openChannelFragment(FragmentManager fragmentManager, int serviceId, ListUIHandler uiHandler, String name) { if (name == null) name = ""; defaultTransaction(fragmentManager) - .replace(R.id.fragment_holder, ChannelFragment.getInstance(serviceId, url, name)) + .replace(R.id.fragment_holder, ChannelFragment.getInstance(serviceId, uiHandler, name)) .addToBackStack(null) .commit(); } - public static void openPlaylistFragment(FragmentManager fragmentManager, int serviceId, String url, String name) { + public static void openPlaylistFragment(FragmentManager fragmentManager, int serviceId, ListUIHandler uiHandler, String name) { if (name == null) name = ""; defaultTransaction(fragmentManager) - .replace(R.id.fragment_holder, PlaylistFragment.getInstance(serviceId, url, name)) + .replace(R.id.fragment_holder, PlaylistFragment.getInstance(serviceId, uiHandler, name)) .addToBackStack(null) .commit(); } @@ -370,10 +373,10 @@ public class NavigationHelper { // Through Intents //////////////////////////////////////////////////////////////////////////*/ - public static void openSearch(Context context, int serviceId, String query) { + public static void openSearch(Context context, int serviceId, String searchString) { Intent mIntent = new Intent(context, MainActivity.class); mIntent.putExtra(Constants.KEY_SERVICE_ID, serviceId); - mIntent.putExtra(Constants.KEY_QUERY, query); + mIntent.putExtra(Constants.KEY_SEARCH_STRING, searchString); mIntent.putExtra(Constants.KEY_OPEN_SEARCH, true); context.startActivity(mIntent); } From 1ee1b522f1ceb6fd869feb9c638522e28f86098d Mon Sep 17 00:00:00 2001 From: Michalis Nikolaidis Date: Sun, 8 Jul 2018 23:33:25 +0000 Subject: [PATCH 051/103] Translated using Weblate (Greek) Currently translated at 19,5% (74 of 379 strings) --- app/src/main/res/values-el/strings.xml | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index fd89066aa..864453f7a 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -62,4 +62,41 @@ Δημιουργήθηκε ο φάκελος \'%1$s\' Δ + Άνοιγμα σε αναδυόμενο παράθυρο + Εγγραφή + Εγγεγραμμένος + Μόνο μερικές συσκευές υποστηρίζουν την αναπαραγωγή 2K/4K βίντεο + Μαύρο + Προτάσεις αναζήτησης + Ιστορικό αναζήτησης + Λήψεις + Λήψεις + Όλα + Κανάλι + Ναι + Αργότερα + Φίλτρο + Σφάλμα + ΑΝΑΦΟΡΑ + "Πληροφορίες: " + "Τι συνέβη: " + Το σχόλιό σας (στα Αγγλικά): + "Λεπτομέρειες: " + + + Αναφορά Σφάλματος + Βίντεο + Ήχος + Παύση + Διαγραφή + Σφάλμα + Το αρχείο υπάρχει ήδη + Πατήστε για λεπτομέρειες + Λήψη + Γράμματα και ψηφία + Ρυθμίσεις + Άνοιγμα ιστοσελίδας + Άδειες + Ιστορικό + Ιστορικό From 708d7162fb9be3a5f2aa1da308ffe2d178553633 Mon Sep 17 00:00:00 2001 From: Lee Hoe Mun Date: Sun, 8 Jul 2018 18:19:59 +0000 Subject: [PATCH 052/103] Translated using Weblate (Chinese (Mandarin)) Currently translated at 16.6% (63 of 379 strings) --- app/src/main/res/values-cmn/strings.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-cmn/strings.xml b/app/src/main/res/values-cmn/strings.xml index ee13afdb7..4016a40c8 100644 --- a/app/src/main/res/values-cmn/strings.xml +++ b/app/src/main/res/values-cmn/strings.xml @@ -64,4 +64,9 @@ 酷黑 黑色 记住弹出窗口的尺寸与位置 - + M4A — 更好的音质 + 记住上一次弹出窗口的位置以及大小 + 清理照片内存 + 最小化弹出播放器 + + From dd9557c13e5b27234e1bdc078d9c3e87ad1240d4 Mon Sep 17 00:00:00 2001 From: Tobias Groza Date: Mon, 9 Jul 2018 00:11:36 +0000 Subject: [PATCH 053/103] Translated using Weblate (Greek) Currently translated at 19.5% (74 of 379 strings) --- app/src/main/res/values-el/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 864453f7a..a03f32a38 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -78,10 +78,10 @@ Φίλτρο Σφάλμα ΑΝΑΦΟΡΑ - "Πληροφορίες: " - "Τι συνέβη: " + Πληροφορίες: + Τι συνέβη: Το σχόλιό σας (στα Αγγλικά): - "Λεπτομέρειες: " + Λεπτομέρειες: Αναφορά Σφάλματος From decb167ba9d7b0ecfb6ddadee775051a543a469b Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Tue, 10 Jul 2018 16:26:42 +0200 Subject: [PATCH 054/103] make the new extractor refactorings work with SoundCloud --- app/build.gradle | 2 +- .../java/org/schabi/newpipe/MainActivity.java | 12 +- .../newpipe/fragments/MainFragment.java | 6 +- .../fragments/detail/VideoDetailFragment.java | 4 +- .../fragments/list/BaseListFragment.java | 13 +- .../fragments/list/BaseListInfoFragment.java | 6 +- .../list/channel/ChannelFragment.java | 16 +- .../fragments/list/kiosk/KioskFragment.java | 8 +- .../list/playlist/PlaylistFragment.java | 20 +-- .../fragments/list/search/SearchFragment.java | 166 ++++++++++-------- .../local/bookmark/BookmarkFragment.java | 4 +- .../subscription/SubscriptionFragment.java | 4 +- .../schabi/newpipe/util/ExtractorHelper.java | 27 ++- .../schabi/newpipe/util/NavigationHelper.java | 24 ++- .../schabi/newpipe/util/ServiceHelper.java | 1 - 15 files changed, 163 insertions(+), 150 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 396b79459..10aaf91a0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -54,7 +54,7 @@ dependencies { exclude module: 'support-annotations' } - implementation 'com.github.TeamNewPipe:NewPipeExtractor:4746a1c48a8682' + implementation 'com.github.TeamNewPipe:NewPipeExtractor:a1aaca1be' testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:2.8.9' diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 38ee4a1f8..f43d413e9 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -410,17 +410,13 @@ public class MainActivity extends AppCompatActivity { case CHANNEL: NavigationHelper.openChannelFragment(getSupportFragmentManager(), serviceId, - NewPipe.getService(serviceId) - .getChannelUIHFactory() - .fromUrl(url), + url, title); break; case PLAYLIST: NavigationHelper.openPlaylistFragment(getSupportFragmentManager(), serviceId, - NewPipe.getService(serviceId) - .getChannelUIHFactory() - .fromUrl(url), + url, title); break; } @@ -431,9 +427,7 @@ public class MainActivity extends AppCompatActivity { NavigationHelper.openSearchFragment( getSupportFragmentManager(), serviceId, - NewPipe.getService(serviceId) - .getSearchQIHFactory() - .fromQuery(searchString)); + searchString); } else { NavigationHelper.gotoMainFragment(getSupportFragmentManager()); diff --git a/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java index cd4fc1baf..0e3312403 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java @@ -132,9 +132,7 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte NavigationHelper.openSearchFragment( getFragmentManager(), ServiceHelper.getSelectedServiceId(activity), - NewPipe.getService(currentServiceId) - .getSearchQIHFactory() - .fromQuery("")); + ""); } catch (Exception e) { ErrorActivity.reportUiError((AppCompatActivity) getActivity(), e); } @@ -237,7 +235,7 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte String name = preferences.getString(getString(R.string.main_page_selected_channel_name), FALLBACK_CHANNEL_NAME); ChannelFragment fragment = ChannelFragment.getInstance(serviceId, - NewPipe.getService(currentServiceId).getPlaylistUIHFactory().fromUrl(url), + url, name); fragment.useAsFrontPage(true); return fragment; 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 fac6435dd..d91502cdd 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 @@ -371,9 +371,7 @@ public class VideoDetailFragment NavigationHelper.openChannelFragment( getFragmentManager(), currentInfo.getServiceId(), - NewPipe.getService(currentInfo.getServiceId()) - .getChannelUIHFactory() - .fromUrl(currentInfo.getUploaderUrl()), + currentInfo.getUploaderUrl(), currentInfo.getUploaderName()); } catch (Exception e) { ErrorActivity.reportUiError((AppCompatActivity) getActivity(), e); diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java index adf419795..c4702046d 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java @@ -162,10 +162,7 @@ public abstract class BaseListFragment extends BaseStateFragment implem getParentFragment().getFragmentManager() : getFragmentManager(), selectedItem.getServiceId(), - NewPipe.getService(selectedItem - .getServiceId()) - .getChannelUIHFactory() - .fromUrl(selectedItem.getUrl()), + selectedItem.getUrl(), selectedItem.getName()); } catch (Exception e) { ErrorActivity.reportUiError((AppCompatActivity) getActivity(), e); @@ -183,9 +180,7 @@ public abstract class BaseListFragment extends BaseStateFragment implem ? getParentFragment().getFragmentManager() : getFragmentManager(), selectedItem.getServiceId(), - NewPipe.getService(selectedItem.getServiceId()) - .getPlaylistUIHFactory() - .fromUrl(selectedItem.getUrl()), + selectedItem.getUrl(), selectedItem.getName()); } catch (Exception e) { ErrorActivity.reportUiError((AppCompatActivity) getActivity(), e); @@ -204,7 +199,9 @@ public abstract class BaseListFragment extends BaseStateFragment implem private void onStreamSelected(StreamInfoItem selectedItem) { onItemSelected(selectedItem); - NavigationHelper.openVideoDetailFragment(useAsFrontPage ? getParentFragment().getFragmentManager() : getFragmentManager(), + NavigationHelper.openVideoDetailFragment(useAsFrontPage + ? getParentFragment().getFragmentManager() + : getFragmentManager(), selectedItem.getServiceId(), selectedItem.getUrl(), selectedItem.getName()); } diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java index 270ba5550..9c3afb7f6 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java @@ -30,7 +30,7 @@ public abstract class BaseListInfoFragment @State protected String name; @State - protected ListUIHandler uiHandler; + protected String url; protected I currentInfo; protected String currentNextPageUrl; @@ -187,9 +187,9 @@ public abstract class BaseListInfoFragment // Utils //////////////////////////////////////////////////////////////////////////*/ - protected void setInitialData(int serviceId, ListUIHandler uiHandler, String name) { + protected void setInitialData(int serviceId, String url, String name) { this.serviceId = serviceId; - this.uiHandler = uiHandler; + this.url = url; this.name = !TextUtils.isEmpty(name) ? name : ""; } } diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java index 758b6506c..041b550ed 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java @@ -91,9 +91,9 @@ public class ChannelFragment extends BaseListInfoFragment { private MenuItem menuRssButton; - public static ChannelFragment getInstance(int serviceId, ListUIHandler uiHandler, String name) { + public static ChannelFragment getInstance(int serviceId, String url, String name) { ChannelFragment instance = new ChannelFragment(); - instance.setInitialData(serviceId, uiHandler, name); + instance.setInitialData(serviceId, url, name); return instance; } @@ -237,10 +237,10 @@ public class ChannelFragment extends BaseListInfoFragment { openRssFeed(); break; case R.id.menu_item_openInBrowser: - openUrlInBrowser(uiHandler.getUrl()); + openUrlInBrowser(url); break; case R.id.menu_item_share: - shareUrl(name, uiHandler.getUrl()); + shareUrl(name, url); break; default: return super.onOptionsItemSelected(item); @@ -406,12 +406,12 @@ public class ChannelFragment extends BaseListInfoFragment { @Override protected Single loadMoreItemsLogic() { - return ExtractorHelper.getMoreChannelItems(serviceId, uiHandler.getUrl(), currentNextPageUrl); + return ExtractorHelper.getMoreChannelItems(serviceId, url, currentNextPageUrl); } @Override protected Single loadResult(boolean forceLoad) { - return ExtractorHelper.getChannelInfo(serviceId, uiHandler.getUrl(), forceLoad); + return ExtractorHelper.getChannelInfo(serviceId, url, forceLoad); } /*////////////////////////////////////////////////////////////////////////// @@ -489,7 +489,7 @@ public class ChannelFragment extends BaseListInfoFragment { if (!result.getErrors().isEmpty()) { showSnackBarError(result.getErrors(), UserAction.REQUESTED_CHANNEL, NewPipe.getNameOfService(serviceId), - "Get next page of: " + uiHandler.getUrl(), R.string.general_error); + "Get next page of: " + url, R.string.general_error); } } @@ -505,7 +505,7 @@ public class ChannelFragment extends BaseListInfoFragment { onUnrecoverableError(exception, UserAction.REQUESTED_CHANNEL, NewPipe.getNameOfService(serviceId), - uiHandler.getUrl(), + url, errorId); return true; } diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java index 97e35f4c2..66ccfe6c3 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java @@ -75,7 +75,7 @@ public class KioskFragment extends BaseListInfoFragment { ListUIHFactory kioskUIHFactory = service.getKioskList() .getUIHFactoryByType(kioskId); instance.setInitialData(serviceId, - kioskUIHFactory.fromId(kioskId), kioskId); + kioskUIHFactory.fromId(kioskId).getUrl(), kioskId); instance.kioskId = kioskId; return instance; } @@ -135,7 +135,7 @@ public class KioskFragment extends BaseListInfoFragment { .getString(getString(R.string.content_country_key), getString(R.string.default_country_value)); return ExtractorHelper.getKioskInfo(serviceId, - uiHandler.getUrl(), + url, contentCountry, forceReload); } @@ -147,7 +147,7 @@ public class KioskFragment extends BaseListInfoFragment { .getString(getString(R.string.content_country_key), getString(R.string.default_country_value)); return ExtractorHelper.getMoreKioskItems(serviceId, - uiHandler.getUrl(), + url, currentNextPageUrl, contentCountry); } @@ -183,7 +183,7 @@ public class KioskFragment extends BaseListInfoFragment { if (!result.getErrors().isEmpty()) { showSnackBarError(result.getErrors(), UserAction.REQUESTED_PLAYLIST, NewPipe.getNameOfService(serviceId) - , "Get next page of: " + uiHandler.getUrl(), 0); + , "Get next page of: " + url, 0); } } } diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java index b7df1e0c3..2f60276d7 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java @@ -83,9 +83,9 @@ public class PlaylistFragment extends BaseListInfoFragment { private MenuItem playlistBookmarkButton; - public static PlaylistFragment getInstance(int serviceId, ListUIHandler uiHandler, String name) { + public static PlaylistFragment getInstance(int serviceId, String url, String name) { PlaylistFragment instance = new PlaylistFragment(); - instance.setInitialData(serviceId, uiHandler, name); + instance.setInitialData(serviceId, url, name); return instance; } @@ -220,22 +220,22 @@ public class PlaylistFragment extends BaseListInfoFragment { @Override protected Single loadMoreItemsLogic() { - return ExtractorHelper.getMorePlaylistItems(serviceId, uiHandler.getUrl(), currentNextPageUrl); + return ExtractorHelper.getMorePlaylistItems(serviceId, url, currentNextPageUrl); } @Override protected Single loadResult(boolean forceLoad) { - return ExtractorHelper.getPlaylistInfo(serviceId, uiHandler.getUrl(), forceLoad); + return ExtractorHelper.getPlaylistInfo(serviceId, url, forceLoad); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_item_openInBrowser: - openUrlInBrowser(uiHandler.getUrl()); + openUrlInBrowser(url); break; case R.id.menu_item_share: - shareUrl(name, uiHandler.getUrl()); + shareUrl(name, url); break; case R.id.menu_item_bookmark: onBookmarkClicked(); @@ -275,9 +275,7 @@ public class PlaylistFragment extends BaseListInfoFragment { try { NavigationHelper.openChannelFragment(getFragmentManager(), result.getServiceId(), - NewPipe.getService(serviceId) - .getChannelUIHFactory() - .fromUrl(result.getUploaderUrl()), + result.getUploaderUrl(), result.getUploaderName()); } catch (Exception e) { ErrorActivity.reportUiError((AppCompatActivity) getActivity(), e); @@ -337,7 +335,7 @@ public class PlaylistFragment extends BaseListInfoFragment { if (!result.getErrors().isEmpty()) { showSnackBarError(result.getErrors(), UserAction.REQUESTED_PLAYLIST, NewPipe.getNameOfService(serviceId) - , "Get next page of: " + uiHandler.getUrl(), 0); + , "Get next page of: " + url, 0); } } @@ -353,7 +351,7 @@ public class PlaylistFragment extends BaseListInfoFragment { onUnrecoverableError(exception, UserAction.REQUESTED_PLAYLIST, NewPipe.getNameOfService(serviceId), - uiHandler.getUrl(), + url, errorId); return true; } diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java index ee76966ff..503bc86ee 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java @@ -29,12 +29,15 @@ import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.TextView; +import com.facebook.stetho.common.ListUtil; + import org.schabi.newpipe.R; import org.schabi.newpipe.ReCaptchaActivity; import org.schabi.newpipe.database.history.model.SearchHistoryEntry; import org.schabi.newpipe.extractor.InfoItem; import org.schabi.newpipe.extractor.ListExtractor; import org.schabi.newpipe.extractor.NewPipe; +import org.schabi.newpipe.extractor.ServiceList; import org.schabi.newpipe.extractor.StreamingService; import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.search.SearchExtractor; @@ -55,6 +58,7 @@ import java.io.IOException; import java.io.InterruptedIOException; import java.net.SocketException; import java.util.ArrayList; +import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.Queue; @@ -69,6 +73,8 @@ import io.reactivex.disposables.Disposable; import io.reactivex.schedulers.Schedulers; import io.reactivex.subjects.PublishSubject; +import static java.util.Arrays.asList; + import static org.schabi.newpipe.util.AnimationUtils.animateView; public class SearchFragment @@ -95,10 +101,19 @@ public class SearchFragment @State protected int serviceId = Constants.NO_SERVICE_ID; + + // this three represet the current search query @State - protected SearchQIHandler searchQuery; + protected String searchString; @State - protected SearchQIHandler lastSearchedQuery; + protected String[] contentFilter; + @State + protected String sortFilter; + + // these represtent the last search + @State + protected String lastSearchedString; + @State protected boolean wasSearchFocused = false; @@ -130,11 +145,11 @@ public class SearchFragment /*////////////////////////////////////////////////////////////////////////*/ - public static SearchFragment getInstance(int serviceId, SearchQIHandler query) { + public static SearchFragment getInstance(int serviceId, String searchString) { SearchFragment searchFragment = new SearchFragment(); - searchFragment.setQuery(serviceId, query); + searchFragment.setQuery(serviceId, searchString, new String[0], ""); - if (!TextUtils.isEmpty(query.getSearchString())) { + if (!TextUtils.isEmpty(searchString)) { searchFragment.setSearchOnResume(); } @@ -212,12 +227,12 @@ public class SearchFragment "", R.string.general_error)); } - if (!TextUtils.isEmpty(searchQuery.getSearchString())) { + if (!TextUtils.isEmpty(searchString)) { if (wasLoading.getAndSet(false)) { - search(searchQuery); + search(searchString, contentFilter, sortFilter); } else if (infoListAdapter.getItemsList().size() == 0) { if (savedState == null) { - search(searchQuery); + search(searchString, contentFilter, sortFilter); } else if (!isLoading.get() && !wasSearchFocused) { infoListAdapter.clearStreamItemList(); showEmptyState(); @@ -227,7 +242,7 @@ public class SearchFragment if (suggestionDisposable == null || suggestionDisposable.isDisposed()) initSuggestionObserver(); - if (TextUtils.isEmpty(searchQuery.getSearchString()) || wasSearchFocused) { + if (TextUtils.isEmpty(searchString) || wasSearchFocused) { showKeyboardSearch(); showSuggestionsPanel(); } else { @@ -257,8 +272,8 @@ public class SearchFragment switch (requestCode) { case ReCaptchaActivity.RECAPTCHA_REQUEST: if (resultCode == Activity.RESULT_OK - && !TextUtils.isEmpty(searchQuery.getSearchString())) { - search(searchQuery); + && !TextUtils.isEmpty(searchString)) { + search(searchString, contentFilter, sortFilter); } else Log.e(TAG, "ReCaptcha failed"); break; @@ -305,18 +320,9 @@ public class SearchFragment @Override public void onSaveInstanceState(Bundle bundle) { - try { - searchQuery = searchEditText != null - ? NewPipe.getService(serviceId).getSearchQIHFactory().fromQuery( - searchEditText.getText().toString()) - : searchQuery; - } catch (Exception e) { - ErrorActivity.reportError(getActivity(), e, getActivity().getClass(), - getActivity().findViewById(android.R.id.content), - ErrorActivity.ErrorInfo.make(UserAction.UI_ERROR, - "", - "", R.string.general_error)); - } + searchString = searchEditText != null + ? searchEditText.getText().toString() + : searchString; super.onSaveInstanceState(bundle); } @@ -326,12 +332,11 @@ public class SearchFragment @Override public void reloadContent() { - if (!TextUtils.isEmpty(searchQuery.getSearchString()) + if (!TextUtils.isEmpty(searchString) || (searchEditText != null && !TextUtils.isEmpty(searchEditText.getText()))) { - search(!TextUtils.isEmpty(searchQuery.getSearchString()) - ? searchQuery - : getSearchQuery(searchEditText.getText().toString(), - new ArrayList<>(0), "")); + search(!TextUtils.isEmpty(searchString) + ? searchString + : searchEditText.getText().toString(), new String[0], ""); } else { if (searchEditText != null) { searchEditText.setText(""); @@ -387,14 +392,21 @@ public class SearchFragment private TextWatcher textWatcher; private void showSearchOnStart() { - if (DEBUG) Log.d(TAG, "showSearchOnStart() called, searchQuery → " + searchQuery+", lastSearchedQuery → " + lastSearchedQuery); - searchEditText.setText(searchQuery.getSearchString()); + if (DEBUG) Log.d(TAG, "showSearchOnStart() called, searchQuery → " + + searchString + + ", lastSearchedQuery → " + + lastSearchedString); + searchEditText.setText(searchString); - if (TextUtils.isEmpty(searchQuery.getSearchString()) || TextUtils.isEmpty(searchEditText.getText())) { + if (TextUtils.isEmpty(searchString) || TextUtils.isEmpty(searchEditText.getText())) { searchToolbarContainer.setTranslationX(100); searchToolbarContainer.setAlpha(0f); searchToolbarContainer.setVisibility(View.VISIBLE); - searchToolbarContainer.animate().translationX(0).alpha(1f).setDuration(200).setInterpolator(new DecelerateInterpolator()).start(); + searchToolbarContainer.animate() + .translationX(0) + .alpha(1f) + .setDuration(200) + .setInterpolator(new DecelerateInterpolator()).start(); } else { searchToolbarContainer.setTranslationX(0); searchToolbarContainer.setAlpha(1f); @@ -435,7 +447,7 @@ public class SearchFragment suggestionListAdapter.setListener(new SuggestionListAdapter.OnSuggestionItemSelected() { @Override public void onSuggestionItemSelected(SuggestionItem item) { - search(getSearchQuery(item.query, new ArrayList<>(), "")); + search(item.query, new String[0], ""); searchEditText.setText(item.query); } @@ -476,7 +488,7 @@ public class SearchFragment if (event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER || event.getAction() == EditorInfo.IME_ACTION_SEARCH)) { - search(getSearchQuery(searchEditText.getText().toString(), new ArrayList<>(), "")); + search(searchEditText.getText().toString(), new String[0], ""); return true; } return false; @@ -557,10 +569,12 @@ public class SearchFragment @Override public boolean onBackPressed() { - if (suggestionsPanel.getVisibility() == View.VISIBLE && infoListAdapter.getItemsList().size() > 0 && !isLoading.get()) { + if (suggestionsPanel.getVisibility() == View.VISIBLE + && infoListAdapter.getItemsList().size() > 0 + && !isLoading.get()) { hideSuggestionsPanel(); hideKeyboardSearch(); - searchEditText.setText(lastSearchedQuery.getSearchString()); + searchEditText.setText(lastSearchedString); return true; } return false; @@ -576,8 +590,8 @@ public class SearchFragment final Observable observable = suggestionPublisher .debounce(SUGGESTIONS_DEBOUNCE, TimeUnit.MILLISECONDS) - .startWith(searchQuery != null - ? searchQuery.getSearchString() + .startWith(searchString != null + ? searchString : "") .filter(searchString -> isSuggestionsEnabled); @@ -650,17 +664,17 @@ public class SearchFragment // no-op } - private void search(final SearchQIHandler query) { - if (DEBUG) Log.d(TAG, "search() called with: query = [" + query + "]"); - if (query.getSearchString().isEmpty()) return; + private void search(final String searchString, String[] contentFilter, String sortFilter) { + if (DEBUG) Log.d(TAG, "search() called with: query = [" + searchString + "]"); + if (searchString.isEmpty()) return; try { - final StreamingService service = NewPipe.getServiceByUrl(query.getUrl()); + final StreamingService service = NewPipe.getServiceByUrl(searchString); if (service != null) { showLoading(); disposables.add(Observable .fromCallable(() -> - NavigationHelper.getIntentByLink(activity, service, query.getUrl())) + NavigationHelper.getIntentByLink(activity, service, searchString)) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(intent -> { @@ -674,21 +688,20 @@ public class SearchFragment // Exception occurred, it's not a url } - lastSearchedQuery = query; - searchQuery = query; - currentPageUrl = ""; + lastSearchedString = this.searchString; + this.searchString = searchString; infoListAdapter.clearStreamItemList(); hideSuggestionsPanel(); hideKeyboardSearch(); - historyRecordManager.onSearched(serviceId, query.getSearchString()) + historyRecordManager.onSearched(serviceId, searchString) .observeOn(AndroidSchedulers.mainThread()) .subscribe( ignored -> {}, error -> showSnackBarError(error, UserAction.SEARCHED, - NewPipe.getNameOfService(serviceId), query.getSearchString(), 0) + NewPipe.getNameOfService(serviceId), searchString, 0) ); - suggestionPublisher.onNext(query.getSearchString()); + suggestionPublisher.onNext(searchString); startLoading(false); } @@ -697,11 +710,16 @@ public class SearchFragment super.startLoading(forceLoad); if (disposables != null) disposables.clear(); if (searchDisposable != null) searchDisposable.dispose(); - searchDisposable = ExtractorHelper.searchFor(serviceId, searchQuery, contentCountry) + searchDisposable = ExtractorHelper.searchFor(serviceId, + searchString, + Arrays.asList(contentFilter), + sortFilter, + contentCountry) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .doOnEvent((searchResult, throwable) -> isLoading.set(false)) .subscribe(this::handleResult, this::onError); + } @Override @@ -709,8 +727,13 @@ public class SearchFragment isLoading.set(true); showListFooter(true); if (searchDisposable != null) searchDisposable.dispose(); - searchDisposable = ExtractorHelper.getMoreSearchItems(serviceId, - searchQuery, nextPageUrl, contentCountry) + searchDisposable = ExtractorHelper.getMoreSearchItems( + serviceId, + searchString, + asList(contentFilter), + sortFilter, + nextPageUrl, + contentCountry) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .doOnEvent((nextItemsResult, throwable) -> isLoading.set(false)) @@ -737,31 +760,18 @@ public class SearchFragment this.filterItemCheckedId = item.getItemId(); item.setChecked(true); - searchQuery = getSearchQuery(searchQuery.getSearchString(), contentFilter, ""); + this.contentFilter = new String[] {contentFilter.get(0)}; - if (!TextUtils.isEmpty(searchQuery.getSearchString())) { - search(searchQuery); + if (!TextUtils.isEmpty(searchString)) { + search(searchString, this.contentFilter, sortFilter); } } - private void setQuery(int serviceId, SearchQIHandler searchQuery) { + private void setQuery(int serviceId, String searchString, String[] contentfilter, String sortFilter) { this.serviceId = serviceId; - this.searchQuery = searchQuery; - } - - private SearchQIHandler getSearchQuery(String searchString, - List contentFilter, - String sortFilter) { - try { - return service.getSearchQIHFactory() - .fromQuery(searchString, contentFilter, sortFilter); - } catch (Exception e) { - onUnrecoverableError(e, UserAction.SEARCHED, - service.getServiceInfo().getName(), - searchQuery.getSearchString(), - R.string.general_error); - } - return searchQuery; + this.searchString = searchString; + this.contentFilter = contentfilter; + this.sortFilter = sortFilter; } /*////////////////////////////////////////////////////////////////////////// @@ -786,7 +796,7 @@ public class SearchFragment ? R.string.parsing_error : R.string.general_error; onUnrecoverableError(exception, UserAction.GET_SUGGESTIONS, - NewPipe.getNameOfService(serviceId), searchQuery.getSearchString(), errorId); + NewPipe.getNameOfService(serviceId), searchString, errorId); } /*////////////////////////////////////////////////////////////////////////// @@ -814,10 +824,12 @@ public class SearchFragment public void handleResult(@NonNull SearchInfo result) { if (!result.getErrors().isEmpty()) { showSnackBarError(result.getErrors(), UserAction.SEARCHED, - NewPipe.getNameOfService(serviceId), searchQuery.getSearchString(), 0); + NewPipe.getNameOfService(serviceId), searchString, 0); } - lastSearchedQuery = searchQuery; + lastSearchedString = searchString; + nextPageUrl = result.getNextPageUrl(); + currentPageUrl = result.getUrl(); if (infoListAdapter.getItemsList().size() == 0) { if (!result.getRelatedItems().isEmpty()) { @@ -841,7 +853,7 @@ public class SearchFragment if (!result.getErrors().isEmpty()) { showSnackBarError(result.getErrors(), UserAction.SEARCHED, NewPipe.getNameOfService(serviceId) - , "\"" + searchQuery + "\" → page: " + nextPageUrl, 0); + , "\"" + searchString + "\" → page: " + nextPageUrl, 0); } super.handleNextItems(result); } @@ -858,7 +870,7 @@ public class SearchFragment ? R.string.parsing_error : R.string.general_error; onUnrecoverableError(exception, UserAction.SEARCHED, - NewPipe.getNameOfService(serviceId), searchQuery.getSearchString(), errorId); + NewPipe.getNameOfService(serviceId), searchString, errorId); } return true; diff --git a/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java b/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java index a7e16a5f1..02eabd9ef 100644 --- a/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java @@ -117,9 +117,7 @@ public final class BookmarkFragment NavigationHelper.openPlaylistFragment( fragmentManager, entry.getServiceId(), - NewPipe.getService(entry.getServiceId()) - .getPlaylistUIHFactory() - .fromUrl(entry.getUrl()), + entry.getUrl(), entry.getName()); } } catch (Exception e) { diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java index 9bbb5f517..c194069fb 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.java @@ -324,9 +324,7 @@ public class SubscriptionFragment extends BaseStateFragment searchFor(final int serviceId, - final SearchQIHandler query, + final String searchString, + final List contentFilter, + final String sortFilter, final String contentCountry) { checkServiceId(serviceId); return Single.fromCallable(() -> - SearchInfo.getInfo(NewPipe.getService(serviceId).getSearchExtractor(query, contentCountry))); + SearchInfo.getInfo(NewPipe.getService(serviceId), + NewPipe.getService(serviceId) + .getSearchQIHFactory() + .fromQuery(searchString, contentFilter, sortFilter), + contentCountry)); } public static Single getMoreSearchItems(final int serviceId, - final SearchQIHandler query, - final String pageUrl, - final String contentCountry) { + final String searchString, + final List contentFilter, + final String sortFilter, + final String pageUrl, + final String contentCountry) { checkServiceId(serviceId); return Single.fromCallable(() -> - SearchInfo.getMoreItems(NewPipe.getService(serviceId), query, contentCountry, pageUrl)); + SearchInfo.getMoreItems(NewPipe.getService(serviceId), + NewPipe.getService(serviceId) + .getSearchQIHFactory() + .fromQuery(searchString, contentFilter, sortFilter), + contentCountry, + pageUrl)); } @@ -225,7 +237,6 @@ public final class ExtractorHelper { serviceId == -1 ? "none" : NewPipe.getNameOfService(serviceId), url + (optionalErrorMessage == null ? "" : optionalErrorMessage), errorId)); } }); - } /** 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 0344e5e79..2271d79e1 100644 --- a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java @@ -286,9 +286,11 @@ public class NavigationHelper { return fragmentManager.popBackStackImmediate(SEARCH_FRAGMENT_TAG, 0); } - public static void openSearchFragment(FragmentManager fragmentManager, int serviceId, SearchQIHandler query) { + public static void openSearchFragment(FragmentManager fragmentManager, + int serviceId, + String searchString) { defaultTransaction(fragmentManager) - .replace(R.id.fragment_holder, SearchFragment.getInstance(serviceId, query)) + .replace(R.id.fragment_holder, SearchFragment.getInstance(serviceId, searchString)) .addToBackStack(SEARCH_FRAGMENT_TAG) .commit(); } @@ -317,18 +319,25 @@ public class NavigationHelper { .commit(); } - public static void openChannelFragment(FragmentManager fragmentManager, int serviceId, ListUIHandler uiHandler, String name) { + public static void openChannelFragment( + FragmentManager fragmentManager, + int serviceId, + String url, + String name) { if (name == null) name = ""; defaultTransaction(fragmentManager) - .replace(R.id.fragment_holder, ChannelFragment.getInstance(serviceId, uiHandler, name)) + .replace(R.id.fragment_holder, ChannelFragment.getInstance(serviceId, url, name)) .addToBackStack(null) .commit(); } - public static void openPlaylistFragment(FragmentManager fragmentManager, int serviceId, ListUIHandler uiHandler, String name) { + public static void openPlaylistFragment(FragmentManager fragmentManager, + int serviceId, + String url, + String name) { if (name == null) name = ""; defaultTransaction(fragmentManager) - .replace(R.id.fragment_holder, PlaylistFragment.getInstance(serviceId, uiHandler, name)) + .replace(R.id.fragment_holder, PlaylistFragment.getInstance(serviceId, url, name)) .addToBackStack(null) .commit(); } @@ -470,7 +479,8 @@ public class NavigationHelper { switch (linkType) { case STREAM: - rIntent.putExtra(VideoDetailFragment.AUTO_PLAY, PreferenceManager.getDefaultSharedPreferences(context) + rIntent.putExtra(VideoDetailFragment.AUTO_PLAY, + PreferenceManager.getDefaultSharedPreferences(context) .getBoolean(context.getString(R.string.autoplay_through_intent_key), false)); break; } diff --git a/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java b/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java index d86f27f2f..e7e52f393 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java @@ -5,7 +5,6 @@ import android.preference.PreferenceManager; import android.support.annotation.DrawableRes; import android.support.annotation.StringRes; -import org.schabi.newpipe.BuildConfig; import org.schabi.newpipe.R; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.ServiceList; From e386bdd6b3c9355f6d5b501da133886fe5824e91 Mon Sep 17 00:00:00 2001 From: Tobias Groza Date: Tue, 10 Jul 2018 15:44:58 +0000 Subject: [PATCH 055/103] Translated using Weblate (Greek) Currently translated at 19.7% (75 of 379 strings) --- app/src/main/res/values-el/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index a03f32a38..8f383b580 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -99,4 +99,6 @@ Άδειες Ιστορικό Ιστορικό + Εμφάνιση πληροφοριών + From 4638149ad016f27af8e8739d99dfc92fd8f8683d Mon Sep 17 00:00:00 2001 From: Nathan Follens Date: Wed, 11 Jul 2018 18:51:45 +0000 Subject: [PATCH 056/103] Translated using Weblate (Flemish) Currently translated at 100,0% (379 of 379 strings) --- app/src/main/res/values-nl-rBE/strings.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-nl-rBE/strings.xml b/app/src/main/res/values-nl-rBE/strings.xml index 65781b6a3..3c15cf226 100644 --- a/app/src/main/res/values-nl-rBE/strings.xml +++ b/app/src/main/res/values-nl-rBE/strings.xml @@ -454,4 +454,8 @@ Afspelen in achtergrond Afspelen in pop-up - +Doorspoelen tijdens stilte + Stap + Standaardwaarden herstellen + + From e008fd21a4bbb9c85ba73615cd471c60e358f9bb Mon Sep 17 00:00:00 2001 From: Rex_sa Date: Sat, 14 Jul 2018 18:49:43 +0000 Subject: [PATCH 057/103] Translated using Weblate (Arabic) Currently translated at 100.0% (379 of 379 strings) --- app/src/main/res/values-ar/strings.xml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 8711f2712..b2aa06f13 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -463,7 +463,7 @@ ضوابط سرعة التشغيل سرعة الأداء تردد الصوت - "النزع (قد يسبب تشويه)" + نزع الإرتباط (قد يسبب تشويه) تعديل الايقاع Nightcore هل تريد أيضا استيراد الإعدادات؟ @@ -478,4 +478,14 @@ لا حدود الحد من جودة الفيديو عند استخدام بيانات الهاتف المحمول - + تسريع إلى الأمام أثناء الصمت + خطوة + إعادة تعيين + + تصغير عند تبديل التطبيق + الإجراء عند التبديل إلى تطبيق آخر من مشغل الفيديو الرئيسي — %s + لاشيء + تصغير إلى مشغل الخلفية + تصغير إلى مشغل منبثق + + From 14e0dcb085f826e636003e1fe1f9371bb1099bdc Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Sun, 15 Jul 2018 21:21:09 +0200 Subject: [PATCH 058/103] fix names from UIH to LinkHandler --- app/build.gradle | 2 +- .../main/java/org/schabi/newpipe/MainActivity.java | 1 - .../newpipe/fragments/list/BaseListFragment.java | 2 -- .../newpipe/fragments/list/BaseListInfoFragment.java | 4 ++-- .../fragments/list/channel/ChannelFragment.java | 2 +- .../newpipe/fragments/list/kiosk/KioskFragment.java | 12 ++++++------ .../fragments/list/playlist/PlaylistFragment.java | 2 +- .../fragments/list/search/SearchFragment.java | 2 -- .../org/schabi/newpipe/util/NavigationHelper.java | 4 ++-- 9 files changed, 13 insertions(+), 18 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 10aaf91a0..014f379f6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -54,7 +54,7 @@ dependencies { exclude module: 'support-annotations' } - implementation 'com.github.TeamNewPipe:NewPipeExtractor:a1aaca1be' + implementation 'com.github.TeamNewPipe:NewPipeExtractor:8ee068fd98' testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:2.8.9' diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index f43d413e9..191332e19 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -49,7 +49,6 @@ import android.widget.TextView; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.StreamingService; -import org.schabi.newpipe.extractor.uih.SearchQIHandler; import org.schabi.newpipe.fragments.BackPressable; import org.schabi.newpipe.fragments.MainFragment; import org.schabi.newpipe.fragments.detail.VideoDetailFragment; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java index c4702046d..1db12bba9 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java @@ -16,11 +16,9 @@ import android.view.View; import org.schabi.newpipe.R; import org.schabi.newpipe.extractor.InfoItem; -import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.channel.ChannelInfoItem; import org.schabi.newpipe.extractor.playlist.PlaylistInfoItem; import org.schabi.newpipe.extractor.stream.StreamInfoItem; -import org.schabi.newpipe.extractor.uih.ListUIHandler; import org.schabi.newpipe.fragments.BaseStateFragment; import org.schabi.newpipe.fragments.OnScrollBelowItemsListener; import org.schabi.newpipe.local.dialog.PlaylistAppendDialog; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java index 9c3afb7f6..e702c602f 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java @@ -9,8 +9,8 @@ import android.view.View; import org.schabi.newpipe.extractor.ListExtractor; import org.schabi.newpipe.extractor.ListInfo; import org.schabi.newpipe.extractor.NewPipe; -import org.schabi.newpipe.extractor.uih.ListUIHandler; -import org.schabi.newpipe.extractor.uih.UIHandler; +import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler; +import org.schabi.newpipe.extractor.linkhandler.LinkHandler; import org.schabi.newpipe.util.Constants; import java.util.Queue; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java index 041b550ed..42ba8e0ac 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java @@ -33,7 +33,7 @@ import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.channel.ChannelInfo; import org.schabi.newpipe.extractor.exceptions.ExtractionException; import org.schabi.newpipe.extractor.stream.StreamInfoItem; -import org.schabi.newpipe.extractor.uih.ListUIHandler; +import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler; import org.schabi.newpipe.fragments.list.BaseListInfoFragment; import org.schabi.newpipe.info_list.InfoItemDialog; import org.schabi.newpipe.local.dialog.PlaylistAppendDialog; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java index 66ccfe6c3..114e92e43 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/kiosk/KioskFragment.java @@ -18,9 +18,9 @@ import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.StreamingService; import org.schabi.newpipe.extractor.exceptions.ExtractionException; import org.schabi.newpipe.extractor.kiosk.KioskInfo; -import org.schabi.newpipe.extractor.uih.ListUIHFactory; -import org.schabi.newpipe.extractor.uih.ListUIHandler; -import org.schabi.newpipe.extractor.uih.UIHFactory; +import org.schabi.newpipe.extractor.linkhandler.ListLinkHandlerFactory; +import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler; +import org.schabi.newpipe.extractor.linkhandler.LinkHandlerFactory; import org.schabi.newpipe.fragments.list.BaseListInfoFragment; import org.schabi.newpipe.report.UserAction; import org.schabi.newpipe.util.ExtractorHelper; @@ -72,10 +72,10 @@ public class KioskFragment extends BaseListInfoFragment { throws ExtractionException { KioskFragment instance = new KioskFragment(); StreamingService service = NewPipe.getService(serviceId); - ListUIHFactory kioskUIHFactory = service.getKioskList() - .getUIHFactoryByType(kioskId); + ListLinkHandlerFactory kioskLinkHandlerFactory = service.getKioskList() + .getListLinkHandlerFactoryByType(kioskId); instance.setInitialData(serviceId, - kioskUIHFactory.fromId(kioskId).getUrl(), kioskId); + kioskLinkHandlerFactory.fromId(kioskId).getUrl(), kioskId); instance.kioskId = kioskId; return instance; } diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java index 2f60276d7..b7a42791c 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java @@ -30,7 +30,7 @@ import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.exceptions.ExtractionException; import org.schabi.newpipe.extractor.playlist.PlaylistInfo; import org.schabi.newpipe.extractor.stream.StreamInfoItem; -import org.schabi.newpipe.extractor.uih.ListUIHandler; +import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler; import org.schabi.newpipe.fragments.list.BaseListInfoFragment; import org.schabi.newpipe.info_list.InfoItemDialog; import org.schabi.newpipe.local.playlist.RemotePlaylistManager; diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java index 503bc86ee..f7ae11fcb 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java @@ -37,12 +37,10 @@ import org.schabi.newpipe.database.history.model.SearchHistoryEntry; import org.schabi.newpipe.extractor.InfoItem; import org.schabi.newpipe.extractor.ListExtractor; import org.schabi.newpipe.extractor.NewPipe; -import org.schabi.newpipe.extractor.ServiceList; import org.schabi.newpipe.extractor.StreamingService; import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.search.SearchExtractor; import org.schabi.newpipe.extractor.search.SearchInfo; -import org.schabi.newpipe.extractor.uih.SearchQIHandler; import org.schabi.newpipe.fragments.BackPressable; import org.schabi.newpipe.fragments.list.BaseListFragment; import org.schabi.newpipe.local.history.HistoryRecordManager; 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 2271d79e1..85367e2a5 100644 --- a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java @@ -31,8 +31,8 @@ import org.schabi.newpipe.extractor.stream.AudioStream; import org.schabi.newpipe.extractor.stream.Stream; import org.schabi.newpipe.extractor.stream.StreamInfo; import org.schabi.newpipe.extractor.stream.VideoStream; -import org.schabi.newpipe.extractor.uih.ListUIHandler; -import org.schabi.newpipe.extractor.uih.SearchQIHandler; +import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler; +import org.schabi.newpipe.extractor.linkhandler.SearchQueryHandler; import org.schabi.newpipe.fragments.MainFragment; import org.schabi.newpipe.fragments.detail.VideoDetailFragment; import org.schabi.newpipe.fragments.list.channel.ChannelFragment; From 0ff65b5496885a6d66be68578d86c81c56110c77 Mon Sep 17 00:00:00 2001 From: Rex_sa Date: Sat, 14 Jul 2018 19:00:55 +0000 Subject: [PATCH 059/103] Translated using Weblate (Arabic) Currently translated at 100.0% (379 of 379 strings) --- app/src/main/res/values-ar/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index b2aa06f13..b390a8306 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -359,7 +359,7 @@ مُزامَنة - تنزيل الملف البث. + تنزيل ملف البث الإشارات مرجعية استعمال التقديم السريع الغير دقيق From 88d354b08b83eb3ac0e1845954b124d74563307e Mon Sep 17 00:00:00 2001 From: Rex_sa Date: Mon, 16 Jul 2018 11:11:56 +0000 Subject: [PATCH 060/103] Translated using Weblate (Arabic) Currently translated at 100,0% (379 of 379 strings) --- app/src/main/res/values-ar/strings.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index b390a8306..839a296aa 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -2,7 +2,7 @@ جاري التشغيل في الخلفية إلغاء - إختر متصفح + اختر المتصفح مظلم صيغة الصوت الإفتراضية الدقة الإفتراضية @@ -61,10 +61,10 @@ تعذرت عملية تحليل الموقع تعذر فك تشفير توقيع رابط الفيديو اضغط بحث للبدء - إشتراك + اشتراك مشترك الرئيسية - الإشتراكات + الاشتراكات ما الجديد @@ -84,11 +84,11 @@ عن التطبيق التاريخ التاريخ - فتح في وضع النوافذ المنبثقة - "بعض القرارات لن يكون الصوت عند تمكين هذا الخيار " + فتح في وضع النافذة المنبثقة + "بعض الخيارات الدقة لن تحتوي على صوت عند تمكين هذا الخيار " وضع النوافذ المنبثقة NewPipe - تم إلغاء اشتراك القناة - تعذر تغيير في الاشتراك + تم إلغاء الاشتراك في القناة + تعذر تغيير حالة الاشتراك تعذر تحديث الاشتراك نافذة @@ -305,7 +305,7 @@ مرة واحدة فقط العنوان خاطئ - لم يتم العثور على مشغل بث (يمكنك تثبيت VLC لتشغيله) + لم يتم العثور على مشغل الفديو (يمكنك تثبيت VLC لتشغيله) استيراد قاعدة البيانات تصدير قاعدة البيانات "سيقوم بالكتابة على سجل التاريخ والاشتراكات الحالية " From 573fa8870c25da01f3119a465682f2c8326d703c Mon Sep 17 00:00:00 2001 From: Rex_sa Date: Mon, 16 Jul 2018 11:20:19 +0000 Subject: [PATCH 061/103] Translated using Weblate (Arabic) Currently translated at 100.0% (379 of 379 strings) --- app/src/main/res/values-ar/strings.xml | 96 +++++++++++++------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 839a296aa..1d1a0ea1e 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -1,6 +1,6 @@ - جاري التشغيل في الخلفية + يتم التشغيل في الخلفية إلغاء اختر المتصفح مظلم @@ -25,7 +25,7 @@ تطبيق Kore غير موجود. هل تريد تثبيته ؟ مضيء صور معاينة الفيديو - M4A — جودة أفضل + جودة أفضل — M4A خطأ في الشبكة الفيديو التالي لا يوجد مشغل فيديو. هل تريد تثبيت VLC ؟ @@ -42,7 +42,7 @@ الفيديو والصوتيات مشاركة مشاركة بواسطة - عرض\'مقاطع\'الفيديو\'التالية\'و\'المشابهة\' + عرض الفديوهات \'التالية\'و\'المماثلة\' عرض خيار لتشغيل الفيديو بواسطة Kodi Media Center عرض خيار التشغيل بواسطة Kodi السمة @@ -72,7 +72,7 @@ تشغيل تلقائي اسود التاريخ وذاكرة التخزين المؤقت - التأريخ و ذاكرة التخزين المؤقتة + التاريخ و ذاكرة التخزين المؤقتة المحتوى التنزيلات التنزيلات @@ -94,14 +94,14 @@ نافذة تشغيل مقطع الفيديو عند إستدعاء NewPipe من تطبيق آخر - "دقة النوافذ المنبثقة الافتراضية " + الدقة الافتراضية لنوافذ المنبثقة "عرض أعلى جودة " بعض الأجهزة فقط تدعم تشغيل مقاطع الفيديو 2K / 4K تنسيق الفيديو الافتراضي تذكر حجم النافذة و وضعها - تذكر آخر حجم ومكان للنافذة + تذكر آخر مكان و حجم للنافذة المنبثقة اعدادات إيماءة المشغل - استخدم إيماءات للتحكم في سطوع وحجم المشغل + استخدم إيماءات التحكم في سطوع وصوت المشغل اقتراحات البحث عرض الاقتراحات عند البحث سجل البحث @@ -114,7 +114,7 @@ المشغل السلوك المنبثق - التشغيل في الوضع المنبثق + يتم التشغيل في الوضع المنبثق تم وضعه على قائمة الانتظار في مشغل الخلفية تم وضعه على قائمة الانتظار في مشغل النافذة المنبثقة عرض المحتوى المقيّد بحسب العُمر @@ -170,9 +170,9 @@ استخدام المشغل القديم المشغل القديم المدمج في إطار Mediaframework - ك - م - ب + الف + مليون + بليون صفر لا تقم با الإختيار (في بعض اللغات) لأنها ليست \"حالة خاصة\" للأندرويد @@ -186,14 +186,14 @@ لاتوجد مشاهدات لاتوجد فديوهات - بداية + تشغيل إيقاف شغل حذف التوقيع مهمة جديدة - حسنا + حسناً اسم الملف العمليات @@ -238,7 +238,7 @@ البحث - شاهد + تمت مشاهدته تم تعطيل السجل التاريخ فارغ تم مسح التاريخ @@ -251,7 +251,7 @@ صفحة الخلاصة صفحة القناة حدد قناة - لم يتم الاشتراك في القناة بعد + لم يتم الاشتراك في اي قناة بعد الترند أفضل 50 جديد & وساخن @@ -265,9 +265,9 @@ تحدي ريكابتشا اضغط للإدراج بقائمة الانتظار - لم تتم المشاهدة + لاتوجد مشاهدة %s مشاهدة - "اثنان مشاهدات " + مشاهدتين %s مشاهدات كثيرة %s عدد المشاهدات %s أقصى مشاهدات @@ -276,10 +276,10 @@ صفر واحد - اثنان - قليل - عدد كثير - "أخرى " + %s اثنان + %s قليل + %s عدد كثير + "%s أخرى " إعادة طلب كلمة التحقق @@ -289,19 +289,19 @@ حدد كشك كشك - إدراج بقائمة الانتظار على خلفية + إدراج بقائمة الانتظار في مشغل الخلفية إدراج بقائمة الانتظار على المنبثقة ابدأ هنا على خلفية المصدر المحتوى الإفتراضي حسب البلد تغيير الإتجاه - الإنتقال إلى الخلفية - الإنتقال إلى نافذة منبثقة - التحول إلى الرئيسية + الإنتقال إلى التشغيل في الخلفية + الإنتقال إلى التشغيل في النافذة المنبثقة + الإنتقال إلى الرئيسية الخدمة فتح الدرج إغلاق الدرج - دائمًا + دائماً مرة واحدة فقط العنوان خاطئ @@ -334,7 +334,7 @@ مشغل الفديو - السؤال دائمًا + السؤال دائماً الحصول على المعلومات … تحميل المحتوى المطلوب @@ -342,14 +342,14 @@ إنشاء قائمة تشغيل جديدة حذف قائمة التشغيل "إعادة تسمية قائمة التشغيل " - التسمية + الأسم إضافة إلى قائمة تشغيل هل تريد حذف قائمة التشغيل هذه ؟ قائمة التشغيل التي تم إنشاؤها تمت إضافتها إلى قائمة التشغيل لا يمكن حذف قائمة التشغيل - ملئ + ملئ الشاشة تكبير حجم خط التسمية @@ -395,32 +395,32 @@ تم محو ذاكرة التخزين المؤقت للبيانات الوصفية وضع البث القادم تلقائيا في قائمة الإنتظار رفض البث المشابه في حال كون البث السابق يعمل في حالة عدم التكرار. - إضافة إلى قائمة التشغيل كصورة مصغرة + إضافة صورة مصغرة إلى قائمة التشغيل قائمة التشغيل المخزنة تم تغيير الصورة المصغرة لقائمة التشغيل بدون تسميات توضيحية تسميات توضيحية - تعديل مشغل نص التسمية التوضيحية وأنماط الخلفية. يتطلب إعادة تشغيل التطبيق ليصبح ساري المفعول. + تعديل مشغل نص التسمية التوضيحية وأنماط الخلفية. يتطلب إعادة تشغيل التطبيق لتصبح التغييرات سارية المفعول. تمكين LeakCanary - قد يتسبب مراقبة في تسرب الذاكرة في عدم استجابة التطبيق عند تفريغ السجلات + قد تتسبب مراقبة تسرب الذاكرة في عدم استجابة التطبيق عند تفريغ السجلات تقرير الأخطاء خارج دورة الحياة فرض الإبلاغ عن استثناءات Rx غير القابلة للتسليم خارج دورة حياة الجزء أو النشاط بعد التخلص منها محو سجل المشاهدة - احذف محفوظات التدفقات التي تم تشغيلها. + احذف محفوظات الفديوهات التي تم تشغيلها. حذف سجل المشاهدة بالكامل. - سجل المشاهدة المحذوف. + سجل المشاهدة محذوف. محو سجل البحث يحذف تاريخ البحث عن الكلمات الرئيسية. حذف محفوظات البحث بالكامل. سجل البحث المحذوف. المشغل الخارجي لا يدعم هذه الأنواع من الروابط مصدر ملف / مصدر غير صالح - الملف غير موجود أو ليس لديه الإذن الكافي للقراءة أو الكتابة إليه + الملف غير موجود أو ليس لديك الإذن الكافي للقراءة أو الكتابة إليه لا توجد تدفقات متاحة للتنزيل تم حذف عنصر واحد. @@ -433,7 +433,7 @@ آخر ما تم تشغيله الأكثر تشغيلا - هذا سوف يتجاوز الإعداد الحالي الخاص بك. + هذا سوف يتجاوز الإعدادت الحالية الخاصة بك. طريقة \'التشغيل\' المفضلة "الإجراء الافتراضي عند فتح المحتوى — %s" @@ -445,19 +445,19 @@ تعذر استيراد الاشتراكات لا يمكن تصدير الاشتراكات - استيراد اشتراكات YouTube عن طريق تنزيل ملف التصدير: -\n -\n1. انتقل إلى عنوان URL هذا: %1$s -\n2. تسجيل الدخول عندما يتطلب -\n3. يجب أن يبدأ تنزيل (وهذا ملف التصدير) - قم باستيراد ملف تعريف SoundCloud عن طريق كتابة عنوان URL أو معرفك: -\n -\n1. تمكين \"وضع سطح المكتب\" في متصفح الويب (الموقع غير متاح للأجهزة المحمولة) -\n2. انتقل إلى عنوان URL هذا: %1$s -\n3. تسجيل الدخول عندما يتطلب + استيراد اشتراكات YouTube عن طريق تنزيل ملف التصدير: +\n +\n1. انتقل إلى عنوان URL هذا: %1$s +\n2. تسجيل الدخول عندما يطلب منك +\n3. يجب أن يبدأ التنزيل (وهذا ملف التصدير) + قم باستيراد ملف تعريف SoundCloud عن طريق كتابة عنوان URL أو معرفك: +\n +\n1. تمكين \"وضع سطح المكتب\" في متصفح الويب (الموقع غير متاح للأجهزة المحمولة) +\n2. انتقل إلى عنوان URL هذا: %1$s +\n3. تسجيل الدخول عندما يطلب منك \n4. انسخ عنوان URL للملف الشخصي الذي تمت إعادة توجيهك إليه. - ضع في اعتبارك أن هذه العملية يمكن أن تكون باهظة الثمن. -\n + ضع في اعتبارك أن هذه العملية يمكن أن تكون مكلفة اذا كنت تستخدم بيانات اشتراك انترنت. +\n \nهل تريد الاستمرار؟ ضوابط سرعة التشغيل From 4ef01ef745c9c772be814d76ea0e80a9d0fa1e2b Mon Sep 17 00:00:00 2001 From: Andrea Troiano Date: Wed, 18 Jul 2018 08:24:04 +0000 Subject: [PATCH 062/103] Translated using Weblate (Italian) Currently translated at 100,0% (379 of 379 strings) --- app/src/main/res/values-it/strings.xml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 2b2431b09..18bbc6d3e 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -454,7 +454,7 @@ Controlli della velocità di riproduzione Tempo Tono - Slega (può causare distorsione) + Scollega (può causare distorsione) Nightcore Valore predefinito Nessun flusso disponibile per il download @@ -491,4 +491,14 @@ Senza limiti Limita la risoluzione quando si utilizzano dati mobili - + Avanzamento veloce durante il silenzio + Step + Reset + + Minimizza al cambio applicazione + Azione quando si passa ad un\'altra applicazione dal lettore video principale — %s + Nessuna + Minimizza al lettore in sottofondo + Minimizza al lettore popup + + From 68d5b5969398842be627abc4b4168d197b74e5fb Mon Sep 17 00:00:00 2001 From: Next Hubs Date: Tue, 17 Jul 2018 10:07:01 +0000 Subject: [PATCH 063/103] Translated using Weblate (Urdu) Currently translated at 5.0% (19 of 379 strings) --- app/src/main/res/values-ur/strings.xml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-ur/strings.xml b/app/src/main/res/values-ur/strings.xml index 74e45bad2..c653cf6e6 100644 --- a/app/src/main/res/values-ur/strings.xml +++ b/app/src/main/res/values-ur/strings.xml @@ -4,10 +4,19 @@ کوشائع ہوا انسٹال منسوخ کریں - اشتراک کریں + بانٹیں ڈاؤن لوڈکریں تلاش کریں - نتائج دکھارہاہےبرائے + کیا آپ کا مطلب تھا انٹرنیٹ میں کھولیں ترتیبات + کوئیstream پلیئر نہیں ملا.کیا آپ VLC انسٹال کرنا چاہتے ہیں؟ + کوئیstream پلیئر نہیں ملا.(آپ VLC انسٹال کر سکتے ہیے) + PopUp موڈ میں کھولیں + سٹریم فائل ڈاؤن لوڈ کریں. + کے ساتھ بانٹیں + Internet Browser منتخب کریں +\n + rotation کرو + external video player استعمال کریں From 39e04de208839cd29e9e0353582037a8e5a732b8 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Wed, 18 Jul 2018 15:05:49 +0200 Subject: [PATCH 064/103] show radio pin for content filter again --- .../newpipe/fragments/list/search/SearchFragment.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java index f7ae11fcb..77274c96a 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java @@ -358,9 +358,17 @@ public class SearchFragment supportActionBar.setDisplayHomeAsUpEnabled(true); } + int itemId = 0; + boolean isFirstItem = true; for(String filter : service.getSearchQIHFactory().getAvailableContentFilter()) { - menu.add(filter); + MenuItem item = menu.add(1, itemId++, 0, filter); + if(isFirstItem) { + item.setChecked(true); + isFirstItem = false; + } } + menu.setGroupCheckable(1, true, true); + restoreFilterChecked(menu, filterItemCheckedId); } From 48b6f01b131b505b33bf5c15f5f84d9057205451 Mon Sep 17 00:00:00 2001 From: D D Date: Tue, 17 Jul 2018 13:17:57 +0000 Subject: [PATCH 065/103] Translated using Weblate (Bulgarian) Currently translated at 97.8% (371 of 379 strings) --- app/src/main/res/values-bg/strings.xml | 343 +++++++++++++++++++------ 1 file changed, 258 insertions(+), 85 deletions(-) diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 03c210679..34e7867a9 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -1,14 +1,14 @@ -Натисни на търсене за да започнеш +Докоснете търсачката, за да започнете %1$s гледания Публикувано на %1$s Не е намерен стрийм плейър. Желаете ли да инсталирате VLC? Инсталирай - Затвори - Отвори в браузъра - Отвори в подпрозорец + Отмени + Отвори в браузър + Отвори в прозорец Сподели - Сваляне + Изтегли Търси Настройки Може би имахте в предвид: %1$s ? @@ -16,81 +16,81 @@ Избери браузър ориентация Използвай външен видео плейър - Някои резолюции няма да имат вграден аудио поток ако изберете тази опция + Някои резолюции няма да имат вграден аудио поток, ако тази опция е избрана Използвай външен аудио плейър - Режим малък прозорец на NewPipe + NewPipe в прозорец Абониране Абониран Премахнат абонамент за канала - Не мога да променя абонаментите - Не мога да обновя абонаментите + Неуспешна промяна на абонамента + Неуспешно обновление на абонамента Абонаменти - Новости + Обновления - Фон - Подпрозорец + Във фонов режим + В прозорец - Локация за запис на клиповете - Място за съхранение на свалени клипове - Въведи път за съхранение на свалени клипове + Директория за изтегляне на видео + Папка за съхранение на изтеглените видеота + Въведете път за съхранение на изтеглените видеота - Локация за запис на аудио - Път за съхранение на свалено аудио - Въведи път за съхранение на свалено аудио + Директория за изтегляне на аудио + Папка за съхранение на изтеглено аудио + Въведете път за съхранение на изтеглено аудио Автоматично възпроизвеждане - Автоматично въпроизвеждане на видео, когато NewPipe е повикан от друго приложение + Въпроизвежда видео, когато NewPipe е повикан от друго приложение Резолюция по подразбиране - Резолюция по подразбиране на подпрозореца + Резолюция по подразбиране на прозореца Покажи по-високи резолюции Само някои устройства поддържат възпроизвеждане на 2K/4K клипове Въпроизвеждане с Kodi - Приложението Kore не е намерено. Желаете ли да го инсталирате? - Покажи опция \"Въпроизвеждане с Kodi\" - Показване на опция за въпроизвеждане на видео чрез Kodi media center + Приложението „Kore“ не е намерено. Желаете ли да го инсталирате? + Покажи „Възпроизвеждане с Kodi“ + Показване на опция за възпроизвеждане на видео чрез „Kodi media center“ Аудио Аудио формат по подразбиране Видео формат по подразбиране WebM — свободен формат M4A — по-добро качество - Тема + Тема на външния вид Светла Тъмна Черна - Помни размера и позицията на подпрозореца - Запомни последния размер и позиция на подпрозореца + Помни размера и позицията на прозореца + Използвай размера и позицията на прозореца от предишния път Контролиране на плейъра чрез жестове - Използвай жестове за да контролираш яркостта и силата на звука на плейъра + Позволи използване на жестове за контрол на яркостта и силата на звука на плейъра Предложения за търсене - Показвай предположения по време на търсене + Показвай предложения за търсене История на търсенията Съхранявай заявките за търсене локално История и кеш-памет - Следи изгледаните клипове - Поднови клип при възобновяване на фокуса - Продължава въпроизвеждането след прекъсване (например, телефонно обаждане) - Свалени - Следващ клип - Показвай „следващи“ и „подобни“ клипове - Показвай поле със съвет \"Задръж за добавяне\" - Неподдържан URL + Запаметявай кои видеота са гледани + Възобнови при връщане на фокус + Продължавай възпроизвеждането след прекъсване (например телефонно обаждане) + Изтегли + Следващо видео + Показвай „следващ“ и „подобни“ + Показвай съвет „задръж за добавяне“ + Непознат URL Език на съдържанието по подразбиране Плейър Поведение Видео & Аудио История и кеш-памет - Подпрозорец + Нов прозорец Външност Други - Въпроизвеждане във фонов режим - Въпроизвеждане в подпрозорец + Възпроизвеждане във фонов режим + Възпроизвеждане в подпрозорец Включен в опашката на фоновия плейър - Включен в опашката за възпроизвеждане в подпрозорец + Включен в опашката в нов прозорец Възпроизвеждане Съдържание - Покажи съдържание с ограничение във възрастта + Покажи съдържание за възрастни Съдържание за възрастни. Разрешаването на такова съдържание става от Настройки. на живо Изтегляния @@ -111,17 +111,17 @@ Възпроизведи всички Известия от NewPipe - Известия за фоновия плейър и плейъра на подпрозореца на NewPipe + Известия за фоновия плейър и плейъра в отделен прозорец на NewPipe [Неизвестен] Грешка Проблем с мрежата Не мога да заредя всички миниатюри - Не мога да интерпретирам правилно уебсайта - Не мога да интерпретирам изцяло правилно уебсайта + Неуспешно пресъздаване на уебсайта + Не мога да пресъздам изцяло уебсайта Съдържанието не е налично - Блокирано от GEMA + Блокирано от „GEMA“ Не мога да настроя меню за сваляне Това е предаване на живо, което все още не се поддържа. Не мога да достъпя нито един поток @@ -131,7 +131,7 @@ Критичен проблем с плейъра Опит за възстановяване от възникналия проблем с плейъра - Съжаляваме, но това не би трябвало да се случва. + Съжаляваме, това не би трябвало да се случва. Докладвай за грешката чрез имейл Съжаляваме, възникнаха някои грешки. ДОКЛАД @@ -141,18 +141,18 @@ Подробности: - Миниатюра на клипа - Миниатюра на аватаря на качилия клипа + Миниатюра на видео + Миниатюра на аватара на качилия видео Харесвания Нехаресвания - Използвай Tor - (Експериментално) Пренасочвай трафика при сваляне към мрежата на Tor за по-високо ниво на поверителност (стриймването на клипове все още не се поддържа). + Използвай „Tor“ + (Експериментално) Пренасочвай трафика при сваляне към мрежата на „Tor“ за по-високо ниво на поверителност (стриймването на видео все още не се поддържа). Докладвай за грешка Няма резултати - Тук все още няма нищо + Тук няма нищо - Не мога да създам директория за свалянията в \'%1$s\' - Създадох директория за свалянията в \'%1$s\' + Неуспешно създаване на директория за изтеглени в „%1$s“ + Бе създадена директория за свалянията в „%1$s“ Видео Аудио @@ -174,61 +174,61 @@ Няма клипове - %s клип - %s клипове + %s видео + %s видеота Пауза Начало Изтрий - Чексума + Контролна сума - Готово + ОК Име на файла Нишки Грешка Сървърът не се поддържа Файлът вече съществува - Неправилен формат на URL-а или няма връзка - NewPipe Сваляне - Натисни за подробности + Неправилен хиперлинк или няма връзка с Интернет + NewPipe Изтегляне + Докосни за подробности Моля, изчакайте… Копирано в клипборда Позволени символи в името на файловете Невалидните символи се заменят с тази стойност - Стойност за замяна + Символ за замяна Букви и цифри За NewPipe Настройки Относно приложението Лицензи от трети страни - Не мога да заредя лицензите + Неуспешно зареждане на лиценза Отвори уебсайта Относно приложението Допринесли - Лицензии - Безплатен и лек YouTube фронтенд за Android. + Лицензи + Безплатно и леко поточно предаване за Android. Виж в GitHub Изтегли стрийм файл. Покажи инфо - NewPipe + Главен Отметки Добави към Използвай бързо, но неточно превъртане - Неточното превъртане позволява на плейъра да превърта кадри по-бързо с намалена прецизност - Зареждай иконки + Неточното превъртане позволява на плейъра да превърта кадри по-бързо, с намалена прецизност + Зареждай миниатюри Кеш-паметта с изображения е изтрита - Изчисти кешираните метаданни - Изчисти всички кешираини метаданни за уебстраници - Кеш-паметта с метаданни бе изчистена - Автоматично пускай следващия - Автоматично прибавяне на сродно съдържание при неповтарящ се преглед . - Държава по подразбиране, за която да бъде показвано подходящо съдържание + Изтрий кешираните метаданни + Премахни всички метаданни за уебстраници от кеш-паметта + Кеш-паметта с метаданни бе изтрита + Автоматично нареди на опашка следващия + "Автоматично прибавяне на сродно съдържание при неповтарящ се преглед . " + Държава, за която да бъде показвано съдържание Услуга Отстраняване на грешки Винаги @@ -237,19 +237,19 @@ Смени ориентацията Мини във фонов режим - Мини към изкачащ прозорец + Мини към нов прозорец Мини в основен режим - Внасяне на база данни - Изнасяне на база данни + Импортиране на база данни + Експортиране на база данни Ще замени текущите история и абонаменти - Изнасяне на история, абонаменти и плейлисти - Изчисти историята с изгледани + Експортиране на историята, абонаментите и плейлистите + Изтрий историята с изгледани Изтрий цялата история с изгледани. Историята с изгледани е изтрита. Изтрий историята на търсенията Изтрива историята с въвежданите за търсене ключови думи. - Изтрий цялата история на гледанията. + Изтрий цялата история на търсенията. Историята на търсенията е изтрита. URL подписът на видеото не можа да бъде дешифрован Външните плейъри не поддържат този вид линкове @@ -272,16 +272,189 @@ Няма инсталирано приложение, което да изпълни този файл © %1$s от %2$s под лиценза %3$s - Направи принос - За всичко, което се сетите: превод, промени по дизайна, изчистване на кода или много сериозни промени по кода – помощта е винаги добре дошла. Колкото повече се прави по това, толкова по-добре се получава. - Направи дарение - NewPipe се разработва от доброволни разработчици, което отделят от своето време, за да ви доставят най-доброто преживяване. Дайте от себе си, за да помогнете на разработчиците да направят NewPipe още по-добро приложение, докато се наслаждават на едно кафе от вас. + Съдействайте + За всичко, което се сетите: превод, промени по дизайна, изчистване на кода или много сериозни промени по кода – помощта е винаги добре дошла. Колкото повече развитие, толкова по-добре! + Направете дарение + NewPipe се разработва от доброволци, които отделят от своето време, за да ви доставят най-доброто преживяване. Дайте от себе си в замяна, за да помогнете на разработчиците да направят NewPipe още по-добро приложение, докато се наслаждават на едно кафе от вас. Дари Уебсайт Посетете сайта на NewPipe за повече информация и новини. Политиката на NewPipe за личните данни Проектът NewPipe се отнася много сериозно към вашата поверителност. За това, приложението не събира никакви данни без вашето съгласие. \nНашата политика за личните данни обяснява подробно какви данни изпращате и къде се съхраняват, когато изпращате съобщения за грешки. - Прочетет нашата политика за поверителност + Прочетете нашата политика за поверителност Лицензът на NewPipe - + Липсва стрийм плейър (можете да изтеглите VLC, за да пуснете стрийма) + Изключете, за да спрете зареждането на всички миниатюри, спестявайки трафик и памет. При промяна на тази настройка, текущата кеш-памет на изображенията ще бъде изтрита. + Показвай подсказка, когато е избран фонов режим или режим в прозорец на страницата с детайли на съответното видео + Изтрива историята на възпроизвежданите стриймове. + Не са намерени видео стриймове + Не са намерени аудио стриймове + "Какво:\\nЗаявка:\\nЕзик на съдържанието:\\nУслуга:\\nВреме по GMT:\\nПакет:\\nВерсия:\\nОС версия: " + Миниатюра на видео + Потребителски доклад + Пренареди чрез плъзгане + + Начало + Изтрий един + Преименувай + + Нова цел + Моля, изберете достъпна папка за изтегляния + Това разрешение се изисква за +\nвъзпроизвеждане в отделен прозорец + 1 елемент е изтрит. + + reCAPTCHA + reCAPTCHA заявка + Изисква се въвеждане на reCAPTCHA + + Изтегляне + Повечето специални символи + + NewPipe е безплатен „copyleft“ софтуер: Можете да го използвате, изучавате, споделяте и подобрявате по ваше усмотрение. В частност, Вие можете да препубликувате и/или модифицирате приложението според правилата на Главния обществен лиценз на ГНУ, издаден от Фондацията за свободен софтуер – версия 3 на лиценза или по-нова. + Прочетете лиценза + + + История + Търсения + Гледани + Историята е изключена + История + Историята е празна + Историята е изчистена + Елементът е изтрит + Искате ли да изтриете този елемент от историята на търсенията? + Искате ли да изтриете този елемент от историята на гледанията? + Окончателно ли искате да изтриете всички елементи от историята на гледанията? + Последно възпроизвеждани + Най-възпроизвеждани + + Съдържание на главната страница + Празна страница + Страница-павилион + Страница с абонаменти + Страница с акценти от вашите абонаменти + Страница на определен канал + Изберете канал + За момента нямате абонаменти + Изберете павилион + Експортирането приключи + Импортирането приключи + Невалиден ZIP файл + Внимание: не всички файлове бяха импортирани успешно. + Това ще замени текущата Ви инсталация. + Желаете ли също да импортирате настройките? + + Павилион + Набиращи популярност + Топ 50 + Ново и горещо + Във фонов режим + В прозорец + Премахни + Детайли + Аудио настройки + Задръжте, за да поставите на опашката + На опашката във „фонов режим“ + На опашката в „режим в прозорец“ + Възпроизвеждане от тук + Възпроизвеждане от тук във фонов режим + Възпроизвеждане от тук в прозорец + + Отвори навигационната лента + Затвори навигационната лента + Тук нещо ще се появи скоро ;D + + + Действие при повикване от друго приложение + Действие по подразбиране при отваряне на съдържание — %s + + Видео плейър + Във фонов режим + В прозорец + Винаги питай + + Получаване на инфо… + Зареждане на заявеното съдържание + + Създай Нов Плейлист + Изтрий Плейлист + Преименувай Прелист + Име + Добави Към Плейлист + Задай като миниатюра на плейлиста + + Миниатюрата на плейлиста е сменена + Премахни отметката + + Искате ли да изтриете този плейлист? + Плейлистът е създаден + Добавено към плейлист + Миниатюрата на плейлиста е сменена + Плейлистът не можа да бъде изтрит + + Без надписи + + Приспособи + Запълни + Увеличи + + Авто-генерирани + + Надписи + Модифицирай мащаба на текста и фона на надписите. Изисква рестарт на приложението, за да се приложат промените. + + Включи LeakCanary + Следенето за пропускане на памет може да направи приложението нестабилно + + Докладвай за извънредни грешки + Импортиране/експортиране + Импортирай + Импортирай от + Експортирай в + + Импортиране… + Експортиране… + + Файл с данни за импортиране + Предишно експортиране + + Неуспешно импортиране на абонатите + Неуспешно експортиране на абонатите + + Импортирайте YouTube абонаментите, чрез изтегляне на нужния файл: +\n +\n1. Посетете тази връзка: %1$s +\n2. Влезте в акаунта си, когато това се изиска +\n3. Изтеглянето трябва да започне (това е експортирания файл) + Импортирайте SoundCloud профил чрез въвеждане на хипервръзката към него или чрез вашия ID: +\n +\n1. Включете „десктоп режим“ в браузър (сайтът е недостъпен за мобилни устройства) +\n2. Посетете връзката: %1$s +\n3. Влезте в профила си, ако се изисква +\n4. Копирайте хипервръзката на профилната страница, към която сте насочени. + вашиятID, soundcloud.com/вашиятID + + Това действие може да изразходва голямо количество данни от вашия трафик. +\n +\nЖелаете ли да продължите? + + Управление скоростта на възпроизвеждане + Темпо + Височина + Бързо превъртане при тишина + От съображения към Общия европейски регламент относно защитата на данните, Ви привличаме вниманието към политиката за поверителност на NewPipe. Моля, прочетете я внимателно. +\nТрябва да сте съгласни с условията, за да ни изпратите доклада за грешката. + Приеми + Откажи + + Без ограничения + Ограничена резолюция при мобилни данни + Минимизирай при преход към друго приложение + Действие при преминаване към друго приложение от видео плейъра — %s + Без минимизиране + Минимизирай във фонов режим + Минимизирай в прозорец + + From 78485287a49cedf2f067a87afa08f051aa8dccfe Mon Sep 17 00:00:00 2001 From: Ariel Shulman Date: Tue, 17 Jul 2018 17:58:34 +0000 Subject: [PATCH 066/103] Translated using Weblate (Hebrew) Currently translated at 82.3% (312 of 379 strings) --- app/src/main/res/values-he/strings.xml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml index 7480fdbff..6468079f4 100644 --- a/app/src/main/res/values-he/strings.xml +++ b/app/src/main/res/values-he/strings.xml @@ -32,7 +32,7 @@ הכנס נתיב לשמירת קבצי שמע נגן אוטומטית - הפעל סרטון אוטומטית כאשר NewPipe נפתח דרך אפליקציה אחרת + מנגן סרטון כאשר NewPipe נפתח דרך אפליקציה אחרת רזולוציית ברירת המחדל רזולוציית ברירת המחדל לחלון צץ הצג רזולוציות גבוהות יותר @@ -119,7 +119,7 @@ היסטוריית חיפושים שמור חיפושים מקומית - היסטוריה + היסטוריה ומטמון המשך לעקוב אחר סרטונים שנצפו המשך לנגן בעת חזרת המיקוד ליישום המשך לנגן לאחר הפרעות (לדוגמה: שיחות טלפון) @@ -386,4 +386,16 @@ \n3. ההורדה אמורה להתחיל (זהו קובץ היצוא) קצב ברירת מחדל - +השתמש בחיפוש מהיר שאינו מדויק + חיפוש לא מדויק מאפשר לנגן לחפש נקודת זמן מהר יותר, עם דיוק מופחת + טען תמונות ממוזערות + "השבת כדי לעצור את טעינת כל התמונות הממוזערות וחסוך בשימוש בנתונים ובזכרון. השינוי ימחק את המטמון בזכרון ובדיסק. " + הסר את כל נתוני העמודים במטמון + אוטומטית הכנס לתור את ההזרמה הבאה + "אוטומטית הוסף הזרמה קשורה כאשר ההזרמה האחרונה לא נמצאת במצב הזרמה חוזרת של התור. " + כפתור כיוון + החלף לראשי + + פעולה זו תדרוס את ההיסטוריה ורשימת המנויים הקיימת. + "מחק הסטוריה של ניגונים קודמים. " + From e60db5f928a2af528ea595f323110c3951dfd7e6 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Thu, 19 Jul 2018 16:18:57 +0200 Subject: [PATCH 067/103] make new filtersystem translatable --- app/build.gradle | 2 +- .../fragments/list/search/SearchFragment.java | 7 ++++++- .../java/org/schabi/newpipe/util/ServiceHelper.java | 12 ++++++++++++ app/src/main/res/values/strings.xml | 5 +++++ build.gradle | 2 +- 5 files changed, 25 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 014f379f6..fbaab1214 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -54,7 +54,7 @@ dependencies { exclude module: 'support-annotations' } - implementation 'com.github.TeamNewPipe:NewPipeExtractor:8ee068fd98' + implementation 'com.github.TeamNewPipe:NewPipeExtractor:1eff8c5708' testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:2.8.9' diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java index 77274c96a..5e511c03b 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java @@ -51,6 +51,7 @@ import org.schabi.newpipe.util.AnimationUtils; import org.schabi.newpipe.util.ExtractorHelper; import org.schabi.newpipe.util.LayoutManagerSmoothScroller; import org.schabi.newpipe.util.NavigationHelper; +import org.schabi.newpipe.util.ServiceHelper; import java.io.IOException; import java.io.InterruptedIOException; @@ -360,8 +361,12 @@ public class SearchFragment int itemId = 0; boolean isFirstItem = true; + final Context c = getContext(); for(String filter : service.getSearchQIHFactory().getAvailableContentFilter()) { - MenuItem item = menu.add(1, itemId++, 0, filter); + MenuItem item = menu.add(1, + itemId++, + 0, + ServiceHelper.getTranslatedFilterString(filter, c)); if(isFirstItem) { item.setChecked(true); isFirstItem = false; diff --git a/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java b/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java index e7e52f393..7c781eb14 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ServiceHelper.java @@ -30,6 +30,18 @@ public class ServiceHelper { } } + public static String getTranslatedFilterString(String filter, Context c) { + switch(filter) { + case "all": return c.getString(R.string.all); + case "videos": return c.getString(R.string.videos); + case "channels": return c.getString(R.string.channels); + case "playlists": return c.getString(R.string.playlists); + case "tracks": return c.getString(R.string.tracks); + case "users": return c.getString(R.string.users); + default: return filter; + } + } + /** * Get a resource string with instructions for importing subscriptions for each service. * diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8686d21d3..502483667 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -125,7 +125,12 @@ Error report All Channel + Channels Playlist + Playlists + Videos + Tracks + Users Yes Later Disabled diff --git a/build.gradle b/build.gradle index a45c00aef..0448ed61e 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.2' + classpath 'com.android.tools.build:gradle:3.1.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files From 82bb467a2aa7a972cdda198f00558c4823f4ce02 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Sat, 21 Jul 2018 14:35:03 +0200 Subject: [PATCH 068/103] move on to version v0.13.6 --- app/build.gradle | 4 +-- .../fragments/list/search/SearchFragment.java | 2 -- .../metadata/android/en-US/changelogs/65.txti | 28 +++++++++++++++++++ 3 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/65.txti diff --git a/app/build.gradle b/app/build.gradle index fbaab1214..6b591cad3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "org.schabi.newpipe" minSdkVersion 15 targetSdkVersion 27 - versionCode 64 - versionName "0.13.5" + versionCode 65 + versionName "0.13.6" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java index 5e511c03b..1e29eabbd 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java @@ -29,8 +29,6 @@ import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.TextView; -import com.facebook.stetho.common.ListUtil; - import org.schabi.newpipe.R; import org.schabi.newpipe.ReCaptchaActivity; import org.schabi.newpipe.database.history.model.SearchHistoryEntry; diff --git a/fastlane/metadata/android/en-US/changelogs/65.txti b/fastlane/metadata/android/en-US/changelogs/65.txti new file mode 100644 index 000000000..90c7a7309 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/65.txti @@ -0,0 +1,28 @@ +### Improvements + +- Disable burgermenu icon animation #1486 +- undo delete of downloads #1472 +- Download option in share menu #1498 +- Added share option to long tap menu #1454 +- Minimize main player on exit #1354 +- Library version update and database backup fix #1510 +- ExoPlayer 2.8.2 Update #1392 + - Reworked the playback speed control dialog to support different step sizes for faster speed change. + - Added a toggle to fast-forward during silences in playback speed control. This should be helpful for audiobooks and certain music genres, and can bring a true seamless experience (and can break a song with lots of silences =\\). + - Refactored media source resolution to allow passing metadata alongside media internally in the player, rather than doing so manually. Now we have a single source of metadata and is directly available when playback starts. + - Fixed remote playlist metadata not updating when new metadata is available when playlist fragment is opened. + - Various UI fixes: #1383, background player notification controls now always white, easier to shutdown popup player through flinging +- Use new extractor with refactored architecture for multiservice + +### Fixes + +- Fix #1440 Broken Video Info Layout #1491 +- View history fix #1497 + - #1495, by updating the metadata (thumbnail, title and video count) as soon as the user access the playlist. + - #1475, by registering a view in the database when the user starts a video on external player on detail fragment. +- Fix creen timeout in case of popup mode. #1463 (Fixed #640) +- Main video player fix #1509 + - [#1412] Fixed repeat mode causing player NPE when new intent is received while player activity is in background. + - Fixed minimizing player to popup does not destroy player when popup permission is not granted. + + From b7006a8f2c05a42347190345c6c0c7d0cb1b2635 Mon Sep 17 00:00:00 2001 From: Osoitz Date: Sun, 22 Jul 2018 08:55:09 +0000 Subject: [PATCH 069/103] Translated using Weblate (Basque) Currently translated at 100.0% (379 of 379 strings) --- app/src/main/res/values-eu/strings.xml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index d0da3d364..6eee064f9 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -468,4 +468,14 @@ Mugagabea Mugatu bereizmena datu mugikorrak erabiltzean - + Aurreratu azkar isilunea dagoenean + Urratsa + Leheneratu + + Minimizatu aplikazioa aldatzean + Ekintza bideo erreproduzigailu nagusitik beste aplikazio batera aldatzean — %s + Bat ere ez + Minimizatu bigarren planoko erreproduzigailura + Minimizatu laster-leiho erreproduzigailura + + From f5b57cc0da17318ebab7388f9cfadd506290d20d Mon Sep 17 00:00:00 2001 From: Rex_sa Date: Sat, 21 Jul 2018 20:28:58 +0000 Subject: [PATCH 070/103] Translated using Weblate (Arabic) Currently translated at 100.0% (379 of 379 strings) --- app/src/main/res/values-ar/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 1d1a0ea1e..3ddb368f8 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -359,7 +359,7 @@ مُزامَنة - تنزيل ملف البث + تنزيل ملف البث. الإشارات مرجعية استعمال التقديم السريع الغير دقيق From 50571449cb583244cfcb0d7ca7001a2bc6cf4e72 Mon Sep 17 00:00:00 2001 From: Osoitz Date: Sun, 22 Jul 2018 08:59:59 +0000 Subject: [PATCH 071/103] Translated using Weblate (Basque) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-eu/strings.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index 6eee064f9..8be6aad2d 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -476,6 +476,10 @@ Ekintza bideo erreproduzigailu nagusitik beste aplikazio batera aldatzean — %s Bat ere ez Minimizatu bigarren planoko erreproduzigailura - Minimizatu laster-leiho erreproduzigailura + Minimizatu laster-liho erreproduzigailura - +Kanalak + Erreprodukzio-zerrendak + Pistak + Erabiltzaileak + From 735d9a539161efced17841697cc6426f79a3caa2 Mon Sep 17 00:00:00 2001 From: Heimen Stoffels Date: Sun, 22 Jul 2018 09:40:27 +0000 Subject: [PATCH 072/103] Translated using Weblate (Dutch) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-nl/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 7be3e0160..007b3e232 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -495,4 +495,8 @@ te openen in pop-upmodus Stap Standaardwaarden + Kanalen + Afspeellijsten + Nummers + Gebruikers From 414abad05f6fa5ec0d1b7aeda207a82b97f7dd2a Mon Sep 17 00:00:00 2001 From: Marc Riera Date: Sun, 22 Jul 2018 10:37:32 +0000 Subject: [PATCH 073/103] Translated using Weblate (Catalan) Currently translated at 100,0% (383 of 383 strings) --- app/src/main/res/values-ca/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index e1bf62601..8c3a9b43f 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -462,4 +462,8 @@ Pas Reinicialitza + Canals + Llistes de reproducció + Pistes + Usuaris From 26489b0f002e730926d543cfacf362dec1f88b9e Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Sun, 22 Jul 2018 13:55:17 +0200 Subject: [PATCH 074/103] fix filters --- .../newpipe/fragments/list/search/SearchFragment.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java index 1e29eabbd..411379963 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java @@ -56,8 +56,10 @@ import java.io.InterruptedIOException; import java.net.SocketException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.Iterator; import java.util.List; +import java.util.Map; import java.util.Queue; import java.util.concurrent.TimeUnit; @@ -114,6 +116,7 @@ public class SearchFragment @State protected boolean wasSearchFocused = false; + private Map menuItemToFilterName; private StreamingService service; private String currentPageUrl; private String nextPageUrl; @@ -357,10 +360,13 @@ public class SearchFragment supportActionBar.setDisplayHomeAsUpEnabled(true); } + menuItemToFilterName = new HashMap<>(); + int itemId = 0; boolean isFirstItem = true; final Context c = getContext(); for(String filter : service.getSearchQIHFactory().getAvailableContentFilter()) { + menuItemToFilterName.put(itemId, filter); MenuItem item = menu.add(1, itemId++, 0, @@ -379,7 +385,7 @@ public class SearchFragment public boolean onOptionsItemSelected(MenuItem item) { List contentFilter = new ArrayList<>(1); - contentFilter.add(item.getTitle().toString()); + contentFilter.add(menuItemToFilterName.get(item.getItemId())); changeContentFilter(item, contentFilter); return true; From 65b744472bd595bc2bae8c704790e646660be20d Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Sun, 22 Jul 2018 13:02:20 +0000 Subject: [PATCH 075/103] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-zh-rTW/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 0dfb82955..1d02fcbae 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -478,4 +478,8 @@ 步進 重設 + 頻道 + 播放清單 + + 使用者 From 3b0c96f6547bfbc8eb3bfa0da271b433fcef79fa Mon Sep 17 00:00:00 2001 From: Marc Riera Date: Sun, 22 Jul 2018 10:43:11 +0000 Subject: [PATCH 076/103] Translated using Weblate (Catalan) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-ca/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 8c3a9b43f..700506bce 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -226,7 +226,7 @@ M\'agrada No m\'agrada Fes servir el Tor - (En proves) Força el trànsit de baixada a través del Tot per a més privadesa (no compatible encara amb les emissions de vídeo). + (En proves) Força el trànsit de baixada a través del Tor per a més privadesa (no compatible encara amb les emissions de vídeo). Informa sobre un error Informe de l\'usuari Cap resultat From 860c4d045a8ca49b4cc3f94d6d49098b3a263c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Sun, 22 Jul 2018 11:33:15 +0000 Subject: [PATCH 077/103] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegi?= =?UTF-8?q?an=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 95.8% (367 of 383 strings) --- app/src/main/res/values-nb-rNO/strings.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 34fa54b1a..0f8d9b55a 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -483,4 +483,12 @@ Minimer til bakgrunnsspiller Minimer til oppsprettsspiller - +Kanaler + Spillelister + Spor + Brukere + Hurtig foroverspoling ved stillhet + Steg + Tilbakestill + + From 21bd9f09da425fed9058023d948cdce7d141dc0c Mon Sep 17 00:00:00 2001 From: Ali Demirtas Date: Sun, 22 Jul 2018 16:52:38 +0000 Subject: [PATCH 078/103] Translated using Weblate (Turkish) Currently translated at 100,0% (383 of 383 strings) --- app/src/main/res/values-tr/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 4441ee6b1..6fad8c97c 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -491,4 +491,8 @@ Adım Sıfırla + Kanallar + Onatma listeleri + Parçalar + Kullanıcılar From b52dee37f4a83fd96bb7bb25a6029aa352f26740 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Mon, 23 Jul 2018 18:54:40 +0200 Subject: [PATCH 079/103] move on to version v0.13.7 --- app/build.gradle | 4 +-- .../en-US/changelogs/{65.txti => 65.txt} | 0 .../metadata/android/en-US/changelogs/66.txt | 34 +++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) rename fastlane/metadata/android/en-US/changelogs/{65.txti => 65.txt} (100%) create mode 100644 fastlane/metadata/android/en-US/changelogs/66.txt diff --git a/app/build.gradle b/app/build.gradle index 6b591cad3..f22492aef 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "org.schabi.newpipe" minSdkVersion 15 targetSdkVersion 27 - versionCode 65 - versionName "0.13.6" + versionCode 66 + versionName "0.13.7" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true diff --git a/fastlane/metadata/android/en-US/changelogs/65.txti b/fastlane/metadata/android/en-US/changelogs/65.txt similarity index 100% rename from fastlane/metadata/android/en-US/changelogs/65.txti rename to fastlane/metadata/android/en-US/changelogs/65.txt diff --git a/fastlane/metadata/android/en-US/changelogs/66.txt b/fastlane/metadata/android/en-US/changelogs/66.txt new file mode 100644 index 000000000..3bdc6ae6d --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/66.txt @@ -0,0 +1,34 @@ +# Chagelog of v0.13.7 + +### Fixed +- Fix sort filter issues of v0.13.6 + +# Changelog of v0.13.6 + +### Improvements + +- Disable burgermenu icon animation #1486 +- undo delete of downloads #1472 +- Download option in share menu #1498 +- Added share option to long tap menu #1454 +- Minimize main player on exit #1354 +- Library version update and database backup fix #1510 +- ExoPlayer 2.8.2 Update #1392 + - Reworked the playback speed control dialog to support different step sizes for faster speed change. + - Added a toggle to fast-forward during silences in playback speed control. This should be helpful for audiobooks and certain music genres, and can bring a true seamless experience (and can break a song with lots of silences =\\). + - Refactored media source resolution to allow passing metadata alongside media internally in the player, rather than doing so manually. Now we have a single source of metadata and is directly available when playback starts. + - Fixed remote playlist metadata not updating when new metadata is available when playlist fragment is opened. + - Various UI fixes: #1383, background player notification controls now always white, easier to shutdown popup player through flinging +- Use new extractor with refactored architecture for multiservice + +### Fixes + +- Fix #1440 Broken Video Info Layout #1491 +- View history fix #1497 + - #1495, by updating the metadata (thumbnail, title and video count) as soon as the user access the playlist. + - #1475, by registering a view in the database when the user starts a video on external player on detail fragment. +- Fix creen timeout in case of popup mode. #1463 (Fixed #640) +- Main video player fix #1509 + - [#1412] Fixed repeat mode causing player NPE when new intent is received while player activity is in background. + - Fixed minimizing player to popup does not destroy player when popup permission is not granted. + From d8cdc577021d15aca60e36309a5c146e3ee54abc Mon Sep 17 00:00:00 2001 From: Rex_sa Date: Tue, 24 Jul 2018 02:48:16 +0000 Subject: [PATCH 080/103] Translated using Weblate (Arabic) Currently translated at 100,0% (383 of 383 strings) --- app/src/main/res/values-ar/strings.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 3ddb368f8..79cafbaed 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -488,4 +488,8 @@ تصغير إلى مشغل الخلفية تصغير إلى مشغل منبثق - +القنوات + قوائم التشغيل + المسارات + المستخدمين + From f4ea3980c25ce9f07a3626837ae22df124f3e165 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 24 Jul 2018 08:25:43 +0000 Subject: [PATCH 081/103] Translated using Weblate (Ukrainian) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-uk/strings.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 08ece56de..582dd35ba 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -483,4 +483,8 @@ Зменшити до фонового програвачу Зменшити до віконного програвачу - +Канали + Плейлисти + Стежки + Користувачі + From 84cb3a10603e0191d80674a5f5e686539fcd04e2 Mon Sep 17 00:00:00 2001 From: mesnevi Date: Wed, 25 Jul 2018 06:21:35 +0000 Subject: [PATCH 082/103] Translated using Weblate (Russian) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-ru/strings.xml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 9549749cb..f90f8725c 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -311,7 +311,7 @@ Потоки аудио не найдены Пожертвовать - NewPipe разрабатывается добровольцами в свободное время ради вашего удобства использования программы. Пора воздать должное, разработчики могут сделать NewPipe ещё лучше с чашечкой кофе! + NewPipe разрабатывают добровольцы в свободное время. Они делают это для того, чтобы программой было легко и удобно пользоваться. Давайте порадуем разработчиков чашечкой кофе! Когда им будет приятно, они так всё сделают, что и вам будет приятно. Воздать должное Веб-сайт Для получения более подробной информации и последних новостей о NewPipe посетите наш веб-сайт. @@ -407,7 +407,7 @@ Мониторинг утечки памяти может привести к зависанию приложения Ошибки отчёта вне очереди - + Принудительно отсылать недоставленные сообщения об ошибках в коде или действиях после их удаления Импорт/Экспорт Импорт @@ -485,4 +485,18 @@ Без ограничения Ограничить разрешение при использовании мобильных данных - + Каналы + Плей-листы + Дорожки + Пользователи + Перематывать вперёд при включённом беззвучном режиме. + Щаг + Сбросить + + Сворачивать при переключении приложений + При переключении воспроизведения видео со стандартного плеера на другое приложение — %s + Ничего не делать + Свернуть в режим фонового воспроизведения + Свернуть в режим всплывающего окна + + From b39e071d1ed35d18e1c99d37267a33e002942ff9 Mon Sep 17 00:00:00 2001 From: mesnevi Date: Wed, 25 Jul 2018 10:20:03 +0000 Subject: [PATCH 083/103] Translated using Weblate (Russian) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-ru/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index f90f8725c..8f5795a92 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -472,7 +472,7 @@ NewPipe - программное обеспечение copyleft libre: вы можете использовать, изучать и улучшать его по своему усмотрению. В частности, вы можете распространять и/или изменять его в соответствии с GNU General Public License, опубликованным Free Software Foundation, либо версией 3 License, либо (по вашему выбору) любой более поздней версии. Предпочтительное действие \'Открыть\' - Желаете ли вы также импортировать настройки? + Хотите импортировать настройки? Политика конфиденциальности NewPipe Проект NewPipe очень серьезно относится к вашей конфиденциальности. Поэтому приложение не собирает никаких данных без вашего согласия. @@ -489,7 +489,7 @@ Плей-листы Дорожки Пользователи - Перематывать вперёд при включённом беззвучном режиме. + Перематывать вперёд при включённом беззвучном режиме Щаг Сбросить From 881b191b8d4562667ca3b1a05a456c91a6a60428 Mon Sep 17 00:00:00 2001 From: Andrey mm Date: Wed, 25 Jul 2018 10:24:05 +0000 Subject: [PATCH 084/103] Translated using Weblate (Russian) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-ru/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 8f5795a92..f80ad4fc4 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -102,7 +102,7 @@ ОТЧЁТ Информация: Что произошло: - Детали: + Подробности: (Экспериментально) Загружать через Tor для повышения конфиденциальности (прямые трансляции пока не поддерживаются). From 4ef8b9334452a1a5968bd04c80680fdc7fe9812d Mon Sep 17 00:00:00 2001 From: kapodamy Date: Sat, 28 Jul 2018 12:07:10 -0300 Subject: [PATCH 085/103] patch for ListHelper.java double check for null --- app/src/main/java/org/schabi/newpipe/util/ListHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 4f607b581..1a5bf14f7 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ListHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ListHelper.java @@ -443,11 +443,11 @@ public final class ListHelper { /** * Are we connected to wifi? * @param context App context - * @return True if connected to wifi + * @return {@code true} if connected to wifi */ private static boolean isWifiActive(Context context) { ConnectivityManager manager = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); - return manager.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_WIFI; + return manager != null && manager.getActiveNetworkInfo() != null && manager.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_WIFI; } } From 75202921a13dd37e00e18d7a7d81d163dc974c8d Mon Sep 17 00:00:00 2001 From: Eduardo Caron Date: Sun, 29 Jul 2018 00:11:48 +0000 Subject: [PATCH 086/103] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-pt-rBR/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 670b23002..0ffd898a0 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -478,4 +478,8 @@ abrir em modo popup \n Reiniciar + Canais + Listas de reprodução + Faixas + Usuários From f521def4a52a57baee730ce65f734376538c9d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Freddy=20Mor=C3=A1n=20Jr?= Date: Sat, 28 Jul 2018 19:35:00 +0000 Subject: [PATCH 087/103] Translated using Weblate (Spanish) Currently translated at 99.4% (381 of 383 strings) --- app/src/main/res/values-es/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 8e91794e8..98dec6a54 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -498,4 +498,6 @@ abrir en modo popup Paso Reiniciar + Canales + Usuarios From 1ce21986210ce3e5eb49106433174c7d77102511 Mon Sep 17 00:00:00 2001 From: Eduardo Caron Date: Sun, 29 Jul 2018 00:13:51 +0000 Subject: [PATCH 088/103] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-pt-rBR/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 0ffd898a0..7805a8fba 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -100,7 +100,7 @@ Threads URL inválida ou internet indisponível Selecione uma pasta para download - Nenhum player de stream encontrado. Deseja Instalar o VLC? + Nenhum player de stream encontrado. Deseja instalar o VLC? Não foi possível interpretar o site Áudio Reproduzir From 783d4e7e8ad00a7b5526776cb181738b21499891 Mon Sep 17 00:00:00 2001 From: Igor Nedoboy Date: Sun, 29 Jul 2018 22:34:33 +0000 Subject: [PATCH 089/103] Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) --- app/src/main/res/values-ru/strings.xml | 82 +++++++++++++------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index f80ad4fc4..007b43188 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -18,9 +18,9 @@ Папка для хранения загруженных видео Введите путь к папке для загрузки видео Разрешение по умолчанию - Воспроизвести с помощью Kodi + Воспроизвести в Kodi Приложение Kore не найдено. Установить его? - Показывать опцию «Воспроизвести с помощью Kodi» + Показать опцию «Воспроизвести в Kodi» Показать опцию воспроизведения видео через Kodi media center Аудио Формат аудио по умолчанию @@ -114,7 +114,7 @@ Видео Аудио Повторить попытку - В доступе к хранилищу было отказано + Нет доступа к накопителю Не удалось загрузить все миниатюры Не удалось расшифровать подпись URL у видео Не удалось найти ни один поток @@ -137,7 +137,7 @@ Обновить Очистить Использовать старый плеер - Контроль жестов + Управление жестами Всё Фильтр @@ -149,7 +149,7 @@ reCAPTCHA Открыть в отдельном окне - Показывать подсказки в поиске + Отображать подсказки при поиске Позже Отключено @@ -169,7 +169,7 @@ Запрос reCAPTCHA Запрошен ввод reCAPTCHA - Показывать более высокое разрешение + Показать высокие разрешения NewPipe в окне О NewPipe Настройки @@ -182,7 +182,7 @@ О приложении Участники Прочитать лицензию - Библиотека лёгкого потокового воспроизведения на Android. + Свободное легковесное потоковое воспроизведение на Android. Открыть на GitHub Приветствуется всё — идеи, перевод, изменения дизайна, чистка кода или огромные изменения в коде. Чем больше сделано, тем лучше! © %1$s %2$s под лицензией %3$s @@ -198,7 +198,7 @@ История поиска Хранить поисковые запросы локально - История и Кэш + История и кэш Запоминать просмотренные видео Возобновлять при возврате фокуса Возобновлять воспроизведение после перерывов (например, телефонных звонков) @@ -225,12 +225,12 @@ Плеер Поведение - История и кеш + История и Кэш Плейлист Отменить Нет результатов - Тут ничего нет + Ничего нет Нет подписчиков @@ -279,7 +279,7 @@ Удалить Вы подписаны Подписка отменена - Показать \"держать, чтобы добавить\" подсказку + Подсказка \"Зажмите, чтобы добавить\" Показывать подсказку при нажатии на иконку «В окне» или «В фоне» на странице сведений о видео [Неизвестно] @@ -290,7 +290,7 @@ Зажмите, чтобы добавить в очередь Добавить в очередь «В фоне» Добавить в очередь «В окне» - Воспроизвести тут + Воспроизвести здесь Воспроизвести в фоне Воспроизвести в окне Потоковый плеер не найден (вы можете установить VLC) @@ -311,12 +311,12 @@ Потоки аудио не найдены Пожертвовать - NewPipe разрабатывают добровольцы в свободное время. Они делают это для того, чтобы программой было легко и удобно пользоваться. Давайте порадуем разработчиков чашечкой кофе! Когда им будет приятно, они так всё сделают, что и вам будет приятно. + Разработчики NewPipe ценой своего свободного времени делают вашу жизнь чуть удобнее. Отплатите им тем же — наслаждаясь чашечкой кофе, они смогут сделать NewPipe ещё лучше. Воздать должное Веб-сайт Для получения более подробной информации и последних новостей о NewPipe посетите наш веб-сайт. - Открыть лоток - Закрыть лоток + Открыть боковую панель + Закрыть боковую панель Проигрыватель видео Фоновый проигрыватель @@ -343,8 +343,8 @@ Экспорт данных Ваша текущая история и подписки будут перезаписаны Экспорт истории, подписок и плейлистов. - Неправильная директория - Неправильный файл/контент источника + Неверная папка + Неправильный файл/источник контента Файл не существует или нет разрешения на его чтение или запись Имя файла не может быть пустым Произошла ошибка: %1$s @@ -365,20 +365,20 @@ Экспорт завершён Импорт завершён Нет верного Zip файла - Предупреждение: нет возможности импорта всех файлов. + Предупреждение: не все файлы были импортированы. Это перезапишет вашу текущую установку. - Скоро тут что-то будет ;D + Скоро здесь кое-что появится ;D Всегда спрашивать - Создать новый плейлист + Создать плейлист Удалить плейлист Переименовать плейлист Имя Добавить в плейлист - Установить как иконку плейлиста + Установить как миниатюру плейлиста Добавить плейлист в закладки Удалить закладку @@ -386,7 +386,7 @@ Вы хотите удалить этот плейлист? Плейлист создан Добавлено в плейлист - Иконка плейлиста изменена + Миниатюра плейлиста изменена Не удалось удалить плейлист Без титров @@ -406,8 +406,8 @@ Включить LeakCanary Мониторинг утечки памяти может привести к зависанию приложения - Ошибки отчёта вне очереди - Принудительно отсылать недоставленные сообщения об ошибках в коде или действиях после их удаления + "Сообщать об ошибках жизненного цикла" + Принудительно сообщать о недоставляемых Rx-исключениях вне фрагмента или жизненного цикла после удаления Импорт/Экспорт Импорт @@ -436,14 +436,14 @@ \n4. Скопируйте адрес из адресной строки. вашID, soundcloud.com/вашID - Эта операция может использовать большие объемы сетевого трафика. + Это действие может использовать большие объёмы сетевого трафика. \n \nПродолжить? Загружать миниатюры - Отключите, чтобы перестать загружать миниатюры и начать экономить трафик и память. Изменение настройки очистит кеш изображений в памяти и на диске. - Кеш изображений очищен - Очистить кеш метаданных - Кеш метаданных очищен + Отключите, чтобы перестать загружать миниатюры и начать экономить трафик и память. Изменение настройки очистит кэш изображений в памяти и на диске. + Кэш изображений очищен + Очистить кэш метаданных + Кэш метаданных очищен Управление скоростью воспроизведения Темп Тон @@ -456,41 +456,41 @@ Нет потоков, доступных для загрузки Титры - Нет приложения, установленного для воспроизведения этого файла + Приложение для воспроизведения этого файла не установлено Изменить размер и фон титров. Требуется перезапуск приложения для вступления изменений в силу. Очистить историю просмотров Удалить всю историю просмотров. - История просмотров была удалена. + История просмотров удалена. Очистить историю поиска Удалить историю поисковых запросов. Удаляет историю воспроизведённых потоков. Удалить всю историю поиска. - Удалить историю поиска. + История поиска удалена. 1 элемент удалён. - NewPipe - программное обеспечение copyleft libre: вы можете использовать, изучать и улучшать его по своему усмотрению. В частности, вы можете распространять и/или изменять его в соответствии с GNU General Public License, опубликованным Free Software Foundation, либо версией 3 License, либо (по вашему выбору) любой более поздней версии. + NewPipe — программное обеспечение copyleft libre: вы можете использовать, изучать и улучшать его по своему усмотрению. В частности, вы можете распространять и/или изменять его в соответствии с GNU General Public License, опубликованной Free Software Foundation, либо версии 3, либо (по вашему выбору) любой более поздней версии. Предпочтительное действие \'Открыть\' Хотите импортировать настройки? Политика конфиденциальности NewPipe - Проект NewPipe очень серьезно относится к вашей конфиденциальности. Поэтому приложение не собирает никаких данных без вашего согласия. -\nПолитика конфиденциальности NewPipe подробно объясняет, какие данные отправляются и хранятся при отправке отчета о сбоях. + Проект NewPipe очень серьёзно относится к вашей конфиденциальности. Поэтому приложение не собирает никаких данных без вашего согласия. +\nПолитика конфиденциальности NewPipe подробно объясняет, какие данные отправляются и хранятся при отправке отчёта о сбоях. Прочитать политику конфиденциальности - Чтобы соответствовать Европейскому стандарту защиты данных (GDPR), мы обращаем ваше внимание на политику конфиденциальности NewPipe. Пожалуйста, внимательно прочитайте его. -\nВы должны принять её, чтобы отправить нам отчет об ошибке. + В соответствии с Общим регламентом по защите данных ЕС (GDPR), обращаем ваше внимание на политику конфиденциальности NewPipe. Пожалуйста, внимательно ознакомьтесь с ней. +\nВам необходимо принять её условия, чтобы отправить нам отчёт об ошибке. Принять Отклонить - Без ограничения + Без ограничений Ограничить разрешение при использовании мобильных данных Каналы - Плей-листы + Плейлисты Дорожки Пользователи - Перематывать вперёд при включённом беззвучном режиме - Щаг + Пропускать тишину + Шаг Сбросить Сворачивать при переключении приложений From e948eebe84e7f3f0f339aaf64a164dab00b8afc9 Mon Sep 17 00:00:00 2001 From: Igor Nedoboy Date: Mon, 30 Jul 2018 03:22:38 +0000 Subject: [PATCH 090/103] Translated using Weblate (Russian) Currently translated at 99,4% (381 of 383 strings) --- app/src/main/res/values-ru/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 007b43188..3c1de2564 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -21,7 +21,7 @@ Воспроизвести в Kodi Приложение Kore не найдено. Установить его? Показать опцию «Воспроизвести в Kodi» - Показать опцию воспроизведения видео через Kodi media center + Показать опцию воспроизведения видео через медиацентр Kodi Аудио Формат аудио по умолчанию WebM — свободный формат @@ -440,7 +440,7 @@ \n \nПродолжить? Загружать миниатюры - Отключите, чтобы перестать загружать миниатюры и начать экономить трафик и память. Изменение настройки очистит кэш изображений в памяти и на диске. + Отключите, чтобы не загружать миниатюры и сэкономить трафик и память. Изменение настройки очистит кэш изображений в памяти и на диске. Кэш изображений очищен Очистить кэш метаданных Кэш метаданных очищен From 522daf5aff55a7c8fdd92f8d65b1395c59e6980d Mon Sep 17 00:00:00 2001 From: Igor Nedoboy Date: Mon, 30 Jul 2018 03:46:01 +0000 Subject: [PATCH 091/103] Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) --- app/src/main/res/values-ru/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 3c1de2564..5b2674b3f 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -470,7 +470,7 @@ История поиска удалена. 1 элемент удалён. - NewPipe — программное обеспечение copyleft libre: вы можете использовать, изучать и улучшать его по своему усмотрению. В частности, вы можете распространять и/или изменять его в соответствии с GNU General Public License, опубликованной Free Software Foundation, либо версии 3, либо (по вашему выбору) любой более поздней версии. + NewPipe — свободное программное обеспечение: вы можете использовать, изучать и улучшать его по своему усмотрению. В частности, вы можете распространять и/или изменять его в соответствии с условиями GNU General Public License, опубликованной Free Software Foundation, либо версии 3, либо (по вашему выбору) любой более поздней версии. Предпочтительное действие \'Открыть\' Хотите импортировать настройки? From 8fed029ee3f08a585f009993c4351ae8acaacdf5 Mon Sep 17 00:00:00 2001 From: Igor Nedoboy Date: Mon, 30 Jul 2018 04:02:04 +0000 Subject: [PATCH 092/103] Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) --- app/src/main/res/values-ru/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 5b2674b3f..1a5faf28d 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -117,7 +117,7 @@ Нет доступа к накопителю Не удалось загрузить все миниатюры Не удалось расшифровать подпись URL у видео - Не удалось найти ни один поток + Не удалось найти ни одного потока Воспроизвести From e95df0dbd55729305bc57650b43173ea3a4fbfff Mon Sep 17 00:00:00 2001 From: Igor Nedoboy Date: Mon, 30 Jul 2018 04:15:46 +0000 Subject: [PATCH 093/103] Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) --- app/src/main/res/values-ru/strings.xml | 68 +++++++++++++------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 1a5faf28d..75357a077 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -14,7 +14,7 @@ Поделиться с помощью Выбрать браузер поворот - Путь для загрузки видео + Путь загрузки видео Папка для хранения загруженных видео Введите путь к папке для загрузки видео Разрешение по умолчанию @@ -40,8 +40,8 @@ Миниатюра аватара пользователя Не понравилось Понравилось - Использовать внешний видеоплеер - Использовать внешний аудиоплеер + Внешний видеоплеер + Внешний аудиоплеер Воспроизведение в фоновом режиме Тема Тёмная @@ -51,7 +51,7 @@ Ошибка сети Использовать Tor - Папка для загрузки аудио + Путь загрузки аудио Папка для хранения загруженных аудио Введите путь к папке для загрузки аудио @@ -59,7 +59,7 @@ Подождите… Файл уже существует Потоки - OK + ОК Начать Пауза Удалить @@ -69,17 +69,17 @@ Ошибка Сервер не поддерживается NewPipe скачивает - Неправильный URL или нет доступа к интернету - Нажмите для деталей + Неверный URL или нет доступа к интернету + Подробности Скопировано в буфер обмена Выберите доступную папку для загрузки - Показывать контент с ограничением по возрасту + Контент с ограничением по возрасту Ошибка - Ваш комментарий (на английском): + Ваш комментарий (English): Невозможно создать папку для загрузки \'%1$s\' - Воспроизводить автоматически + Автовоспроизведение Воспроизводить видео при вызове NewPipe из другого приложения Контент Видео с возрастными ограничениями. Разрешить подобный контент можно в настройках. @@ -95,9 +95,9 @@ Не удалось создать меню загрузки Это прямая трансляция, они пока не поддерживаются. Не удалось загрузить изображение - "Падение приложения/пользовательского интерфейса " + Падение приложения/UI Простите, это не должно было произойти. - Отправить отчёт об ошибке по электронной почте + Отправить отчёт по e-mail Простите, произошли ошибки. ОТЧЁТ Информация: @@ -129,14 +129,14 @@ Формат видео по умолчанию Чёрная Запоминать размер и положение всплывающего окна - Использовать жесты для изменения яркости и громкости + Изменять яркость и громкость жестами Всплывающее окно Воспроизведение во всплывающем окне Канал Да Обновить Очистить - Использовать старый плеер + Старый плеер Управление жестами Всё Фильтр @@ -160,16 +160,16 @@  млрд.  тыс. - Разрешение в режиме всплывающего окна - Запоминать последний размер и положение всплывающего окна - Поисковые подсказки + Разрешение всплывающего окна + Запоминать размер и положение всплывающего окна + Подсказки поиска Лучшее разрешение Старый встроенный плеер на Mediaframework Запрос reCAPTCHA Запрошен ввод reCAPTCHA - Показать высокие разрешения + Высокие разрешения NewPipe в окне О NewPipe Настройки @@ -213,7 +213,7 @@ Символ для замены Буквы и цифры - Большинство специальных символов + Большинство спецсимволов История История поиска @@ -332,8 +332,8 @@ Добавить к - Использовать быстрый, но неточный поиск - Неточный поиск позволяет плееру искать позицию быстрее, но с пониженной точностью + Быстрый неточный поиск + Неточный поиск позволяет плееру искать позицию быстрее, но менее точно Автоматическая очередь следующего стрима Автоматически добавлять связанные видео, при воспроизведении с последнего видео в неповторяющейся очереди. Отладка @@ -344,7 +344,7 @@ Ваша текущая история и подписки будут перезаписаны Экспорт истории, подписок и плейлистов. Неверная папка - Неправильный файл/источник контента + Неверный файл или источник контента Файл не существует или нет разрешения на его чтение или запись Имя файла не может быть пустым Произошла ошибка: %1$s @@ -357,16 +357,16 @@ Отклонить Переименовать - Вы хотите удалить этот элемент из истории поиска? - Вы уверены, что хотите удалить все элементы из истории? - Последнее проигрывание - Наиболее проигрываемые + Удалить этот элемент из истории поиска? + Удалить все элементы из истории? + Недавно проигранные + Часто проигрываемые Экспорт завершён Импорт завершён - Нет верного Zip файла + Нет верного Zip-файла Предупреждение: не все файлы были импортированы. - Это перезапишет вашу текущую установку. + Текущие данные будут заменены. Скоро здесь кое-что появится ;D @@ -383,7 +383,7 @@ Добавить плейлист в закладки Удалить закладку - Вы хотите удалить этот плейлист? + Удалить этот плейлист? Плейлист создан Добавлено в плейлист Миниатюра плейлиста изменена @@ -406,7 +406,7 @@ Включить LeakCanary Мониторинг утечки памяти может привести к зависанию приложения - "Сообщать об ошибках жизненного цикла" + Сообщать об ошибках жизненного цикла Принудительно сообщать о недоставляемых Rx-исключениях вне фрагмента или жизненного цикла после удаления Импорт/Экспорт @@ -436,7 +436,7 @@ \n4. Скопируйте адрес из адресной строки. вашID, soundcloud.com/вашID - Это действие может использовать большие объёмы сетевого трафика. + Это действие может вызвать большой расход трафика. \n \nПродолжить? Загружать миниатюры @@ -465,7 +465,7 @@ История просмотров удалена. Очистить историю поиска Удалить историю поисковых запросов. - Удаляет историю воспроизведённых потоков. + Удалить историю воспроизведённых потоков. Удалить всю историю поиска. История поиска удалена. 1 элемент удалён. @@ -484,14 +484,14 @@ Отклонить Без ограничений - Ограничить разрешение при использовании мобильных данных + Предельное разрешение в мобильной сети Каналы Плейлисты Дорожки Пользователи Пропускать тишину Шаг - Сбросить + Сброс Сворачивать при переключении приложений При переключении воспроизведения видео со стандартного плеера на другое приложение — %s From 315089c3614bf61e1d490b64b390851c2122bf19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emin=20Tufan=20=C3=87etin?= Date: Sun, 29 Jul 2018 15:37:57 +0000 Subject: [PATCH 094/103] Translated using Weblate (Turkish) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-tr/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 6fad8c97c..251eab263 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -492,7 +492,7 @@ Sıfırla Kanallar - Onatma listeleri + Oynatma Listeleri Parçalar Kullanıcılar From d2f9b063b29c8fe78fac55eb55731ba1be516714 Mon Sep 17 00:00:00 2001 From: Igor Nedoboy Date: Mon, 30 Jul 2018 10:59:52 +0000 Subject: [PATCH 095/103] Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) --- app/src/main/res/values-ru/strings.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 75357a077..8f0b81026 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -20,7 +20,7 @@ Разрешение по умолчанию Воспроизвести в Kodi Приложение Kore не найдено. Установить его? - Показать опцию «Воспроизвести в Kodi» + Показать \"Воспроизвести в Kodi\" Показать опцию воспроизведения видео через медиацентр Kodi Аудио Формат аудио по умолчанию @@ -29,7 +29,7 @@ Скачать Следующее видео URL не поддерживается - Показывать \'следующее\' и \'предложенные\' видео + \"Следующее\" и \"Предложенные\" видео Язык контента по умолчанию Видео и Аудио Внешний вид @@ -78,7 +78,7 @@ Контент с ограничением по возрасту Ошибка Ваш комментарий (English): - Невозможно создать папку для загрузки \'%1$s\' + Не удалось создать папку для загрузки \"%1$s\" Автовоспроизведение Воспроизводить видео при вызове NewPipe из другого приложения Контент @@ -109,7 +109,7 @@ Сообщить об ошибке Сообщить о нарушении - Создана папка для загрузок \'%1$s\' + Создана папка для загрузок \"%1$s\" Видео Аудио @@ -280,7 +280,7 @@ Вы подписаны Подписка отменена Подсказка \"Зажмите, чтобы добавить\" - Показывать подсказку при нажатии на иконку «В окне» или «В фоне» на странице сведений о видео + Показать подсказку при нажатии \"В окне\" или \"В фоне\" на странице сведений о видео [Неизвестно] Восстановление после ошибки проигрывателя @@ -288,8 +288,8 @@ В фоне В окне Зажмите, чтобы добавить в очередь - Добавить в очередь «В фоне» - Добавить в очередь «В окне» + Добавить в очередь \"В фоне\" + Добавить в очередь \"В окне\" Воспроизвести здесь Воспроизвести в фоне Воспроизвести в окне @@ -365,7 +365,7 @@ Экспорт завершён Импорт завершён Нет верного Zip-файла - Предупреждение: не все файлы были импортированы. + Внимание: не все файлы были импортированы. Текущие данные будут заменены. Скоро здесь кое-что появится ;D @@ -471,7 +471,7 @@ 1 элемент удалён. NewPipe — свободное программное обеспечение: вы можете использовать, изучать и улучшать его по своему усмотрению. В частности, вы можете распространять и/или изменять его в соответствии с условиями GNU General Public License, опубликованной Free Software Foundation, либо версии 3, либо (по вашему выбору) любой более поздней версии. - Предпочтительное действие \'Открыть\' + Предпочтительное действие \"Открыть\" Хотите импортировать настройки? Политика конфиденциальности NewPipe From feb3d11f63e4d99c950d7edc574a23b7ed80bf9b Mon Sep 17 00:00:00 2001 From: Dual Natan Date: Mon, 30 Jul 2018 11:16:35 +0000 Subject: [PATCH 096/103] Translated using Weblate (Swedish) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-sv/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 1247a552b..525b0b278 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -301,4 +301,5 @@ Fil Byta orientationen + Rensa metadatan i cacheminnet From be6bc68b5649e1ccb2e83af6d3f94f8407dd7c50 Mon Sep 17 00:00:00 2001 From: MadderRagax Date: Mon, 30 Jul 2018 11:20:43 +0000 Subject: [PATCH 097/103] Translated using Weblate (Swedish) Currently translated at 100.0% (383 of 383 strings) --- app/src/main/res/values-sv/strings.xml | 177 ++++++++++++++++++++++++- 1 file changed, 172 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 525b0b278..7b75ea7e7 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -4,7 +4,7 @@ Ingen strömspelare hittades. Vill du installera VLC? Installera Avbryt - Öppna i bläddrare + Öppna i webbläsare Öppna i popup-läge Dela Ladda ner @@ -12,7 +12,7 @@ Inställningar Menade du: %1$s ? Dela med - Välj bläddrare + Välj webbläsare rotering Använd extern videospelare Några upplösningar kommer INTE ha ljud när det här alternativet är aktiverat @@ -189,7 +189,7 @@ Inga videor %s video - %s videon + %s videor Start @@ -292,7 +292,7 @@ Använda snabb inexact sökning Ladda miniatyrer - Inaktivera för att stoppa alla miniatyrer från lastning och spara på nät och minnesanvändning. Ändring av detta kommer att rensa cache-minnet. + Inaktivera för att stoppa alla miniatyrbilder från att ladda och spara på data och minnesanvändning. Ändring av detta kommer att rensa cache-minnet. Bild cacheminnet var rensad Tjänst Debug @@ -302,4 +302,171 @@ Byta orientationen Rensa metadatan i cacheminnet - + Ingen strömspelare hittades (du kan installera VLC för att spela upp) + Ladda ned sändning. + "Ej exakt sökning tillåter spelaren att söka positioner snabbare med minskad precision " + Ta bort alla cachade webbsidor + Metadata cache rensad + "Köa nästa ström automatiskt " + Lägg automatiskt till en relaterad ström när du spelar den sista strömmen i en ej upprepad kö. + Standard innehåll land + Kanaler + Spellistor + Spår + Användare + Växla till Bakgrunden + Växla till popup + Växla till main + + Importera databas + Exportera databas + Kommer att skriva över din nuvarande historik och prenumerationer + Exportera historik, prenumerationer och spellistor. + Rensa visningshistorik + Tar bort historiken för spelade videoklipp. + Ta bort hela visningshistoriken. + Visningshistorik borttagen. + Rensa sökhistorik + Tar bort historiken för söka nyckelord. + Ta bort hela sökhistoriken. + Sökhistorik borttagen. + Externa spelare stöder inte dessa typer av länkar + Ogiltig URL + Inga videoströmmar hittades + Inga ljudspår hittades + Ogiltig katalog + Ogiltig fil/innehålls källa + Filen finns inte eller otillräcklig behörighet att läsa eller skriva till den + Filnamnet får inte vara tomt + Ett fel uppstod: %1$s + Inga strömmar är tillgängliga för nedladdning + + Dra för att ändra ordning + + Skapa + Ta bort en + Ta bort alla + Avfärda + Döp om + + 1 objekt borttaget. + + Ingen app installerad för att spela upp filen + + NewPipes Sekretesspolicy + "NewPipe projektet tar din integritet på största allvar. Appen samlar därför inte in några uppgifter utan ditt medgivande. NewPipes Sekretesspolicy förklarar i detalj vad för data som skickas och lagras när du skickar en kraschrapport." + Läs sekretesspolicy + NewPipe är copyleft fri programvara: Du kan använda, studera, dela och förbättra den som du vill. Specifikt kan du distribuera och/eller modifiera det under villkoren för GNU General Public License som publicerats av Free Software Foundation, antingen version 3 av licensen, eller (om du så önskar) en senare version. + Vill du ta bort det här föremålet från visningshistoriken? + Är du säker du vill ta bort alla föremål från historiken? + Senast spelade + Mest spelade + + Exporteringen har slutförts + Importeringen har slutförts + Ingen giltig ZIP-fil + Varning: det gick inte att importera alla filer. + Det här kommer skriva över dina nuvarande inställningar. + Vill du också importera inställningar? + + Öppna navigationspanelen + Stäng navigationspanelen + Något kommer att visas här snart ;D + + + Föredra \'öppna\' åtgärden + Standardåtgärden när du öppnar innehåll — %s + + Videospelare + Bakgrundsspelare + Popup-spelare + Fråga alltid + + Hämtar information… + Laddar begärt innehåll + + Skapa ny spellista + Radera spellista + Byt namn på spellista + Namn + Lägg till i spellistan + Använd som spellistans miniatyrbild + + Bokmärk spellistan + Ta bort bokmärke + + Vill du ta bort den här spellistan? + Spellistan skapades + Tillagad i spellistan + "Spellistans miniatyrbild förändrades " + Kunde inte ta bort spellistan + + Ingen textning + + Passa + Fyll + Zoom + + Auto-genererade + + Textning + Ändra spelaren textskala och bakgrundsstil. Kräver att appen startar om för att träder i kraft. + + Aktivera LeakCanary + Minnesläcka övervakning kan orsaka att appen inte svarar under heap dumpning + + Rapportera Out-of-lifecycle fel + Tvinga rapportering av otillåtna Rx-undantag utanför fragment eller aktivitetslivscykel efter uppstädning + + Importera/Exportera + Importera + Importera från + Exportera till + + Importera… + Exporterar… + + Importera fil + Föregående export + + Kunde inte importera prenumerationer + kunde inte exportera prenumerationer + + Importera YouTube-prenumerationer genom att hämta export-filen: +\n +\n1. Gå till följande webbadress: %1$s +\n2. Logga in när du blir tillfrågad +\n3. En nedladdning ska starta (det är export-filen) + Importera en SoundCloud profil genom att skriva in webbadressen eller ditt ID: +\n +\n1. Aktivera \"skrivbordsläge\" i en webbläsare (sidan är inte tillgänglig för mobila enheter) +\n2. Gå till följande webbadress: %1$s +\n3. Logga in när du blir tillfrågad +\n4. Kopiera profilens webbadress som du blev omdirigerad till. + dittID, soundcloud.com/dittid + + Tänk på att operationer kan vara nätverks intensiv. +\n +\nVill du fortsätta? + + Uppspelningshastighet Kontroller + Tempo + Pitch + Avlänka (kan orsaka förvrängning) + Snabbspola vid frånvaro av ljud + Steg + Återställ + + För att uppfylla den Europeiska dataskyddsförordningen (GDPR), uppmärksammar vi NewPipes sekretesspolicy. Läs den noggrant. Du måste acceptera det om du vill skicka felrapporten. + Acceptera + Avböj + + Ingen gräns + Begränsa upplösningen när du använder mobil data + "Minimera vid växling av applikationen " + Åtgärd när du växlar till andra applikationer från huvudvideospelare — %s + Ingen + Minimera till Bakgrunds-spelare + Minimera till popup-spelare + + From ff769caf82ccaaaa548f2604904d00fdfaca8a55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20Tapia=20Ram=C3=ADrez?= Date: Wed, 1 Aug 2018 01:25:12 +0000 Subject: [PATCH 098/103] Translated using Weblate (Spanish) Currently translated at 100,0% (383 of 383 strings) --- app/src/main/res/values-es/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 98dec6a54..57765c659 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -500,4 +500,6 @@ abrir en modo popup Canales Usuarios + Listas de reproducción + Pistas From 1aa3761d1afae60dbaa38fcabe26feb7c6de1062 Mon Sep 17 00:00:00 2001 From: Carles Pastor Badosa Date: Thu, 2 Aug 2018 03:22:26 +0200 Subject: [PATCH 099/103] Fix typo in v0.13.7 changelog --- fastlane/metadata/android/en-US/changelogs/66.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/metadata/android/en-US/changelogs/66.txt b/fastlane/metadata/android/en-US/changelogs/66.txt index 3bdc6ae6d..89eb0abbb 100644 --- a/fastlane/metadata/android/en-US/changelogs/66.txt +++ b/fastlane/metadata/android/en-US/changelogs/66.txt @@ -1,4 +1,4 @@ -# Chagelog of v0.13.7 +# Changelog of v0.13.7 ### Fixed - Fix sort filter issues of v0.13.6 From c6da4043edee9d15c09ca16dd2c9c9d4e48d8771 Mon Sep 17 00:00:00 2001 From: D D Date: Wed, 1 Aug 2018 05:59:18 +0000 Subject: [PATCH 100/103] Translated using Weblate (Bulgarian) Currently translated at 98.4% (377 of 383 strings) --- app/src/main/res/values-bg/strings.xml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 34e7867a9..019922f73 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -72,7 +72,7 @@ Възобнови при връщане на фокус Продължавай възпроизвеждането след прекъсване (например телефонно обаждане) Изтегли - Следващо видео + Следващ клип Показвай „следващ“ и „подобни“ Показвай съвет „задръж за добавяне“ Непознат URL @@ -157,7 +157,7 @@ Видео Аудио Опитай отново - Отказан достъп до хранилището (провери правата) + Достъпа до хранилището е отказан Използвай стария плейър Използваю стария вграден Mediaframewoek плейър @@ -174,8 +174,8 @@ Няма клипове - %s видео - %s видеота + %s клип + %s клипове Пауза @@ -251,7 +251,7 @@ Изтрива историята с въвежданите за търсене ключови думи. Изтрий цялата история на търсенията. Историята на търсенията е изтрита. - URL подписът на видеото не можа да бъде дешифрован + URL подписът на клипа не можа да бъде дешифрован Външните плейъри не поддържат този вид линкове Невалиден URL Невалидна директория @@ -286,7 +286,7 @@ Лицензът на NewPipe Липсва стрийм плейър (можете да изтеглите VLC, за да пуснете стрийма) Изключете, за да спрете зареждането на всички миниатюри, спестявайки трафик и памет. При промяна на тази настройка, текущата кеш-памет на изображенията ще бъде изтрита. - Показвай подсказка, когато е избран фонов режим или режим в прозорец на страницата с детайли на съответното видео + Показвай подсказка, когато е избран фонов режим или режим в прозорец на страницата с детайли на съответния клип Изтрива историята на възпроизвежданите стриймове. Не са намерени видео стриймове Не са намерени аудио стриймове @@ -457,4 +457,10 @@ Минимизирай във фонов режим Минимизирай в прозорец - +Канали + Плейлисти + Песни + Потребители + Възстанови + + From d0704f621f44fdb9e3708fb53d81bd16fdc3e224 Mon Sep 17 00:00:00 2001 From: Maxime Burlandy Date: Wed, 1 Aug 2018 06:51:45 +0000 Subject: [PATCH 101/103] Translated using Weblate (French) Currently translated at 97.1% (372 of 383 strings) --- app/src/main/res/values-fr/strings.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 3ab89ec54..ede0f0d77 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -434,11 +434,11 @@ \n3. Un téléchargement va démarrer (ce sera celui du fichier nécessaire à l\'importation des abonnements)" Pour importer vos abonnements SoundCloud, vous devez connaitre l\'URL de votre profil ou votre identifiant (id). Si vous le savez, tapez-le ci-dessous. \n -\nSi vous ne le connaissez pas, veuillez suivre les étapes suivantes : +\nSi vous ne le connaissez pas, veuillez suivre les étapes suivantes : \n -\n1. Activer le \"mode bureau\" dans votre navigateur (le site n\'est pas accesible en mode mobile) -\n2. Suivez ce : %1$s -\n3. Connectez-vous à votre compte +\n1. Activer le \"mode bureau\" dans votre navigateur (le site n\'est pas accesible en mode mobile) +\n2. Suivez cette URL : %1$s +\n3. Connectez-vous à votre compte \n4. Copier l\'URL vers lequel vous venez d\'être redirigé (qui est l\'URL de votre profil) votreID, soundcloud.com/votreid @@ -485,4 +485,16 @@ \nVous devez l\'accepter pour nous envoyer le rapport de bug. Pas de limite Limiter la résolution en données mobile + Chaînes + Listes de lecture + Pistes + Utilisateurs + Accélérer pendant les silences + Étape + Réinitialiser + + Minimiser + Action lors du changement d\'applications depuis le lecteur vidéo + Aucune + Réduire From a6a5bef4477eb4f211d2dbab3b9f30fba103efa3 Mon Sep 17 00:00:00 2001 From: MadderRagax Date: Tue, 31 Jul 2018 22:53:44 +0000 Subject: [PATCH 102/103] Update translation via weblate Translated using Weblate (Swedish) Currently translated at 100.0% (383 of 383 strings) Translated using Weblate (Chinese (Mandarin)) Currently translated at 27.4% (105 of 383 strings) Translated using Weblate (Chinese (Simplified)) Currently translated at 97.1% (372 of 383 strings) Translated using Weblate (German) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Arabic) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Basque) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Dutch) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Spanish) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Catalan) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Chinese (Traditional)) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (German) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Turkish) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Portuguese (Brazil)) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Ukrainian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Swedish) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (French) Currently translated at 97,1% (372 of 383 strings) Translated using Weblate (French) Currently translated at 97,1% (372 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Arabic) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Basque) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Dutch) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Spanish) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Catalan) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Chinese (Traditional)) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (German) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Ukrainian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Swedish) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Turkish) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Portuguese (Brazil)) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Estonian) Currently translated at 91.6% (351 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) Translated using Weblate (Russian) Currently translated at 100,0% (383 of 383 strings) --- app/src/main/res/values-ar/strings.xml | 16 ++-- app/src/main/res/values-ca/strings.xml | 16 ++-- app/src/main/res/values-cmn/strings.xml | 53 ++++++++++++- app/src/main/res/values-de/strings.xml | 20 +++-- app/src/main/res/values-es/strings.xml | 16 ++-- app/src/main/res/values-et/strings.xml | 16 ++-- app/src/main/res/values-eu/strings.xml | 16 ++-- app/src/main/res/values-fr/strings.xml | 16 ++-- app/src/main/res/values-nl/strings.xml | 16 ++-- app/src/main/res/values-pt-rBR/strings.xml | 16 ++-- app/src/main/res/values-ru/strings.xml | 90 +++++++++++----------- app/src/main/res/values-sv/strings.xml | 24 +++--- app/src/main/res/values-tr/strings.xml | 16 ++-- app/src/main/res/values-uk/strings.xml | 16 ++-- app/src/main/res/values-zh-rCN/strings.xml | 3 + app/src/main/res/values-zh-rTW/strings.xml | 16 ++-- 16 files changed, 213 insertions(+), 153 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 79cafbaed..1009e8e87 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -309,7 +309,7 @@ استيراد قاعدة البيانات تصدير قاعدة البيانات "سيقوم بالكتابة على سجل التاريخ والاشتراكات الحالية " - تصدير سجل, الاشتراكات وقوائم التشغيل. + تصدير سجل, الاشتراكات وقوائم التشغيل عرض المعلومات إضافة إلى @@ -389,12 +389,12 @@ "معرفك , soundcloud.com/ الخاص بك " إفتراضي -تعطيل إيقاف جميع الصور المصغرة من تحميل البيانات واستخدام الذاكرة وحفظها. سيؤدي التغيير هذا إلى محو-ذاكرة التخزين المؤقت في الذاكرة-وذاكرة على القرص. +تعطيل إيقاف جميع الصور المصغرة من تحميل البيانات واستخدام الذاكرة وحفظها. سيؤدي التغيير هذا إلى محو-ذاكرة التخزين المؤقت في الذاكرة-وذاكرة على القرص امسح البيانات الوصفية المخزنة مؤقتًا إزالة جميع بيانات صفحات الويب المخزنة مؤقتًا تم محو ذاكرة التخزين المؤقت للبيانات الوصفية وضع البث القادم تلقائيا في قائمة الإنتظار - رفض البث المشابه في حال كون البث السابق يعمل في حالة عدم التكرار. + رفض البث المشابه في حال كون البث السابق يعمل في حالة عدم التكرار إضافة صورة مصغرة إلى قائمة التشغيل قائمة التشغيل المخزنة @@ -402,7 +402,7 @@ بدون تسميات توضيحية تسميات توضيحية - تعديل مشغل نص التسمية التوضيحية وأنماط الخلفية. يتطلب إعادة تشغيل التطبيق لتصبح التغييرات سارية المفعول. + تعديل مشغل نص التسمية التوضيحية وأنماط الخلفية. يتطلب إعادة تشغيل التطبيق لتصبح التغييرات سارية المفعول تمكين LeakCanary قد تتسبب مراقبة تسرب الذاكرة في عدم استجابة التطبيق عند تفريغ السجلات @@ -411,12 +411,12 @@ فرض الإبلاغ عن استثناءات Rx غير القابلة للتسليم خارج دورة حياة الجزء أو النشاط بعد التخلص منها محو سجل المشاهدة - احذف محفوظات الفديوهات التي تم تشغيلها. - حذف سجل المشاهدة بالكامل. + احذف محفوظات الفديوهات التي تم تشغيلها + حذف سجل المشاهدة بالكامل سجل المشاهدة محذوف. محو سجل البحث - يحذف تاريخ البحث عن الكلمات الرئيسية. - حذف محفوظات البحث بالكامل. + يحذف تاريخ البحث عن الكلمات الرئيسية + حذف محفوظات البحث بالكامل سجل البحث المحذوف. المشغل الخارجي لا يدعم هذه الأنواع من الروابط مصدر ملف / مصدر غير صالح diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 700506bce..eeea5dffe 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -61,7 +61,7 @@ Importa una base de dades Exporta una base de dades - Exporta l\'historial, les subscripcions i les llistes de reproducció. + Exporta l\'historial, les subscripcions i les llistes de reproducció Error Error de xarxa Vídeo @@ -310,7 +310,7 @@ Toqueu el botó de cerca per començar En algunes resolucions NO hi haurà àudio quan aquesta opció estigui activada Reproductor d\'àudio extern - Desactiveu-ho per evitar que es carreguin les miniatures i estalviar dades i memòria. Si canvieu aquesta opció, s\'esborrarà la memòria cau d\'imatges tant de la memòria com de l\'emmagatzematge. + Desactiveu-ho per evitar que es carreguin les miniatures i estalviar dades i memòria. Si canvieu aquesta opció, s\'esborrarà la memòria cau d\'imatges tant de la memòria com de l\'emmagatzematge Emmagatzema les cerques localment Registra els vídeos visualitzats Reprèn automàticament @@ -390,7 +390,7 @@ Desvincula (pot provocar distorsió) Nightcore Elimina totes les dades de llocs web de la memòria cau - Afegeix a la cua un vídeo relacionat quan es reprodueix l\'últim vídeo en una cua sense repetició. + Afegeix a la cua un vídeo relacionat quan es reprodueix l\'últim vídeo en una cua sense repetició Mostra els missatges d\'ajuda Mostra un missatge d\'ajuda quan el botó de mode en segon pla o emergent estigui premut a la pàgina de detalls d\'un vídeo Què ha passat:\\nPetició:\\nIdioma del contingut:\\nServei:\\nHora GMT:\\nPaquet:\\nVersió:\\nVersió del SO: @@ -425,17 +425,17 @@ No hi ha vídeos que es puguin baixar Subtítols - Modifica la mida del text i el fons dels subtítols. Cal reiniciar l\'aplicació per aplicar els canvis. + Modifica la mida del text i el fons dels subtítols. Cal reiniciar l\'aplicació per aplicar els canvis No s\'ha trobat cap aplicació que pugui reproduir aquest fitxer Esborra l\'historial de reproduccions - Esborra l\'historial dels vídeos que s\'han reproduït. - Esborra tot l\'historial de reproduccions. + Esborra l\'historial dels vídeos que s\'han reproduït + Esborra tot l\'historial de reproduccions S\'ha esborrat l\'historial de reproduccions. Esborra l\'historial de cerca - Esborra l\'historial de paraules cercades. - Esborra tot l\'historial de cerca. + Esborra l\'historial de paraules cercades + Esborra tot l\'historial de cerca S\'ha esborrat l\'historial de cerca. S\'ha esborrat 1 element. diff --git a/app/src/main/res/values-cmn/strings.xml b/app/src/main/res/values-cmn/strings.xml index 4016a40c8..852ac7f1e 100644 --- a/app/src/main/res/values-cmn/strings.xml +++ b/app/src/main/res/values-cmn/strings.xml @@ -69,4 +69,55 @@ 清理照片内存 最小化弹出播放器 - +清楚观看历史 + 已删除搜索历史 + 错误 + 网络错误 + 举报错误 + 没有结果 + 开始 + 暂停 + 播放 + 创建 + 删除 + 删除所有 + 新任务 + 好 +\n + + 错误 +\n + 服务器无法支持 + 文件已存在 + NewPipe 下载中 + 请稍等… + 字母与数字 + 最特别的字符 + + 这个文件里没有已下载应用程式 + + 关于NewPipe + 设置 + 关于 + 第三方执照 + 打开网页 + 删除书签 + + 请问你要删除这个列表吗? + 已创建播放列表 + 已加入播放列表 + 步骤 + 重置 + + 为了遵守欧洲通用数据保护法规(GDPR,我们请你注意NewPipe的隐私政策.请仔细阅读. +\n你必须接受它才能将错误报告发送给我们. + 接受 + 拒绝 + + 没有限制 + 使用移动数据时的解析度限制 + 最小化应用程序切换 + 从主视频播放器切换到其他应用程序时的操作 - %s + 没有 + 最小化背景播放器 + diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 1ffdb4992..c58ab68e9 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -329,7 +329,7 @@ Datenbank importieren Datenbank exportieren Wird deinen Verlauf und deine Abos überschreiben - Verlauf, Abos und Wiedergabelisten exportieren. + Verlauf, Abos und Wiedergabelisten exportieren Keine gültige ZIP-Datei Warnung: Nicht alle Dateien konnten importiert werden. Dies wird deine aktuellen Einstellungen überschreiben. @@ -421,9 +421,9 @@ Verknüpfung aufheben (kann zu Verzerrungen führen) Nightcore Standard -Deaktiviere diese Option, um das Laden aller Miniaturansichten zu stoppen und Daten und Speicherverbrauch zu sparen. Wenn du dies änderst, wird sowohl der In-Memory- als auch der On-Disk-Image-Cache gelöscht. +Deaktiviere diese Option, um das Laden aller Miniaturansichten zu stoppen und Daten und Speicherverbrauch zu sparen. Wenn du dies änderst, wird sowohl der In-Memory- als auch der On-Disk-Image-Cache gelöscht Nächsten Stream automatisch einreihen - Automatisches Anhängen eines verwandten Streams beim Abspielen des letzten Streams in einer nicht wiederholten Warteschlange. + Automatisches Anhängen eines verwandten Streams beim Abspielen des letzten Streams in einer nicht wiederholten Warteschlange Hier wird bald etwas stehen ;D @@ -456,17 +456,17 @@ Standardaktion beim Öffnen von Inhalten - %s Untertitel - Ändere Textgröße und Hintergrundstil des Untertitels im Player. Wird erst nach Neustart des App wirksam. + Ändere Textgröße und Hintergrundstil des Untertitels im Player. Wird erst nach Neustart des App wirksam Keine App zum Abspielen dieser Datei installiert Verlauf leeren - Löscht den Verlauf der abgespielten Streams. - Löscht den ganzen Verlauf. + Löscht den Verlauf der abgespielten Streams + Löscht den ganzen Verlauf Verlauf gelöscht. Suchverlauf löschen - Lösche Verlauf der Suchschlüsselwörter. - Lösche gesamten Suchverlauf. + Lösche Verlauf der Suchschlüsselwörter + Lösche gesamten Suchverlauf Suchverlauf gelöscht. 1 Element gelöscht. @@ -493,4 +493,8 @@ Schritt Zurücksetzen + Kanäle + Wiedergabelisten + Titel + Nutzer diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 57765c659..b2aca1df6 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -330,7 +330,7 @@ abrir en modo popup Importar base de datos Exportar base de datos Reemplazará su historial actual y sus suscripciones - Exportar historial, suscripciones y listas de reproducción. + Exportar historial, suscripciones y listas de reproducción Exportación completa Importación completa Archivo ZIP no válido @@ -403,7 +403,7 @@ abrir en modo popup Usar búsqueda rápida inexacta La búsqueda inexacta permite al reproductor buscar posiciones más rápido con menor precisión Auto-encolar la siguiente transmisión - Auto-añadir un vídeo relacionado al reproducir el último vídeo en una cola no repetitiva. + Auto-añadir un vídeo relacionado al reproducir el último vídeo en una cola no repetitiva DIRECTO SINCRONIZAR Archivo @@ -445,7 +445,7 @@ abrir en modo popup \n \n¿Desea continuar? Cargar Miniaturas - Descativar todas las miniaturas para evitar que se carguen, guarden datos y usen memoria. Al cambiar esto se borrarán tanto la caché de imágenes en la memoria como en el disco. + Descativar todas las miniaturas para evitar que se carguen, guarden datos y usen memoria. Al cambiar esto se borrarán tanto la caché de imágenes en la memoria como en el disco Caché de imagen limpiado Metadatos eliminados del caché Eliminar todos los datos de la página web en caché @@ -464,15 +464,15 @@ abrir en modo popup No hay ninguna app instalada para reproducir este archivo Subtítulos - Modificar la escala de texto de los subtítulos y los estilos de fondo del reproductor. Requiere el reinicio de la app para que surta efecto. + Modificar la escala de texto de los subtítulos y los estilos de fondo del reproductor. Requiere el reinicio de la app para que surta efecto Borrar historial de reproducciones - Elimina el historial de las transmisiones reproducidas. - Elimina todo el historial de reproducciones. + Elimina el historial de las transmisiones reproducidas + Elimina todo el historial de reproducciones Historial de reproducciones eliminado. Borrar historial de búsqueda - Elimina el historial de palabras clave de búsqueda. - Elimina todo el historial de búsqueda. + Elimina el historial de palabras clave de búsqueda + Elimina todo el historial de búsqueda Historial de búsquedas eliminado. 1 elemento eliminado. diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 2ee7fb37d..7f08efd38 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -69,13 +69,13 @@ Kasuta ebatäpset kerimist Ebatäpne kerimine lubab pleieril otsida asukohta kiiremini täpsuse arvel Laadi pisipildid - Keela, peatamaks pisipiltide laadimine ja vähenda andme- ja mälukasutust. Selle muutmine puhastab nii sisemälu kui piltide vahemälu andmekandjal. + Keela, peatamaks pisipiltide laadimine ja vähenda andme- ja mälukasutust. Selle muutmine puhastab nii sisemälu kui piltide vahemälu andmekandjal Pildid kustutati vahemälust Kustuta metaandmed vahemälust Kustuta veebilehtede andmed vahemälust Metaandmed kustutati vahemälust Järgmine voog automaatselt järjekorda - Lisa seotud voog automaatselt, kui esitusel on viimane voog mittekorduvast järjekorrast. + Lisa seotud voog automaatselt, kui esitusel on viimane voog mittekorduvast järjekorrast Pleieri juhtimise viiped Luba viiped helitugevuse ja ereduse juhtimiseks Kuva soovitused @@ -143,14 +143,14 @@ Impordi andmebaas Ekspordi andmebaas Alistab praeguse ajaloo ja tellimused - Ekspordi ajalugu, tellimused ja pleilistid. + Ekspordi ajalugu, tellimused ja pleilistid Puhasta vaatamiste ajalugu - Kustutab vaadatud voogude ajaloo. - Kustuta kogu vaatamiste ajalugu. + Kustutab vaadatud voogude ajaloo + Kustuta kogu vaatamiste ajalugu Vaatamiste ajalugu kustutati. Kustuta otsinguajalugu - Kustutab otsisõnade ajaloo. - Kustuta kogu otsinguajalugu. + Kustutab otsisõnade ajaloo + Kustuta kogu otsinguajalugu Otsinguajalugu kustutati. Viga Võrgu viga @@ -382,7 +382,7 @@ Automaatselt loodud Subtiitrid - Kohanda pleieri subtiitrite teksti suurust ja tausta. Jõustamiseks tuleb rakendus taaskäivitada. + Kohanda pleieri subtiitrite teksti suurust ja tausta. Jõustamiseks tuleb rakendus taaskäivitada Mälulekke seire võib põhjustada rakenduse hangumise diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index 8be6aad2d..9f9fceb8b 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -328,21 +328,21 @@ Kendu cache-ko wegbuneen datu guztiak Metadatuen cache-a ezabatuta Gehitu ilarara hurrengo jarioa - Gehitu erlazionatutako jario bat azken jarioa jo bitartean errepikapenik gabeko ilara batean. + Gehitu erlazionatutako jario bat azken jarioa jo bitartean errepikapenik gabeko ilara batean Arazketa Fitxategia Inportatu datu-basea Esportatu datu-basea Zure uneko historiala eta harpidetzak gainidatziko ditu - Esportatu historiala, harpidetzak eta erreprodukzio-zerrendak. + Esportatu historiala, harpidetzak eta erreprodukzio-zerrendak Garbitu ikusitakoaren historiala - Jotako jarioen historiala ezabatzen du. - Ezabatu ikusitakoaren historial osoa. + Jotako jarioen historiala ezabatzen du + Ezabatu ikusitakoaren historial osoa Ikusitakoaren historiala ezabatuta. Garbitu bilaketa historiala - Ezabatu bilaketa gakoen historiala. - Ezabatu bilaketen historial osoa. + Ezabatu bilaketa gakoen historiala + Ezabatu bilaketen historial osoa Bilaketen historiala ezabatuta. Direktorio baliogabea Fitxategi edo edukiaren iturri baliogabea @@ -407,7 +407,7 @@ Automatikoki sortuak Azpitituluak - Aldatu azpitituluen testuaren eskala eta atzealdeko estiloa. Aplikazioa berrabiarazi behar da aldaketak aplikatzeko. + Aldatu azpitituluen testuaren eskala eta atzealdeko estiloa. Aplikazioa berrabiarazi behar da aldaketak aplikatzeko Gaitu LeakCanary Memoria galeren monitorizazioa. Aplikazioak agian ez du erantzungo memoriaren aitortza egin bitartean @@ -453,7 +453,7 @@ Ezarpenak ere inportatu nahi dituzu? Bilaketa ez zehatzak posizioak azkarrago baina prezisio gutxiagoz bilatzea ahalbidetzen du - "Desgaitu iruditxoak kargatzea gelditzeko eta datuak eta memoria aurrezteko. Hau aldatzean memoria eta diskoko irudien cache-ak garbituko dira." + "Desgaitu iruditxoak kargatzea gelditzeko eta datuak eta memoria aurrezteko. Hau aldatzean memoria eta diskoko irudien cache-ak garbituko dira" NewPipe Software Librea eta Copyleft da: Nahi eran erabili, ikertu, partekatu eta hobetu dezakezu. Zehazki, elkarbanatzea eta aldatzea Free Software Foundation-ek argitaratutako GNU General Public License-ren 3. bertsioa edo berriagoren baten terminoen arabera egiteko baimena duzu. Behartu aktibitatearen bizitza ziklotik kanpo baztertu eta gero entregatu ezin diren Rx salbuespenen inguruko txostena diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index ede0f0d77..e74c948fd 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -384,7 +384,7 @@ Recherche rapide approximative Permettre au lecteur d\'accéder plus rapidement à une position au détriment de la précision Charger miniatures - Désactiver pour arrêter le chargement de toutes les miniatures et sauvegarder les données et l\'utilisation de la mémoire. Modifier cela effacera à la fois le cache d\'image en mémoire et sur disque. + Désactiver pour arrêter le chargement de toutes les miniatures et sauvegarder les données et l\'utilisation de la mémoire. Modifier cela effacera à la fois le cache d\'image en mémoire et sur disque Images en cache effacées Effacer les données en cache Effacer toutes les pages web mises en cache @@ -403,7 +403,7 @@ Télécharger le fichier de flux Vidéo suivante en file d\'attente - Ajout automatique d\'un flux connexe lors de la lecture du dernier flux dans une file d\'attente non répétitive. + Ajout automatique d\'un morceau suggéré lors de la lecture du dernier morceau dans une file d\'attente non bouclée. Débogage Remplir Générés automatiquement @@ -448,7 +448,7 @@ Vitesse de lecture Cadence - Unhook (déformations possibles) + Détacher (déformations possibles) Défaut Ouvrir de préférence avec Action par défaut lors de l\'ouverture de contenu - %s @@ -493,8 +493,10 @@ Étape Réinitialiser - Minimiser - Action lors du changement d\'applications depuis le lecteur vidéo + Minimiser lors du changement d\'application + Action lors du changement d\'applications depuis le lecteur vidéo —%s Aucune - Réduire - + Lecture en arrière plan + Mettre en lecteur popup + + diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 007b3e232..358e76fde 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -331,7 +331,7 @@ te openen in pop-upmodus Database importeren Database exporteren Dit zal je huidige geschiedenis en abonnementen overschrijven - Exporteer geschiedenis, abonnementen en speellijsten. + Exporteer geschiedenis, abonnementen en speellijsten Export voltooid Import voltooid Geen geldig ZIP-bestand @@ -399,7 +399,7 @@ te openen in pop-upmodus Snelle, minder exact spoelen gebruiken Minder exact spoelen laat de speler sneller posities zoeken met verminderde precisie Volgende stream automatisch in wachtrij plaatsen - Automatisch een gerelateerde stream toekennen bij het afspelen van de laatste stream in een niet-herhalende afspeelwachtlijst. + Automatisch een gerelateerde stream toekennen bij het afspelen van de laatste stream in een niet-herhalende afspeelwachtlijst SYNCHRONISEREN Bestand @@ -441,7 +441,7 @@ te openen in pop-upmodus \n \nWil je doorgaan? Miniatuurvoorbeelden laden - Schakel dit uit om alle miniatuurvoorbeelden niet meer te laden; dit bespaart gegevens en geheugen. Het wijzigen van deze instelling wist het geheugen en de afbeeldingscache. + Schakel dit uit om alle miniatuurvoorbeelden niet meer te laden; dit bespaart gegevens en geheugen. Het wijzigen van deze instelling wist het geheugen en de afbeeldingscache Afbeeldingscache gewist Gecachete metagegevens wissen Alle gecachete webpagina-gegevens wissen @@ -458,17 +458,17 @@ te openen in pop-upmodus Geen streams beschikbaar voor downloaden Bijschriften - Bijschriftgrootte en achtergrondstijlen wijzigen. Vereist een herstart van de app. + Bijschriftgrootte en achtergrondstijlen wijzigen. Vereist een herstart van de app Er is geen app geïnstalleerd die dit bestand kan afspelen Kijkgeschiedenis wissen - Verwijdert de geschiedenis van afgespeelde streams. - Verwijdert de gehele kijkgeschiedenis. + Verwijdert de geschiedenis van afgespeelde streams + Verwijdert de gehele kijkgeschiedenis Kijkgeschiedenis verwijderd. Zoekgeschiedenis wissen - Verwijdert de gebruikte zoektermen. - Verwijdert de gehele geschiedenis. + Verwijdert de gebruikte zoektermen + Verwijdert de gehele geschiedenis Zoekgeschiedenis verwijderd. 1 item verwijderd. diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 7805a8fba..3ec466bba 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -310,7 +310,7 @@ abrir em modo popup Importar base de dados Exportar base de dados Isso irá sobrescrever seu histórico e inscrições - Exportar histórico, inscrições e listas de reprodução. + Exportar histórico, inscrições e listas de reprodução Exportação completa Importação completa Não há nenhum arquivo ZIP válido @@ -379,7 +379,7 @@ abrir em modo popup Usar índice de indexação rápido porém não preciso Usar índice de indexação inexato Adicionar a próxima stream à fila automaticamente - Auto anexar uma stream relacionada quando a reprodução iniciar na última stream em uma fila não repetitiva. + Auto anexar uma stream relacionada quando a reprodução iniciar na última stream em uma fila não repetitiva Sincronizar Arquivo @@ -427,7 +427,7 @@ abrir em modo popup Cache de metadados foi limpo Controles de Velocidade de Reprodução "Tempo " - Desabilite para para de carregar todas as miniaturas e economizar dados e uso de memória. Alterar esta configuração irá limpar o cache de imagens na memória e em disco. + Desabilite para para de carregar todas as miniaturas e economizar dados e uso de memória. Alterar esta configuração irá limpar o cache de imagens na memória e em disco Passo Desvincular (pode causar distorção) Padrão @@ -439,18 +439,18 @@ abrir em modo popup Abrir gaveta Fechar gaveta Legendas - Modifique o tamanho da legenda e o estilo da tela de fundo. Necessário reiniciar o aplicativo para ter efeito. + Modifique o tamanho da legenda e o estilo da tela de fundo. Necessário reiniciar o aplicativo para ter efeito Night-core Nenhum player instalado para reproduzir este arquivo "Limpar histórico de já assistidos " - Deleta o histórico de videos já reproduzidos. - Deleta todo o histórico de já reproduzidos. + Deleta o histórico de videos já reproduzidos + Deleta todo o histórico de já reproduzidos Histórico de já assistidos deletado. Limpar histórico de pesquisa - Deleta histórico de palavras chave pesquisadas. - Deletar todo o histórico de pesquisa. + Deleta histórico de palavras chave pesquisadas + Deletar todo o histórico de pesquisa Histórico de pesquisa deletado. 1 item deletado. diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 8f0b81026..4fc30e90e 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -20,18 +20,18 @@ Разрешение по умолчанию Воспроизвести в Kodi Приложение Kore не найдено. Установить его? - Показать \"Воспроизвести в Kodi\" + \"Воспроизвести в Kodi\" Показать опцию воспроизведения видео через медиацентр Kodi Аудио Формат аудио по умолчанию - WebM — свободный формат - M4A — лучше качество + WebM — свободный + M4A — выше качество Скачать Следующее видео URL не поддерживается - \"Следующее\" и \"Предложенные\" видео + \"Следующее\" и \"Предложенные\" Язык контента по умолчанию - Видео и Аудио + Видео и аудио Внешний вид Другое @@ -75,7 +75,7 @@ Выберите доступную папку для загрузки - Контент с ограничением по возрасту + Контент 18+ Ошибка Ваш комментарий (English): Не удалось создать папку для загрузки \"%1$s\" @@ -128,7 +128,7 @@ Только некоторые устройства могут воспроизводить видео в 2K/4K Формат видео по умолчанию Чёрная - Запоминать размер и положение всплывающего окна + Восстановить окно Изменять яркость и громкость жестами Всплывающее окно Воспроизведение во всплывающем окне @@ -162,7 +162,7 @@  тыс. Разрешение всплывающего окна Запоминать размер и положение всплывающего окна - Подсказки поиска + Варианты поиска Лучшее разрешение Старый встроенный плеер на Mediaframework @@ -200,7 +200,7 @@ Хранить поисковые запросы локально История и кэш Запоминать просмотренные видео - Возобновлять при возврате фокуса + Возобновить при фокусе Возобновлять воспроизведение после перерывов (например, телефонных звонков) @@ -208,7 +208,7 @@ Уведомления для NewPipe в фоне и во всплывающем окне Загрузки - Допустимые символы в именах файлов + Допустимые символы имён файлов Недопустимые символы заменяются на этот Символ для замены @@ -225,7 +225,7 @@ Плеер Поведение - История и Кэш + История и кэш Плейлист Отменить @@ -279,33 +279,33 @@ Удалить Вы подписаны Подписка отменена - Подсказка \"Зажмите, чтобы добавить\" + \"Зажмите, чтобы добавить\" Показать подсказку при нажатии \"В окне\" или \"В фоне\" на странице сведений о видео [Неизвестно] - Восстановление после ошибки проигрывателя + Восстановление после ошибки плеера В фоне В окне Зажмите, чтобы добавить в очередь - Добавить в очередь \"В фоне\" - Добавить в очередь \"В окне\" - Воспроизвести здесь - Воспроизвести в фоне - Воспроизвести в окне + В очередь \"В фоне\" + В очередь \"В окне\" + Видеоплеер + Фоновый плеер + Плеер в окне Потоковый плеер не найден (вы можете установить VLC) Страна контента по умолчанию Сервис Всегда - Только один раз + Только сейчас Переключить ориентацию Перейти в фон Перейти в окно Перейти в главное окно - Ошибка проигрывателя без возможности восстановления - Внешние проигрыватели не поддерживают ссылки этих типов + Ошибка плеера без возможности восстановления + Внешние плееры не поддерживают ссылки этих типов Неверная ссылка Потоки видео не найдены Потоки аудио не найдены @@ -318,31 +318,31 @@ Открыть боковую панель Закрыть боковую панель - Проигрыватель видео - Фоновый проигрыватель + Видеоплеер + Фоновый плеер Плеер в окне Всегда спрашивать - Получение информации… + Получение сведений… Загрузка запрошенного контента Загрузка файла прямой трансляции. - Показать информацию + Показать сведения Закладки Добавить к - Быстрый неточный поиск + Быстрый поиск позиции Неточный поиск позволяет плееру искать позицию быстрее, но менее точно - Автоматическая очередь следующего стрима - Автоматически добавлять связанные видео, при воспроизведении с последнего видео в неповторяющейся очереди. + Автодополнение очереди + Добавлять похожие потоки в очередь при воспроизведении последнего, если не включён повтор Отладка Файл Импорт данных Экспорт данных Ваша текущая история и подписки будут перезаписаны - Экспорт истории, подписок и плейлистов. + Экспорт истории, подписок и плейлистов Неверная папка Неверный файл или источник контента Файл не существует или нет разрешения на его чтение или запись @@ -378,7 +378,7 @@ Переименовать плейлист Имя Добавить в плейлист - Установить как миниатюру плейлиста + На миниатюру плейлиста Добавить плейлист в закладки Удалить закладку @@ -440,51 +440,51 @@ \n \nПродолжить? Загружать миниатюры - Отключите, чтобы не загружать миниатюры и сэкономить трафик и память. Изменение настройки очистит кэш изображений в памяти и на диске. + Отключите, чтобы не загружать миниатюры и сэкономить трафик и память. Изменение настройки очистит кэш изображений в памяти и накопителе Кэш изображений очищен Очистить кэш метаданных Кэш метаданных очищен Управление скоростью воспроизведения Темп Тон - Независимо (возможны искажения) + Независимо (искажения) Nightcore По умолчанию Удалить все загруженные данные веб-страниц - Действие по умолчанию при открытии контента — %s + При открытии ссылки на контент — %s Нет потоков, доступных для загрузки Титры Приложение для воспроизведения этого файла не установлено - Изменить размер и фон титров. Требуется перезапуск приложения для вступления изменений в силу. + Изменить размер и фон титров. Изменения вступят в силу после перезапуска Очистить историю просмотров - Удалить всю историю просмотров. + Вся история просмотров будет удалена История просмотров удалена. Очистить историю поиска - Удалить историю поисковых запросов. - Удалить историю воспроизведённых потоков. - Удалить всю историю поиска. + Удалить историю поисковых запросов + Удалить историю воспроизведённых потоков + Вся история поиска будет удалена История поиска удалена. 1 элемент удалён. NewPipe — свободное программное обеспечение: вы можете использовать, изучать и улучшать его по своему усмотрению. В частности, вы можете распространять и/или изменять его в соответствии с условиями GNU General Public License, опубликованной Free Software Foundation, либо версии 3, либо (по вашему выбору) любой более поздней версии. - Предпочтительное действие \"Открыть\" + При открытии контента Хотите импортировать настройки? Политика конфиденциальности NewPipe Проект NewPipe очень серьёзно относится к вашей конфиденциальности. Поэтому приложение не собирает никаких данных без вашего согласия. \nПолитика конфиденциальности NewPipe подробно объясняет, какие данные отправляются и хранятся при отправке отчёта о сбоях. - Прочитать политику конфиденциальности + Прочитать политику В соответствии с Общим регламентом по защите данных ЕС (GDPR), обращаем ваше внимание на политику конфиденциальности NewPipe. Пожалуйста, внимательно ознакомьтесь с ней. \nВам необходимо принять её условия, чтобы отправить нам отчёт об ошибке. Принять Отклонить Без ограничений - Предельное разрешение в мобильной сети + Предел разрешения в мобильной сети Каналы Плейлисты Дорожки @@ -493,10 +493,10 @@ Шаг Сброс - Сворачивать при переключении приложений - При переключении воспроизведения видео со стандартного плеера на другое приложение — %s + При сворачивании плеера + При переключении со стандартного плеера на другое приложение — %s Ничего не делать - Свернуть в режим фонового воспроизведения - Свернуть в режим всплывающего окна + Фоновый плеер + Плеер в окне diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 7b75ea7e7..675514f17 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -25,9 +25,9 @@ Genväg för att lagra nerladdade videor i Fyll i genvägen som videor ska laddas ner till - Plats för att ladda ner ljud till - Plats för att lagra nerladdat ljud i - Ange nerladdningsplats för ljudfiler + Genväg för nerladdning av ljud + Genväg för att lagra nerladdade ljudfiler i + Fyll i genvägen som ljudfiler ska laddas ner till Automatiskt spelar en video upp när NewPipe öppnas av en annan app Standardupplösning @@ -120,7 +120,7 @@ Vad är nytt - Autospela + Spela upp automatiskt Sök historik Spara sökfrågor lokalt Historik & Cacheminne @@ -292,7 +292,7 @@ Använda snabb inexact sökning Ladda miniatyrer - Inaktivera för att stoppa alla miniatyrbilder från att ladda och spara på data och minnesanvändning. Ändring av detta kommer att rensa cache-minnet. + Inaktivera för att stoppa alla miniatyrbilder från att ladda och spara på data och minnesanvändning. Ändring av detta kommer att rensa cache-minnet Bild cacheminnet var rensad Tjänst Debug @@ -308,7 +308,7 @@ Ta bort alla cachade webbsidor Metadata cache rensad "Köa nästa ström automatiskt " - Lägg automatiskt till en relaterad ström när du spelar den sista strömmen i en ej upprepad kö. + Lägg automatiskt till en relaterad ström när du spelar den sista strömmen i en ej upprepad kö Standard innehåll land Kanaler Spellistor @@ -321,14 +321,14 @@ Importera databas Exportera databas Kommer att skriva över din nuvarande historik och prenumerationer - Exportera historik, prenumerationer och spellistor. + Exportera historik, prenumerationer och spellistor Rensa visningshistorik - Tar bort historiken för spelade videoklipp. - Ta bort hela visningshistoriken. + Tar bort historiken för spelade videoklipp + Ta bort hela visningshistoriken Visningshistorik borttagen. Rensa sökhistorik - Tar bort historiken för söka nyckelord. - Ta bort hela sökhistoriken. + Tar bort historiken för sökta nyckelord + Ta bort hela sökhistoriken Sökhistorik borttagen. Externa spelare stöder inte dessa typer av länkar Ogiltig URL @@ -410,7 +410,7 @@ Auto-genererade Textning - Ändra spelaren textskala och bakgrundsstil. Kräver att appen startar om för att träder i kraft. + Ändra spelaren textskala och bakgrundsstil. Kräver att appen startar om för att träder i kraft Aktivera LeakCanary Minnesläcka övervakning kan orsaka att appen inte svarar under heap dumpning diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 251eab263..15fbc4130 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -326,7 +326,7 @@ Veri tabanını içe aktar Veri tabanını dışa aktar Şu anki geçmişinizi ve aboneliklerinizi geçersiz kılar - Geçmişi, abonelikleri ve oynatma listelerini dışa aktar. + Geçmişi, abonelikleri ve oynatma listelerini dışa aktar Dışa aktarım bitti İçe aktarım bitti Geçerli ZIP dosyası yok @@ -395,7 +395,7 @@ Hızlı isabetsiz konumlama kullan İsabetsiz konumlama, oynatıcının azaltılmış kesinlikle daha hızlı konumlama yapmasını sağlar Sonraki akışı kendiliğinden kuyruğa ekle - Yinelemeyen bir kuyruktaki son akış oynatılırken ilgili bir akışı kendiliğinden sonuna ekle. + Yinelemeyen bir kuyruktaki son akış oynatılırken ilgili bir akışı kendiliğinden sonuna ekle EŞZAMANLA Dosya @@ -437,7 +437,7 @@ \n \nDevam etmek istiyor musunuz? Küçük resimleri yükle - Küçük resimlerin hepsinin yüklenmesini engellemek ve bellek ve veri kullanımını azaltmak için devre dışı bırakın. Bunu değiştirmek, hem bellekteki hem de diskteki resim önbelleğini temizler. + Küçük resimlerin hepsinin yüklenmesini engellemek ve bellek ve veri kullanımını azaltmak için devre dışı bırakın. Bunu değiştirmek, hem bellekteki hem de diskteki resim önbelleğini temizler Resim önbelleği temizlendi Önbelleklenmiş üst veriyi temizle Önbelleklenmiş tüm web sayfası verisini kaldır @@ -454,17 +454,17 @@ İçerik açılırken öntanımlı eylem — %s Ek Açıklamalar - Oynatıcı ek açıklamalar metin boyutunu ve arka plan biçimlerini düzenle. Etki için uygulamayı yeniden başlatmak gerekir. + Oynatıcı ek açıklamalar metin boyutunu ve arka plan biçimlerini düzenle. Etki için uygulamayı yeniden başlatmak gerekir Bu dosyayı oynatmak için kurulan uygulama yok İzleme geçmişini temizle - Oynatılan akışların geçmişini siler. - Tüm izleme geçmişini sil. + Oynatılan akışların geçmişini siler + Tüm izleme geçmişini sil İzleme geçmişi silindi. Arama geçmişini temizle - Aranan anahtar sözcüklerin geçmişini siler. - Tüm arama geçmişini sil. + Aranan anahtar sözcüklerin geçmişini siler + Tüm arama geçmişini sil Arama geçmişi silindi. 1 öge silindi. diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 582dd35ba..313448323 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -192,7 +192,7 @@ Імпортувати базу Експортувати базу Це перепише чинну історію та підписання - Експортувати історію, підписання та плейлисти. + Експортувати історію, підписання та плейлисти Неможливо відтворити цей стрим Відновлююсь після помилки програвача Помилкова URL @@ -387,7 +387,7 @@ Використовувати неточне шукання Неточне шукання дозволяє програвачеві рухатися позиціями швидше, проте з меншою точністю Автоматично додати до черги наступний стрим - Автоматично додавати пов\'язаний стрим під час відтворення останнього у неповторювальній черзі. + Автоматично додавати пов\'язаний стрим під час відтворення останнього у неповторювальній черзі СИНХРОНІЗАЦІЯ Теки @@ -429,7 +429,7 @@ \n \nПродовжуватимете? Завантажити ескізи - Відключити аби зупинити завантаження ескізів та заощадити використання ресурсів та пам\'яті. Увімкнення функції призведе до повного вичищення кешу зображень. + Відключити аби зупинити завантаження ескізів та заощадити використання ресурсів та пам\'яті. Увімкнення функції призведе до повного вичищення кешу зображень Кеш зображень стерто Стерти кеш метаданих "Усунути всі кешовані дані веб-сторінки " @@ -446,17 +446,17 @@ Типова дія під час відкриття вмісту — %s Субтитри - Змінення маштабу тексту субтитрів та фонових стилів. Увімкнення функції потребує перезавантаження застосунку. + Змінення маштабу тексту субтитрів та фонових стилів. Увімкнення функції потребує перезавантаження застосунку Не знайдено відповідного застосунку для відтворення цього файла Очистити історію переглядів - Видаляє історію відтворень. - Видалити всю історію переглядів. + Видаляє історію відтворень + Видалити всю історію переглядів Історію переглядів було видалено. Очистити історію пошуків - Видаляє історію шуканих ключових слів. - Видалити всю пошукову історію. + Видаляє історію шуканих ключових слів + Видалити всю пошукову історію Пошукову історію було видалено. Видалено один фраґмент. diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 8d4c99aaa..5118b42d6 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -461,4 +461,7 @@ 不限制 使用移动数据时限制分辨率 + 更多频道 + 更多频道 + 用户们 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 1d02fcbae..2e6610381 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -271,7 +271,7 @@ 匯入資料庫 匯出資料庫 將覆蓋您目前的歷史記錄和訂閱 - 匯出歷史記錄、訂閱和播放清單。 + 匯出歷史記錄、訂閱和播放清單 返回 欲了解更多關於 NewPipe 的資訊和新聞,請造訪我們的網站。 首頁內容 @@ -382,7 +382,7 @@ 使用粗略但快速的尋找 粗略尋找讓播放器更快找到影片的進度位置 自動播放隊列中下一部影片 - 在非重複播放佇列中的最後一個串流上開始播放時,自動附上相關串流。 + 在非重複播放佇列中的最後一個串流上開始播放時,自動附上相關串流 同步 檔案 @@ -424,7 +424,7 @@ \n3. 詢問時登入到您的帳號 \n4. 複製您被重新導向到的網址。 載入縮圖 - 停用後,NewPipe將不再載入縮圖,減少數據使用與騰空儲存空間,亦會清除記憶體和磁碟上的縮圖快取。 + 停用後,NewPipe將不再載入縮圖,減少數據使用與騰空儲存空間,亦會清除記憶體和磁碟上的縮圖快取 已清除圖片快取 抹除快取中介資料 移除所有網頁的快取資料 @@ -441,17 +441,17 @@ 沒有可供下載的串流 字幕 - 調整播放器字幕大小與背景樣式。必須重新啟動應用程式才會生效。 + 調整播放器字幕大小與背景樣式。必須重新啟動應用程式才會生效 未安裝可播放此檔案的應用程式 清除觀看歷史 - 刪除播放過的串流歷史。 - 刪除全部的觀看歷史。 + 刪除播放過的串流歷史 + 刪除全部的觀看歷史 觀看歷史已刪除。 清除觀看歷史 - 刪除搜尋關鍵字的歷史。 - 刪除全部的搜尋歷史。 + 刪除搜尋關鍵字的歷史 + 刪除全部的搜尋歷史 搜尋歷史已刪除。 已刪除 1 個項目。 From a7f36248d0f2a82fb8ab2f536996a90886907f9c Mon Sep 17 00:00:00 2001 From: oscar Date: Tue, 24 Jul 2018 17:41:57 +0200 Subject: [PATCH 103/103] Removed incorrect explanations of the M4A and WebM audio formats --- app/src/main/res/values-ar/strings.xml | 2 -- app/src/main/res/values-az/strings.xml | 1 - app/src/main/res/values-b+ast/strings.xml | 2 -- app/src/main/res/values-bg/strings.xml | 2 -- app/src/main/res/values-bn-rBD/strings.xml | 2 -- app/src/main/res/values-ca/strings.xml | 2 -- app/src/main/res/values-cmn/strings.xml | 1 - app/src/main/res/values-cs/strings.xml | 2 -- app/src/main/res/values-de/strings.xml | 2 -- app/src/main/res/values-el/strings.xml | 2 -- app/src/main/res/values-eo/strings.xml | 2 -- app/src/main/res/values-es/strings.xml | 2 -- app/src/main/res/values-et/strings.xml | 2 -- app/src/main/res/values-eu/strings.xml | 2 -- app/src/main/res/values-fa/strings.xml | 2 -- app/src/main/res/values-fi/strings.xml | 2 -- app/src/main/res/values-fr/strings.xml | 2 -- app/src/main/res/values-he/strings.xml | 2 -- app/src/main/res/values-hi/strings.xml | 2 -- app/src/main/res/values-hr/strings.xml | 2 -- app/src/main/res/values-hu/strings.xml | 2 -- app/src/main/res/values-id/strings.xml | 2 -- app/src/main/res/values-it/strings.xml | 2 -- app/src/main/res/values-ja/strings.xml | 2 -- app/src/main/res/values-ko/strings.xml | 2 -- app/src/main/res/values-ku/strings.xml | 2 -- app/src/main/res/values-lt/strings.xml | 2 -- app/src/main/res/values-mk/strings.xml | 2 -- app/src/main/res/values-nb-rNO/strings.xml | 2 -- app/src/main/res/values-nl-rBE/strings.xml | 2 -- app/src/main/res/values-nl/strings.xml | 2 -- app/src/main/res/values-pl/strings.xml | 2 -- app/src/main/res/values-pt-rBR/strings.xml | 2 -- app/src/main/res/values-pt/strings.xml | 2 -- app/src/main/res/values-ro/strings.xml | 2 -- app/src/main/res/values-ru/strings.xml | 8 +++----- app/src/main/res/values-sk/strings.xml | 2 -- app/src/main/res/values-sl/strings.xml | 2 -- app/src/main/res/values-sr/strings.xml | 2 -- app/src/main/res/values-sv/strings.xml | 2 -- app/src/main/res/values-tr/strings.xml | 2 -- app/src/main/res/values-uk/strings.xml | 2 -- app/src/main/res/values-vi/strings.xml | 2 -- app/src/main/res/values-zh-rCN/strings.xml | 2 -- app/src/main/res/values-zh-rHK/strings.xml | 2 -- app/src/main/res/values-zh-rTW/strings.xml | 2 -- app/src/main/res/values/settings_keys.xml | 4 ++-- app/src/main/res/values/strings.xml | 2 -- 48 files changed, 5 insertions(+), 97 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 1009e8e87..9d7725070 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -25,7 +25,6 @@ تطبيق Kore غير موجود. هل تريد تثبيته ؟ مضيء صور معاينة الفيديو - جودة أفضل — M4A خطأ في الشبكة الفيديو التالي لا يوجد مشغل فيديو. هل تريد تثبيت VLC ؟ @@ -53,7 +52,6 @@ (إختبارية) إجراء التنزيلات من خلال استخدام بروكسي Tor لزيادة الخصوصية ( تشغيل الفيديو المباشر غير مدعوم حتى الأن ). استخدام Tor مشاهدات %1$s - تنسيق حر — WebM تم حجبه بواسطة GEMA المحتوى غير متاح لم يتمكن من تحميل كل صور المعاينة diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index 61a57ec26..d39e46d5a 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -48,7 +48,6 @@ Audio Defolt audio formatı Defolt video formatı - M4A — daha yaxşı keyfiyyət Mövzu Açıq Qaranlıq diff --git a/app/src/main/res/values-b+ast/strings.xml b/app/src/main/res/values-b+ast/strings.xml index ff0d96016..a8ee6260c 100644 --- a/app/src/main/res/values-b+ast/strings.xml +++ b/app/src/main/res/values-b+ast/strings.xml @@ -33,8 +33,6 @@ Amuesa una opción pa reproducir un videu per Kodi Audiu Formatu por defeutu d\'audiu - WebM — formatu llibre - M4A — calidá meyor Tema Escuru Claru diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 019922f73..e465e8bb1 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -53,8 +53,6 @@ Аудио Аудио формат по подразбиране Видео формат по подразбиране - WebM — свободен формат - M4A — по-добро качество Тема на външния вид Светла Тъмна diff --git a/app/src/main/res/values-bn-rBD/strings.xml b/app/src/main/res/values-bn-rBD/strings.xml index 859e16aa9..f9ec7a07a 100644 --- a/app/src/main/res/values-bn-rBD/strings.xml +++ b/app/src/main/res/values-bn-rBD/strings.xml @@ -46,8 +46,6 @@ অডিও ডিফল্ট অডিও ফরম্যাট পছন্দসই ভিডিও ফরম্যাট - WebM — বিনামূল্য/স্বাধীন ফরম্যাট - m4a — ভালো মানের থিম উজ্জ্বল অন্ধকার diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index eeea5dffe..28f12217b 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -23,8 +23,6 @@ Àudio Format d\'àudio per defecte Format de vídeo per defecte - WebM — format lliure - M4A — millor qualitat Tema Clar Fosc diff --git a/app/src/main/res/values-cmn/strings.xml b/app/src/main/res/values-cmn/strings.xml index 852ac7f1e..f55bbc60b 100644 --- a/app/src/main/res/values-cmn/strings.xml +++ b/app/src/main/res/values-cmn/strings.xml @@ -64,7 +64,6 @@ 酷黑 黑色 记住弹出窗口的尺寸与位置 - M4A — 更好的音质 记住上一次弹出窗口的位置以及大小 清理照片内存 最小化弹出播放器 diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index a1ee6ab1e..a4c5c7cb1 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -32,8 +32,6 @@ Zobrazit možnost přehrání videa pomocí multimediálního centra Kodi Zvuk Výchozí formát zvuku - WebM — volný formát - M4A — lepší kvalita Téma Tmavé Světlé diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index c58ab68e9..616a2abcc 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -24,8 +24,6 @@ Zeigt eine Option an, über die man Videos mit Kodi abspielen kann Audio Bevorzugtes Audioformat - WebM — freies Format - M4A — bessere Qualität Herunterladen Nächstes Video \'Nächste\' und \'ähnliche\' Videos anzeigen diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 8f383b580..7fdb02a59 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -32,8 +32,6 @@ Προβολή μιας επιλογής για αναπαραγωγή με το Kodi media center. Ήχος Προεπιλεγμένη μορφή ήχου - WebM — δωρεάν format - m4a — καλύτερη ποιότητα Θέμα Σκοτεινό Φωτεινό diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index fdae53d50..585800cba 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -21,8 +21,6 @@ Montri \"Ludi per Kodi\"-opcion Sono Defaŭlta sondosierformo - WebM — libera dosierformo - m4a — pli bona kvalito Etoso Malluma Luma diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index b2aca1df6..e51bb358e 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -24,8 +24,6 @@ Mostrar una opción para reproducir vídeo con Kodi Media Center Audio Formato de audio por defecto - WebM — formato libre - M4A — mejor calidad Descargar Siguiente vídeo URL no soportada diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 7f08efd38..2d9d58fe2 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -58,8 +58,6 @@ Heli Heli vaikevorming Video vaikevorming - WebM — libre vorming - M4A — parem kvaliteet Teema Hele Tume diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index 9f9fceb8b..74273e560 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -22,8 +22,6 @@ Erakutsi bideoa Kodi multimedia zentroarekin erreproduzitzeko aukera Audioa Audio formatu lehenetsia - WebM — formatu librea - M4A — kalitate hobea Deskargatu Hurrengo bideoa Erakutsi \'hurrengo\' eta \'antzeko\' bideoak diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml index 5d1f0b336..71acd9c69 100644 --- a/app/src/main/res/values-fa/strings.xml +++ b/app/src/main/res/values-fa/strings.xml @@ -35,8 +35,6 @@ نمایش گزینه‌ای برای پخش ویدیو با مرکز رسانهٔ کودی. صدا قالب صدای پیش‌گزیده - قالب آزاد — WebM - کیفیت بهتر — m4a زمینه تیره روشن diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index c755f8e73..fc9c343b1 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -54,8 +54,6 @@ Ääni Oletusääniformaatti Oletusvideoformaatti - WebM — vapaa formaatti - M4A — parempi laatu Teema Kirkas Tumma diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index e74c948fd..c748a7626 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -24,8 +24,6 @@ %1$s vues Audio Format audio par défaut - WebM — format libre - M4A — meilleure qualité Télécharger Vidéo suivante Afficher les vidéos \"suivantes\" et \"similaires\" diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml index 6468079f4..21e944ea8 100644 --- a/app/src/main/res/values-he/strings.xml +++ b/app/src/main/res/values-he/strings.xml @@ -44,8 +44,6 @@ שמע תבנית ברירת המחדל לשמע תבנית סרט ברירת מחדל - WebM — תבנית חופשית - M4A — איכות גבוהה יותר ערכת נושא מואר חשוך diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index 909218fe3..fe4389495 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -87,8 +87,6 @@ उस विकल्प को दिखाए जिसमे Kodi Media Center के जरिये विडियो प्ले किया जाता है डिफ़ॉल्ट ऑडियो का फॉर्मेट डिफ़ॉल्ट विडियो का फॉर्मेट - webm - फ्री फॉर्मेट - M4A - बेहतर क्वालिटी एप्प का नया रूप काला विडियो पॉपअप की आकर और उसकी स्थति को याद रखे diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 3fd74e7df..8e73cdf4f 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -54,8 +54,6 @@ Zvuk Zadani format zvuka Zadani format videozapisa - WebM - slobodni format - M4A - bolja kvaliteta Tema Svijetla Tamna diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 965b19031..1f925eb39 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -24,8 +24,6 @@ Mutat egy opciót a videók Kodi médiaközponttal való lejátszására. Hang Alapértelmezett hang formátum - WebM — szabad formátum - m4a — jobb minőség Letöltés Következő videó A webcím nem támogatott diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index 44973426f..029a4b1de 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -32,8 +32,6 @@ Tampilkan opsi untuk memutar video via media center Kodi Audio Format audio baku - WebM — format bebas - M4A — kualitas lebih baik Tema Gelap Terang diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 18bbc6d3e..d772d5754 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -24,8 +24,6 @@ Mostra l\'opzione per riprodurre i video tramite Kodi Audio Formato audio predefinito - WebM — formato libero - M4A — miglior qualità Scarica Prossimo video Mostra \'prossimi\' video e video \'simili\' diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 3eff27ff9..ceee62fa9 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -23,8 +23,6 @@ Kodi メディアセンター経由で動画を再生するための設定を表示します 音楽 デフォルトの音楽形式 - WebM形式 - m4a形式 保存 次の動画 \"次の動画\"と\"関連動画\"を表示します diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index 0a73759a9..2eee6b809 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -24,8 +24,6 @@ 비디오를 Kodi media center를 사용해 재생하는 옵션을 표시합니다 오디오 기본 오디오 형식 - WebM — 공개형 무료 자유 포맷입니다 - m4a — 보다 나은 품질을 제공합니다 다운로드 다음 비디오 다음 및 유사한 비디오 표시 diff --git a/app/src/main/res/values-ku/strings.xml b/app/src/main/res/values-ku/strings.xml index 8d30f3592..228849b33 100644 --- a/app/src/main/res/values-ku/strings.xml +++ b/app/src/main/res/values-ku/strings.xml @@ -58,8 +58,6 @@ ده‌نگ جۆری سه‌ره‌كی ده‌نگ جۆری سه‌ره‌كی ڤیدیۆ - WebM — جۆری ئاسایی - M4A — كوالێتی به‌رزتر ڕووكار ڕووناك تاریك diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 36482c0d0..af2ff5a7a 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -43,8 +43,6 @@ Garso įrašas Numatytasos garso formatas Numatytasos vaizdo formatas - WebM — laisvas formatas - M4A - geresnė kokybė Tema Šviesi Tamsi diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index 1ae02a0f2..67de9b563 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -59,8 +59,6 @@ Звук Стандарден аудио формат Стандарден видео формат - WebM — слободен формат - М4А — подобар квалитет Тема Светла Темна diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 0f8d9b55a..28d0480d2 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -32,8 +32,6 @@ Vis valg for avspilling via Kodi mediasenter Lyd Forvalgt lydformat - WebM — fritt format - M4A — bedre kvalitet Drakt Mørk Lys diff --git a/app/src/main/res/values-nl-rBE/strings.xml b/app/src/main/res/values-nl-rBE/strings.xml index 3c15cf226..4c0ee5de3 100644 --- a/app/src/main/res/values-nl-rBE/strings.xml +++ b/app/src/main/res/values-nl-rBE/strings.xml @@ -59,8 +59,6 @@ Audio Standaardaudioformaat Standaardvideoformaat - WebM — vrij formaat - M4A — betere kwaliteit Thema Licht Donker diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 358e76fde..aed2683ce 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -24,8 +24,6 @@ Toont een optie om een video op een Kodi media center af te spelen Audio Standaardaudioformaat - WebM — vrij formaat - M4A — betere kwaliteit Downloaden Volgende video URL wordt niet ondersteund diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 0889fa9e3..0b09d5d3e 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -35,8 +35,6 @@ Wyświetl opcję, aby odtworzyć wideo przez Kodi Audio Domyślny format audio - WebM — otwarty i darmowy format - M4A — lepsza jakość Motyw Ciemny Jasny diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 3ec466bba..b58ab0b51 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -5,7 +5,6 @@ Seu comentário (em inglês): O que aconteceu: Informações: - WebM — formato aberto %1$s visualizações Reproduzir Vídeo com restrição de idade. Permissão para vídeos com essa restrição podem ser feitas no menu configurações. @@ -78,7 +77,6 @@ Downloads Downloads Você quis dizer: %1$s ? - M4A — melhor qualidade Nova missão App/interface parou Reproduzindo em segundo plano diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index dec2c6f77..d8ca1a265 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -26,8 +26,6 @@ Mostra uma opção para reproduzir o vídeo no Kodi Áudio Formato áudio padrão - WebM — formato livre - M4A — melhor qualidade Descarregar Vídeo seguinte Mostrar vídeos \'seguintes\' e \'semelhantes\' diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 022d0482e..a45b48199 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -33,8 +33,6 @@ Audio Format audio implicit Directorul de descărcare \'%1$s\' a fost creat - WebM — format liber - M4A — calitate superioară Temă Întunecat Luminos diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 4fc30e90e..3cacc83e8 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -24,8 +24,6 @@ Показать опцию воспроизведения видео через медиацентр Kodi Аудио Формат аудио по умолчанию - WebM — свободный - M4A — выше качество Скачать Следующее видео URL не поддерживается @@ -436,7 +434,7 @@ \n4. Скопируйте адрес из адресной строки. вашID, soundcloud.com/вашID - Это действие может вызвать большой расход трафика. + Это действие может вызвать большой расход трафика. \n \nПродолжить? Загружать миниатюры @@ -475,10 +473,10 @@ Хотите импортировать настройки? Политика конфиденциальности NewPipe - Проект NewPipe очень серьёзно относится к вашей конфиденциальности. Поэтому приложение не собирает никаких данных без вашего согласия. + Проект NewPipe очень серьёзно относится к вашей конфиденциальности. Поэтому приложение не собирает никаких данных без вашего согласия. \nПолитика конфиденциальности NewPipe подробно объясняет, какие данные отправляются и хранятся при отправке отчёта о сбоях. Прочитать политику - В соответствии с Общим регламентом по защите данных ЕС (GDPR), обращаем ваше внимание на политику конфиденциальности NewPipe. Пожалуйста, внимательно ознакомьтесь с ней. + В соответствии с Общим регламентом по защите данных ЕС (GDPR), обращаем ваше внимание на политику конфиденциальности NewPipe. Пожалуйста, внимательно ознакомьтесь с ней. \nВам необходимо принять её условия, чтобы отправить нам отчёт об ошибке. Принять Отклонить diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 6204e5fba..26a94f2b5 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -32,8 +32,6 @@ Zobrazovať možnosť prehrať video cez mediálne centrum Kodi Zvuk Predvolený zvukový formát - WebM — voľný formát - M4A — lepšia kvalita Téma Tmavá Svetlá diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index 16a4ab8e7..d2d6d4343 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -25,8 +25,6 @@ Pokaži možnost \"Predvajaj s Kodi\" Privzet zapis zvoka Zvok - WebM — prost zapis - M4A — višja kakovost posnetkov Prejem Naslednji video Pokaži naslednji video in podobne posnetke diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 54cb4db2a..60f99e254 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -24,8 +24,6 @@ Приказ опције за пуштање видеа у Коди медија центру Аудио Подразумевани формат звука - WebM — слободни формат - M4A — бољи квалитет Преузми Следећи видео УРЛ није подржан diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 675514f17..1508b33b2 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -41,8 +41,6 @@ Ljud Standardformat för ljud Videoformat som föredras - WebM — öppet format - M4A — bättre kvalité Tema Ljus Mörk diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 15fbc4130..a13aeff81 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -34,8 +34,6 @@ \"Kodi ile oynat\" seçeneğini göster Kodi ortam merkezi aracılığıyla video oynatmak için bir seçenek görüntüler Öntanımlı ses biçimi - WebM — özgür biçim - M4A — daha iyi kalite Tema Koyu Açık diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 313448323..78eb45590 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -34,8 +34,6 @@ Показувати опцію відтворення відео за допомогою Kodi media center Аудіо Типовий аудіо формат - WebM — вільний формат - M4A — ліпша якість Тема Темна Світла diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 1c3fe27a6..a55f01085 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -41,8 +41,6 @@ Âm thanh Định dạng âm thanh mặc định Định dạng video ưa thích - WebM — Định dạng miễn phí - M4a — chất lượng tốt hơn Nền Chủ đề Sáng diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 5118b42d6..1207975f5 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -26,8 +26,6 @@ 显示 Kodi 媒体中心播放视频的选项 音频 默认音频格式 - WebM — 开放格式 - M4A — 品质更佳 主题 灰暗 明亮 diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index e21f8f1ea..7cb4ca5cb 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -22,8 +22,6 @@ 顯示以 Kodi 媒體中心播放影片的選項 聲音 預設聲音檔案格式 - WebM — 開放格式 - M4A — 更佳畫質 主題 黑暗 明亮 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 2e6610381..302eb83a1 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -26,8 +26,6 @@ 找不到Kore,您要安裝Kore嗎? 顯示「用Kodi播放」的選項 預設音訊格式 - WebM — 開放格式 - M4A — 畫質更佳 主題 灰暗 明亮 diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 3e73738ed..02f065285 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -93,8 +93,8 @@ audio_m4a audio_webm - @string/m4a_description - @string/webm_description + M4A + WebM @string/audio_m4a_key diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 502483667..240fef3dc 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -64,8 +64,6 @@ Audio Default audio format Default video format - WebM — libre format - M4A — better quality Theme Light Dark