From 52f82ed2280918ec5c4c3d5c09a9f6fc6d5e6bec Mon Sep 17 00:00:00 2001 From: k1rakishou Date: Fri, 4 Oct 2019 21:47:01 +0300 Subject: [PATCH 0001/1194] Show video thumbnail on the lock screen --- .../newpipe/player/BackgroundPlayer.java | 60 ++++++++++++++----- .../player/helper/MediaSessionManager.java | 43 +++++++++++-- .../org/schabi/newpipe/util/BitmapUtils.java | 42 +++++++++++++ 3 files changed, 124 insertions(+), 21 deletions(-) create mode 100644 app/src/main/java/org/schabi/newpipe/util/BitmapUtils.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 ab07ded22..4bcd719c2 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -25,6 +25,7 @@ import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import android.content.res.Resources; import android.graphics.Bitmap; import android.os.Build; import android.os.IBinder; @@ -48,6 +49,7 @@ import org.schabi.newpipe.player.helper.LockManager; import org.schabi.newpipe.player.playqueue.PlayQueueItem; import org.schabi.newpipe.player.resolver.AudioPlaybackResolver; import org.schabi.newpipe.player.resolver.MediaSourceTag; +import org.schabi.newpipe.util.BitmapUtils; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.ThemeHelper; @@ -189,18 +191,37 @@ public final class BackgroundPlayer extends Service { setupNotification(notRemoteView); setupNotification(bigNotRemoteView); - 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) - .setCustomContentView(notRemoteView) - .setCustomBigContentView(bigNotRemoteView); + NotificationCompat.Builder builder = new NotificationCompat.Builder(this, getString(R.string.notification_channel_id)); + builder.setOngoing(true); + builder.setSmallIcon(R.drawable.ic_newpipe_triangle_white); + builder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC); + builder.setCustomContentView(notRemoteView); + builder.setCustomBigContentView(bigNotRemoteView); + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + basePlayerImpl.mediaSessionManager.setLockScreenArt( + builder, + getCenteredThumbnailBitmap() + ); + } + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) { builder.setPriority(NotificationCompat.PRIORITY_MAX); } return builder; } + @Nullable + private Bitmap getCenteredThumbnailBitmap() { + int screenWidth = Resources.getSystem().getDisplayMetrics().widthPixels; + int screenHeight = Resources.getSystem().getDisplayMetrics().heightPixels; + + return BitmapUtils.centerCrop( + basePlayerImpl.getThumbnail(), + screenWidth, + screenHeight); + } + private void setupNotification(RemoteViews remoteViews) { if (basePlayerImpl == null) return; @@ -248,8 +269,10 @@ public final class BackgroundPlayer extends Service { //if (DEBUG) Log.d(TAG, "updateNotification() called with: drawableId = [" + drawableId + "]"); if (notBuilder == null) return; if (drawableId != -1) { - if (notRemoteView != null) notRemoteView.setImageViewResource(R.id.notificationPlayPause, drawableId); - if (bigNotRemoteView != null) bigNotRemoteView.setImageViewResource(R.id.notificationPlayPause, drawableId); + if (notRemoteView != null) + notRemoteView.setImageViewResource(R.id.notificationPlayPause, drawableId); + if (bigNotRemoteView != null) + bigNotRemoteView.setImageViewResource(R.id.notificationPlayPause, drawableId); } notificationManager.notify(NOTIFICATION_ID, notBuilder.build()); } @@ -275,7 +298,8 @@ public final class BackgroundPlayer extends Service { protected class BasePlayerImpl extends BasePlayer { - @NonNull final private AudioPlaybackResolver resolver; + @NonNull + final private AudioPlaybackResolver resolver; private int cachedDuration; private String cachedDurationString; @@ -294,8 +318,10 @@ public final class BackgroundPlayer extends Service { super.handleIntent(intent); resetNotification(); - if (bigNotRemoteView != null) bigNotRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 0, false); - if (notRemoteView != null) notRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 0, false); + if (bigNotRemoteView != null) + bigNotRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 0, false); + if (notRemoteView != null) + notRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 0, false); startForeground(NOTIFICATION_ID, notBuilder.build()); } @@ -330,6 +356,7 @@ public final class BackgroundPlayer extends Service { updateNotificationThumbnail(); updateNotification(-1); } + /*////////////////////////////////////////////////////////////////////////// // States Implementation //////////////////////////////////////////////////////////////////////////*/ @@ -352,9 +379,10 @@ public final class BackgroundPlayer extends Service { if (!shouldUpdateOnProgress) return; resetNotification(); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O /*Oreo*/) updateNotificationThumbnail(); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O /*Oreo*/) + updateNotificationThumbnail(); if (bigNotRemoteView != null) { - if(cachedDuration != duration) { + if (cachedDuration != duration) { cachedDuration = duration; cachedDurationString = getTimeString(duration); } @@ -382,8 +410,10 @@ public final class BackgroundPlayer extends Service { @Override public void destroy() { super.destroy(); - if (notRemoteView != null) notRemoteView.setImageViewBitmap(R.id.notificationCover, null); - if (bigNotRemoteView != null) bigNotRemoteView.setImageViewBitmap(R.id.notificationCover, null); + if (notRemoteView != null) + notRemoteView.setImageViewBitmap(R.id.notificationCover, null); + if (bigNotRemoteView != null) + bigNotRemoteView.setImageViewBitmap(R.id.notificationCover, null); } /*////////////////////////////////////////////////////////////////////////// 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 a5c703837..ec53e72fe 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 @@ -2,12 +2,18 @@ package org.schabi.newpipe.player.helper; import android.content.Context; import android.content.Intent; +import android.graphics.Bitmap; +import android.media.MediaMetadata; +import android.os.Build; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import android.support.annotation.RequiresApi; +import android.support.v4.app.NotificationCompat; +import android.support.v4.media.MediaMetadataCompat; +import android.support.v4.media.session.MediaButtonReceiver; import android.support.v4.media.session.MediaSessionCompat; import android.view.KeyEvent; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.media.session.MediaButtonReceiver; +import android.support.v4.media.app.NotificationCompat.MediaStyle; import com.google.android.exoplayer2.Player; import com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector; @@ -40,13 +46,38 @@ public class MediaSessionManager { return MediaButtonReceiver.handleIntent(mediaSession, intent); } + @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) + public void setLockScreenArt( + NotificationCompat.Builder builder, + @Nullable Bitmap thumbnailBitmap + ) { + if (thumbnailBitmap == null) { + return; + } + + if (!mediaSession.isActive()) { + return; + } + + mediaSession.setMetadata( + new MediaMetadataCompat.Builder() + .putBitmap(MediaMetadata.METADATA_KEY_ALBUM_ART, thumbnailBitmap) + .build() + ); + + MediaStyle mediaStyle = new MediaStyle() + .setMediaSession(mediaSession.getSessionToken()); + + builder.setStyle(mediaStyle); + } + /** * Should be called on player destruction to prevent leakage. - * */ + */ public void dispose() { this.sessionConnector.setPlayer(null); this.sessionConnector.setQueueNavigator(null); this.mediaSession.setActive(false); this.mediaSession.release(); - } + } } diff --git a/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java b/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java new file mode 100644 index 000000000..2dac94912 --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java @@ -0,0 +1,42 @@ +package org.schabi.newpipe.util; + +import android.graphics.Bitmap; +import android.support.annotation.Nullable; + +public class BitmapUtils { + + @Nullable + public static Bitmap centerCrop(Bitmap inputBitmap, int newWidth, int newHeight) { + if (inputBitmap == null || inputBitmap.isRecycled()) { + return null; + } + + float sourceWidth = inputBitmap.getWidth(); + float sourceHeight = inputBitmap.getHeight(); + + float xScale = newWidth / sourceWidth; + float yScale = newHeight / sourceHeight; + + float newXScale; + float newYScale; + + if (yScale > xScale) { + newXScale = (1.0f / yScale) * xScale; + newYScale = 1.0f; + } else { + newXScale = 1.0f; + newYScale = (1.0f / xScale) * yScale; + } + + float scaledWidth = newXScale * sourceWidth; + float scaledHeight = newYScale * sourceHeight; + + int left = (int) ((sourceWidth - scaledWidth) / 2); + int top = (int) ((sourceHeight - scaledHeight) / 2); + int width = (int) scaledWidth; + int height = (int) scaledHeight; + + return Bitmap.createBitmap(inputBitmap, left, top, width, height); + } + +} From cf13f5ca56950944f5ab44e8c00c8c7566e55ed2 Mon Sep 17 00:00:00 2001 From: k1rakishou Date: Fri, 8 Nov 2019 20:47:42 +0300 Subject: [PATCH 0002/1194] Rebase onto the latest dev, update appcompat dependencies to use androidx --- .../player/helper/MediaSessionManager.java | 21 +++++++++++-------- .../org/schabi/newpipe/util/BitmapUtils.java | 3 ++- 2 files changed, 14 insertions(+), 10 deletions(-) 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 ec53e72fe..b75ddb706 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 @@ -5,15 +5,16 @@ import android.content.Intent; import android.graphics.Bitmap; import android.media.MediaMetadata; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.RequiresApi; -import android.support.v4.app.NotificationCompat; import android.support.v4.media.MediaMetadataCompat; -import android.support.v4.media.session.MediaButtonReceiver; import android.support.v4.media.session.MediaSessionCompat; import android.view.KeyEvent; -import android.support.v4.media.app.NotificationCompat.MediaStyle; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; +import androidx.core.app.NotificationCompat; +import androidx.media.session.MediaButtonReceiver; +import androidx.media.app.NotificationCompat.MediaStyle; import com.google.android.exoplayer2.Player; import com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector; @@ -25,8 +26,10 @@ import org.schabi.newpipe.player.mediasession.PlayQueuePlaybackController; public class MediaSessionManager { private static final String TAG = "MediaSessionManager"; - @NonNull private final MediaSessionCompat mediaSession; - @NonNull private final MediaSessionConnector sessionConnector; + @NonNull + private final MediaSessionCompat mediaSession; + @NonNull + private final MediaSessionConnector sessionConnector; public MediaSessionManager(@NonNull final Context context, @NonNull final Player player, @@ -72,7 +75,7 @@ public class MediaSessionManager { } /** - * Should be called on player destruction to prevent leakage. + * Should be called on player destruction to prevent leakage.BitmapUtils */ public void dispose() { this.sessionConnector.setPlayer(null); diff --git a/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java b/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java index 2dac94912..a0e7de4ac 100644 --- a/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java +++ b/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java @@ -1,7 +1,8 @@ package org.schabi.newpipe.util; import android.graphics.Bitmap; -import android.support.annotation.Nullable; + +import androidx.annotation.Nullable; public class BitmapUtils { From e8437052d8565ab7c524c96186a69528a30f5a1c Mon Sep 17 00:00:00 2001 From: k1rakishou Date: Thu, 28 Nov 2019 21:46:37 +0300 Subject: [PATCH 0003/1194] Add a setting for the lock screen thumbnail feature --- .../newpipe/player/BackgroundPlayer.java | 28 ++++++++++++++++--- .../player/helper/MediaSessionManager.java | 14 ++++++++++ app/src/main/res/values/settings_keys.xml | 1 + app/src/main/res/values/strings.xml | 2 ++ app/src/main/res/xml/video_audio_settings.xml | 7 +++++ 5 files changed, 48 insertions(+), 4 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 4bcd719c2..521daf184 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -25,13 +25,17 @@ import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import android.content.SharedPreferences; import android.content.res.Resources; import android.graphics.Bitmap; import android.os.Build; import android.os.IBinder; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; import androidx.core.app.NotificationCompat; + +import android.preference.PreferenceManager; import android.util.Log; import android.view.View; import android.widget.RemoteViews; @@ -77,6 +81,7 @@ public final class BackgroundPlayer extends Service { private BasePlayerImpl basePlayerImpl; private LockManager lockManager; + private SharedPreferences sharedPreferences; /*////////////////////////////////////////////////////////////////////////// // Service-Activity Binder @@ -106,6 +111,7 @@ public final class BackgroundPlayer extends Service { if (DEBUG) Log.d(TAG, "onCreate() called"); notificationManager = ((NotificationManager) getSystemService(NOTIFICATION_SERVICE)); lockManager = new LockManager(this); + sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); ThemeHelper.setTheme(this); basePlayerImpl = new BasePlayerImpl(this); @@ -199,10 +205,7 @@ public final class BackgroundPlayer extends Service { builder.setCustomBigContentView(bigNotRemoteView); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - basePlayerImpl.mediaSessionManager.setLockScreenArt( - builder, - getCenteredThumbnailBitmap() - ); + setLockScreenThumbnail(builder); } if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) { @@ -211,6 +214,23 @@ public final class BackgroundPlayer extends Service { return builder; } + @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) + private void setLockScreenThumbnail(NotificationCompat.Builder builder) { + boolean isLockScreenThumbnailEnabled = sharedPreferences.getBoolean( + getString(R.string.enable_lock_screen_video_thumbnail_key), + true + ); + + if (isLockScreenThumbnailEnabled) { + basePlayerImpl.mediaSessionManager.setLockScreenArt( + builder, + getCenteredThumbnailBitmap() + ); + } else { + basePlayerImpl.mediaSessionManager.clearLockScreenArt(builder); + } + } + @Nullable private Bitmap getCenteredThumbnailBitmap() { int screenWidth = Resources.getSystem().getDisplayMetrics().widthPixels; 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 b75ddb706..64022e39c 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 @@ -74,6 +74,20 @@ public class MediaSessionManager { builder.setStyle(mediaStyle); } + @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) + public void clearLockScreenArt(NotificationCompat.Builder builder) { + mediaSession.setMetadata( + new MediaMetadataCompat.Builder() + .putBitmap(MediaMetadata.METADATA_KEY_ALBUM_ART, null) + .build() + ); + + MediaStyle mediaStyle = new MediaStyle() + .setMediaSession(mediaSession.getSessionToken()); + + builder.setStyle(mediaStyle); + } + /** * Should be called on player destruction to prevent leakage.BitmapUtils */ diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 80f2bb1f4..109010b4e 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -152,6 +152,7 @@ main_page_content enable_playback_resume enable_playback_state_lists + enable_lock_screen_video_thumbnail import_data export_data diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a34b00ea9..16cf110a2 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -58,7 +58,9 @@ Kore app not found. Install it? org.xbmc.kore Show \"Play with Kodi\" option + Enable lock screen video thumbnail Display an option to play a video via Kodi media center + When using the background player a video thumbnail will be displayed on the lock screen Audio Default audio format Default video format diff --git a/app/src/main/res/xml/video_audio_settings.xml b/app/src/main/res/xml/video_audio_settings.xml index 4e1b1f8b2..a814fe0a9 100644 --- a/app/src/main/res/xml/video_audio_settings.xml +++ b/app/src/main/res/xml/video_audio_settings.xml @@ -81,6 +81,13 @@ android:summary="@string/show_play_with_kodi_summary" android:title="@string/show_play_with_kodi_title"/> + + Date: Fri, 20 Sep 2019 16:02:16 +0700 Subject: [PATCH 0004/1194] Fix scrolling comments list AppBarLayout mostly gets it, but we still need to uphold our own part - expanding it back after focus returns to it --- .../material/appbar/FlingBehavior.java | 39 ++++++++++++++ .../fragments/list/BaseListFragment.java | 3 +- .../views/SuperScrollLayoutManager.java | 53 +++++++++++++++++++ 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 app/src/main/java/org/schabi/newpipe/views/SuperScrollLayoutManager.java diff --git a/app/src/main/java/com/google/android/material/appbar/FlingBehavior.java b/app/src/main/java/com/google/android/material/appbar/FlingBehavior.java index 4a2662f53..ea2857b03 100644 --- a/app/src/main/java/com/google/android/material/appbar/FlingBehavior.java +++ b/app/src/main/java/com/google/android/material/appbar/FlingBehavior.java @@ -1,10 +1,13 @@ package com.google.android.material.appbar; +import android.annotation.SuppressLint; import android.content.Context; +import android.graphics.Rect; import android.util.AttributeSet; import android.view.MotionEvent; import android.widget.OverScroller; +import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.coordinatorlayout.widget.CoordinatorLayout; @@ -13,10 +16,46 @@ import java.lang.reflect.Field; // check this https://stackoverflow.com/questions/56849221/recyclerview-fling-causes-laggy-while-appbarlayout-is-scrolling/57997489#57997489 public final class FlingBehavior extends AppBarLayout.Behavior { + private final Rect focusScrollRect = new Rect(); + public FlingBehavior(Context context, AttributeSet attrs) { super(context, attrs); } + @Override + public boolean onRequestChildRectangleOnScreen(@NonNull CoordinatorLayout coordinatorLayout, @NonNull AppBarLayout child, @NonNull Rect rectangle, boolean immediate) { + focusScrollRect.set(rectangle); + + coordinatorLayout.offsetDescendantRectToMyCoords(child, focusScrollRect); + + int height = coordinatorLayout.getHeight(); + + if (focusScrollRect.top <= 0 && focusScrollRect.bottom >= height) { + // the child is too big to fit inside ourselves completely, ignore request + return false; + } + + int offset = getTopAndBottomOffset(); + + int dy; + + if (focusScrollRect.bottom > height) { + dy = focusScrollRect.top; + } else if (focusScrollRect.top < 0) { + // scrolling up + dy = -(height - focusScrollRect.bottom); + } else { + // nothing to do + return false; + } + + //int newOffset = offset + dy; + + int consumed = scroll(coordinatorLayout, child, dy, getMaxDragOffset(child), 0); + + return consumed == dy; + } + @Override public boolean onInterceptTouchEvent(CoordinatorLayout parent, AppBarLayout child, MotionEvent ev) { switch (ev.getActionMasked()) { 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 d6fd1dd00..a3844a92f 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 @@ -34,6 +34,7 @@ import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.OnClickGesture; import org.schabi.newpipe.util.StateSaver; import org.schabi.newpipe.util.StreamDialogEntry; +import org.schabi.newpipe.views.SuperScrollLayoutManager; import java.util.List; import java.util.Queue; @@ -147,7 +148,7 @@ public abstract class BaseListFragment extends BaseStateFragment implem } protected RecyclerView.LayoutManager getListLayoutManager() { - return new LinearLayoutManager(activity); + return new SuperScrollLayoutManager(activity); } protected RecyclerView.LayoutManager getGridLayoutManager() { diff --git a/app/src/main/java/org/schabi/newpipe/views/SuperScrollLayoutManager.java b/app/src/main/java/org/schabi/newpipe/views/SuperScrollLayoutManager.java new file mode 100644 index 000000000..33fe7b9cc --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/views/SuperScrollLayoutManager.java @@ -0,0 +1,53 @@ +/* + * Copyright (C) Eltex ltd 2019 + * SuperScrollLayoutManager.java is part of NewPipe. + * + * NewPipe is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * NewPipe is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with NewPipe. If not, see . + */ +package org.schabi.newpipe.views; + +import android.content.Context; +import android.graphics.Rect; +import android.view.FocusFinder; +import android.view.View; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +public final class SuperScrollLayoutManager extends LinearLayoutManager { + private final Rect handy = new Rect(); + + public SuperScrollLayoutManager(Context context) { + super(context); + } + + @Override + public boolean requestChildRectangleOnScreen(@NonNull RecyclerView parent, @NonNull View child, @NonNull Rect rect, boolean immediate, boolean focusedChildVisible) { + if (!parent.isInTouchMode()) { + // only activate when in directional navigation mode (Android TV etc) — fine grained + // touch scrolling is better served by nested scroll system + + if (!focusedChildVisible || getFocusedChild() == child) { + handy.set(rect); + + parent.offsetDescendantRectToMyCoords(child, handy); + + parent.requestRectangleOnScreen(handy, immediate); + } + } + + return super.requestChildRectangleOnScreen(parent, child, rect, immediate, focusedChildVisible); + } +} From 4806ac62ee62719998aa1361df8f3ce7156e9c06 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 20 Sep 2019 16:04:13 +0700 Subject: [PATCH 0005/1194] Correctly move focus from toolbar search bar to dropdown We don't hide MainFragment when search is show, so FocusFinder sometimes gives focus to (obscured) main content --- app/src/main/res/layout/toolbar_search_layout.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/res/layout/toolbar_search_layout.xml b/app/src/main/res/layout/toolbar_search_layout.xml index fdc7e6d6b..bd5b2d5c7 100644 --- a/app/src/main/res/layout/toolbar_search_layout.xml +++ b/app/src/main/res/layout/toolbar_search_layout.xml @@ -19,6 +19,7 @@ android:drawablePadding="8dp" android:focusable="true" android:focusableInTouchMode="true" + android:nextFocusDown="@+id/suggestions_list" android:hint="@string/search" android:imeOptions="actionSearch|flagNoFullscreen" android:inputType="textFilter|textNoSuggestions" From 8952e2b0cdf362a9afb813f2c4ed20f998d474f5 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 20 Sep 2019 16:07:27 +0700 Subject: [PATCH 0006/1194] Close DrawerLayout on back button press --- .../main/java/org/schabi/newpipe/MainActivity.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index c24d77d03..3c18c25f6 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -20,6 +20,7 @@ package org.schabi.newpipe; +import android.annotation.SuppressLint; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageManager; @@ -29,6 +30,8 @@ import android.os.Handler; import android.os.Looper; import android.preference.PreferenceManager; import android.util.Log; +import android.view.Gravity; +import android.view.KeyEvent; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; @@ -59,6 +62,7 @@ import org.schabi.newpipe.fragments.detail.VideoDetailFragment; import org.schabi.newpipe.fragments.list.search.SearchFragment; import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.util.Constants; +import org.schabi.newpipe.util.FireTvUtils; import org.schabi.newpipe.util.KioskTranslator; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.PermissionHelper; @@ -408,13 +412,20 @@ public class MainActivity extends AppCompatActivity { public void onBackPressed() { if (DEBUG) Log.d(TAG, "onBackPressed() called"); + if (FireTvUtils.isFireTv()) { + View drawerPanel = findViewById(R.id.navigation_layout); + if (drawer.isDrawerOpen(drawerPanel)) { + drawer.closeDrawers(); + return; + } + } + Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragment_holder); // If current fragment implements BackPressable (i.e. can/wanna handle back press) delegate the back press to it if (fragment instanceof BackPressable) { if (((BackPressable) fragment).onBackPressed()) return; } - if (getSupportFragmentManager().getBackStackEntryCount() == 1) { finish(); } else super.onBackPressed(); From 2b39438eba2f4a78c288fd8a5121ce0672c544d0 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 20 Sep 2019 16:10:57 +0700 Subject: [PATCH 0007/1194] Fix scrolling in main screen grid GridLayoutManager is buggy - https://issuetracker.google.com/issues/37067220: it randomly loses or incorrectly assigns focus when being scrolled via direction-based navigation. This commit reimplements onFocusSearchFailed() on top of scrollBy() to work around that problem. Ordinary touch-based navigation should not be affected. --- .../fragments/list/BaseListFragment.java | 3 +- .../newpipe/local/BaseLocalListFragment.java | 3 +- .../subscription/SubscriptionFragment.java | 3 +- .../newpipe/views/FixedGridLayoutManager.java | 59 +++++++++++++++ .../newpipe/views/NewPipeRecyclerView.java | 72 +++++++++++++++++++ .../giga/ui/fragment/MissionsFragment.java | 3 +- app/src/main/res/layout/fragment_kiosk.xml | 2 +- 7 files changed, 140 insertions(+), 5 deletions(-) create mode 100644 app/src/main/java/org/schabi/newpipe/views/FixedGridLayoutManager.java create mode 100644 app/src/main/java/org/schabi/newpipe/views/NewPipeRecyclerView.java 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 a3844a92f..88684f2e7 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 @@ -35,6 +35,7 @@ import org.schabi.newpipe.util.OnClickGesture; import org.schabi.newpipe.util.StateSaver; import org.schabi.newpipe.util.StreamDialogEntry; import org.schabi.newpipe.views.SuperScrollLayoutManager; +import org.schabi.newpipe.views.FixedGridLayoutManager; import java.util.List; import java.util.Queue; @@ -156,7 +157,7 @@ public abstract class BaseListFragment extends BaseStateFragment implem int width = resources.getDimensionPixelSize(R.dimen.video_item_grid_thumbnail_image_width); width += (24 * resources.getDisplayMetrics().density); final int spanCount = (int) Math.floor(resources.getDisplayMetrics().widthPixels / (double)width); - final GridLayoutManager lm = new GridLayoutManager(activity, spanCount); + final GridLayoutManager lm = new FixedGridLayoutManager(activity, spanCount); lm.setSpanSizeLookup(infoListAdapter.getSpanSizeLookup(spanCount)); return lm; } diff --git a/app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java b/app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java index 414a9b6b5..c1293e240 100644 --- a/app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java @@ -18,6 +18,7 @@ import android.view.View; import org.schabi.newpipe.R; import org.schabi.newpipe.fragments.BaseStateFragment; import org.schabi.newpipe.fragments.list.ListViewContract; +import org.schabi.newpipe.views.FixedGridLayoutManager; import static org.schabi.newpipe.util.AnimationUtils.animateView; @@ -95,7 +96,7 @@ public abstract class BaseLocalListFragment extends BaseStateFragment int width = resources.getDimensionPixelSize(R.dimen.video_item_grid_thumbnail_image_width); width += (24 * resources.getDisplayMetrics().density); final int spanCount = (int) Math.floor(resources.getDisplayMetrics().widthPixels / (double)width); - final GridLayoutManager lm = new GridLayoutManager(activity, spanCount); + final GridLayoutManager lm = new FixedGridLayoutManager(activity, spanCount); lm.setSpanSizeLookup(itemListAdapter.getSpanSizeLookup(spanCount)); return lm; } 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 bff6c1b3a..ea820b71e 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 @@ -57,6 +57,7 @@ import org.schabi.newpipe.util.ServiceHelper; import org.schabi.newpipe.util.ShareUtils; import org.schabi.newpipe.util.ThemeHelper; import org.schabi.newpipe.views.CollapsibleView; +import org.schabi.newpipe.views.FixedGridLayoutManager; import java.io.File; import java.text.SimpleDateFormat; @@ -192,7 +193,7 @@ public class SubscriptionFragment extends BaseStateFragment + * FixedGridLayoutManager.java is part of NewPipe. + * + * NewPipe is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * NewPipe is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with NewPipe. If not, see . + */ +package org.schabi.newpipe.views; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.FocusFinder; +import android.view.View; +import android.view.ViewGroup; + +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +// Version of GridLayoutManager that works around https://issuetracker.google.com/issues/37067220 +public class FixedGridLayoutManager extends GridLayoutManager { + public FixedGridLayoutManager(Context context, int spanCount) { + super(context, spanCount); + } + + public FixedGridLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { + super(context, attrs, defStyleAttr, defStyleRes); + } + + public FixedGridLayoutManager(Context context, int spanCount, int orientation, boolean reverseLayout) { + super(context, spanCount, orientation, reverseLayout); + } + + @Override + public View onFocusSearchFailed(View focused, int focusDirection, RecyclerView.Recycler recycler, RecyclerView.State state) { + FocusFinder ff = FocusFinder.getInstance(); + + View result = ff.findNextFocus((ViewGroup) focused.getParent(), focused, focusDirection); + if (result != null) { + return super.onFocusSearchFailed(focused, focusDirection, recycler, state); + } + + if (focusDirection == View.FOCUS_DOWN) { + scrollVerticallyBy(10, recycler, state); + return null; + } + + return super.onFocusSearchFailed(focused, focusDirection, recycler, state); + } +} diff --git a/app/src/main/java/org/schabi/newpipe/views/NewPipeRecyclerView.java b/app/src/main/java/org/schabi/newpipe/views/NewPipeRecyclerView.java new file mode 100644 index 000000000..76dee200f --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/views/NewPipeRecyclerView.java @@ -0,0 +1,72 @@ +/* + * Copyright (C) Eltex ltd 2019 + * NewPipeRecyclerView.java is part of NewPipe. + * + * NewPipe is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * NewPipe is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with NewPipe. If not, see . + */ +package org.schabi.newpipe.views; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.View; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; + +public class NewPipeRecyclerView extends RecyclerView { + private static final String TAG = "FixedRecyclerView"; + + public NewPipeRecyclerView(@NonNull Context context) { + super(context); + } + + public NewPipeRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs) { + super(context, attrs); + } + + public NewPipeRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + } + + @Override + public View focusSearch(int direction) { + return null; + } + + @Override + public View focusSearch(View focused, int direction) { + return null; + } + + @Override + public boolean dispatchUnhandledMove(View focused, int direction) { + View found = super.focusSearch(focused, direction); + if (found != null) { + found.requestFocus(direction); + return true; + } + + if (direction == View.FOCUS_UP) { + if (canScrollVertically(-1)) { + scrollBy(0, -10); + return true; + } + + return false; + } + + return super.dispatchUnhandledMove(focused, direction); + } +} diff --git a/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java b/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java index 26da47b1f..3792f030a 100644 --- a/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java +++ b/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java @@ -30,6 +30,7 @@ import org.schabi.newpipe.R; import org.schabi.newpipe.settings.NewPipeSettings; import org.schabi.newpipe.util.FilePickerActivityHelper; import org.schabi.newpipe.util.ThemeHelper; +import org.schabi.newpipe.views.FixedGridLayoutManager; import java.io.File; import java.io.IOException; @@ -108,7 +109,7 @@ public class MissionsFragment extends Fragment { mList = v.findViewById(R.id.mission_recycler); // Init layouts managers - mGridManager = new GridLayoutManager(getActivity(), SPAN_SIZE); + mGridManager = new FixedGridLayoutManager(getActivity(), SPAN_SIZE); mGridManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() { @Override public int getSpanSize(int position) { diff --git a/app/src/main/res/layout/fragment_kiosk.xml b/app/src/main/res/layout/fragment_kiosk.xml index 01eeb0855..643d7d4f0 100644 --- a/app/src/main/res/layout/fragment_kiosk.xml +++ b/app/src/main/res/layout/fragment_kiosk.xml @@ -5,7 +5,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - Date: Fri, 20 Sep 2019 16:13:13 +0700 Subject: [PATCH 0008/1194] MainPlayer: make title and subtitle non-focusable Focus isn't needed for marquee, only selection --- app/src/main/res/layout-large-land/activity_main_player.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/main/res/layout-large-land/activity_main_player.xml b/app/src/main/res/layout-large-land/activity_main_player.xml index b535db2b8..902e81f1f 100644 --- a/app/src/main/res/layout-large-land/activity_main_player.xml +++ b/app/src/main/res/layout-large-land/activity_main_player.xml @@ -178,7 +178,6 @@ android:textSize="15sp" android:textStyle="bold" android:clickable="true" - android:focusable="true" tools:ignore="RtlHardcoded" tools:text="The Video Title LONG very LONG"/> @@ -194,7 +193,6 @@ android:textColor="@android:color/white" android:textSize="12sp" android:clickable="true" - android:focusable="true" tools:text="The Video Artist LONG very LONG very Long"/> From 1bb96ef4058994fe2eabaa93cc5fdcf819acfa44 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 20 Sep 2019 16:16:21 +0700 Subject: [PATCH 0009/1194] When child of CoordinatorLayout wants focus, show it! The same logic is present in RecyclerView, ScrollView etc. Android really should default to this behavior for all Views with isScrollContainer = true --- .../newpipe/views/FocusAwareCoordinator.java | 63 +++++++++++++++++++ .../fragment_video_detail.xml | 4 +- 2 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 app/src/main/java/org/schabi/newpipe/views/FocusAwareCoordinator.java diff --git a/app/src/main/java/org/schabi/newpipe/views/FocusAwareCoordinator.java b/app/src/main/java/org/schabi/newpipe/views/FocusAwareCoordinator.java new file mode 100644 index 000000000..778e50e52 --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/views/FocusAwareCoordinator.java @@ -0,0 +1,63 @@ +/* + * Copyright (C) Eltex ltd 2019 + * FocusAwareCoordinator.java is part of NewPipe. + * + * NewPipe is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * NewPipe is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with NewPipe. If not, see . + */ +package org.schabi.newpipe.views; + +import android.content.Context; +import android.graphics.Rect; +import android.util.AttributeSet; +import android.view.View; +import android.view.ViewGroup; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.coordinatorlayout.widget.CoordinatorLayout; + +public final class FocusAwareCoordinator extends CoordinatorLayout { + private final Rect childFocus = new Rect(); + + public FocusAwareCoordinator(@NonNull Context context) { + super(context); + } + + public FocusAwareCoordinator(@NonNull Context context, @Nullable AttributeSet attrs) { + super(context, attrs); + } + + public FocusAwareCoordinator(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + } + + @Override + public void requestChildFocus(View child, View focused) { + super.requestChildFocus(child, focused); + + if (!isInTouchMode()) { + if (focused.getHeight() >= getHeight()) { + focused.getFocusedRect(childFocus); + + ((ViewGroup) child).offsetDescendantRectToMyCoords(focused, childFocus); + } else { + focused.getHitRect(childFocus); + + ((ViewGroup) child).offsetDescendantRectToMyCoords((View) focused.getParent(), childFocus); + } + + requestChildRectangleOnScreen(child, childFocus, false); + } + } +} diff --git a/app/src/main/res/layout-large-land/fragment_video_detail.xml b/app/src/main/res/layout-large-land/fragment_video_detail.xml index 02b0a7b86..186e184f3 100644 --- a/app/src/main/res/layout-large-land/fragment_video_detail.xml +++ b/app/src/main/res/layout-large-land/fragment_video_detail.xml @@ -10,7 +10,7 @@ android:orientation="horizontal" android:baselineAligned="false"> - - + Date: Fri, 20 Sep 2019 16:23:17 +0700 Subject: [PATCH 0010/1194] Do not discriminate against non-Amazon TV boxes --- .../main/java/org/schabi/newpipe/util/FireTvUtils.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/util/FireTvUtils.java b/app/src/main/java/org/schabi/newpipe/util/FireTvUtils.java index 69666463e..879b54e1f 100644 --- a/app/src/main/java/org/schabi/newpipe/util/FireTvUtils.java +++ b/app/src/main/java/org/schabi/newpipe/util/FireTvUtils.java @@ -1,10 +1,18 @@ package org.schabi.newpipe.util; +import android.annotation.SuppressLint; +import android.content.pm.PackageManager; + import org.schabi.newpipe.App; public class FireTvUtils { + @SuppressLint("InlinedApi") public static boolean isFireTv(){ final String AMAZON_FEATURE_FIRE_TV = "amazon.hardware.fire_tv"; - return App.getApp().getPackageManager().hasSystemFeature(AMAZON_FEATURE_FIRE_TV); + + PackageManager pm = App.getApp().getPackageManager(); + + return pm.hasSystemFeature(AMAZON_FEATURE_FIRE_TV) + || pm.hasSystemFeature(PackageManager.FEATURE_LEANBACK); } } From 644ad110c06638c50b4bd3800d3a334b4f976c7d Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 20 Sep 2019 16:25:30 +0700 Subject: [PATCH 0011/1194] Make description focusable, so TV users can scroll it --- app/src/main/res/layout-large-land/fragment_video_detail.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/res/layout-large-land/fragment_video_detail.xml b/app/src/main/res/layout-large-land/fragment_video_detail.xml index 186e184f3..02d330ade 100644 --- a/app/src/main/res/layout-large-land/fragment_video_detail.xml +++ b/app/src/main/res/layout-large-land/fragment_video_detail.xml @@ -490,6 +490,7 @@ android:textAppearance="?android:attr/textAppearanceMedium" android:textIsSelectable="true" android:textSize="@dimen/video_item_detail_description_text_size" + android:focusable="true" tools:text="Description Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed a ultricies ex. Integer sit amet sodales risus. Duis non mi et urna pretium bibendum." /> Date: Fri, 20 Sep 2019 16:36:57 +0700 Subject: [PATCH 0012/1194] Improve usability of MainVideoActivity with directional navigation * Hide player controls when back is pressed (only on TV devices) * Do not hide control after click unless in touch mode * Show player controls on dpad usage * Notably increase control hide timeout when not in touch mode --- .../newpipe/player/MainVideoPlayer.java | 53 ++++++++++++++++++- .../schabi/newpipe/player/VideoPlayer.java | 15 +++++- 2 files changed, 66 insertions(+), 2 deletions(-) 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 7a3e60c66..5663e1ea2 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -1,5 +1,6 @@ /* * Copyright 2017 Mauricio Colli + * Copyright 2019 Eltex ltd * MainVideoPlayer.java is part of NewPipe * * License: GPL-3.0+ @@ -45,6 +46,7 @@ import android.util.DisplayMetrics; import android.util.Log; import android.util.TypedValue; import android.view.GestureDetector; +import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; import android.view.WindowManager; @@ -75,6 +77,7 @@ 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.FireTvUtils; import org.schabi.newpipe.util.ListHelper; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.PermissionHelper; @@ -89,6 +92,7 @@ import java.util.UUID; import static org.schabi.newpipe.player.BasePlayer.STATE_PLAYING; import static org.schabi.newpipe.player.VideoPlayer.DEFAULT_CONTROLS_DURATION; import static org.schabi.newpipe.player.VideoPlayer.DEFAULT_CONTROLS_HIDE_TIME; +import static org.schabi.newpipe.player.VideoPlayer.DPAD_CONTROLS_HIDE_TIME; import static org.schabi.newpipe.util.AnimationUtils.Type.SCALE_AND_ALPHA; import static org.schabi.newpipe.util.AnimationUtils.Type.SLIDE_AND_ALPHA; import static org.schabi.newpipe.util.AnimationUtils.animateRotation; @@ -187,6 +191,40 @@ public final class MainVideoPlayer extends AppCompatActivity } } + @Override + public boolean onKeyDown(int keyCode, KeyEvent event) { + switch (event.getKeyCode()) { + default: + break; + case KeyEvent.KEYCODE_BACK: + if (FireTvUtils.isFireTv() && playerImpl.isControlsVisible()) { + playerImpl.hideControls(0, 0); + hideSystemUi(); + return true; + } + break; + case KeyEvent.KEYCODE_DPAD_UP: + case KeyEvent.KEYCODE_DPAD_LEFT: + case KeyEvent.KEYCODE_DPAD_DOWN: + case KeyEvent.KEYCODE_DPAD_RIGHT: + case KeyEvent.KEYCODE_DPAD_CENTER: + if (playerImpl.getCurrentState() == BasePlayer.STATE_BLOCKED) { + return true; + } + + if (!playerImpl.isControlsVisible()) { + playerImpl.showControlsThenHide(); + showSystemUi(); + return true; + } else { + playerImpl.hideControls(DEFAULT_CONTROLS_DURATION, DPAD_CONTROLS_HIDE_TIME); + } + break; + } + + return super.onKeyDown(keyCode, event); + } + @Override protected void onResume() { if (DEBUG) Log.d(TAG, "onResume() called"); @@ -692,7 +730,7 @@ public final class MainVideoPlayer extends AppCompatActivity getControlsVisibilityHandler().removeCallbacksAndMessages(null); animateView(getControlsRoot(), true, DEFAULT_CONTROLS_DURATION, 0, () -> { if (getCurrentState() == STATE_PLAYING && !isSomePopupMenuVisible()) { - hideControls(DEFAULT_CONTROLS_DURATION, DEFAULT_CONTROLS_HIDE_TIME); + safeHideControls(DEFAULT_CONTROLS_DURATION, DEFAULT_CONTROLS_HIDE_TIME); } }); } @@ -898,6 +936,18 @@ public final class MainVideoPlayer extends AppCompatActivity super.showControls(duration); } + @Override + public void safeHideControls(long duration, long delay) { + if (DEBUG) Log.d(TAG, "safeHideControls() called with: delay = [" + delay + "]"); + + View controlsRoot = getControlsRoot(); + if (controlsRoot.isInTouchMode()) { + getControlsVisibilityHandler().removeCallbacksAndMessages(null); + getControlsVisibilityHandler().postDelayed( + () -> animateView(controlsRoot, false, duration, 0, MainVideoPlayer.this::hideSystemUi), delay); + } + } + @Override public void hideControls(final long duration, long delay) { if (DEBUG) Log.d(TAG, "hideControls() called with: delay = [" + delay + "]"); @@ -1058,6 +1108,7 @@ public final class MainVideoPlayer extends AppCompatActivity playerImpl.showControlsThenHide(); showSystemUi(); } + return true; } 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 360475ba2..0d9c14058 100644 --- a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java @@ -97,6 +97,7 @@ public abstract class VideoPlayer extends BasePlayer protected static final int RENDERER_UNAVAILABLE = -1; public static final int DEFAULT_CONTROLS_DURATION = 300; // 300 millis public static final int DEFAULT_CONTROLS_HIDE_TIME = 2000; // 2 Seconds + public static final int DPAD_CONTROLS_HIDE_TIME = 7000; // 7 Seconds private List availableStreams; private int selectedStreamIndex; @@ -825,8 +826,11 @@ public abstract class VideoPlayer extends BasePlayer public void showControlsThenHide() { if (DEBUG) Log.d(TAG, "showControlsThenHide() called"); + + final int hideTime = controlsRoot.isInTouchMode() ? DEFAULT_CONTROLS_HIDE_TIME : DPAD_CONTROLS_HIDE_TIME; + animateView(controlsRoot, true, DEFAULT_CONTROLS_DURATION, 0, - () -> hideControls(DEFAULT_CONTROLS_DURATION, DEFAULT_CONTROLS_HIDE_TIME)); + () -> hideControls(DEFAULT_CONTROLS_DURATION, hideTime)); } public void showControls(long duration) { @@ -835,6 +839,15 @@ public abstract class VideoPlayer extends BasePlayer animateView(controlsRoot, true, duration); } + public void safeHideControls(final long duration, long delay) { + if (DEBUG) Log.d(TAG, "safeHideControls() called with: delay = [" + delay + "]"); + if (rootView.isInTouchMode()) { + controlsVisibilityHandler.removeCallbacksAndMessages(null); + controlsVisibilityHandler.postDelayed( + () -> animateView(controlsRoot, false, duration), delay); + } + } + public void hideControls(final long duration, long delay) { if (DEBUG) Log.d(TAG, "hideControls() called with: delay = [" + delay + "]"); controlsVisibilityHandler.removeCallbacksAndMessages(null); From d8bd8d87ec6eb6ca7379740be27d7d7545ae31d3 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 20 Sep 2019 16:42:32 +0700 Subject: [PATCH 0013/1194] Make player screen controls into buttons Buttons are more likely to have "correct" styling and are focusable/clickable out of box --- .../activity_main_player.xml | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/layout-large-land/activity_main_player.xml b/app/src/main/res/layout-large-land/activity_main_player.xml index 902e81f1f..2859b6c5d 100644 --- a/app/src/main/res/layout-large-land/activity_main_player.xml +++ b/app/src/main/res/layout-large-land/activity_main_player.xml @@ -196,8 +196,9 @@ tools:text="The Video Artist LONG very LONG very Long"/> - - @@ -268,8 +272,9 @@ tools:ignore="RtlHardcoded" tools:visibility="visible"> - - From 7db1ba40ebf530181984c99804b1ab6d392a1742 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 20 Sep 2019 16:48:34 +0700 Subject: [PATCH 0014/1194] Do not allow focus to escape from open DrawerLayout Upstream DrawerLayout does override addFocusables, but incorrectly checks for isDrawerOpen instread of isDrawerVisible --- .../newpipe/views/FocusAwareDrawerLayout.java | 69 +++++++++++++++++++ app/src/main/res/layout/activity_main.xml | 4 +- 2 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 app/src/main/java/org/schabi/newpipe/views/FocusAwareDrawerLayout.java diff --git a/app/src/main/java/org/schabi/newpipe/views/FocusAwareDrawerLayout.java b/app/src/main/java/org/schabi/newpipe/views/FocusAwareDrawerLayout.java new file mode 100644 index 000000000..0e8097dbe --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/views/FocusAwareDrawerLayout.java @@ -0,0 +1,69 @@ +/* + * Copyright (C) Eltex ltd 2019 + * FocusAwareDrawerLayout.java is part of NewPipe. + * + * NewPipe is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * NewPipe is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with NewPipe. If not, see . + */ +package org.schabi.newpipe.views; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.View; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.view.GravityCompat; +import androidx.core.view.ViewCompat; +import androidx.drawerlayout.widget.DrawerLayout; + +import java.util.ArrayList; + +public final class FocusAwareDrawerLayout extends DrawerLayout { + public FocusAwareDrawerLayout(@NonNull Context context) { + super(context); + } + + public FocusAwareDrawerLayout(@NonNull Context context, @Nullable AttributeSet attrs) { + super(context, attrs); + } + + public FocusAwareDrawerLayout(@NonNull Context context, @Nullable AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + } + + @Override + public void addFocusables(ArrayList views, int direction, int focusableMode) { + boolean hasOpenPanels = false; + View content = null; + + for (int i = 0; i < getChildCount(); ++i) { + View child = getChildAt(i); + + DrawerLayout.LayoutParams lp = (DrawerLayout.LayoutParams) child.getLayoutParams(); + + if (lp.gravity == 0) { + content = child; + } else { + if (isDrawerVisible(child)) { + hasOpenPanels = true; + child.addFocusables(views, direction, focusableMode); + } + } + } + + if (content != null && !hasOpenPanels) { + content.addFocusables(views, direction, focusableMode); + } + } +} diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 92e73234f..a965f5f65 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,5 +1,5 @@ - - + From a8a28294d3d43f9720141c561dc1e9fa3b10d421 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 20 Sep 2019 17:42:56 +0700 Subject: [PATCH 0015/1194] Support for seeking videos in directional navigation mode --- .../newpipe/views/FocusAwareSeekBar.java | 138 ++++++++++++++++++ .../activity_main_player.xml | 2 +- 2 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 app/src/main/java/org/schabi/newpipe/views/FocusAwareSeekBar.java diff --git a/app/src/main/java/org/schabi/newpipe/views/FocusAwareSeekBar.java b/app/src/main/java/org/schabi/newpipe/views/FocusAwareSeekBar.java new file mode 100644 index 000000000..3789ea344 --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/views/FocusAwareSeekBar.java @@ -0,0 +1,138 @@ +/* + * Copyright (C) Eltex ltd 2019 + * FocusAwareDrawerLayout.java is part of NewPipe. + * + * NewPipe is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * NewPipe is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with NewPipe. If not, see . + */ +package org.schabi.newpipe.views; + +import android.content.Context; +import android.graphics.Rect; +import android.util.AttributeSet; +import android.view.KeyEvent; +import android.view.ViewTreeObserver; +import android.widget.SeekBar; + +import androidx.appcompat.widget.AppCompatSeekBar; + +/** + * SeekBar, adapted for directional navigation. It emulates touch-related callbacks + * (onStartTrackingTouch/onStopTrackingTouch), so existing code does not need to be changed to + * work with it. + */ +public final class FocusAwareSeekBar extends AppCompatSeekBar { + private NestedListener listener; + + private ViewTreeObserver treeObserver; + + public FocusAwareSeekBar(Context context) { + super(context); + } + + public FocusAwareSeekBar(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public FocusAwareSeekBar(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + } + + @Override + public void setOnSeekBarChangeListener(OnSeekBarChangeListener l) { + this.listener = l == null ? null : new NestedListener(l); + + super.setOnSeekBarChangeListener(listener); + } + + @Override + public boolean onKeyDown(int keyCode, KeyEvent event) { + if (!isInTouchMode() && keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { + releaseTrack(); + } + + return super.onKeyDown(keyCode, event); + } + + @Override + protected void onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect) { + super.onFocusChanged(gainFocus, direction, previouslyFocusedRect); + + if (!isInTouchMode() && !gainFocus) { + releaseTrack(); + } + } + + private final ViewTreeObserver.OnTouchModeChangeListener touchModeListener = isInTouchMode -> { if (isInTouchMode) releaseTrack(); }; + + @Override + protected void onAttachedToWindow() { + super.onAttachedToWindow(); + + treeObserver = getViewTreeObserver(); + treeObserver.addOnTouchModeChangeListener(touchModeListener); + } + + @Override + protected void onDetachedFromWindow() { + if (treeObserver == null || !treeObserver.isAlive()) { + treeObserver = getViewTreeObserver(); + } + + treeObserver.removeOnTouchModeChangeListener(touchModeListener); + treeObserver = null; + + super.onDetachedFromWindow(); + } + + private void releaseTrack() { + if (listener != null && listener.isSeeking) { + listener.onStopTrackingTouch(this); + } + } + + private final class NestedListener implements OnSeekBarChangeListener { + private final OnSeekBarChangeListener delegate; + + boolean isSeeking; + + private NestedListener(OnSeekBarChangeListener delegate) { + this.delegate = delegate; + } + + @Override + public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { + if (!seekBar.isInTouchMode() && !isSeeking && fromUser) { + isSeeking = true; + + onStartTrackingTouch(seekBar); + } + + delegate.onProgressChanged(seekBar, progress, fromUser); + } + + @Override + public void onStartTrackingTouch(SeekBar seekBar) { + isSeeking = true; + + delegate.onStartTrackingTouch(seekBar); + } + + @Override + public void onStopTrackingTouch(SeekBar seekBar) { + isSeeking = false; + + delegate.onStopTrackingTouch(seekBar); + } + } +} diff --git a/app/src/main/res/layout-large-land/activity_main_player.xml b/app/src/main/res/layout-large-land/activity_main_player.xml index 2859b6c5d..c40931a1a 100644 --- a/app/src/main/res/layout-large-land/activity_main_player.xml +++ b/app/src/main/res/layout-large-land/activity_main_player.xml @@ -401,7 +401,7 @@ tools:text="1:06:29"/> - Date: Mon, 23 Sep 2019 13:50:51 +0700 Subject: [PATCH 0016/1194] Focus drawer when it opens It is still buggy because of NavigationView (why the hell is NavigationMenuView marked as focusable?) but at least initial opening works as intended --- .../newpipe/views/FocusAwareDrawerLayout.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/views/FocusAwareDrawerLayout.java b/app/src/main/java/org/schabi/newpipe/views/FocusAwareDrawerLayout.java index 0e8097dbe..2354427a3 100644 --- a/app/src/main/java/org/schabi/newpipe/views/FocusAwareDrawerLayout.java +++ b/app/src/main/java/org/schabi/newpipe/views/FocusAwareDrawerLayout.java @@ -17,8 +17,10 @@ */ package org.schabi.newpipe.views; +import android.annotation.SuppressLint; import android.content.Context; import android.util.AttributeSet; +import android.view.Gravity; import android.view.View; import androidx.annotation.NonNull; @@ -66,4 +68,35 @@ public final class FocusAwareDrawerLayout extends DrawerLayout { content.addFocusables(views, direction, focusableMode); } } + + // this override isn't strictly necessary, but it is helpful when DrawerLayout isn't the topmost + // view in hierarchy (such as when system or builtin appcompat ActionBar is used) + @Override + @SuppressLint("RtlHardcoded") + public void openDrawer(@NonNull View drawerView, boolean animate) { + super.openDrawer(drawerView, animate); + + LayoutParams params = (LayoutParams) drawerView.getLayoutParams(); + + int gravity = GravityCompat.getAbsoluteGravity(params.gravity, ViewCompat.getLayoutDirection(this)); + + int direction = 0; + + switch (gravity) { + case Gravity.LEFT: + direction = FOCUS_LEFT; + break; + case Gravity.RIGHT: + direction = FOCUS_RIGHT; + break; + case Gravity.TOP: + direction = FOCUS_UP; + break; + case Gravity.BOTTOM: + direction = FOCUS_DOWN; + break; + } + + drawerView.requestFocus(direction); + } } From d23227d427831184f6ae12162593c6112bcd4b11 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 23 Sep 2019 14:17:03 +0700 Subject: [PATCH 0017/1194] Implement global focus highlight --- .../java/org/schabi/newpipe/MainActivity.java | 5 + .../org/schabi/newpipe/RouterActivity.java | 6 + .../newpipe/download/DownloadActivity.java | 6 + .../newpipe/player/MainVideoPlayer.java | 6 + .../newpipe/views/FocusOverlayView.java | 248 ++++++++++++++++++ 5 files changed, 271 insertions(+) create mode 100644 app/src/main/java/org/schabi/newpipe/views/FocusOverlayView.java diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 3c18c25f6..8d2702d0b 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -69,6 +69,7 @@ import org.schabi.newpipe.util.PermissionHelper; import org.schabi.newpipe.util.ServiceHelper; import org.schabi.newpipe.util.StateSaver; import org.schabi.newpipe.util.ThemeHelper; +import org.schabi.newpipe.views.FocusOverlayView; public class MainActivity extends AppCompatActivity { private static final String TAG = "MainActivity"; @@ -121,6 +122,10 @@ public class MainActivity extends AppCompatActivity { } catch (Exception e) { ErrorActivity.reportUiError(this, e); } + + if (FireTvUtils.isFireTv()) { + FocusOverlayView.setupFocusObserver(this); + } } private void setupDrawer() throws Exception { diff --git a/app/src/main/java/org/schabi/newpipe/RouterActivity.java b/app/src/main/java/org/schabi/newpipe/RouterActivity.java index 1be6e096a..c5b97f86f 100644 --- a/app/src/main/java/org/schabi/newpipe/RouterActivity.java +++ b/app/src/main/java/org/schabi/newpipe/RouterActivity.java @@ -45,10 +45,12 @@ import org.schabi.newpipe.player.playqueue.SinglePlayQueue; import org.schabi.newpipe.report.UserAction; import org.schabi.newpipe.util.Constants; import org.schabi.newpipe.util.ExtractorHelper; +import org.schabi.newpipe.util.FireTvUtils; import org.schabi.newpipe.util.ListHelper; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.PermissionHelper; import org.schabi.newpipe.util.ThemeHelper; +import org.schabi.newpipe.views.FocusOverlayView; import java.io.Serializable; import java.util.ArrayList; @@ -316,6 +318,10 @@ public class RouterActivity extends AppCompatActivity { selectedPreviously = selectedRadioPosition; alertDialog.show(); + + if (FireTvUtils.isFireTv()) { + FocusOverlayView.setupFocusObserver(alertDialog); + } } private List getChoicesForService(StreamingService service, LinkType linkType) { diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java index 449a790e8..56265d321 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java @@ -13,7 +13,9 @@ import android.view.ViewTreeObserver; import org.schabi.newpipe.R; import org.schabi.newpipe.settings.SettingsActivity; +import org.schabi.newpipe.util.FireTvUtils; import org.schabi.newpipe.util.ThemeHelper; +import org.schabi.newpipe.views.FocusOverlayView; import us.shandian.giga.service.DownloadManagerService; import us.shandian.giga.ui.fragment.MissionsFragment; @@ -50,6 +52,10 @@ public class DownloadActivity extends AppCompatActivity { getWindow().getDecorView().getViewTreeObserver().removeOnGlobalLayoutListener(this); } }); + + if (FireTvUtils.isFireTv()) { + FocusOverlayView.setupFocusObserver(this); + } } private void updateFragments() { 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 5663e1ea2..38da4d8b2 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -84,6 +84,7 @@ import org.schabi.newpipe.util.PermissionHelper; import org.schabi.newpipe.util.ShareUtils; import org.schabi.newpipe.util.StateSaver; import org.schabi.newpipe.util.ThemeHelper; +import org.schabi.newpipe.views.FocusOverlayView; import java.util.List; import java.util.Queue; @@ -141,6 +142,7 @@ public final class MainVideoPlayer extends AppCompatActivity hideSystemUi(); setContentView(R.layout.activity_main_player); + playerImpl = new VideoPlayerImpl(this); playerImpl.setup(findViewById(android.R.id.content)); @@ -172,6 +174,10 @@ public final class MainVideoPlayer extends AppCompatActivity getContentResolver().registerContentObserver( Settings.System.getUriFor(Settings.System.ACCELEROMETER_ROTATION), false, rotationObserver); + + if (FireTvUtils.isFireTv()) { + FocusOverlayView.setupFocusObserver(this); + } } @Override diff --git a/app/src/main/java/org/schabi/newpipe/views/FocusOverlayView.java b/app/src/main/java/org/schabi/newpipe/views/FocusOverlayView.java new file mode 100644 index 000000000..b0b9cc421 --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/views/FocusOverlayView.java @@ -0,0 +1,248 @@ +/* + * Copyright 2019 Alexander Rvachev + * FocusOverlayView.java is part of NewPipe + * + * License: GPL-3.0+ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.schabi.newpipe.views; + +import android.app.Activity; +import android.app.Dialog; +import android.content.Context; +import android.graphics.Canvas; +import android.graphics.ColorFilter; +import android.graphics.Paint; +import android.graphics.PixelFormat; +import android.graphics.Rect; +import android.graphics.drawable.Drawable; +import android.os.Handler; +import android.os.Looper; +import android.os.Message; +import android.view.KeyEvent; +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewTreeObserver; +import android.view.Window; + +import androidx.annotation.NonNull; +import androidx.appcompat.view.WindowCallbackWrapper; + +import org.schabi.newpipe.R; + +import java.lang.ref.WeakReference; + +public final class FocusOverlayView extends Drawable implements + ViewTreeObserver.OnGlobalFocusChangeListener, + ViewTreeObserver.OnDrawListener, + ViewTreeObserver.OnGlobalLayoutListener, + ViewTreeObserver.OnScrollChangedListener, ViewTreeObserver.OnTouchModeChangeListener { + + private boolean isInTouchMode; + + private final Rect focusRect = new Rect(); + + private final Paint rectPaint = new Paint(); + + private final Handler animator = new Handler(Looper.getMainLooper()) { + @Override + public void handleMessage(Message msg) { + updateRect(); + } + }; + + private WeakReference focused; + + public FocusOverlayView(Context context) { + rectPaint.setStyle(Paint.Style.STROKE); + rectPaint.setStrokeWidth(2); + rectPaint.setColor(context.getResources().getColor(R.color.white)); + } + + @Override + public void onGlobalFocusChanged(View oldFocus, View newFocus) { + int l = focusRect.left; + int r = focusRect.right; + int t = focusRect.top; + int b = focusRect.bottom; + + if (newFocus != null && newFocus.getWidth() > 0 && newFocus.getHeight() > 0) { + newFocus.getGlobalVisibleRect(focusRect); + + focused = new WeakReference<>(newFocus); + } else { + focusRect.setEmpty(); + + focused = null; + } + + if (l != focusRect.left || r != focusRect.right || t != focusRect.top || b != focusRect.bottom) { + invalidateSelf(); + } + + focused = new WeakReference<>(newFocus); + + animator.sendEmptyMessageDelayed(0, 1000); + } + + private void updateRect() { + if (focused == null) { + return; + } + + View focused = this.focused.get(); + + int l = focusRect.left; + int r = focusRect.right; + int t = focusRect.top; + int b = focusRect.bottom; + + if (focused != null) { + focused.getGlobalVisibleRect(focusRect); + } else { + focusRect.setEmpty(); + } + + if (l != focusRect.left || r != focusRect.right || t != focusRect.top || b != focusRect.bottom) { + invalidateSelf(); + } + } + + @Override + public void onDraw() { + updateRect(); + } + + @Override + public void onScrollChanged() { + updateRect(); + + animator.removeMessages(0); + animator.sendEmptyMessageDelayed(0, 1000); + } + + @Override + public void onGlobalLayout() { + updateRect(); + + animator.sendEmptyMessageDelayed(0, 1000); + } + + @Override + public void onTouchModeChanged(boolean isInTouchMode) { + this.isInTouchMode = isInTouchMode; + + if (isInTouchMode) { + updateRect(); + } else { + invalidateSelf(); + } + } + + public void setCurrentFocus(View focused) { + if (focused == null) { + return; + } + + this.isInTouchMode = focused.isInTouchMode(); + + onGlobalFocusChanged(null, focused); + } + + @Override + public void draw(@NonNull Canvas canvas) { + if (!isInTouchMode && focusRect.width() != 0) { + canvas.drawRect(focusRect, rectPaint); + } + } + + @Override + public int getOpacity() { + return PixelFormat.TRANSPARENT; + } + + @Override + public void setAlpha(int alpha) { + } + + @Override + public void setColorFilter(ColorFilter colorFilter) { + } + + public static void setupFocusObserver(Dialog dialog) { + Rect displayRect = new Rect(); + + Window window = dialog.getWindow(); + assert window != null; + + View decor = window.getDecorView(); + decor.getWindowVisibleDisplayFrame(displayRect); + + FocusOverlayView overlay = new FocusOverlayView(dialog.getContext()); + overlay.setBounds(0, 0, displayRect.width(), displayRect.height()); + + setupOverlay(window, overlay); + } + + public static void setupFocusObserver(Activity activity) { + Rect displayRect = new Rect(); + + Window window = activity.getWindow(); + View decor = window.getDecorView(); + decor.getWindowVisibleDisplayFrame(displayRect); + + FocusOverlayView overlay = new FocusOverlayView(activity); + overlay.setBounds(0, 0, displayRect.width(), displayRect.height()); + + setupOverlay(window, overlay); + } + + private static void setupOverlay(Window window, FocusOverlayView overlay) { + ViewGroup decor = (ViewGroup) window.getDecorView(); + decor.getOverlay().add(overlay); + + ViewTreeObserver observer = decor.getViewTreeObserver(); + observer.addOnScrollChangedListener(overlay); + observer.addOnGlobalFocusChangeListener(overlay); + observer.addOnGlobalLayoutListener(overlay); + observer.addOnTouchModeChangeListener(overlay); + + overlay.setCurrentFocus(decor.getFocusedChild()); + + // Some key presses don't actually move focus, but still result in movement on screen. + // For example, MovementMethod of TextView may cause requestRectangleOnScreen() due to + // some "focusable" spans, which in turn causes CoordinatorLayout to "scroll" it's children. + // Unfortunately many such forms of "scrolling" do not count as scrolling for purpose + // of dispatching ViewTreeObserver callbacks, so we have to intercept them by directly + // receiving keys from Window. + window.setCallback(new WindowCallbackWrapper(window.getCallback()) { + @Override + public boolean dispatchKeyEvent(KeyEvent event) { + boolean res = super.dispatchKeyEvent(event); + overlay.onKey(event); + return res; + } + }); + } + + private void onKey(KeyEvent event) { + if (event.getAction() != KeyEvent.ACTION_DOWN) { + return; + } + + updateRect(); + + animator.sendEmptyMessageDelayed(0, 100); + } +} From 28fb864ed01bf0af2989527d984e500f91717fe1 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 23 Sep 2019 17:20:15 +0700 Subject: [PATCH 0018/1194] Focus video view thumbnail after it is loaded --- .../schabi/newpipe/fragments/detail/VideoDetailFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 14e989625..fd2a3285d 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 @@ -505,7 +505,7 @@ public class VideoDetailFragment setHeightThumbnail(); - + thumbnailBackgroundButton.requestFocus(); } @Override From 79c962fc8805183fdbe44b5dfe0ab7b2e32cd141 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 30 Sep 2019 12:02:07 +0700 Subject: [PATCH 0019/1194] More robust focus search in SuperScrollLayoutManager FocusFinder has glitches when some of target Views have different size. Fortunately LayoutManager can redefine focus search strategy to override the default behavior. --- .../views/SuperScrollLayoutManager.java | 110 +++++++++++++++++- app/src/main/res/layout/fragment_comments.xml | 2 +- 2 files changed, 110 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/views/SuperScrollLayoutManager.java b/app/src/main/java/org/schabi/newpipe/views/SuperScrollLayoutManager.java index 33fe7b9cc..3946b8435 100644 --- a/app/src/main/java/org/schabi/newpipe/views/SuperScrollLayoutManager.java +++ b/app/src/main/java/org/schabi/newpipe/views/SuperScrollLayoutManager.java @@ -19,16 +19,21 @@ package org.schabi.newpipe.views; import android.content.Context; import android.graphics.Rect; -import android.view.FocusFinder; import android.view.View; +import android.view.ViewGroup; import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; +import java.util.ArrayList; + public final class SuperScrollLayoutManager extends LinearLayoutManager { private final Rect handy = new Rect(); + private final ArrayList focusables = new ArrayList<>(); + public SuperScrollLayoutManager(Context context) { super(context); } @@ -50,4 +55,107 @@ public final class SuperScrollLayoutManager extends LinearLayoutManager { return super.requestChildRectangleOnScreen(parent, child, rect, immediate, focusedChildVisible); } + + @Nullable + @Override + public View onInterceptFocusSearch(@NonNull View focused, int direction) { + View focusedItem = findContainingItemView(focused); + if (focusedItem == null) { + return super.onInterceptFocusSearch(focused, direction); + } + + int listDirection = getAbsoluteDirection(direction); + if (listDirection == 0) { + return super.onInterceptFocusSearch(focused, direction); + } + + // FocusFinder has an oddity: it considers size of Views more important + // than closeness to source View. This means, that big Views far away from current item + // are preferred to smaller sub-View of closer item. Setting focusability of closer item + // to FOCUS_AFTER_DESCENDANTS does not solve this, because ViewGroup#addFocusables omits + // such parent itself from list, if any of children are focusable. + // Fortunately we can intercept focus search and implement our own logic, based purely + // on position along the LinearLayoutManager axis + + ViewGroup recycler = (ViewGroup) focusedItem.getParent(); + + int sourcePosition = getPosition(focusedItem); + if (sourcePosition == 0 && listDirection < 0) { + return super.onInterceptFocusSearch(focused, direction); + } + + View preferred = null; + + int distance = Integer.MAX_VALUE; + + focusables.clear(); + + recycler.addFocusables(focusables, direction, recycler.isInTouchMode() ? View.FOCUSABLES_TOUCH_MODE : View.FOCUSABLES_ALL); + + try { + for (View view : focusables) { + if (view == focused || view == recycler) { + continue; + } + + int candidate = getDistance(sourcePosition, view, listDirection); + if (candidate < 0) { + continue; + } + + if (candidate < distance) { + distance = candidate; + preferred = view; + } + } + } finally { + focusables.clear(); + } + + return preferred; + } + + private int getAbsoluteDirection(int direction) { + switch (direction) { + default: + break; + case View.FOCUS_FORWARD: + return 1; + case View.FOCUS_BACKWARD: + return -1; + } + + if (getOrientation() == RecyclerView.HORIZONTAL) { + switch (direction) { + default: + break; + case View.FOCUS_LEFT: + return getReverseLayout() ? 1 : -1; + case View.FOCUS_RIGHT: + return getReverseLayout() ? -1 : 1; + } + } else { + switch (direction) { + default: + break; + case View.FOCUS_UP: + return getReverseLayout() ? 1 : -1; + case View.FOCUS_DOWN: + return getReverseLayout() ? -1 : 1; + } + } + + return 0; + } + + private int getDistance(int sourcePosition, View candidate, int direction) { + View itemView = findContainingItemView(candidate); + if (itemView == null) { + return -1; + } + + int position = getPosition(itemView); + + return direction * (position - sourcePosition); + } } diff --git a/app/src/main/res/layout/fragment_comments.xml b/app/src/main/res/layout/fragment_comments.xml index 0ee62c05d..4ced11d35 100644 --- a/app/src/main/res/layout/fragment_comments.xml +++ b/app/src/main/res/layout/fragment_comments.xml @@ -5,7 +5,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - Date: Wed, 9 Oct 2019 17:09:07 +0700 Subject: [PATCH 0020/1194] Allow comment links (if any) to gain focus --- .../holder/CommentsMiniInfoItemHolder.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java b/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java index 4d94ec392..e7b09f3e2 100644 --- a/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java +++ b/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java @@ -1,6 +1,9 @@ package org.schabi.newpipe.info_list.holder; import androidx.appcompat.app.AppCompatActivity; + +import android.text.method.LinkMovementMethod; +import android.text.style.URLSpan; import android.text.util.Linkify; import android.view.ViewGroup; import android.widget.TextView; @@ -122,15 +125,35 @@ public class CommentsMiniInfoItemHolder extends InfoItemHolder { }); } + private void allowLinkFocus() { + if (itemView.isInTouchMode()) { + return; + } + + URLSpan[] urls = itemContentView.getUrls(); + + if (urls != null && urls.length != 0) { + itemContentView.setMovementMethod(LinkMovementMethod.getInstance()); + } + } + private void ellipsize() { + boolean hasEllipsis = false; + if (itemContentView.getLineCount() > commentDefaultLines){ int endOfLastLine = itemContentView.getLayout().getLineEnd(commentDefaultLines - 1); int end = itemContentView.getText().toString().lastIndexOf(' ', endOfLastLine -2); if(end == -1) end = Math.max(endOfLastLine -2, 0); String newVal = itemContentView.getText().subSequence(0, end) + " …"; itemContentView.setText(newVal); + hasEllipsis = true; } + linkify(); + + if (!hasEllipsis) { + allowLinkFocus(); + } } private void toggleEllipsize() { @@ -145,11 +168,13 @@ public class CommentsMiniInfoItemHolder extends InfoItemHolder { itemContentView.setMaxLines(commentExpandedLines); itemContentView.setText(commentText); linkify(); + allowLinkFocus(); } private void linkify(){ Linkify.addLinks(itemContentView, Linkify.WEB_URLS); Linkify.addLinks(itemContentView, pattern, null, null, timestampLink); + itemContentView.setMovementMethod(null); } } From 6e76610f303af3428f5ec0afc565ce98cc4bb7ed Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 23 Sep 2019 17:57:14 +0700 Subject: [PATCH 0021/1194] Eliminate bunch of ExoPlayer warnings --- app/src/main/java/org/schabi/newpipe/player/BasePlayer.java | 2 +- .../org/schabi/newpipe/player/playback/MediaSourceManager.java | 2 +- 2 files changed, 2 insertions(+), 2 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 a07afcea9..50a60ecb1 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -556,7 +556,7 @@ public abstract class BasePlayer implements } private Disposable getProgressReactor() { - return Observable.interval(PROGRESS_LOOP_INTERVAL_MILLIS, TimeUnit.MILLISECONDS) + return Observable.interval(PROGRESS_LOOP_INTERVAL_MILLIS, TimeUnit.MILLISECONDS, AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(ignored -> triggerProgressUpdate(), error -> Log.e(TAG, "Progress update failure: ", error)); 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 85c852f57..bbe391807 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 @@ -318,7 +318,7 @@ public class MediaSourceManager { //////////////////////////////////////////////////////////////////////////*/ private Observable getEdgeIntervalSignal() { - return Observable.interval(progressUpdateIntervalMillis, TimeUnit.MILLISECONDS) + return Observable.interval(progressUpdateIntervalMillis, TimeUnit.MILLISECONDS, AndroidSchedulers.mainThread()) .filter(ignored -> playbackListener.isApproachingPlaybackEdge(playbackNearEndGapMillis)); } From a7c31e6bcc28067573aebd8a198091cdc053a7f4 Mon Sep 17 00:00:00 2001 From: Alexander-- Date: Fri, 8 Nov 2019 14:26:12 +0700 Subject: [PATCH 0022/1194] RecyclerView scroll fixes * Move all focus-related work arouns to NewPipeRecyclerView * Try to pass focus within closer parents first * Do small arrow scroll if there are not more focusables in move direction --- .../newpipe/views/NewPipeRecyclerView.java | 173 ++++++++++++++++-- 1 file changed, 160 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/views/NewPipeRecyclerView.java b/app/src/main/java/org/schabi/newpipe/views/NewPipeRecyclerView.java index 76dee200f..435281d14 100644 --- a/app/src/main/java/org/schabi/newpipe/views/NewPipeRecyclerView.java +++ b/app/src/main/java/org/schabi/newpipe/views/NewPipeRecyclerView.java @@ -18,55 +18,202 @@ package org.schabi.newpipe.views; import android.content.Context; +import android.graphics.Rect; +import android.os.Build; import android.util.AttributeSet; +import android.util.Log; +import android.view.FocusFinder; import android.view.View; +import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.recyclerview.widget.RecyclerView; public class NewPipeRecyclerView extends RecyclerView { - private static final String TAG = "FixedRecyclerView"; + private static final String TAG = "NewPipeRecyclerView"; + + private Rect focusRect = new Rect(); + private Rect tempFocus = new Rect(); + + private boolean allowDpadScroll; public NewPipeRecyclerView(@NonNull Context context) { super(context); + + init(); } public NewPipeRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs) { super(context, attrs); + + init(); } public NewPipeRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); + + init(); } - @Override - public View focusSearch(int direction) { - return null; + private void init() { + setFocusable(true); + + setDescendantFocusability(FOCUS_AFTER_DESCENDANTS); + } + + public void setFocusScrollAllowed(boolean allowDpadScroll) { + this.allowDpadScroll = allowDpadScroll; } @Override public View focusSearch(View focused, int direction) { + // RecyclerView has buggy focusSearch(), that calls into Adapter several times, + // but ultimately fails to produce correct results in many cases. To add insult to injury, + // it's focusSearch() hard-codes several behaviors, incompatible with widely accepted focus + // handling practices: RecyclerView does not allow Adapter to give focus to itself (!!) and + // always checks, that returned View is located in "correct" direction (which prevents us + // from temporarily giving focus to special hidden View). return null; } + @Override + protected void removeDetachedView(View child, boolean animate) { + if (child.hasFocus()) { + // If the focused child is being removed (can happen during very fast scrolling), + // temporarily give focus to ourselves. This will usually result in another child + // gaining focus (which one does not really matter, because at that point scrolling + // is FAST, and that child will soon be off-screen too) + requestFocus(); + } + + super.removeDetachedView(child, animate); + } + + // we override focusSearch to always return null, so all moves moves lead to dispatchUnhandledMove() + // as added advantage, we can fully swallow some kinds of moves (such as downward movement, that + // happens when loading additional contents is in progress + @Override public boolean dispatchUnhandledMove(View focused, int direction) { - View found = super.focusSearch(focused, direction); - if (found != null) { - found.requestFocus(direction); + tempFocus.setEmpty(); + + // save focus rect before further manipulation (both focusSearch() and scrollBy() + // can mess with focused View by moving it off-screen and detaching) + + if (focused != null) { + View focusedItem = findContainingItemView(focused); + if (focusedItem != null) { + focusedItem.getHitRect(focusRect); + } + } + + // call focusSearch() to initiate layout, but disregard returned View for now + View adapterResult = super.focusSearch(focused, direction); + if (adapterResult != null && !isOutside(adapterResult)) { + adapterResult.requestFocus(direction); return true; } - if (direction == View.FOCUS_UP) { - if (canScrollVertically(-1)) { - scrollBy(0, -10); - return true; - } + if (arrowScroll(direction)) { + // if RecyclerView can not yield focus, but there is still some scrolling space in indicated, + // direction, scroll some fixed amount in that direction (the same logic in ScrollView) + return true; + } - return false; + if (focused != this && direction == FOCUS_DOWN && !allowDpadScroll) { + Log.i(TAG, "Consuming downward scroll: content load in progress"); + return true; + } + + if (tryFocusFinder(direction)) { + return true; + } + + if (adapterResult != null) { + adapterResult.requestFocus(direction); + return true; } return super.dispatchUnhandledMove(focused, direction); } + + private boolean tryFocusFinder(int direction) { + if (Build.VERSION.SDK_INT >= 28) { + // Android 9 implemented bunch of handy changes to focus, that render code below less useful, and + // also broke findNextFocusFromRect in way, that render this hack useless + return false; + } + + FocusFinder finder = FocusFinder.getInstance(); + + // try to use FocusFinder instead of adapter + ViewGroup root = (ViewGroup) getRootView(); + + tempFocus.set(focusRect); + + root.offsetDescendantRectToMyCoords(this, tempFocus); + + View focusFinderResult = finder.findNextFocusFromRect(root, tempFocus, direction); + if (focusFinderResult != null && !isOutside(focusFinderResult)) { + focusFinderResult.requestFocus(direction); + return true; + } + + // look for focus in our ancestors, increasing search scope with each failure + // this provides much better locality than using FocusFinder with root + ViewGroup parent = (ViewGroup) getParent(); + + while (parent != root) { + tempFocus.set(focusRect); + + parent.offsetDescendantRectToMyCoords(this, tempFocus); + + View candidate = finder.findNextFocusFromRect(parent, tempFocus, direction); + if (candidate != null && candidate.requestFocus(direction)) { + return true; + } + + parent = (ViewGroup) parent.getParent(); + } + + return false; + } + + private boolean arrowScroll(int direction) { + switch (direction) { + case FOCUS_DOWN: + if (!canScrollVertically(1)) { + return false; + } + scrollBy(0, 100); + break; + case FOCUS_UP: + if (!canScrollVertically(-1)) { + return false; + } + scrollBy(0, -100); + break; + case FOCUS_LEFT: + if (!canScrollHorizontally(-1)) { + return false; + } + scrollBy(-100, 0); + break; + case FOCUS_RIGHT: + if (!canScrollHorizontally(-1)) { + return false; + } + scrollBy(100, 0); + break; + default: + return false; + } + + return true; + } + + private boolean isOutside(View view) { + return findContainingItemView(view) == null; + } } From b5558a8b78962234d855f318e1b059bd88892242 Mon Sep 17 00:00:00 2001 From: Alexander-- Date: Fri, 8 Nov 2019 14:41:16 +0700 Subject: [PATCH 0023/1194] Remove FixedGridLayoutManager --- .../fragments/list/BaseListFragment.java | 3 +- .../newpipe/local/BaseLocalListFragment.java | 3 +- .../subscription/SubscriptionFragment.java | 3 +- .../newpipe/views/FixedGridLayoutManager.java | 59 ------------------- .../giga/ui/fragment/MissionsFragment.java | 3 +- 5 files changed, 4 insertions(+), 67 deletions(-) delete mode 100644 app/src/main/java/org/schabi/newpipe/views/FixedGridLayoutManager.java 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 88684f2e7..a3844a92f 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 @@ -35,7 +35,6 @@ import org.schabi.newpipe.util.OnClickGesture; import org.schabi.newpipe.util.StateSaver; import org.schabi.newpipe.util.StreamDialogEntry; import org.schabi.newpipe.views.SuperScrollLayoutManager; -import org.schabi.newpipe.views.FixedGridLayoutManager; import java.util.List; import java.util.Queue; @@ -157,7 +156,7 @@ public abstract class BaseListFragment extends BaseStateFragment implem int width = resources.getDimensionPixelSize(R.dimen.video_item_grid_thumbnail_image_width); width += (24 * resources.getDisplayMetrics().density); final int spanCount = (int) Math.floor(resources.getDisplayMetrics().widthPixels / (double)width); - final GridLayoutManager lm = new FixedGridLayoutManager(activity, spanCount); + final GridLayoutManager lm = new GridLayoutManager(activity, spanCount); lm.setSpanSizeLookup(infoListAdapter.getSpanSizeLookup(spanCount)); return lm; } diff --git a/app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java b/app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java index c1293e240..414a9b6b5 100644 --- a/app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java @@ -18,7 +18,6 @@ import android.view.View; import org.schabi.newpipe.R; import org.schabi.newpipe.fragments.BaseStateFragment; import org.schabi.newpipe.fragments.list.ListViewContract; -import org.schabi.newpipe.views.FixedGridLayoutManager; import static org.schabi.newpipe.util.AnimationUtils.animateView; @@ -96,7 +95,7 @@ public abstract class BaseLocalListFragment extends BaseStateFragment int width = resources.getDimensionPixelSize(R.dimen.video_item_grid_thumbnail_image_width); width += (24 * resources.getDisplayMetrics().density); final int spanCount = (int) Math.floor(resources.getDisplayMetrics().widthPixels / (double)width); - final GridLayoutManager lm = new FixedGridLayoutManager(activity, spanCount); + final GridLayoutManager lm = new GridLayoutManager(activity, spanCount); lm.setSpanSizeLookup(itemListAdapter.getSpanSizeLookup(spanCount)); return lm; } 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 ea820b71e..bff6c1b3a 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 @@ -57,7 +57,6 @@ import org.schabi.newpipe.util.ServiceHelper; import org.schabi.newpipe.util.ShareUtils; import org.schabi.newpipe.util.ThemeHelper; import org.schabi.newpipe.views.CollapsibleView; -import org.schabi.newpipe.views.FixedGridLayoutManager; import java.io.File; import java.text.SimpleDateFormat; @@ -193,7 +192,7 @@ public class SubscriptionFragment extends BaseStateFragment - * FixedGridLayoutManager.java is part of NewPipe. - * - * NewPipe is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * NewPipe is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NewPipe. If not, see . - */ -package org.schabi.newpipe.views; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.FocusFinder; -import android.view.View; -import android.view.ViewGroup; - -import androidx.recyclerview.widget.GridLayoutManager; -import androidx.recyclerview.widget.RecyclerView; - -// Version of GridLayoutManager that works around https://issuetracker.google.com/issues/37067220 -public class FixedGridLayoutManager extends GridLayoutManager { - public FixedGridLayoutManager(Context context, int spanCount) { - super(context, spanCount); - } - - public FixedGridLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { - super(context, attrs, defStyleAttr, defStyleRes); - } - - public FixedGridLayoutManager(Context context, int spanCount, int orientation, boolean reverseLayout) { - super(context, spanCount, orientation, reverseLayout); - } - - @Override - public View onFocusSearchFailed(View focused, int focusDirection, RecyclerView.Recycler recycler, RecyclerView.State state) { - FocusFinder ff = FocusFinder.getInstance(); - - View result = ff.findNextFocus((ViewGroup) focused.getParent(), focused, focusDirection); - if (result != null) { - return super.onFocusSearchFailed(focused, focusDirection, recycler, state); - } - - if (focusDirection == View.FOCUS_DOWN) { - scrollVerticallyBy(10, recycler, state); - return null; - } - - return super.onFocusSearchFailed(focused, focusDirection, recycler, state); - } -} diff --git a/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java b/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java index 3792f030a..26da47b1f 100644 --- a/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java +++ b/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java @@ -30,7 +30,6 @@ import org.schabi.newpipe.R; import org.schabi.newpipe.settings.NewPipeSettings; import org.schabi.newpipe.util.FilePickerActivityHelper; import org.schabi.newpipe.util.ThemeHelper; -import org.schabi.newpipe.views.FixedGridLayoutManager; import java.io.File; import java.io.IOException; @@ -109,7 +108,7 @@ public class MissionsFragment extends Fragment { mList = v.findViewById(R.id.mission_recycler); // Init layouts managers - mGridManager = new FixedGridLayoutManager(getActivity(), SPAN_SIZE); + mGridManager = new GridLayoutManager(getActivity(), SPAN_SIZE); mGridManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() { @Override public int getSpanSize(int position) { From 9801cf50e38abd0214340d48dba1e5b8e1572cef Mon Sep 17 00:00:00 2001 From: Alexander-- Date: Thu, 14 Nov 2019 20:34:31 +0659 Subject: [PATCH 0024/1194] Save/restore focused item --- .../fragments/list/BaseListFragment.java | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) 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 a3844a92f..a2821a65e 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 @@ -34,6 +34,7 @@ import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.OnClickGesture; import org.schabi.newpipe.util.StateSaver; import org.schabi.newpipe.util.StreamDialogEntry; +import org.schabi.newpipe.views.NewPipeRecyclerView; import org.schabi.newpipe.views.SuperScrollLayoutManager; import java.util.List; @@ -50,6 +51,7 @@ public abstract class BaseListFragment extends BaseStateFragment implem protected InfoListAdapter infoListAdapter; protected RecyclerView itemsList; private int updateFlags = 0; + private int focusedPosition = -1; private static final int LIST_MODE_UPDATE_FLAG = 0x32; @@ -111,9 +113,22 @@ public abstract class BaseListFragment extends BaseStateFragment implem return "." + infoListAdapter.getItemsList().size() + ".list"; } + private int getFocusedPosition() { + View focusedItem = itemsList.getFocusedChild(); + if (focusedItem != null) { + RecyclerView.ViewHolder itemHolder = itemsList.findContainingViewHolder(focusedItem); + if (itemHolder != null) { + return itemHolder.getAdapterPosition(); + } + } + + return -1; + } + @Override public void writeTo(Queue objectsToSave) { objectsToSave.add(infoListAdapter.getItemsList()); + objectsToSave.add(getFocusedPosition()); } @Override @@ -121,6 +136,20 @@ public abstract class BaseListFragment extends BaseStateFragment implem public void readFrom(@NonNull Queue savedObjects) throws Exception { infoListAdapter.getItemsList().clear(); infoListAdapter.getItemsList().addAll((List) savedObjects.poll()); + restoreFocus((Integer) savedObjects.poll()); + } + + private void restoreFocus(Integer position) { + if (position == null || position < 0) { + return; + } + + itemsList.post(() -> { + RecyclerView.ViewHolder focusedHolder = itemsList.findViewHolderForAdapterPosition(position); + if (focusedHolder != null) { + focusedHolder.itemView.requestFocus(); + } + }); } @Override @@ -135,6 +164,18 @@ public abstract class BaseListFragment extends BaseStateFragment implem savedState = StateSaver.tryToRestore(bundle, this); } + @Override + public void onStop() { + focusedPosition = getFocusedPosition(); + super.onStop(); + } + + @Override + public void onStart() { + super.onStart(); + restoreFocus(focusedPosition); + } + /*////////////////////////////////////////////////////////////////////////// // Init //////////////////////////////////////////////////////////////////////////*/ From 7bb5cacb0dff6f167046f612af5caf3f603f69da Mon Sep 17 00:00:00 2001 From: Alexander-- Date: Thu, 14 Nov 2019 20:37:16 +0659 Subject: [PATCH 0025/1194] Special MovementMethod for video description Video descriptions can be very long. Some of them are basically walls of text with couple of lines at top or bottom. They are also not scrolled within TextView itself, - instead NewPipe expects user to scroll their containing ViewGroup. This renders all builtin MovementMethod implementations useless. This commit adds a new MovementMethod, that uses requestRectangleOnScreen to intelligently re-position the TextView within it's scrollable container. --- .../fragments/detail/VideoDetailFragment.java | 5 +- .../views/LargeTextMovementMethod.java | 290 ++++++++++++++++++ .../fragment_video_detail.xml | 1 + 3 files changed, 295 insertions(+), 1 deletion(-) create mode 100644 app/src/main/java/org/schabi/newpipe/views/LargeTextMovementMethod.java 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 fd2a3285d..c698d4ad4 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 @@ -87,6 +87,7 @@ import org.schabi.newpipe.util.ShareUtils; import org.schabi.newpipe.util.StreamItemAdapter; import org.schabi.newpipe.util.StreamItemAdapter.StreamSizeWrapper; import org.schabi.newpipe.views.AnimatedProgressBar; +import org.schabi.newpipe.views.LargeTextMovementMethod; import java.io.Serializable; import java.util.Collection; @@ -441,10 +442,13 @@ public class VideoDetailFragment if (videoDescriptionRootLayout.getVisibility() == View.VISIBLE) { videoTitleTextView.setMaxLines(1); videoDescriptionRootLayout.setVisibility(View.GONE); + videoDescriptionView.setFocusable(false); videoTitleToggleArrow.setImageResource(R.drawable.arrow_down); } else { videoTitleTextView.setMaxLines(10); videoDescriptionRootLayout.setVisibility(View.VISIBLE); + videoDescriptionView.setFocusable(true); + videoDescriptionView.setMovementMethod(new LargeTextMovementMethod()); videoTitleToggleArrow.setImageResource(R.drawable.arrow_up); } } @@ -481,7 +485,6 @@ public class VideoDetailFragment videoDescriptionRootLayout = rootView.findViewById(R.id.detail_description_root_layout); videoUploadDateView = rootView.findViewById(R.id.detail_upload_date_view); videoDescriptionView = rootView.findViewById(R.id.detail_description_view); - videoDescriptionView.setMovementMethod(LinkMovementMethod.getInstance()); videoDescriptionView.setAutoLinkMask(Linkify.WEB_URLS); thumbsUpTextView = rootView.findViewById(R.id.detail_thumbs_up_count_view); diff --git a/app/src/main/java/org/schabi/newpipe/views/LargeTextMovementMethod.java b/app/src/main/java/org/schabi/newpipe/views/LargeTextMovementMethod.java new file mode 100644 index 000000000..1f9ab5e2d --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/views/LargeTextMovementMethod.java @@ -0,0 +1,290 @@ +/* + * Copyright 2019 Alexander Rvachev + * FocusOverlayView.java is part of NewPipe + * + * License: GPL-3.0+ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.schabi.newpipe.views; + +import android.graphics.Rect; +import android.text.Layout; +import android.text.Selection; +import android.text.Spannable; +import android.text.method.LinkMovementMethod; +import android.text.style.ClickableSpan; +import android.view.KeyEvent; +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewParent; +import android.widget.TextView; + +public class LargeTextMovementMethod extends LinkMovementMethod { + private final Rect visibleRect = new Rect(); + + private int dir; + + @Override + public void onTakeFocus(TextView view, Spannable text, int dir) { + Selection.removeSelection(text); + + super.onTakeFocus(view, text, dir); + + this.dir = dirToRelative(dir); + } + + @Override + protected boolean handleMovementKey(TextView widget, Spannable buffer, int keyCode, int movementMetaState, KeyEvent event) { + if (!doHandleMovement(widget, buffer, keyCode, movementMetaState, event)) { + // clear selection to make sure, that it does not confuse focus handling code + Selection.removeSelection(buffer); + return false; + } + + return true; + } + + private boolean doHandleMovement(TextView widget, Spannable buffer, int keyCode, int movementMetaState, KeyEvent event) { + int newDir = keyToDir(keyCode); + + if (dir != 0 && newDir != dir) { + return false; + } + + this.dir = 0; + + ViewGroup root = findScrollableParent(widget); + + widget.getHitRect(visibleRect); + + root.offsetDescendantRectToMyCoords((View) widget.getParent(), visibleRect); + + return super.handleMovementKey(widget, buffer, keyCode, movementMetaState, event); + } + + @Override + protected boolean up(TextView widget, Spannable buffer) { + if (gotoPrev(widget, buffer)) { + return true; + } + + return super.up(widget, buffer); + } + + @Override + protected boolean left(TextView widget, Spannable buffer) { + if (gotoPrev(widget, buffer)) { + return true; + } + + return super.left(widget, buffer); + } + + @Override + protected boolean right(TextView widget, Spannable buffer) { + if (gotoNext(widget, buffer)) { + return true; + } + + return super.right(widget, buffer); + } + + @Override + protected boolean down(TextView widget, Spannable buffer) { + if (gotoNext(widget, buffer)) { + return true; + } + + return super.down(widget, buffer); + } + + private boolean gotoPrev(TextView view, Spannable buffer) { + Layout layout = view.getLayout(); + if (layout == null) { + return false; + } + + View root = findScrollableParent(view); + + int rootHeight = root.getHeight(); + + if (visibleRect.top >= 0) { + // we fit entirely into the viewport, no need for fancy footwork + return false; + } + + int topExtra = -visibleRect.top; + + int firstVisibleLineNumber = layout.getLineForVertical(topExtra); + + // when deciding whether to pass "focus" to span, account for one more line + // this ensures, that focus is never passed to spans partially outside scroll window + int visibleStart = firstVisibleLineNumber == 0 ? 0 : layout.getLineStart(firstVisibleLineNumber - 1); + + ClickableSpan[] candidates = buffer.getSpans(visibleStart, buffer.length(), ClickableSpan.class); + + if (candidates.length != 0) { + int a = Selection.getSelectionStart(buffer); + int b = Selection.getSelectionEnd(buffer); + + int selStart = Math.min(a, b); + int selEnd = Math.max(a, b); + + int bestStart = -1; + int bestEnd = -1; + + for (int i = 0; i < candidates.length; i++) { + int start = buffer.getSpanStart(candidates[i]); + int end = buffer.getSpanEnd(candidates[i]); + + if ((end < selEnd || selStart == selEnd) && start >= visibleStart) { + if (end > bestEnd) { + bestStart = buffer.getSpanStart(candidates[i]); + bestEnd = end; + } + } + } + + if (bestStart >= 0) { + Selection.setSelection(buffer, bestEnd, bestStart); + return true; + } + } + + float fourLines = view.getTextSize() * 4; + + visibleRect.left = 0; + visibleRect.right = view.getWidth(); + visibleRect.top = Math.max(0, (int) (topExtra - fourLines)); + visibleRect.bottom = visibleRect.top + rootHeight; + + return view.requestRectangleOnScreen(visibleRect); + } + + private boolean gotoNext(TextView view, Spannable buffer) { + Layout layout = view.getLayout(); + if (layout == null) { + return false; + } + + View root = findScrollableParent(view); + + int rootHeight = root.getHeight(); + + if (visibleRect.bottom <= rootHeight) { + // we fit entirely into the viewport, no need for fancy footwork + return false; + } + + int bottomExtra = visibleRect.bottom - rootHeight; + + int visibleBottomBorder = view.getHeight() - bottomExtra; + + int lineCount = layout.getLineCount(); + + int lastVisibleLineNumber = layout.getLineForVertical(visibleBottomBorder); + + // when deciding whether to pass "focus" to span, account for one more line + // this ensures, that focus is never passed to spans partially outside scroll window + int visibleEnd = lastVisibleLineNumber == lineCount - 1 ? buffer.length() : layout.getLineEnd(lastVisibleLineNumber - 1); + + ClickableSpan[] candidates = buffer.getSpans(0, visibleEnd, ClickableSpan.class); + + if (candidates.length != 0) { + int a = Selection.getSelectionStart(buffer); + int b = Selection.getSelectionEnd(buffer); + + int selStart = Math.min(a, b); + int selEnd = Math.max(a, b); + + int bestStart = Integer.MAX_VALUE; + int bestEnd = Integer.MAX_VALUE; + + for (int i = 0; i < candidates.length; i++) { + int start = buffer.getSpanStart(candidates[i]); + int end = buffer.getSpanEnd(candidates[i]); + + if ((start > selStart || selStart == selEnd) && end <= visibleEnd) { + if (start < bestStart) { + bestStart = start; + bestEnd = buffer.getSpanEnd(candidates[i]); + } + } + } + + if (bestEnd < Integer.MAX_VALUE) { + // cool, we have managed to find next link without having to adjust self within view + Selection.setSelection(buffer, bestStart, bestEnd); + return true; + } + } + + // there are no links within visible area, but still some text past visible area + // scroll visible area further in required direction + float fourLines = view.getTextSize() * 4; + + visibleRect.left = 0; + visibleRect.right = view.getWidth(); + visibleRect.bottom = Math.min((int) (visibleBottomBorder + fourLines), view.getHeight()); + visibleRect.top = visibleRect.bottom - rootHeight; + + return view.requestRectangleOnScreen(visibleRect); + } + + private ViewGroup findScrollableParent(View view) { + View current = view; + + ViewParent parent; + do { + parent = current.getParent(); + + if (parent == current || !(parent instanceof View)) { + return (ViewGroup) view.getRootView(); + } + + current = (View) parent; + + if (current.isScrollContainer()) { + return (ViewGroup) current; + } + } + while (true); + } + + private int dirToRelative(int dir) { + switch (dir) { + case View.FOCUS_DOWN: + case View.FOCUS_RIGHT: + return View.FOCUS_FORWARD; + case View.FOCUS_UP: + case View.FOCUS_LEFT: + return View.FOCUS_BACKWARD; + } + + return dir; + } + + private int keyToDir(int keyCode) { + switch (keyCode) { + case KeyEvent.KEYCODE_DPAD_UP: + case KeyEvent.KEYCODE_DPAD_LEFT: + return View.FOCUS_BACKWARD; + case KeyEvent.KEYCODE_DPAD_DOWN: + case KeyEvent.KEYCODE_DPAD_RIGHT: + return View.FOCUS_FORWARD; + } + + return View.FOCUS_FORWARD; + } +} diff --git a/app/src/main/res/layout-large-land/fragment_video_detail.xml b/app/src/main/res/layout-large-land/fragment_video_detail.xml index 02d330ade..6d54525db 100644 --- a/app/src/main/res/layout-large-land/fragment_video_detail.xml +++ b/app/src/main/res/layout-large-land/fragment_video_detail.xml @@ -15,6 +15,7 @@ android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="5" + android:isScrollContainer="true" android:fitsSystemWindows="true"> Date: Thu, 14 Nov 2019 20:48:19 +0659 Subject: [PATCH 0026/1194] Add hints for focus transition from description --- .../main/res/layout-large-land/fragment_video_detail.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/layout-large-land/fragment_video_detail.xml b/app/src/main/res/layout-large-land/fragment_video_detail.xml index 6d54525db..e1a680e5d 100644 --- a/app/src/main/res/layout-large-land/fragment_video_detail.xml +++ b/app/src/main/res/layout-large-land/fragment_video_detail.xml @@ -379,6 +379,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" + android:focusable="true" + android:descendantFocusability="afterDescendants" android:padding="6dp"> @@ -467,6 +469,8 @@ android:layout_marginTop="5dp" android:orientation="vertical" android:visibility="gone" + android:focusable="true" + android:descendantFocusability="afterDescendants" tools:visibility="visible"> Date: Thu, 14 Nov 2019 20:50:35 +0659 Subject: [PATCH 0027/1194] More fixes to comment focus handling --- .../holder/CommentsMiniInfoItemHolder.java | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java b/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java index e7b09f3e2..198766069 100644 --- a/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java +++ b/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java @@ -126,14 +126,28 @@ public class CommentsMiniInfoItemHolder extends InfoItemHolder { } private void allowLinkFocus() { + itemContentView.setMovementMethod(LinkMovementMethod.getInstance()); + } + + private void denyLinkFocus() { + itemContentView.setMovementMethod(null); + } + + private boolean shouldFocusLinks() { if (itemView.isInTouchMode()) { - return; + return false; } URLSpan[] urls = itemContentView.getUrls(); - if (urls != null && urls.length != 0) { - itemContentView.setMovementMethod(LinkMovementMethod.getInstance()); + return urls != null && urls.length != 0; + } + + private void determineLinkFocus() { + if (shouldFocusLinks()) { + allowLinkFocus(); + } else { + denyLinkFocus(); } } @@ -151,8 +165,10 @@ public class CommentsMiniInfoItemHolder extends InfoItemHolder { linkify(); - if (!hasEllipsis) { - allowLinkFocus(); + if (hasEllipsis) { + denyLinkFocus(); + } else { + determineLinkFocus(); } } @@ -168,13 +184,11 @@ public class CommentsMiniInfoItemHolder extends InfoItemHolder { itemContentView.setMaxLines(commentExpandedLines); itemContentView.setText(commentText); linkify(); - allowLinkFocus(); + determineLinkFocus(); } private void linkify(){ Linkify.addLinks(itemContentView, Linkify.WEB_URLS); Linkify.addLinks(itemContentView, pattern, null, null, timestampLink); - - itemContentView.setMovementMethod(null); } } From 7d75950624f56512a713a2b1ba4cbdc700d89673 Mon Sep 17 00:00:00 2001 From: Alexander-- Date: Thu, 14 Nov 2019 20:54:40 +0659 Subject: [PATCH 0028/1194] Disable srolling down comment list while comments are loading Prevents comment list from losing focus to some outside View when user tries to scroll down after reaching "end" --- .../fragments/list/BaseListInfoFragment.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 9a8e1fd17..7363d221c 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 @@ -10,6 +10,7 @@ import androidx.annotation.NonNull; import org.schabi.newpipe.extractor.ListExtractor; import org.schabi.newpipe.extractor.ListInfo; import org.schabi.newpipe.util.Constants; +import org.schabi.newpipe.views.NewPipeRecyclerView; import java.util.Queue; @@ -17,6 +18,8 @@ import icepick.State; import io.reactivex.Single; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.Disposable; +import io.reactivex.functions.Action; +import io.reactivex.functions.Consumer; import io.reactivex.schedulers.Schedulers; public abstract class BaseListInfoFragment @@ -136,9 +139,13 @@ public abstract class BaseListInfoFragment isLoading.set(true); if (currentWorker != null) currentWorker.dispose(); + + forbidDownwardFocusScroll(); + currentWorker = loadMoreItemsLogic() .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) + .doFinally(this::allowDownwardFocusScroll) .subscribe((@io.reactivex.annotations.NonNull ListExtractor.InfoItemsPage InfoItemsPage) -> { isLoading.set(false); handleNextItems(InfoItemsPage); @@ -148,6 +155,18 @@ public abstract class BaseListInfoFragment }); } + private void forbidDownwardFocusScroll() { + if (itemsList instanceof NewPipeRecyclerView) { + ((NewPipeRecyclerView) itemsList).setFocusScrollAllowed(false); + } + } + + private void allowDownwardFocusScroll() { + if (itemsList instanceof NewPipeRecyclerView) { + ((NewPipeRecyclerView) itemsList).setFocusScrollAllowed(true); + } + } + @Override public void handleNextItems(ListExtractor.InfoItemsPage result) { super.handleNextItems(result); From 436c75ca6c081b34388a835924b1270277d50ffe Mon Sep 17 00:00:00 2001 From: Alexander-- Date: Thu, 14 Nov 2019 22:43:54 +0659 Subject: [PATCH 0029/1194] Make comment pic explicitly non-focusable --- app/src/main/res/layout/list_comments_item.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/res/layout/list_comments_item.xml b/app/src/main/res/layout/list_comments_item.xml index 393d7d1b4..41606201f 100644 --- a/app/src/main/res/layout/list_comments_item.xml +++ b/app/src/main/res/layout/list_comments_item.xml @@ -18,6 +18,7 @@ android:layout_alignParentTop="true" android:layout_marginRight="@dimen/video_item_search_image_right_margin" android:contentDescription="@string/list_thumbnail_view_description" + android:focusable="false" android:src="@drawable/buddy" tools:ignore="RtlHardcoded" /> From a1e02f770434237b0be4bf0bf8a938a33018b509 Mon Sep 17 00:00:00 2001 From: Alexander-- Date: Sat, 16 Nov 2019 13:02:46 +0659 Subject: [PATCH 0030/1194] Default to landscape orientation for Android TV --- .../main/java/org/schabi/newpipe/player/MainVideoPlayer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 38da4d8b2..0650e2a26 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -164,13 +164,14 @@ public final class MainVideoPlayer extends AppCompatActivity super.onChange(selfChange); if (globalScreenOrientationLocked()) { final boolean lastOrientationWasLandscape = defaultPreferences.getBoolean( - getString(R.string.last_orientation_landscape_key), false); + getString(R.string.last_orientation_landscape_key), FireTvUtils.isFireTv()); setLandscape(lastOrientationWasLandscape); } else { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); } } }; + getContentResolver().registerContentObserver( Settings.System.getUriFor(Settings.System.ACCELEROMETER_ROTATION), false, rotationObserver); @@ -238,7 +239,7 @@ public final class MainVideoPlayer extends AppCompatActivity if (globalScreenOrientationLocked()) { boolean lastOrientationWasLandscape = defaultPreferences.getBoolean( - getString(R.string.last_orientation_landscape_key), false); + getString(R.string.last_orientation_landscape_key), FireTvUtils.isFireTv()); setLandscape(lastOrientationWasLandscape); } From c0fb96a911c7c0464e26b78597e58aa96b19bde9 Mon Sep 17 00:00:00 2001 From: Alexander-- Date: Sat, 16 Nov 2019 13:05:59 +0659 Subject: [PATCH 0031/1194] Release seekbar on any confirmation key, not just DPAD_CENTER --- .../java/org/schabi/newpipe/util/FireTvUtils.java | 13 +++++++++++++ .../org/schabi/newpipe/views/FocusAwareSeekBar.java | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/util/FireTvUtils.java b/app/src/main/java/org/schabi/newpipe/util/FireTvUtils.java index 879b54e1f..2c5090381 100644 --- a/app/src/main/java/org/schabi/newpipe/util/FireTvUtils.java +++ b/app/src/main/java/org/schabi/newpipe/util/FireTvUtils.java @@ -3,6 +3,7 @@ package org.schabi.newpipe.util; import android.annotation.SuppressLint; import android.content.pm.PackageManager; +import android.view.KeyEvent; import org.schabi.newpipe.App; public class FireTvUtils { @@ -15,4 +16,16 @@ public class FireTvUtils { return pm.hasSystemFeature(AMAZON_FEATURE_FIRE_TV) || pm.hasSystemFeature(PackageManager.FEATURE_LEANBACK); } + + public static boolean isConfirmKey(int keyCode) { + switch (keyCode) { + case KeyEvent.KEYCODE_DPAD_CENTER: + case KeyEvent.KEYCODE_ENTER: + case KeyEvent.KEYCODE_SPACE: + case KeyEvent.KEYCODE_NUMPAD_ENTER: + return true; + default: + return false; + } + } } diff --git a/app/src/main/java/org/schabi/newpipe/views/FocusAwareSeekBar.java b/app/src/main/java/org/schabi/newpipe/views/FocusAwareSeekBar.java index 3789ea344..dafd5ae6f 100644 --- a/app/src/main/java/org/schabi/newpipe/views/FocusAwareSeekBar.java +++ b/app/src/main/java/org/schabi/newpipe/views/FocusAwareSeekBar.java @@ -25,6 +25,7 @@ import android.view.ViewTreeObserver; import android.widget.SeekBar; import androidx.appcompat.widget.AppCompatSeekBar; +import org.schabi.newpipe.util.FireTvUtils; /** * SeekBar, adapted for directional navigation. It emulates touch-related callbacks @@ -57,7 +58,7 @@ public final class FocusAwareSeekBar extends AppCompatSeekBar { @Override public boolean onKeyDown(int keyCode, KeyEvent event) { - if (!isInTouchMode() && keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { + if (!isInTouchMode() && FireTvUtils.isConfirmKey(keyCode)) { releaseTrack(); } From dc7ae3917e97889def2f7315e7ca4d947dbdd847 Mon Sep 17 00:00:00 2001 From: Alexander-- Date: Sun, 17 Nov 2019 16:53:11 +0659 Subject: [PATCH 0032/1194] Leanback launcher support --- app/src/main/AndroidManifest.xml | 2 ++ .../main/res/mipmap-xhdpi/newpipe_tv_banner.png | Bin 0 -> 2138 bytes 2 files changed, 2 insertions(+) create mode 100644 app/src/main/res/mipmap-xhdpi/newpipe_tv_banner.png diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 9052dabab..3583d0312 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -12,6 +12,7 @@ + diff --git a/app/src/main/res/mipmap-xhdpi/newpipe_tv_banner.png b/app/src/main/res/mipmap-xhdpi/newpipe_tv_banner.png new file mode 100644 index 0000000000000000000000000000000000000000..4be6644504b178aa612b218202626b4b5d9e2a26 GIT binary patch literal 2138 zcmdT`i#OZZ7XC#QnU2k3^SOFRAEAiK4{2qg9Wpsz+;r^d`u7M|GxkJDS|2 zC{fXiW|)dfYcdk*cG{sSDOIH&p*5i-5d=Xb++WxH6LZg6`@Fuj&feeNXPxhqhKKs= zeqr(j006p}0N-x`0D=bRPjs}vepa-u4-T4ylbAC)V9VD@x(TkKR|BF60I;X+vq9EN z7BS$aai(8XW&|!JlbC={28cwWQ)&j5keF~a*$IcgOqZcd06=>bt2* zMeoX}pV}{@+PGul%LFUyK0z?8J`I&jq%`8(>>UF-6Jtb$h7z@Ke#%%y_cwc7=)(@U#6inNelwd%a{vI+na zOUH810is!LOF}=^)VopvXb23@b0!Z8RI5}2FI_0(U3LXvpaw*zYPU8-E+#>bi^Z_%xW=$$Ll_em== zq9!KQXa9l{F^JWqcyUHA@XOD^`YPc_;T>rgaTI<{tVuER*!+;x^OLCL0Cn}XM2QG5 z2iSyAuM<^B=N!eDXuh83se9%yN!nRkE0Xuo2E4)^goY@_m=eQhURES2_r4E}Ckw1_ zz`%m%m54_ZniL`OlCMi%whJ~AFKvrsXk}Lc@_{%!M!vx0uPw0NwfXC##fMyMs$3dX zX+7x%3O$X0IDhj6H)!6MkOtyUW^{*`J1E8737fT8jesR%gk8s+2?sOJ(WFdq7Tx&Q z_VPPEWfz!iIzt+kYW{gju9!&X|GxYYbfro09C;g2;qWl(bOuc&iH~F4{1Iv?+*GGi zZ#jvT2t*(-b}YW=o@&{rD+gXf=~Ut6s#X3!dWY%zJiI~dmQm#uAu*nv;M3Jn8CQ|7 zh{i8<@praILEI8#+m5Aq$n3l_3unu72^&IWhg!i-PZ?^+C46+&vE<>lmyk*YhVtCf1I>#%RcUk2v}ppmq+gg# zPa0#(TiPaUq%cUshI%t`Ov^PTST5tO&+RvjEJSYd;rz{&^|>LiC`Qghx0eO50f$zg3t+C(%ON? zDdpiI^a_;{+tp!o;coug>8*b&inT{T81!i&8LjM{(YK~D87w4m`NJXy)5)ey>!X#7 zv%duX+(Qm~y7`}}$>#^0gAUFKf|QyPvXi*EEVo+UT9x$R7RTAmlHrIy$h#j6Erq5i z_YTFlNXC;CM)0z*E`$`kq=mmR{W*S+ICkJ~&!AQn+o)5k`(gz3Xh{rAEk?pY!h#VP3oEaZY=x zfgz$(*AtX%Wa_;OF=OjKL7+Q~cxHXH3pc@SHi~~}+WqdAzVBMbB^#+fhLP546P~}? zF2Qv)%0}jNO{xACArFF^whw+&ZA}{Hq$jJ@8}J+EF+_!QY__*QzThm;DFnP@;+EL2 z?IZ8ti1E2ivh&q2(y(h%0Q;i1Fx_4%V)Nn1}EMnwpr*3{}cND2vDH#2(5m z#uYCVdG5F$-&M&U8?V$GK`qt2VP56Ct7Yc*I@cpdnfD>)#S2pvj(pdFs2DWE5Y27B znh+hcyt5t0xUQ9>`M`9#kRDuHQ$REYW-$bGK=NYK6tr$wa= z<%RXpf`oU?>?ao|-B;@4SD=)s$AtyaMaK%bjeFOEz$fGG2_8zuIzP6K`QQwm%yRAy zh6USk++UCjU&GPjtwoN!kX&ZU^Mp#jf;7}R#=f$U9!6>G`AZ^RzMkmpa6tV4`F$4{ zJHF2dHX6_9XH2hS>P#5GSlhI-qn?-6AqKETpu5=~@JdUCfYp)vR~#JFA^$gxliS|7 z7tweb%WjwW47M3vuyeMkcKKsSquPpO<8uSntr}WCQaA8ffp+)&U+U9eYN|xG(W$3i T=$3)s006-Fh5E8iUcB}{BjNT* literal 0 HcmV?d00001 From 106e538d0824d23604ce83c8bf9ad0916dc65ee5 Mon Sep 17 00:00:00 2001 From: Alexander-- Date: Sun, 17 Nov 2019 16:54:18 +0659 Subject: [PATCH 0033/1194] Excpicitly disable touchscreen requirement --- app/src/main/AndroidManifest.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 3583d0312..3284202fd 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -11,6 +11,8 @@ + + Date: Sun, 17 Nov 2019 16:55:22 +0659 Subject: [PATCH 0034/1194] Disable touchScreenBlocksFocus on AppBarLayout For some inexplicable reason this attribute got enabled by default on Android 9, which effectively prevents details screen from working --- app/src/main/res/layout-large-land/fragment_video_detail.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/res/layout-large-land/fragment_video_detail.xml b/app/src/main/res/layout-large-land/fragment_video_detail.xml index e1a680e5d..684adc222 100644 --- a/app/src/main/res/layout-large-land/fragment_video_detail.xml +++ b/app/src/main/res/layout-large-land/fragment_video_detail.xml @@ -23,6 +23,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@android:color/transparent" + android:touchscreenBlocksFocus="false" android:fitsSystemWindows="true" app:elevation="0dp" app:layout_behavior="com.google.android.material.appbar.FlingBehavior"> From 29136d633a9f54d774e5dbc39b85c73d6b2b06ae Mon Sep 17 00:00:00 2001 From: Alexander-- Date: Sun, 1 Dec 2019 12:33:34 +0659 Subject: [PATCH 0035/1194] Intercept ActivityNotFoundException for ACTION_CAPTIONING_SETTINGS --- .../newpipe/settings/AppearanceSettingsFragment.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java index ce22b84e9..72d720824 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/AppearanceSettingsFragment.java @@ -1,9 +1,11 @@ package org.schabi.newpipe.settings; +import android.content.ActivityNotFoundException; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.provider.Settings; +import android.widget.Toast; import androidx.annotation.Nullable; import androidx.preference.Preference; @@ -42,7 +44,11 @@ public class AppearanceSettingsFragment extends BasePreferenceFragment { @Override public boolean onPreferenceTreeClick(Preference preference) { if (preference.getKey().equals(captionSettingsKey) && CAPTIONING_SETTINGS_ACCESSIBLE) { - startActivity(new Intent(Settings.ACTION_CAPTIONING_SETTINGS)); + try { + startActivity(new Intent(Settings.ACTION_CAPTIONING_SETTINGS)); + } catch (ActivityNotFoundException e) { + Toast.makeText(getActivity(), R.string.general_error, Toast.LENGTH_SHORT).show(); + } } return super.onPreferenceTreeClick(preference); From 3f51114129c813ac83bf658f88934f968990faa9 Mon Sep 17 00:00:00 2001 From: Alexander-- Date: Sun, 1 Dec 2019 12:38:01 +0659 Subject: [PATCH 0036/1194] Improve usability of settings on TV devices * Add focus overlay to SettingsActivity * Make screen "Contents of Main Page" navigable from remote --- .../java/org/schabi/newpipe/settings/SettingsActivity.java | 6 ++++++ app/src/main/res/layout/list_choose_tabs.xml | 1 + 2 files changed, 7 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java index a3f218074..e53b7ba07 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java +++ b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java @@ -12,7 +12,9 @@ import android.view.Menu; import android.view.MenuItem; import org.schabi.newpipe.R; +import org.schabi.newpipe.util.FireTvUtils; import org.schabi.newpipe.util.ThemeHelper; +import org.schabi.newpipe.views.FocusOverlayView; /* @@ -56,6 +58,10 @@ public class SettingsActivity extends AppCompatActivity implements BasePreferenc .replace(R.id.fragment_holder, new MainSettingsFragment()) .commit(); } + + if (FireTvUtils.isFireTv()) { + FocusOverlayView.setupFocusObserver(this); + } } @Override diff --git a/app/src/main/res/layout/list_choose_tabs.xml b/app/src/main/res/layout/list_choose_tabs.xml index ce17e0382..82c9dd081 100644 --- a/app/src/main/res/layout/list_choose_tabs.xml +++ b/app/src/main/res/layout/list_choose_tabs.xml @@ -12,6 +12,7 @@ android:layout_marginTop="3dp" android:minHeight="?listPreferredItemHeightSmall" android:orientation="horizontal" + android:focusable="true" app:cardCornerRadius="5dp" app:cardElevation="4dp"> From 8c9015b57bd489a192e69f4a8977c745810403b2 Mon Sep 17 00:00:00 2001 From: Alexander-- Date: Tue, 10 Dec 2019 21:21:35 +0659 Subject: [PATCH 0037/1194] Remove commented code --- .../com/google/android/material/appbar/FlingBehavior.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/src/main/java/com/google/android/material/appbar/FlingBehavior.java b/app/src/main/java/com/google/android/material/appbar/FlingBehavior.java index ea2857b03..3af2c95bc 100644 --- a/app/src/main/java/com/google/android/material/appbar/FlingBehavior.java +++ b/app/src/main/java/com/google/android/material/appbar/FlingBehavior.java @@ -1,6 +1,5 @@ package com.google.android.material.appbar; -import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Rect; import android.util.AttributeSet; @@ -35,8 +34,6 @@ public final class FlingBehavior extends AppBarLayout.Behavior { return false; } - int offset = getTopAndBottomOffset(); - int dy; if (focusScrollRect.bottom > height) { @@ -49,8 +46,6 @@ public final class FlingBehavior extends AppBarLayout.Behavior { return false; } - //int newOffset = offset + dy; - int consumed = scroll(coordinatorLayout, child, dy, getMaxDragOffset(child), 0); return consumed == dy; From 8e45296826c5b8e449a6e157f71ed3b60a81c686 Mon Sep 17 00:00:00 2001 From: chr_56 Date: Sat, 14 Dec 2019 21:16:40 +0800 Subject: [PATCH 0038/1194] remove values-cmn/strings.xml (useless) --- app/src/main/res/values-cmn/strings.xml | 504 ------------------------ 1 file changed, 504 deletions(-) delete mode 100644 app/src/main/res/values-cmn/strings.xml diff --git a/app/src/main/res/values-cmn/strings.xml b/app/src/main/res/values-cmn/strings.xml deleted file mode 100644 index 3ff479bfd..000000000 --- a/app/src/main/res/values-cmn/strings.xml +++ /dev/null @@ -1,504 +0,0 @@ - - - 点击搜索按钮即可开始使用 - %1$s 次观看 - 发布于 %1$s - 找不到媒体播放器。您要安装 VLC 吗? - 找不到媒体播放器(您可以安装 VLC 来播放)。 - 安装 - 取消 - 在浏览器中打开 - 在悬浮窗模式下打开 - 分享 - 下载 - 下载媒体文件 - 搜索 - 设置 - 您是不是要找:%1$s? - 分享至 - 选择浏览器 - 旋转 - 使用外部视频播放器 - 删除某些分辨率下的音频 - 使用外部音频播放器 - NewPipe 悬浮窗模式 - 订阅 - 已订阅 - 退订成功 - 无法更改订阅 - 无法更新订阅 - 显示信息 - 主页 - 订阅 - 已添加书签到播放列表 - 新功能 - 转到后台 - 悬浮窗 - 添加到 - 视频下载文件夹 - 已下载的视频储存在此处 - 选择视频文件的下载文件夹 - 音频下载文件夹 - 已下载的音频存储在此处 - 选择音频文件的下载文件夹 - 自动播放 - NewPipes被其它程序调用时播放视频 - 默认分辨率 - 默认悬浮窗分辨率 - 显示更高的分辨率 - 只有部分设备支持播放 2K/4K 视频 - 用 Kodi 播放 - 没找到 Kore 应用,需要安装它吗? - 显示“用 Kodi 播放”选项 - 显示以 Kodi 媒体中心播放视频的选项 - 音频 - 默认音频格式 - 默认视频格式 - 主题 - 亮色 - 酷黑 - 黑色 - 记住悬浮窗的尺寸与位置 - 记住上一次悬浮窗的位置以及大小 - 已清除图像缓存 - 最小化悬浮窗播放器 - 清除观看历史 - 搜索记录已删除。 - 错误 - 网络错误 - 举报错误 - 没有结果 - 开始 - 暂停 - 播放 - 创建 - 删除 - 删除所有 - 新任务 - 好 -\n - 错误 -\n - 不支持的服务器 - 文件已存在 - NewPipe 下载中 - 请稍等… - 字母与数字 - 最特别的字符 - 这个文件里没有已下载应用程式 - 关于NewPipe - 设置 - 关于 - 第三方执照 - 打开网页 - 删除书签 - 确定删除该播放列表吗? - 已创建播放列表 - 播放列表 - 步骤 - 重置 - 为了遵守欧洲通用数据保护法规(GDPR,我们请你注意NewPipe的隐私政策.请仔细阅读. -\n你必须接受它才能将错误报告发送给我们. - 接受 - 拒绝 - 没有限制 - 使用移动数据时的解析度限制 - 最小化应用程序切换 - 从主视频播放器切换到其他应用时的操作 - %s - 没有 - 最小化后台播放 - 使用快速粗略定位 - 粗略定位功能允许播放器以略低的精确度为代价换取更快的定位速度 - 下载缩略图 - 清除缓存的元数据 - 移除所有缓存的网页数据 - 已清除缓存的元数据 - 不加载缩略图时,可以节省数据和存储空间。更改后将清除存储空间和扩展空间的缓存。 - 自动排列下一个媒体 - 在非重复排列中播放最后一个媒体时自动推荐相关媒体 - 玩家手势控制 - 使用手势控制播放器的亮度和音量 - 搜索建议 - 搜索时显示建议 - 搜索历史记录 - 在本地存储搜索 - 观看历史 - 记录观看过的视频 - 取得视窗焦点时继续播放 - 在被打断后继续播放(例如有来电) - 下载 - 下一部 - 显示「下一部」及「相关」的视频 - 显示「长按以新增」的提示 - 在视频详细信息页按下后台播放或悬浮窗按钮时提示 - 不支持该网址 - 默认内容的国家 - 服务 - 播放器 - 行为 - 视频与音频 - 历史记录和缓存数据 - 悬浮窗 - 外观 - 其他 - 调试 - 在后台播放 - 在悬浮窗下播放 - 已添加到后台播放队列 - 已添加到悬浮窗播放队列 - 播放 - 内容 - 年龄限制内容 - 显示有年龄限制的视频。可以从设置中允许该内容。 - 直播 - 下载 - 下载 - 错误报告 - 所有 - 频道 - 频道 - 播放列表 - 播放列表 - 曲目 - 用户 - 是的 - 稍等 - 不适用 - 过滤 - 刷新 - 清除 - 调整 - 最佳分辨率 - 复原 - 全部播放 - 总是 - 仅一次 - 文件 - NewPipe 通知 - NewPipe 后台播放和悬浮窗播放的通知 - [未知] - 切换方向 - 切换到后台 - 切换到悬浮窗 - 切换到首页 - 导入数据库 - 导出数据库 - 覆盖您当前的历史记录和订阅 - 导出历史记录、订阅和播放列表 - 删除播放过的媒体的历史记录及回放位置 - 确定要清除所有观看历史记录吗? - 观看历史记录已清除。 - 清除搜索历史记录 - 清除搜索关键词的历史记录 - 确定要清除所有搜索历史记录吗? - 无法加载所有缩略图 - 无法解析视频网址签名 - 无法解析网站 - 无法完全解析网站 - 内容不可用 - 无法设置下载菜单 - 目前还不支持观看直播 - 无法获得任何媒体 - 无法加载图片 - 应用程序或界面出现崩溃了 - 无法播放此媒体 - 发生了无法恢复的播放器错误 - 正在从播放器错误中恢复 - 外部播放器不支持此类型的链接 - 无效的网址 - 找不到视频串流 - 找不到音频串流 - 无效的文件夹 - 无效的文件/内容来源 - 该文件不存在或缺少读写权限 - 文件名不能为空 - 发生错误:%1$s - 没有可供下载的串流 - 抱歉,这不应该发生的。 - 通过电子邮件报告错误 - 抱歉,发生了一些错误。 - 报告 - 信息: - 发生了什么: - 事件:\\n请求:\\n内容语言:\\n服务:\\nGMT 时间:\\n组件:\\n版本:\\n系统版本: - 您的评论(请用英语): - 详细: - 视频预览缩略图 - 视频预览缩略图 - 上传者的头像缩略图 - 喜欢 - 不喜欢 - 使用 Tor - (实验性)通过 Tor 强制下载流量以增加隐私(暂不支持视频媒体)。 - 用户报告 - 这里什么都没有 - 拖动以重新排序 - 无法创建下载目录「%1$s」 - 已成功创建下载目录「%1$s」 - 视频 - 音频 - 重试 - 手机存储访问权限被拒绝 - - - 十亿 - 没有订阅者 - - %s 位订阅者 - - - 无观看次数 - - %s 次观看 - - - 没有视频 - 删除 - 校验 - 退出 - 重命名 - 文件名 - 线程 - 错误的网址或网络不可用 - 点按以查看详细信息 - 复制到剪贴板 - 请稍后在设置中定义一个下载文件夹 - 在悬浮窗模式打开 -\n需要此权限 - 已删除一个项目。 - reCAPTCHA 验证 - reCAPTCHA 验证 - 需完成 reCAPTCHA 验证 - 下载 - 文件名中允许的字符 - 无效字符将替换为该值 - 替换字符 - © %1$s 由 %2$s 使用 %3$s 版权所有 - 无法加载许可证 - 关于 - 贡献者 - 许可证 - 安卓上开源且轻便的媒体播放器。 - 贡献 - 您是否有想法帮助我们:翻译、界面设计、代码优化以及真正繁重的功能扩展 - 我们随时欢迎您提供帮助。让 NewPipe 越变越好! - 在 GitHub 上查看 - 捐赠 - NewPipe 由社区人员维护和开发额,他们耗费时间务求为您带来最佳体验。现在是时候回过头来,让我们的开发人员能够在使 NewPipe 更加完美的同时,享受一杯咖啡。 - 回馈 - 网站 - 访问 NewPipe 网站了解更多信息和新闻。 - NewPipe 的隐私政策 - NewPipe 项目是非常重视您的隐私。因此,未经您的同意,该应用程序不会收集任何数据。 -\nNewPipe 的隐私政策详细说明了当您发送崩溃报告时,什么资料会被传送及储存。 - 阅读隐私政策 - NewPipe 的许可证 - NewPipe 是一个 Copyleft 的自由软件:您可以随意使用、研究、分享或改进它。在遵守由自由软件基金会所发布的 GNU 通用公共授权条款的状况下,您可以自由地再发布或修改它;授权条款预设使用第三版,但您也可以选择更新的版本。 - 阅读许可证 - 历史记录 - 搜索 - 观看 - 历史记录被关闭了 - 历史记录 - 没有历史记录 - 清除历史记录 - 项目已删除 - 确定要从搜索历史记录中删除该项吗? - 确定要从观看历史记录中删除该项吗? - 您确定要删除历史记录中的所有项吗? - 上一次播放 - 最受欢迎 - 首页内容 - 空白页面 - 互动页面 - 订阅页面 - Feed 页面 - 频道页面 - 选择一个频道 - 尚未订阅任何频道 - 选择一个互动 - 输出 - 接入 - 无效的压缩文件 - 警告:无法导入所有文件。 - 这将覆盖您当前的设定。 - 您是否要导入设定? - 互动 - 趋势 - 前 50 - 最新和热门 - 转到后台播放 - 悬浮窗播放 - 移除 - 详细 - 音频设置 - 长按加入队列 - 加入后台播放列表 - 加入悬浮窗播放列表 - 从这里开始播放 - 开始在后台播放 - 开始在新悬浮窗播放 - 打开抽屉 - 关闭抽屉 - 很快就会出现在这里 ;D - 偏好的「开启」动作 - 开启内容时的默认动作 - %s - 视频播放器 - 后台播放器 - 悬浮窗播放器 - 总是询问 - 正在获取信息… - 正在载入请求的内容 - 新的播放列表 - 删除 - 重命名 - 名称 - 添加到播放列表 - 设为播放列表缩略图 - 将播放列表加入书签 - 播放列表缩略图已更改。 - 无法删除播放列表。 - 没有字幕 - 合适 - 填满 - 缩放 - 自动生成 - 字幕 - 修改播放器字幕文本比列和背景样式。需要重启才能生效。 - 启用 LeakCanary - 内存泄漏监视可能导致应用程序在存储时无响应 - 报告活动周期外错误 - 强制报告在处理完片段或活动周期外发生的无法传递的 Rx 异常 - 导入/导出 - 导入 - 导入至 - 导出到 - 正在导入… - 正在导出… - 导入文件 - 之前的导出 - 无法导入订阅 - 无法导出订阅 - 通过下载导出文件来导入 YouTube 订阅: -\n -\n1.移至该网址:%1$s -\n2.当被询问时登入帐号 -\n3.应该开始下载(这是导出文件) - 通过输入 URL 或 ID 来导入 SoundCloud的配置文件: -\n -\n1.在浏览器中启用「桌面模式」(该网站不适用于移动设备) -\n2.移至该网址:%1$s -\n3.当被询问时登入帐号 -\n4.复制您重定向的配置文件到网址。 - 您的 ID,soundcloud.com/yourid - 请记住,此操作可能造成昂贵的网络花费。 -\n -\n您是否要继续? - 播放速度控制 - 速度 - 音量 - 取消链接(可能会导致扭曲) - 静音时快进 - 退订 - 新标签 - 选择标签 - 音量手势控制 - 用手势控制播放器的音量 - 手势控制亮度 - 用手势控制播放器的亮度 - 默认的内容语言 - 升级 - 文件已删除 - 应用升级通知 - 新 NewPipe 版本通知 - 外储存不可行 - 无法下载到外部SD卡。重置下载文件夹位置? - 恢复默认 - 您真的要恢复至默认吗? - 选择 - 升级 - 列表 - 自动 - 轻按以下载 - 已完成 - 有待 - 已暂停 - 已加入队列 - 后处理 - 队列 - 系统拒绝该行动 - 下载失败 - 下载完成 - %s已下载完毕 - 生成独特的名字 - 覆写 - 同名的已下载文件已经存在 - 同名下载进行中 - 显示错误 - 代码 - 无法创建该文件 - 系统拒绝此批准 - 安全连接失败 - 找不到服务器 - 连不上服务器 - 伺服器没回送数据 - 找不到 - 后处理失败 - 清除已完毕的下载 - - 重试上限 - 取消下载前可以尝试的最多次数 - 换成手机数据时中断 - 事件 - 使用默认选项卡, 读取保存的选项卡时出错 - 订阅者计数不可用 - 主页上显示的选项卡 - 会议 - 显示通知, 以便在新版本可用时提示应用更新 - 列表视图模式 - 网格 - 切换视图 - NewPipe 更新可用! - 无法创建目标文件夹 - 服务器不接受多线程下载, 请使用 @string/msg_threads = 1重试 - 切换至移动数据时有用,尽管一些下载无法被暂停 - 显示评论 - 禁用停止显示评论 - 自动播放 - - 评论 - - - 没有评论 - 无法加载评论 - 关闭 - 继续播放 - 恢复上次播放位置 - 列表中的位置 - 在列表中显示播放位置指示符 - 清除数据 - 播放位置已删除。 - 文件被移动或删除 - 已存在具有此名称的文件 - 无法覆盖该文件 - 同名文件正在等待下载 - 处理此文件时 NewPipe 已关闭 - 设备上没有剩余空间 - 进度丢失,因为文件已被删除 - 连接超时 - 你确定吗? - 限制下载队列 - 同时只有一个下载进行 - 开始全部下载 - 暂停全部下载 - 询问下载位置 - 每次下载将询问保存的位置 - 每次下载将询问保存的位置. -\n如果要下载到外部SD卡,请选择外部存储访问框架 - 使用存储访问框架 - 存储访问框架(SAF)允许下载文件到外部SD卡。 -\n注:一些设备不兼容SAF - 删除回放位置 - 删除所有回放位置 - 删除所有的回放位置吗? - 更改要生效的下载文件夹 - \ No newline at end of file From 9309159c387662242f8083ea0545200b8fb8cffa Mon Sep 17 00:00:00 2001 From: chr_56 Date: Sat, 14 Dec 2019 21:25:19 +0800 Subject: [PATCH 0039/1194] copy file in /values-b+zh+HANS+CN to /values-zh-rCN ,in order to manually update the lang file. --- app/src/main/res/values-zh-rCN/strings.xml | 845 +++++++++++---------- 1 file changed, 453 insertions(+), 392 deletions(-) diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 9aa4b9245..8714c6aca 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -1,457 +1,518 @@ - + - 点播%1$s次 - %1$s发布 - 找不到播放器。您是否要安装 VLC? + 点击搜索按钮即可开始使用 + %1$s 次观看 + 发布于 %1$s + 在浏览器中打开 + 在悬浮窗模式下打开 + 您是不是要找:%1$s? + 找不到串流播放器 (您可以安裝并使用VLC播放)。 + 下载串流文件 安装 取消 - 用浏览器打开 分享 下载 搜索 设置 - 您是不是要找: %1$s ? - 分享视频 + 分享给... 选择浏览器 - 旋转 - 使用外置视频播放器 - 使用外置音频播放器 - 视频下载路径 - 下载视频的存储路径 - 输入视频存储路径 - 默认分辨率 - 用Kodi播放 - 找不到Kore,您要安装Kore吗? - 显示“用Kodi播放”的选项 - 显示 Kodi 媒体中心播放视频的选项 - 音频 - 默认音频格式 + 视频下载文件夹 + 已下载的视频存储在这里 + 请选择下载视频的保存位置 + 已下载的音频存储在这里 + 选择下载音频的储存位置 + 自动播放 + 使用Kodi播放 主题 - 灰暗 - 明亮 - + 浅色 + 暗黑 + 黑色 下载 - 即将播放 - 显示下一部和相似的视频 - 不支援此网址 - 默认内容语言 - 视频和音频 + 下一个 + 不支持的 URL 外观 其他 - 后台播放 - 播放 + 全部 + 频道 + + 稍后 网络错误 - - 视频预览缩略图 - 视频预览缩略图 - 上传者的头像缩图 + + 视频 + + + 禁用 + 背景 + 过滤器 + 刷新 + 搜索建议 + 订阅 + 已订阅 + 观看历史 + 播放器 + 历史记录与缓存 + 播放列表 + 撤销 + 全部播放 + 总是 + 仅一次 + 添加至 + 文件 + 加载缩略图 + 清除观看记录 + + 最小化后台播放器 + 最小化悬浮窗播放器 + 频道 + 播放列表 + 取消订阅 + 新标签 + 更新 + 文件已删除 + 无法得知订阅人数 + 每推出新版本时,弹出应用升级通知 + 网格 + 新版 NewPipe 已可升级! + 服务器不接受 接收 multi-threaded 下载, 以 @string/msg_threads = 1 重试 + 自动播放 + 清除数据 + 观看记录已删除 喜欢 不喜欢 - 使用 Tor - (实验性)强制下载流量使用 Tor 加强隐私(暂不支援流媒体视频)。 - 音频存储路径 - 下载音频的存储路径 - 输入音频文件存储路径 - - 未能建立下载路径 “%1$s” - 已创建下载目录 “%1$s” - 内容 - 显示年龄限制内容 - 视频有年龄限制。请先在设置中启用\"显示年龄限制内容\"。 - 错误 - 无法加载所有缩略图 - 无法解密视频网址签名 - 无法解析网站 - 无法完全解析网站 - 内容不可用 - 无法设置下载菜单 - 这是一个在线流媒体,尚不支持。 - 无法获取任何流媒体 - 抱歉,这本不应该发生。 - 使用邮件报告错误 - 抱歉,发生了一些错误。 - 报告 - 信息: - 发生什么: - 您的注释(英文): - 详细信息: - - + 使用Tor + (实验性)通过 Tor 强制下载流量以增强隐私(暂不支持串流视频)。 报告错误 用户报告 - + 无法创建下载目录\"%1$s\" + 已成功创建下载目录「%1$s」 视频 音频 重试 - 无权访问存储空间 - 自动播放 - 当NewPipe被其他应用调用时,自动播放视频 - 直播 - - 点击搜索开始NewPipe + 存储访问权限已被拒绝 + + %1$s 次观看 + + + + 百万 开始 暂停 播放 删除 - 校验和 - - 确定 - - 文件名 - 线程 - 错误 - 服务器不支持 - 文件已经存在 - 网址不正确或网络不可用 - NewPipe 正在下载 - 点击了解细节 - 请稍候… - 已复制到剪贴板 - 请选择一个可用的下载目录 - + 校验 新任务 - 下载 - 下载 - 错误报告 - - 无法加载图像 - 应用/界面已崩溃 - 原因:\\n请求:\\n内容语言:\\n服务:\\nGMT时间:\\n包:\\n版本:\\n操作系统版本: - reCAPTCHA - reCAPTCHA 验证 - - 需要 reCAPTCHA 验证 - -以悬浮窗打开 - 选项启用时,某分辨率的视频将没有声音 - NewPipe悬浮窗模式 - 订阅 - 已订阅 - 已取消订阅频道 - 无法更改订阅 - 无法更新订阅 - - 首页 - 订阅 - - 新鲜事 - - 后台播放 - 悬浮窗 - - 窗口模式默认分辨率 - 显示更高的分辨率 - 只有部分设备支持 2K/4K 视频 - 首选视频格式 - 纯黑 - 记住悬浮窗大小和位置 - 记住上次悬浮窗的大小和位置 - 播放手势控制 - 使用手势操作控制播放器的亮度和音量 - 搜索建议 - 在搜索时显示搜索建议 - 搜索记录 - 在本地存储搜索请求 - 历史和缓存 - 记住观看的视频 - 焦点恢复 - 在打扰(例如来电)过后恢复视频播放 - - - 窗口模式 - 以窗口模式播放 - 所有 - 频道 - 是的 - 稍后 - 已禁用 - 筛选器 - 刷新 - 清除 - 重新调整大小 - 最佳分辨率 - - NewPipe 通知 - NewPipe 后台播放和窗口播放器的通知 - - K - M - B - - 该项权限用于 -\n以窗口模式打开 - - 下载 - 在文件名中允许的字符 - 无效的字符将以该值取代 - 替换字符 - - 字母和数字 - 特殊字符 - - 关于 NewPipe + OK + 文件名 + 线程数 + 错误 + 不支持的服务器 + 文件已存在 + 点击了解详情 + 请稍候… + 复制至剪贴板 + reCAPTCHA验证码 + 悬浮窗播放 + 关于NewPipe 设置 关于 第三方许可 - © %1$s by %2$s under %3$s - 无法加载许可 + © %1$s :作者 %2$s (使用 %3$s ) + 无法加载许可证 打开网站 关于 贡献者 - 许可 - 开源的轻量级流媒体Android客户端。 - 在 GitHub 上查看 - NewPipe 许可 - 无论你有什么想法:翻译程序,改进设计,优化代码或是想做出大量修改——我们都随时欢迎。做得越多它将变得越好! - 阅读许可 - 贡献 - - 历史记录 - 搜索记录 - 观看记录 - 历史记录已禁用 - 历史记录 - 没有历史记录 - 历史记录已清除 - -播放器 - 行为 - 历史记录 & 缓存 - 在后台播放器上排队 - 在弹出播放器上排队 - 播放列表 - 撤销 - 全部播放 - - [未知] - - 无法播放此流媒体 - 发生无法解决的播放器错误 + 许可证 + 下载 + 文件名中允许的字符 + 无效字符将会被替换为此 + 字母和数字 + 最特殊字符 没有结果 - 空空如也 - - 无订阅者 + 没有订阅者 - %s 位订阅者 - - - 无观看次数 - - %s 次观看 - - + %s个订阅者 + + 没有视频 - - %s 部视频 - - - 项目已删除 - 找不到播放器(你可以安装 VLC 来播放) - 下载串流文件。 - 显示详情 - - 书签 - - 添入 - - 使用粗略但快速的寻找 - 粗略寻找让播放器更快找到视频的进度位置 - 加载缩略图 - 停用后,NewPipe將不再加载缩略图,减少数据使用和腾空存储空间,亦会清除内存和内存卡上的缩略图缓存 - 已清除图像缓存 - 清除缓存元数据 - 移除所有网页的缓存数据 - 已清除元数据缓存 - 自动播放队列中下一个视频 - 当播放完非循环列表中的最后一个视频时,自动加入一个相关视频到播放列表 - 显示\"长按添加\"提示 - 当视频详情页中的背景或悬浮按钮被按下的时候显示提示 - 默认内容国家 - 服务 - 调试 - 总是 - 仅一次 - 文件 - - 切换方向 - 切换到后台 - 切换到悬浮窗 - 切换到主页 - - 导入数据库 - 导出数据库 - 将覆盖你现有历史记录和订阅 - 导出历史记录,订阅和播放列表 - 从播放器错误中恢复 - 外部播放器不支持这些链接类型 - 无效的链接 - 未找到视频 - 未找到音频 - 无效的目录 - 无效的文件/内容来源 - 文件不存在或无读写权限 - 文件名不能为空 - 发生了一个错误:%1$s - 无视频媒体可以下载 - - 拖拽以重新排列 - + 拖动以重新排序 创建 - 删除一个 - 删除全部 + 仅删除一个 + 全部删除 解除 - 重命名 - - 捐赠 - NewPipe 是一群志愿者花费业余时间开发的,目的是为您带来最佳体验。你的一点心意,可以让开发者们在享受一杯 Java 的咖啡的同时让 NewPipe 变得更好用。 - 捐赠 - 网页 - 访问 NewPipe 网站以获取更多的信息和新闻。 - 你想从搜索历史中删除此项吗? - 你想从观看历史中删除此项吗? - 确实要删除历史记录的所有项目吗? - 上一次播放 - 最多播放 - - 主页内容 + 重 命名 + 未安装用于播放此文件的应用程序 + 已删除1个项目。 + 哪些标签需要在主页上展示 + 列表视图模式 + 已完成 + 等待中… + 已暂停 + 排队中 + 已加入队列 + 操作已被系统拒绝 + 下载失败 + 下载完成 + %s 次下载已完成 + 没有评论 + 切换服务,当前选择: + 找不到串流播放器。您想安装 VLC 吗? + 旋转 + 使用第三方视频播放器 + 使用第三方视频播放器 + 音频下载文件夹 + 从其他应用打开 NewPipe 时就播放视频 + 默认分辨率 + 找不到Kore。是否安装? + 显示“用Kodi播放”选项 + 显示“通过Kodi media center播放视频的选项” + 音频 + 默认音频格式 + 显示“下一个”和“类似的”视频 + 视频和音频 + 在后台播放 + 播放 + 内容 + 受年龄限制的内容 + 显示受年龄限制的视频。可从设置允许此类内容。 + 直播 + 下载 + 下载 + 错误报告 + 错误 + 无法加载所有缩略图 + 无法解密视频 URL 的签名 + 无法解析网址 + 无法完全解析网址 + 内容不可用 + 无法设置下载菜单 + 暂时不支持观看直播 + 无法获得任何信息流 + 无法加载图像 + App UI 崩溃 + 抱歉,这不应该发生的。 + 通过电子邮件报告错误 + 抱歉,发生了一些错误。 + 报告 + 信息: + 发生了什么: + 详情:\\n请求:\\n内容语言:\\n服务:\\nGMT时间:\\n包:\\n版本:\\n操作系统版本: + 您的注释(请用英文): + 详细信息: + 视频预览缩略图 + 播放视频,时长: + 视频上传者的头像缩略图 + 字节 + 错误的 URL 或未联网 + NewPipe下载中 + 请稍后在设置中设定下载目录 + 用悬浮窗模式 +\n需要此权限 + reCAPTCHA验证 + 请求的新的CAPTCHA验证 + NewPipe悬浮窗模式 + 在悬浮窗中播放 + 默认悬浮窗分辨率 + 使用更高的分辨率 + 仅某些设备支持播放2K / 4K视频 + 清除 + 记住悬浮窗的尺寸与位置 + 记住最后一次使用悬浮窗的大小和位置 + 悬浮窗 + 调整大小 + 删除“某些”分辨率的音频 + 播放器手势控制 + 使用手势控制播放器的亮度和音量 + 显示搜索建议 + 最佳分辨率 + 开源小巧的Android媒体播放器。 + 在GitHub上查看 + NewPipe开源许可证 + 你是否有想:翻译、设计、清理或重型代码更改 ——我们始终欢迎你来贡献! + 阅读许可证 + 贡献 + 替换字符 + 取消订阅频道 + 无法修改订阅 + 无法更新订阅 + 主页面 + 订阅 + 新增功能 + 恢复前台焦点 + 中断后继续播放(例如突然来电后) + 搜索历史记录 + 在本地存储搜索查询记录 + 记录已观看视频 + 历史 + 已搜索 + 已观看 + 历史记录功能已关闭 + 历史 + 历史记录为空 + 清除历史记录 + NewPipe 通知 + NewPipe 后台播放和悬浮窗播放的通知 + 默认视频格式 + 行为 + 空空如也... + 0次观看 + 项目已删除 + 是否要从搜索历史记录中删除此项目? + 显示在主页面内容 空白页 - Kiosk 页 + 『时下流行』页-自定义 订阅页 - Feed 页 + Feed 页面 频道页 - 选择频道 - 还没有订阅的频道 - 选择 kiosk - 导出完成 - 导入完成 - 无有效的 ZIP 文件 - 警告:无法导入所有文件。 - 将覆盖你现有设置。 - - Kiosk - 流行的 + 选择一个频道 + 尚未订阅频道 + 选择一个时下流行页 + 『时下流行』 + 趋势 前50 - 最新 & 最热 - 后台播放器 + 最新与热门 + 显示 \"长按添加\" 说明 + 在视频详情页中,按下背景播放或悬浮窗播放按钮时显示提示 + 已加入后台播放播放列表 + 已加入悬浮窗播放列表 + 无法播放此串流 + 发生无法恢复播放器错误 + 恢复播放器错误 + 后台播放 悬浮窗播放器 移除 详情 音频设置 - 按住以队列 - 在后台队列 - 在悬浮窗队列 - 从这里播放 - 从这里在后台播放 - 从这里在悬浮窗播放 - - 打开侧栏菜单 - 关闭侧栏菜单 - 精彩内容即将呈现 ;D - - - 偏好\"打开\"动作 - 打开内容的默认动作 — %s - + 长按队列 + [未知] + 添加到后台部分队列 + 添加至新悬浮窗列表 + 开始在此处开始播放 + 开始后台播放 + 开始在新悬浮窗中播放 + 捐赠 + NewPipe 是由志愿者花费时间为您带来最佳体验开发的。回馈帮助开发人员在享用一杯咖啡的同时,让 NewPipe 变得更好。 + 回馈 + 网站 + 请访问 NewPipe 网站了解更多信息和讯息。 + 默认国家/地区 + 切换方向 + 切换到背景播放 + 切换到悬浮窗播放 + 切换到主页面 + 服务 + 打开抽屉 + 关闭抽屉 + 第三方播放器不支持此类型链接 + 无效 URL + 未找到视频串流 + 找不到音频串流 视频播放器 后台播放器 悬浮窗播放器 - 总是询问 - - 获取信息中… - 正在加载请求内容 - - 创建新播放列表 - 删除播放列表 - 重命名播放列表 + 正在获取信息… + 正在加载请求的内容 + 导入数据库 + 导出数据库 + 覆盖当前历史记录和订阅 + 导出历史记录、订阅和播放列表 + 导出成功 + 导入成功 + 没有有效的ZIP文件 + 警告:无法导入所有文件。 + 这将覆盖当前设置。 + 显示信息 + 已收藏 + 确定要从观看历史记录中删除该项吗? + 是否确实要从历史记录中删除所有项目? + 最后播放 + 播放最多 + 总是寻问 + 新建播放列表 + 删除 + 重 命名 名称 - 加入播放列表 - 设置为播放列表缩略图 - - 书签播放列表 - 移除书签 - - 你想删除此播放列表吗? - 播放列表已创建 - 加入播放列表 - 播放列表缩略图已更改 + 添加到播放列表 + 设为播放列表缩略图 + 收藏播放列表 + 删除收藏 + 删除此播放列表? + 新建播放列表成功 + 加入播放列表成功 + 播放列表缩略图更改成功。 无法删除播放列表 - 无字幕 - 适应屏幕 填充屏幕 - 放大填充 - + 缩放 + 敬请等待 + 调试 自动生成 - - 启用 LeakCanary - 内存泄露监测可能会在heap dumping时导致应用失去响应 - - 报告生命周期外的错误 - 处理完无法送达的、发生在Fragment或activity生命周期之外的Rx异常后强制报告 - + 启用LeakCanary + 『内存泄漏监视』可能导致应用在『核心转储』时无响应 + 报告『提前结束Android生命周期』错误 + 强制报告处理后的未送达的Activity或Fragment生命周期之外的Rx异常 + 使用快速不精确搜索 + 粗略定位播放:允许播放器以略低的精确度为代价换取更快的定位速度 + 自动播放下一个 + 当播放完非循环列表中的最后一个视频时,自动加入一个相关视频到播放列表 + 没有此文件夹 + 无相似文件/内容源 + 该文件不存在 或 缺少读写该文件的权限 + 文件名不能为空 + 发生错误: %1$s 导入/导出 导入 - 从导入 - 导出至 - - 导入中… - 导出中… - + 从...导入 + 导出到... + 正在导入… + 正在导出… 导入文件 - 之前的导出 - + 以前的导出 无法导入订阅 无法导出订阅 - - 通过下载导出文件导入 YouTube 订阅: -\n1. 在浏览器打开URL:%1$s -\n2. 登录账户 -\n3. 下载应该会马上开始(这个就是导出文件) - 通过输入URL或您的ID导入SoundCloud配置: -\n1. 在浏览器中开启\"桌面模式\"(该网站不适用于移动设备) -\n2. 打开URL:%1$s -\n3. 登录账号 -\n3. 复制重定向后的URL。 - 你的ID 或 soundcloud.com/你的ID - - 请注意该操作可能消耗大量网络流量。 -\n您希望继续吗? - + 通过下载导出文件来导入 YouTube 订阅: +\n +\n1. 转到此网站: %1$s +\n2. 登录(如果需要) +\n3. 应该立即开始下载(即导出文件) + 通过键入网址或你的 ID 导入 SoundCloud 配置文件: +\n +\n1. 在浏览器中启用\"电脑模式\"(该网站不适用于移动设备) +\n2. 转到此 URL: %1$s +\n3. 登录(如果需要) +\n4. 复制重定向的配置文件下载地址。 + 你的 ID:soundcloud.com/[你的ID] + 该操作消耗大量流量, +\n你想继续吗? + 关闭可防止加载缩略图,节已省数据和内存使用。(若现在更改会清除内存和储存中缓存) + 清空图像缓存成功 + 清空已缓存元数据 + 清空已缓存的网页数据 + 清空元数据缓存成功 播放速度控制 - 速度 + 节奏 音调 - Unhook(可能导致失真) - 默认 -未安装能播放此文件的应用 - + 解除关联(可能导致失真) + 首选“打开”操作 + 打开内容时默认操作: = %s + 无可下载的串流内容 字幕 - 修改播放器的字幕文本大小和背景样式。需要重启应用程序以生效 - - 清除观看记录 - 删除视频观看记录 - 删除全部观看记录。 - 观看记录已删除。 - 清除搜索记录 - 删除搜索关键词记录 - 删除全部搜索记录。 - 搜索记录已删除。 - 已删除1项。 - - NewPipe的隐私策略 - NewPipe 项目非常重视您的隐私。因此, 未经您的同意,应用程序不会收集任何您的数据。 NewPipe 的隐私策略详细解释了您在发送崩溃报告时会发送和存储的哪些数据。 - 阅读隐私策略 - NewPipe 是 copyleft 的自由软件: 你可以按照自己的意愿使用、学习、分享和改进它。具体地说, 您可以根据自由软件基金会发布的 GNU 通用公共许可证的条款(第3版或者任何更高版本), 重新发布和/或修改本软件。 - 您是否希望同时导入设置? - - 为了遵守欧洲通用数据保护条例(GDPR),我们提醒您注意NewPipe的隐私政策。 请仔细阅读。 + 修改播放器字幕比例和背景样式。需要重新启动应用程序才能生效。 + 删除串流的播放历史和播放位置 + 删除全部观看记录? + 清除搜索历史记录 + 清除搜索关键词的历史记录 + 是否删除全部搜索历史记录? + 搜索历史记录已删除。 + NewPipe 是版权自由软件:您可以随时使用、研究共享和改进它。您可以根据自由软件基金会发布的 GNU 通用公共许可证GPLv3或(由您选择的)任何更高版本的许可证重新分发或修改该许可证。 + 是否要同时导入设置? + NewPipe的隐私政策 + NewPipe 项目非常重视您的隐私。因此,未经您的同意,应用程序不会收集任何数据。 +\nNewPipe 的隐私政策详细解释了在发送崩溃报告时发送和存储的数据。 + 阅读隐私政策 + 为了遵守欧洲一般数据保护条例 (GDPR),我们提请您注意 NewPipe 的隐私政策。请仔细阅读。 \n您必须接受它才能向我们发送错误报告。 接受 拒绝 - - 不限制 + 无限制 使用移动数据时限制分辨率 - 更多频道 - 更多频道 - 用户们 - + 切换应用时最小化 + 从主播放器切换到其他应用时的操作 - %s + 静音时快进 + 滑块[比例尺] + 重 置 + 曲目 + 用户 + 选择标签 + 音量手势控制 + 使用手势控制播放器的音量 + 亮度手势控制 + 使用手势控制播放器的亮度 + 视频默认语言 + 应用更新通知 + NewPipe有新版本的通知 + 外置存储不可用 + 无法下载到外部 SD 卡。重置下载文件夹位置? + 读取已保存标签时发生错误,因此使用者默认标签 + 恢复默认 + 是否恢复默认值? + 选择 + 更新 + 列表 + 自动 + 切换视图 + 点击下载 + 后期处理 + 生成唯一名称 + 覆盖 + 正在使用此名称进行下载 + 显示错误 + 代码 + 无法创建目标文件夹 + 无法创建文件 + 权限被系统拒绝 + 安全连接失败 + 找不到服务器 + 无法连接到服务器 + 服务器未发送数据 + 找不到 NOT FOUND + 后期处理失败 + 清除已完成的下载 + 停止 + 最大重试次数 + 取消下载前的最多尝试次数 + 在切换到移动流量网络时中断播放 + 切换至移动数据时可能有用,尽管一些下载无法被暂停 + 事件 + 近期大会 + 显示评论 + 禁用,以停止显示评论 + + 评论 + + + 无法加载评论 + 关闭 + 恢复播放 + 恢复上次播放位置 + 列表中的位置 + 在列表中,显示视频最后一次播放时的播放位置 + 已删除播放位置记录。 + 文件被已移动或删除 + 该名称的文件已经存在 + 命名冲突,已存在具有此名称文件 + 无法覆盖文件 + 有此名称的已暂停下载 + 处理文件时,NewPipe 已关闭 + 设备上没有剩余储存空间 + 进度丢失,文件已被删除 + 连接超时 + 你确定吗? + 最大下载队列 + 同时只允许一个下载进行 + 开始下载 + 暂停下载 + 询问下载位置 + 系统将询问您将每次下载的保存位置 + 系统将询问您将每次下载的保存位置。 +\n(如果要下载到外部 SD 卡,请选择 SAF) + 使用 SAF + 存储访问框架(SAF)允许下载文件到外部SD卡。 +\n注:一些设备不兼容SAF + 删除播放位置记录 + 删除所有播放位置记录 + 删除所有播放位置记录? + 更改下载目录让内容生效 + 『时下流行』页-默认 + 无人在线观看 + + %s 人在观看 + + + 没人在听 + + %s个听众 + + + 重新启动应用后,语言将更改。 + \ No newline at end of file From 46b12ed81946b6128092f3b06d256de6e5903cb1 Mon Sep 17 00:00:00 2001 From: Louis-Berlic Date: Thu, 19 Dec 2019 16:10:09 +0100 Subject: [PATCH 0040/1194] Added initial strings.xml for Occitan language --- app/src/main/res/strings.xml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 app/src/main/res/strings.xml diff --git a/app/src/main/res/strings.xml b/app/src/main/res/strings.xml new file mode 100644 index 000000000..0e5b7ccd6 --- /dev/null +++ b/app/src/main/res/strings.xml @@ -0,0 +1,2 @@ + + From a08cd4ce6a8e730e77ec13b5ef9b6e41c179a135 Mon Sep 17 00:00:00 2001 From: Louis-Berlic Date: Thu, 19 Dec 2019 16:11:17 +0100 Subject: [PATCH 0041/1194] Move to values-oc --- app/src/main/res/{ => values-oc}/strings.xml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/src/main/res/{ => values-oc}/strings.xml (100%) diff --git a/app/src/main/res/strings.xml b/app/src/main/res/values-oc/strings.xml similarity index 100% rename from app/src/main/res/strings.xml rename to app/src/main/res/values-oc/strings.xml From cc869b98a30ff9572a0a41293003667c87ec0fdf Mon Sep 17 00:00:00 2001 From: Igor Nedoboy Date: Sat, 28 Dec 2019 20:32:13 +0000 Subject: [PATCH 0042/1194] Translated using Weblate (Russian) Currently translated at 100.0% (508 of 508 strings) --- app/src/main/res/values-ru/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 9e28d4ff6..48b7c4e4c 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -326,7 +326,7 @@ Добавлено в плейлист Миниатюра плейлиста изменена Не удалось удалить плейлист - Без титров + Без субтитров Подогнать Заполнить Приблизить @@ -372,9 +372,9 @@ Удалить все загруженные данные веб-страниц При открытии ссылки на контент — %s Нет потоков для загрузки - Титры + Субтитры Приложение для воспроизведения этого файла не установлено - Изменить размер текста и стиль титров. Нужен перезапуск + Изменить размер текста и стиль субтитров. Нужен перезапуск Очистить историю Удалить всю историю просмотров\? История просмотров удалена From 8da8ce0a0a40234f080093d289eddcd44012a5ef Mon Sep 17 00:00:00 2001 From: MohammedSR Vevo Date: Sat, 28 Dec 2019 14:42:33 +0000 Subject: [PATCH 0043/1194] Translated using Weblate (Kurdish) Currently translated at 70.9% (360 of 508 strings) --- app/src/main/res/values-ku/strings.xml | 348 ++++++++++++++++++++++++- 1 file changed, 339 insertions(+), 9 deletions(-) diff --git a/app/src/main/res/values-ku/strings.xml b/app/src/main/res/values-ku/strings.xml index 228849b33..24e9441ca 100644 --- a/app/src/main/res/values-ku/strings.xml +++ b/app/src/main/res/values-ku/strings.xml @@ -1,5 +1,6 @@ - -گرته‌ له‌ گه‌ڕان بكه‌ بۆ ده‌ستپێكردن + + + گرته‌ له‌ گه‌ڕان بكه‌ بۆ ده‌ستپێكردن %1$s بینراو بڵاوكراوه‌ته‌وه‌ له‌ %1$s هیچ كارپێكه‌رێكی ڤیدیۆیی نه‌دۆزرایه‌وه‌، ده‌ته‌وێت VLC داگریت؟ @@ -27,25 +28,19 @@ ناتوانیت گۆڕانكاری له‌م به‌شدارییه‌دا بكه‌یت ناتوانرێت به‌شداریكردنه‌كه‌ نوێبكرێته‌وه‌ پیشاندانی زانیاری - سه‌ره‌كی به‌شدارییه‌كان نیشانكردنه‌كان - چی نوێ هه‌یه‌ - له‌پشته‌وه‌ په‌نجه‌ره‌ ناردن بۆ - شوێنی داگرتنی ڤیدیۆ شوێنی ڤیدیۆ داگیراوه‌كان نوسینی شوێنی داگرتنی ڤیدیۆكان - شوێنی داگرتنی ده‌نگ شوێنی ده‌نگه‌ داگیراوه‌كان نوسینی شوێنی داگرتنی ده‌نگه‌كان - كاركردنی خۆكارانه‌ قه‌باره‌ی سه‌ره‌كی قه‌باره‌ی سه‌ره‌كی په‌نجه‌ره‌ @@ -68,4 +63,339 @@ ناچالاكی بكه‌ بۆ ڕاگرتنی وێنۆچكه‌كان له‌ باركردن و پاشه‌كه‌وتبوون له‌سه‌ر بیرگه‌ی ئامێره‌كه‌ت. \nگۆڕینی ئه‌مه‌ ده‌بێته‌ هۆی سڕینه‌وه‌یان له‌سه‌ر بیرگه‌ی مۆبایله‌كه‌ت. پاشماوه‌ی وێنۆچكه‌كان سڕایه‌وه‌ - + ڤیدیۆ لێبدرێ کاتێ NewPipe لە ئەپێکیتر کرایەوە + بەکارهێنانی بەدواگەڕانی ناتەواوی خێرا + خاوێنکردنەوەی پاشماوەی داتا + سڕینەوەی پاشماوەی هەموو داتاکان + پاشماوەی داتاکان سڕانەوە + ڕیزکردنی خۆکاری لێدانی دواتر + کۆنتڕۆڵی لێدەر بەجوڵەی پەنجە + جوڵەی پەنجەت لەسەر ڕونما بەکاربهێنە بۆ گۆڕینی ئاستی دەنگ و ڕووناکی + گەڕان بەنێو پێشنیارکراوەکان + پیشاندانی پێشنیارەکان لەکاتی گەڕان + مێژووی گەڕان + مێژووی تەماشاکردن + هێشتنەوەی تراکی ڤیدیۆ لێدراوەکان + بەردەوام بوونی ڤیدیۆ لەدوای هەبوونی هەر بڕینێک (وەک پەیوەندیکردن) + داگرتن + دواتر + پیشاندانی دواتر و ڤیدیۆ هاوشێوەکان + بەستەرەکە پشتگیری نەکراوە + وڵاتی سەرەکی + خزمەتگوزاری + لێدەری ڤیدیۆیی + ڤیدیۆ & دەنگ + مێژوو & پاشماوە + پەنجەرەی بچووک + ڕووکار + هیتر + ڕاستکردنەوە + لێدان لە پاشبنەما + لێدان لە پەنجەرەی بچووک + ڕیزکرا لە لێدان لە پاشبنەما + ڕیزکرا لە لێدان لە پەنجەرەی بچووک + لێدان + ناوەڕۆک + سنوردانانی تەمەن + ڕاستەوخۆ + داگرتنەکان + داگرتنەکان + ناتوانرێ سکاڵابکرێ + هەمووی + کەناڵ + لیستی ڤیدیۆ + بەڵێ + دواتر + ناچالاککراوە + فلتەر + نوێکردنەوە + سڕینەوە + قەبارە دانانەوە + باشترین قەبارە + گەڕانەوە + لێدانی هەمووی + هەمیشە + تەنها ئێستا + فایل + ئاگانامەکانی ئەپ + ئاگانامەکانی ئەپەکە بۆ پاشبنەما و لێدانەکانی پەنجەرەی بچووک + (نەزانراو) + چەسپاندنی لاربوونەوە + گۆڕین بۆ پاشبنەما + گۆڕین بۆ پەنجەرەی بچووک + گۆڕین بۆ سەرەکی + هێنانی داتابەیس + دەرکردنی داتابەیس + جێگەی مێژوو و بەشداربووەکانی ئێستات دەگرێتەوە + زەخیرەکردنی مێژوو و بەشداربوون و لیستەکان + هەڵەیەک ڕوویدا + کێشە لە هێڵەکەتدا هەیە + ناتوانرێ هەموو وێنۆچکەکان باربکرێن + ناتوانرێ وێبسایت شیبکرێتەوە + ناتوانرێ وێبسایت بەتەواوی شیبکرێتەوە + ناوەڕۆک بوونی نییە + ناتوانرێ لیستی داگرتن دابنرێ + پەخشی ڕاستەوخۆ پشتگیری ناکرێ لەئێستادا + هیچ پەخشێ نەدۆزرایەوە + ناتوانرێ وێنە باربکرێ + ئەپ کڕاشبوو + ناتوانرێ ئەم پەخشە لێبدرێ + لێدەرە ڤیدیۆییە دەرەکییەکان پشتگیری ئەم جۆرە بەستەرانە ناکەن + بەستەر هەڵەیە + هیچ پەخشێکی ڤیدیۆیی نەدۆزرایەوە + پەخشی هیچ دەنگێک نەدۆزرایەوە + ئەو فایلە بوونی نییە یان دەسەڵاتی خوێندنەوە و نوسینی لاوازە + ناوی فایل ناکرێ بەتاڵ بێت + هەڵەیەک ڕوویدا : %1$s + ببوورە، ناتوانرێ ئەوە ڕووبدات. + سکاڵا لەسەر کێشە لەڕێگای ئیمێڵ + ببورە، هەندێ کێشە ڕوویدا. + سکاڵا + زانیاری: + چی ڕوویدا: + "لێدوانەکەت (بە ئینگلیزی):" + وردەکارییەکان: + وێنۆچکەی پیشاندانی ڤیدیۆ + ماوەی لێدانی ڤیدیۆ: + وێنۆچکەی کەسی بەرزکەرەوە + بەدڵبوون + بەدڵنەبوون + بەکارهێنانی Tor + سکاڵا لەبوونی کێشە + سکاڵا لەبەکاربەر + هیچ ئەنجامێک نییە + هیچ شتێک لێرەدا نییە + ڕاکێشان بۆ دووبارە داواکردنەوە + ناتوانرێ شوێنی داگرتن دروستبکرێ \'%1$s\' + شوێنی داگرتن دانرا \'%1$s\' + ڤیدیۆ + دەنگ + هەوڵدانەوە + دەسەڵاتی گەیشتن بە بیرگە نەدرا + هەزار + ملیۆن + بلیۆن + هیچ بەشداربوویەک نییە + + %s بەشداربوو + %s بەشداربوون + + هیچ بینراوێک نییە + + %s بینراو + %s بینرااو + + هیچ ڤیدیۆیەک نییە + + ڤیدیۆکان + + + دەستپێکردن + ڕاگرتن + لێدان + دروستکردن + سڕینەوە + سڕینەوەی یەکیان + سڕینەوەی هەمووی + تاقیکردنەوەی هێڵێک + ڕێپێنەدان + دانانەوەی ناو + فرمانی نوێ + باشە + ناوی فایل + دابەشکراوەکان + کێشە ڕوویدا + سێرڤەر پشتگیرینەکراوە + فایل بوونی هەیە + داگرتنەکانی ئەپ + گرتەبکە بۆ وردەکاری + تکایە چاوەڕێبکە… + لەبەرگیرایەوە + تکایە فۆڵدەرێک بۆ شوێنی داگرتن دیاریبکە لە ڕێکخستنەکان + ئەم دەسەڵاتە پێویستە بۆ +\nکردنەوەی پەنجەرەی بچووک + reCAPTCHA + reCAPTCHA challenge + reCAPTCHA challenge requested + داگرتن + پیت و ژمارەکان + کارەکتەرە تایبەتییەکان + دەربارەی ئەپ + ڕێکخستنەکان + دەربارە + © %1$s by %2$s under %3$s + ناتوانرێ مۆڵەت باربکرێ + کردنەوەی وێبسایت + دەربارە + هاوبەشەکان + مۆڵەتەکان + هاوبەشبوون + Whether you have ideas of; translation, design changes, code cleaning, or real heavy code changes—help is always welcome. The more is done the better it gets! + View on GitHub + بەخشین + NewPipe is developed by volunteers spending time bringing you the best experience. Give back to help developers make NewPipe even better while enjoying a cup of coffee. + پێدانەوە + وێبسایت + سەردانی وێبسایتی NewPipe بکە بۆ زانیاری و هەواڵی نوێ. + Read license + مێژوو + گەڕا + تەماشاکراوە + مێژوو ناچالاکە + مێژوو + مێژوو بەتاڵە + مێژوو سڕایەوە + بابەت سڕایەوە + ئایا دەتەوێ ئەم بابەتە لە مێژووی گەڕان بسڕدرێتەوە؟ + ئایا دەتەوێ ئەم بابەتە لە مێژووی تەماشاکردن بسڕدرێتەوە؟ + ئایا دڵنیای لە سڕینەوەی هەموو بابەتەکان لە مێژوودا؟ + دواین لێدراو + زۆرترین لێدان + ناوەڕۆکی پەڕەی سەرەکی + لێدانی پەنجەرەی بچووک + لادان + وردەکارییەکان + ڕێکخستنەکانی دەنگ + دەستپێکردنی لێدان لێرەوە + دەستپێکردنی لێدان لە پاشبنەماوە + دەستپێکردنی لێدان لە پەنجەرەی بچووکەوە + بەمزووانە شتێک لێرەدا دەردەکەوێ :D + لێدەری ڤیدیۆیی + لێدەری پاشبنەما + لێدەری پەنجەرەی بچووک + هەمیشە بپرسە + دەستکەوتنی زانیاری… + بارکردنی ناوەڕۆکی داواکراو + لیستی نوێ + سڕینەوە + ناوںْوسینەوە + ناو + زیادکردن بۆ لیست + دانان لەسەر وێنۆچکەی لیست + لیستی نیشانەکراو + لادانی نیشانەکراو + ئەم لیستە بسڕدرێتەوە؟ + لیست دروستکرا + لیست دانرا + وێنۆچکەی لیست گۆڕدرا. + ناتوانی ئەم لیستە بسڕیتەوە. + هیچ ژێرنووسێک نییە + گونجاو بە ڕونما + پڕ بە ڕونما + هێنانەپێش + خۆکاری دانرا + چالاککردنی LeakCanary + سکاڵا لەسەر کێشەکان + Force reporting of undeliverable Rx exceptions outside of fragment or activity lifecycle after disposal + هێنانەوە/خەزنکردن + هێنانەوە + هێنانەوە لە + خەزنکردن بۆ + دەهێنرێتەوە… + خەزندەکرێ… + هێنانەوەی فایل + خەزنی پێشووتر + ناتوانرێ بەشدارییەکان بهێنرێتەوە + ناتوانرێ بەشدارییەکان خەزن بکرێن + بۆ هێنانەوەی بەشداربوونەکانی یوتوب پێویستە فایلی خەزن بوو بگەڕێنیتەوە: +\n +\n1. ئەم بەستەرە بکەوە: %1$ +\n2. بچۆرەژوورەوە گەر داوای‌ کرد +\n3. داگرتنێک دەست پێدەکات (ئەمە فایلی خەزنکراوە) + Import a SoundCloud profile by typing either the URL or your ID: +\n +\n1. Enable \"desktop mode\" in a web-browser (the site is not available for mobile devices) +\n2. Go to this URL: %1$s +\n3. Log in when asked +\n4. Copy the profile URL you were redirected to. + yourID, soundcloud.com/yourid + ئەوە بزانە ئەم کردارە پێویستی بە هێڵێکی گران هەیە. +\n +\nدەتەوێ بەردەوامبیت؟ + کۆنترۆڵی خێرایی + خێراییەکان + شەپۆلی دەنگ + سڕینەوەی بەستەر (ڕەنگە ببێتە هۆی تێکدان) + هیچ پەخشێک نییە بۆ داگرتن + ژێرنووس + بەهۆی گۆڕانکاری لە شێوەی ژێرنووسکردنەکە. پێویستە ئەپەکە دابخەیت و دیسانەوە بیکەیتەوە. + هیچ ئەپێک دانەمەزراوە بۆ لێدانی ئەم فایلە + سڕینەوەی مێژوو + مێژوو دەسڕێتەوە لەگەڵ ڤیدیۆ لێدراوەکان و شوێنی لیستە ڤیدیۆییەکان + سڕینەوەی تەواوی مێژوو؟ + سڕینەوەی مێژووی گەڕان + مێژووی گەڕانەکانت دەسڕێتەوە + تەواوی گەڕانەکانت بسڕدرێنەوە؟ + مێژووی گەڕانەکانت سڕانەوە. + 1 بابەت سڕایەوە. + NewPipe is copyleft libre software: You can use, study share and improve it at will. Specifically you can redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + NewPipe\'s Privacy Policy + The NewPipe project takes your privacy very seriously. Therefore, the app does not collect any data without your consent. +\nNewPipe\'s privacy policy explains in detail what data is sent and stored when you send a crash report. + Read privacy policy + کەناڵەکان + لیستی ڤیدیۆکان + تراکەکان + بەکاربەرەکان + بەشدارنەبوون + پەڕەیەکی نوێ + هەڵبژاردنی پەڕە + کۆنترۆڵی دەنگ بەجوڵەی پەنجە + جوڵەی پەنجەت لەسەر ڕونما بەکاربهێنە بۆ گۆڕینی ئاستی دەنگ + کۆنترۆڵی ڕووناکی بەجوڵەی پەنجە + جوڵەی پەنجەت لەسەر ڕونما بەکاربهێنە بۆ گۆڕینی ئاستی ڕووناکی ڕونما + زمانی سەرەکی + نوێکارییەکان + فایل سڕایەوە + ئاگانامەی نوێکاری ئەپ + ئاگانامەکانی وەشانی نوێی ئەپ + بیرگەی دەرەکی بەردەست نییە + داگرتن لە بیرگەی دەرەکی ناکرێت. +\nشوێنی فۆڵدەری داگرتنەکان دابنرێتەوە؟ + گێڕانەوە بۆ شێوازی سەرەکی + ئایا دەتەوێ بگەڕێنرێتەوە بۆ شێوازی سەرەکی؟ + ژمارەی بەشداربووان نادیارە + داگرتنێکیترت هەیە بەهەمان ناو + پیشاندانی کێشە + کۆد + فۆڵدەری مەبەست ناتوانرێ دروست بکرێ + فایل ناتوانرێ دروستبکرێ + ڕێگەپێدان ڕەتکرایەوە لەلایەن سیستەمەوە + پەیوەستبوونی پارێزراو شکستی هێنا + ناتوانرێ ڕاژە بدۆزرێتەوە + ناتوانرێ بە ڕاژەوە پەیوەست بیت + ڕاژەکە هیچ داتایەک نانێرێت + ئەم ڕاژەیە ناتوانێ چەندین داگرتن لەیەک کاتدا بکات + ڕووداوەکان + پیشاندانی لێدوانەکان + ناچالاککردنی وەستان بۆ پیشاندانی لێدوانەکان + لێدانی خۆکاری + + لێدوانەکان + + + هیچ لێدوانێک نییە + لێدانەوەی لیست + لێدانەوەی لیست لە شوێنی پێشووتر + شوێنەکان لە لیستدا + سڕینەوەی داتا + مێژوو سڕایەوە. + شوێنی لیستەکان سڕانەوە. + شوێنی فایل گۆڕدراوە یان سڕاوەتەوە + داگرتنێکیتر هەیە بەهەمان ناو + سڕینەوەی شوێنی لیستەکان + شوێنی هەموو لیستەکان دەسڕێتەوە + شوێنی هەموو لیستەکان بسڕدرێتەوە؟ + فۆڵدەری داگرتن بگۆڕە بۆ ئەنجامدانی کاریگەری + خزمەتگوزاری چەسپاو، ئێستا هەڵبژێردراو: + هیچ کەسێک تەماشای ناکات + + %s تەماشا دەکات + %s تەماشا دەکەن + + هیچ کەسێ گوێناگرێ + + %s گوێی لێدەگرێ + %s گوێی لێدەگرن + + \ No newline at end of file From 457ebe3aa2259a8a58778eead1f1cbdb0a10fd29 Mon Sep 17 00:00:00 2001 From: MohammedSR Vevo Date: Sun, 29 Dec 2019 14:15:28 +0000 Subject: [PATCH 0044/1194] Translated using Weblate (Kurdish) Currently translated at 78.5% (410 of 522 strings) --- app/src/main/res/values-ku/strings.xml | 109 ++++++++++++++++++++++++- 1 file changed, 106 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-ku/strings.xml b/app/src/main/res/values-ku/strings.xml index 24e9441ca..f1917a36d 100644 --- a/app/src/main/res/values-ku/strings.xml +++ b/app/src/main/res/values-ku/strings.xml @@ -188,7 +188,7 @@ هیچ ڤیدیۆیەک نییە ڤیدیۆکان - + دەستپێکردن ڕاگرتن @@ -215,7 +215,7 @@ ئەم دەسەڵاتە پێویستە بۆ \nکردنەوەی پەنجەرەی بچووک reCAPTCHA - reCAPTCHA challenge + reCAPTCHA داواکاری reCAPTCHA challenge requested داگرتن پیت و ژمارەکان @@ -372,7 +372,7 @@ لێدانی خۆکاری لێدوانەکان - + هیچ لێدوانێک نییە لێدانەوەی لیست @@ -398,4 +398,107 @@ %s گوێی لێدەگرێ %s گوێی لێدەگرن + + پاشکۆی خۆکاری پەخشێکی بەستراوە لەکاتی کارپێکردنی کۆتا پەخشدا + کۆگای گەڕانی داواکاری نێوخۆیی + گێڕانەوە لەدۆخی سەرنج + پیشاندانی ڕێنمایی ”داگرتن تا پاشکۆ” + پیشاندانی ڕێنمایی کاتێ لە پاشبنەما یاخوود پەنجەرەی بچووکدا گرتە دەکرێ لەسەر وردەکاری ڤیدیۆیەک + ڕەفتار + پیشاندانی ئەو ڤیدیۆیانەی سنوری تەمەنیان بۆ دانراوە. لە ڕێکخستنەکانەوە ڕێگەی پێدەدرێت. + ناتوانرێ واژووی بەستەری ڤیدیۆ بخوێنرێتەوە + نەگێڕانەوەی کارپێکەر بۆ پێش کێشە ڕوویدا + گێڕانەوەی کارپێکەر بۆکاتی پێش کێشە + + + + + بەستەر هەڵەیە یاخوود بەئینتەرنێتەوە پەیوەست نەبوویت + هێما ڕێگەپێدراوەکان لە فایلێکی ناویدا + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + پەڕە بنەڕەتییەکان بەکاردەبردرێن, ناتوانرێ پەڕە پاشەکەوتکراوەکان بخوێنرێنەوە + + + + + + + + + + + + + + + + + + + + + + + + + + پیشاندانی نیشانەکەری شوێنی کارپێکراو لە لیستەکان + + + + + + خێرا بردنە پێشەوە\\ گێڕانەوە بۆکاتی سەرەتا + دۆخی PeerTube + ئارەزوومەندییەکانی دۆخی PeerTube ڕێکبخە + ئەو دۆخانە بدۆزەرەوە کە لەگەڵ خۆتدا دەگونجێن لە https://joinpeertube.org/instances#instances-list + زیادکردنی دۆخ + بەستەری دۆخ دابنێ + ناتوانرێ پشتگیری دۆخەکە بکرێ + تەنها بەستەرەکانی https پشتگیریکراون + هەمان دۆخ کاراکراوە \ No newline at end of file From f4c8fdaf0767e8ef32ea92696e63be910dddfb23 Mon Sep 17 00:00:00 2001 From: Igor Nedoboy Date: Sun, 29 Dec 2019 18:20:37 +0000 Subject: [PATCH 0045/1194] Translated using Weblate (Russian) Currently translated at 100.0% (522 of 522 strings) --- app/src/main/res/values-ru/strings.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 48b7c4e4c..f4848e499 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -522,4 +522,20 @@ %s слушателей Язык будет изменён после перезапуска + Шаг перемотки вперёд/назад + Серверы PeerTube + Настройте предпочтительные серверы PeerTube + Выберите подходящие серверы на https://joinpeertube.org/instances#instances-list + Новый сервер + URL сервера + Не удалось проверить сервер + Поддерживается только https + Сервер уже существует + Локальное + Новое + Популярное + Создан автоматически (автор не найден) + восстановление + Не удалось восстановить загрузку + Выберите сервер \ No newline at end of file From c1e1c191d031eb3f30df3dd83582a5969bcebd52 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Mon, 30 Dec 2019 00:03:26 +0000 Subject: [PATCH 0046/1194] Translated using Weblate (German) Currently translated at 99.2% (518 of 522 strings) --- app/src/main/res/values-de/strings.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index d72b3de29..b5aaac094 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -517,4 +517,14 @@ %s Zuhörer Die Sprache ändert sich, sobald die App neu gestartet wird. + PeerTube Instanzen + Finde die Instanz, die am besten zu dir passt auf https://joinpeertube.org/instances#instances-list + Instanz hinzufügen + Gib die URL der Instanz ein + Validieren der Instanz fehlgeschlagen + Diese Instanz existiert bereits + Lokal + Kürzlich hinzugefügt + Auto-generiert (kein Uploader gefunden) + Wähle eine Instanz \ No newline at end of file From 6f3fd50ed865e6a8f483031db8796389af6deb4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=2E=20R=C3=BCdinger?= Date: Mon, 30 Dec 2019 12:55:21 +0000 Subject: [PATCH 0047/1194] Translated using Weblate (German) Currently translated at 99.2% (518 of 522 strings) --- app/src/main/res/values-de/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index b5aaac094..8be521d02 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -527,4 +527,6 @@ Kürzlich hinzugefügt Auto-generiert (kein Uploader gefunden) Wähle eine Instanz + Bevorzugte Peertube-Instanzen festlegen + Es werden nur https-Adressen unterstützt \ No newline at end of file From 694813ac9080cb243bc8cb15f2288c3486b5fe13 Mon Sep 17 00:00:00 2001 From: Nico-late Date: Mon, 16 Dec 2019 23:59:30 +0100 Subject: [PATCH 0048/1194] Fixed issue #2838 --- .../main/java/org/schabi/newpipe/download/DownloadDialog.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java index 29208b0e0..f7dcd36a7 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java @@ -38,6 +38,7 @@ import com.nononsenseapps.filepicker.Utils; import org.schabi.newpipe.MainActivity; import org.schabi.newpipe.R; +import org.schabi.newpipe.RouterActivity; import org.schabi.newpipe.extractor.MediaFormat; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.localization.Localization; @@ -368,6 +369,9 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck toolbar.setOnMenuItemClickListener(item -> { if (item.getItemId() == R.id.okay) { prepareSelectedDownload(); + if (getActivity() instanceof RouterActivity){ + getActivity().finish(); + } return true; } return false; From 6fb16bad85916e7d5daafb3267ba47f0477c0e19 Mon Sep 17 00:00:00 2001 From: Nico-late <56306738+Nico-late@users.noreply.github.com> Date: Thu, 26 Dec 2019 12:24:18 +0100 Subject: [PATCH 0049/1194] Update app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java Space added for more clarity Co-Authored-By: Tobias Groza --- .../main/java/org/schabi/newpipe/download/DownloadDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java index f7dcd36a7..4fbf4ab5f 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java @@ -369,7 +369,7 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck toolbar.setOnMenuItemClickListener(item -> { if (item.getItemId() == R.id.okay) { prepareSelectedDownload(); - if (getActivity() instanceof RouterActivity){ + if (getActivity() instanceof RouterActivity) { getActivity().finish(); } return true; From de19421de12638b00369b9f6a7a02723c9d8c070 Mon Sep 17 00:00:00 2001 From: dotvirus <33938500+dotvirus@users.noreply.github.com> Date: Mon, 16 Sep 2019 20:22:55 +0200 Subject: [PATCH 0050/1194] Update LocalPlaylistFragment.java --- .../newpipe/local/playlist/LocalPlaylistFragment.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java index 9e72838ad..c60cdac3f 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java @@ -325,6 +325,16 @@ public class LocalPlaylistFragment extends BaseLocalListFragment NavigationHelper.playOnBackgroundPlayer(activity, getPlayQueue(), false)); + headerPopupButton.setOnLongClickListener(view -> { + NavigationHelper.enqueueOnPopupPlayer(activity, getPlayQueue(), true); + return true; + }); + + headerBackgroundButton.setOnLongClickListener(view -> { + NavigationHelper.enqueueOnBackgroundPlayer(activity, getPlayQueue(), true); + return true; + }); + hideLoading(); } From 1e7e8d4121adb3f6af37bf6e6f537609eea72ef1 Mon Sep 17 00:00:00 2001 From: Mauricio Colli Date: Tue, 31 Dec 2019 02:51:32 -0300 Subject: [PATCH 0051/1194] Fix for player access out of its creation thread --- .../org/schabi/newpipe/player/playback/MediaSourceManager.java | 1 + 1 file changed, 1 insertion(+) 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 85c852f57..e4cef8c5c 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 @@ -319,6 +319,7 @@ public class MediaSourceManager { private Observable getEdgeIntervalSignal() { return Observable.interval(progressUpdateIntervalMillis, TimeUnit.MILLISECONDS) + .observeOn(AndroidSchedulers.mainThread()) .filter(ignored -> playbackListener.isApproachingPlaybackEdge(playbackNearEndGapMillis)); } From 2b4190d85d3d5aae7b134c2b0cbd44af65e8369f Mon Sep 17 00:00:00 2001 From: yausername Date: Tue, 31 Dec 2019 20:10:51 +0530 Subject: [PATCH 0052/1194] made instance list url non translatable --- .../newpipe/settings/PeertubeInstanceListFragment.java | 7 +++++++ app/src/main/res/values-ar/strings.xml | 1 - app/src/main/res/values/strings.xml | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java b/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java index 1f8d552d0..a0c16af75 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java @@ -89,6 +89,13 @@ public class PeertubeInstanceListFragment extends Fragment { public void onViewCreated(@NonNull View rootView, @Nullable Bundle savedInstanceState) { super.onViewCreated(rootView, savedInstanceState); + initViews(rootView); + } + + private void initViews(@NonNull View rootView) { + TextView instanceHelpTV = rootView.findViewById(R.id.instanceHelpTV); + instanceHelpTV.setText(getString(R.string.peertube_instance_url_help, getString(R.string.peertube_instance_list_url))); + initButton(rootView); RecyclerView listInstances = rootView.findViewById(R.id.instances); diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index e42f1d7b4..3ad4c2f39 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -543,7 +543,6 @@ تسريع إلى الأمام/-ترجيع وقت البحث نموذج بيرتوب تعيين حالات بيرتوب المفضلة لديك - ابحث عن النموذج التي يناسبك على https://joinpeertube.org/instances#instances-list إضافة نموذج أدخل رابط نموذج فشل في التحقق من النموذج diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 19013322d..6021df15e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -112,7 +112,8 @@ Default content language PeerTube instances Set your favorite peertube instances - Find the instances that best suit you on https://joinpeertube.org/instances#instances-list + Find the instances that best suit you on %s + https://joinpeertube.org/instances#instances-list Add instance Enter instance url Failed to validate instance From 17c0b981d1ef9b19c7ace99b295665ca44b0487c Mon Sep 17 00:00:00 2001 From: Software In Interlingua Date: Tue, 31 Dec 2019 18:01:20 +0000 Subject: [PATCH 0053/1194] Added translation using Weblate (Interlingua) --- app/src/main/res/values-ia/strings.xml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 app/src/main/res/values-ia/strings.xml diff --git a/app/src/main/res/values-ia/strings.xml b/app/src/main/res/values-ia/strings.xml new file mode 100644 index 000000000..a6b3daec9 --- /dev/null +++ b/app/src/main/res/values-ia/strings.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file From 7ddb856ccd971ab4a97e8e06e5a64901974875d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Sun, 29 Dec 2019 19:57:21 +0000 Subject: [PATCH 0054/1194] Translated using Weblate (Turkish) Currently translated at 100.0% (522 of 522 strings) --- app/src/main/res/values-tr/strings.xml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 06bb3946c..533c0d736 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -15,7 +15,7 @@ Şununla paylaş Tarayıcı seçin döndürme - Harici video oynatıcı kullanın + Harici video oynatıcı kullan Harici ses oynatıcı kullanın Video indirme dizini İndirilen video dosyaları burada depolanır @@ -29,7 +29,7 @@ Kodi ile oynat Kore uygulaması bulunamadı. Yüklensin mi\? \"Kodi ile oynat\" seçeneğini göster - Kodi ortam merkezi üzerinden video oynatmak için bir seçenek görüntüleyin + Kodi ortam merkezi üzerinden video oynatmak için bir seçenek göster Varsayılan ses formatı Tema Koyu @@ -175,7 +175,7 @@ Arama geçmişi Arama sorgularını yerel olarak saklayın İzleme geçmişi - İzlenen videoların kaydını tutun + İzlenen videoların kaydını tut Odaklanıldığında sürdür Kesintilerden sonra (örneğin telefon çağrısı) oynatmaya devam et Oynatıcı @@ -208,7 +208,7 @@ Öge silindi Bu ögeyi arama geçmişinden silmek istiyor musunuz\? \"Eklemek için basılı tutun\" ipucunu göster - Vidyo ayrıntıları sayfasında arka plan veya açılır pencere düğmesine basıldığında ipucu gösterilir + Video ayrıntıları sayfasında arka plan veya açılır pencere düğmesine basıldığında ipucu göster Arka plan oynatıcısı kuyruğuna eklendi Açılır pencere oynatıcısı kuyruğuna eklendi Tümünü Oynat @@ -517,4 +517,20 @@ %s dinleyici Uygulama yeniden başlatıldıktan sonra dil değişecektir. + Hızlı ileri/geri sarma süresi + PeerTube örnekleri + Favori peertube örneklerinizi ayarlayın + https://joinpeertube.org/instances#instances-list adresinde size en uygun örnekleri bulun + Örnek ekle + Örnek URL\'sini girin + Örnek doğrulanamadı + Yalnızca https URL\'leri desteklenmektedir + Örnek zaten var + Yerel + Son eklenen + En çok beğenilen + Otomatik oluşturulan (yükleyen bulunamadı) + kurtarılıyor + Bu indirme kurtarılamıyor + Bir örnek seçin \ No newline at end of file From 0c664e346a6a08c537cee06b2c06e453e2a3083d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=2E=20R=C3=BCdinger?= Date: Mon, 30 Dec 2019 13:06:09 +0000 Subject: [PATCH 0055/1194] Translated using Weblate (German) Currently translated at 99.2% (518 of 522 strings) --- app/src/main/res/values-de/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 8be521d02..e16d7d69b 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -517,8 +517,8 @@ %s Zuhörer Die Sprache ändert sich, sobald die App neu gestartet wird. - PeerTube Instanzen - Finde die Instanz, die am besten zu dir passt auf https://joinpeertube.org/instances#instances-list + PeerTube-Instanzen + Finde auf https://joinpeertube.org/instances#instances-list die Instanzen, die am besten zu dir passen Instanz hinzufügen Gib die URL der Instanz ein Validieren der Instanz fehlgeschlagen From e1e2add61695e38587df6ae297a6280ded5b8e5a Mon Sep 17 00:00:00 2001 From: Igor Nedoboy Date: Sun, 29 Dec 2019 22:30:10 +0000 Subject: [PATCH 0056/1194] Translated using Weblate (Russian) Currently translated at 100.0% (522 of 522 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 f4848e499..ef233baee 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -522,7 +522,7 @@ %s слушателей Язык будет изменён после перезапуска - Шаг перемотки вперёд/назад + Перемотка двойным нажатием Серверы PeerTube Настройте предпочтительные серверы PeerTube Выберите подходящие серверы на https://joinpeertube.org/instances#instances-list From 741a872c3928984e4a67dc1c34b08b3f78dcace5 Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Sun, 29 Dec 2019 19:20:57 +0000 Subject: [PATCH 0057/1194] Translated using Weblate (Hebrew) Currently translated at 100.0% (522 of 522 strings) --- app/src/main/res/values-he/strings.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml index fbcf5ce63..9eaedb71e 100644 --- a/app/src/main/res/values-he/strings.xml +++ b/app/src/main/res/values-he/strings.xml @@ -529,4 +529,20 @@ השפה תוחלף עם הפעלת היישומון מחדש. קיוסק בררת מחדל + משך קפיצה מהירה קדימה/אחורה + מופעים של PeerTube + נא להגדיר את מופעי ה־peertube המועדפים עליך + איתור המופעים שהכי מתאימים לך תחת https://joinpeertube.org/instances#instances-list + הוספת מופע + נא להכניס כתובת מופע + אימות המופע נכשל + יש תמיכה בכתובות https בלבד + המופע כבר קיים + מקומי + נוספו לאחרונה + האהובים ביותר + נוצרה אוטומטית (לא נמצא מעלה) + בשחזור + לא ניתן לשחזר את ההורדה הזאת + נא לבחור מופע \ No newline at end of file From b1fd2c007d19f0929c5220d59edd707a332d2728 Mon Sep 17 00:00:00 2001 From: WaldiS Date: Sun, 29 Dec 2019 20:24:48 +0000 Subject: [PATCH 0058/1194] Translated using Weblate (Polish) Currently translated at 99.2% (518 of 522 strings) --- app/src/main/res/values-pl/strings.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 769fa67a6..0b52d3c79 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -523,4 +523,20 @@ %s słuchaczy Język zmieni się po ponownym uruchomieniu aplikacji. + Szybkie przewijanie do przodu/do tyłu szukaj czasu trwania + Wystąpienia PeerTube + Ustaw swoje ulubione instancje peertube + Znajdź instancje, które najbardziej Ci odpowiadają, na https://joinpeertube.org/instances#instances-list + Dodaj instancję + Wprowadź adres URL instancji + Nie udało się sprawdzić poprawności instancji + Obsługiwane są tylko adresy URL https + Instancja już istnieje + Lokalny + Ostatnio dodane + Ulubione + Generowane automatycznie (nie znaleziono uploadera) + odzyskiwanie + Nie można odzyskać tego pobrania + Wybierz instancję \ No newline at end of file From 56364c4a2c7844379fb63757615af1bd6b947950 Mon Sep 17 00:00:00 2001 From: pjammo Date: Mon, 30 Dec 2019 13:25:35 +0000 Subject: [PATCH 0059/1194] Translated using Weblate (Italian) Currently translated at 100.0% (522 of 522 strings) --- app/src/main/res/values-it/strings.xml | 218 +++++++++++++------------ 1 file changed, 117 insertions(+), 101 deletions(-) diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 631922433..3af36f579 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -14,21 +14,21 @@ Condividi con Scegli browser rotazione - Cartella dei video scaricati + Cartella Video Scaricati I video scaricati saranno salvati qui Scegli la cartella per i video scaricati - Risoluzione predefinita + Risoluzione Predefinita Riproduci con Kodi - L\'applicazione Kore non è stata trovata. Vuoi installarla? + L\'applicazione Kore non è stata trovata. Installarla\? Mostra l\'opzione \"Riproduci con Kodi\" Mostra l\'opzione per riprodurre i video tramite Kodi Audio - Formato audio predefinito + Formato Audio Predefinito Scarica Prossimo - Mostra video \'Prossimo\' e \'Simili\' + Mostra video \"Prossimo\" e \"Simili\" URL non supportato - Lingua predefinita per i contenuti + Lingua Predefinita per Contenuti Video e Audio Miniatura anteprima video Riproduci video, durata: @@ -39,7 +39,7 @@ Creata la cartella per i download \'%1$s\' Usa un lettore video esterno Usa un lettore audio esterno - Cartella degli audio scaricati + Cartella Audio Scaricati Gli audio scaricati saranno salvati qui Scegli la cartella per gli audio scaricati Tema @@ -47,7 +47,7 @@ Chiaro Aspetto Altro - Riproduzione in sottofondo + Riproduzione in Sottofondo Riproduci Errore Errore di connessione @@ -60,10 +60,10 @@ Impossibile impostare il menu di download I contenuti in diretta non sono al momento supportati Contenuti - Contenuti vietati ai minori + Contenuti Vietati ai Minori Mostra video riservati a un pubblico maggiorenne. Si possono abilitare dalle Impostazioni. Tocca Cerca per iniziare - Riproduzione automatica + Riproduzione Automatica Riproduci i video quando NewPipe viene aperto da un\'altra app IN DIRETTA Impossibile analizzare completamente il sito web @@ -84,7 +84,7 @@ È stato negato il permesso di accesso all\'archiviazione di massa Download Download - Segnalazione errori + Segnalazione Errori Inizia Pausa Riproduci @@ -102,7 +102,7 @@ Tocca per maggiori dettagli Attendi… Copiato negli appunti - Nelle impostazioni seleziona una cartella per i download + Seleziona una cartella per i download Impossibile caricare l\'immagine L\'app/UI si è interrotta Cosa:\\nRichiesta:\\nLingua contenuto:\\nServizio:\\nOrario GMT:\\nPacchetto:\\nVersione:\\nVersione SO: @@ -119,21 +119,21 @@ Più tardi Apri in modalità popup Modalità popup di NewPipe - Riproduzione in modalità popup + Riproduzione in Modalità Popup Disattivato Non riproduce l\'audio con ALCUNE risoluzioni In sottofondo Popup - Risoluzione predefinita per la modalità popup - Mostra risoluzioni più alte + Risoluzione Predefinita Popup + Mostra Altre Risoluzioni Solo alcuni dispositivi supportano la riproduzione video in 2K e 4K - Formato video predefinito - Ricorda dimensione e posizione del popup - Ricorda l\'ultima dimensione e posizione del popup - Controlli gestuali del lettore multimediale - Usa i gesti per controllare la luminosità e il volume del lettore multimediale - Suggerimenti di ricerca - Mostra i suggerimenti durante la ricerca + Formato Video Predefinito + Ricorda Dimensione e Posizione Popup + Ricorda l\'ultima dimensione e posizione della finestra popup + Controllo Movimenti Lettore Multimediale + Usa i movimenti per controllare luminosità e volume del lettore multimediale + Suggerimenti Ricerca + Mostra suggerimenti durante la ricerca Popup Filtra i risultati Ricarica @@ -144,18 +144,18 @@ \nper riprodurre in modalità popup Impostazioni Informazioni - Licenze di terze parti + Licenze di Terze Parti © %1$s di %2$s protetto da licenza %3$s Impossible caricare la licenza - Visita il sito + Visita il Sito Informazioni Contributori Licenze Streaming libero e leggero su Android. Mostra su GitHub Licenza di NewPipe - Un aiuto è sempre il benvenuto: nuove idee e funzionalità, traduzioni, modifiche al design o cambiamenti radicali del codice rendono l\'applicazione sempre migliore! - Leggi la licenza + Un aiuto è sempre gradito: traduzioni, modifiche al design, pulizia del codice, cambiamenti radicali. Più si fa, meglio è! + Leggi la Licenza Contribuisci Informazioni su NewPipe Iscriviti @@ -165,18 +165,18 @@ Impossibile aggiornare l\'iscrizione Iscrizioni Novità - Cronologia ricerche - Salva le ricerche - Visualizza storico + Cronologia Ricerche + Salva le ricerche localmente + Cronologia Visualizzazioni Salva la cronologia dei video visualizzati - Riprendi tornando in primo piano + Riprendi Riproduzione Continua a riprodurre dopo le interruzioni (es. chiamate) Scarica - Caratteri ammessi nei nomi dei file + Caratteri Ammessi per i Nomi dei File I caratteri non validi vengono sostituiti con - Carattere sostitutivo - Lettere e cifre - Caratteri speciali + Carattere Sostitutivo + Lettere e Cifre + La Maggio Parte dei Caratteri Speciali Cronologia Ricerche effettuate Visualizzati @@ -185,9 +185,9 @@ La cronologia è vuota Cronologia cancellata Principale - Lettore multimediale + Lettore Multimediale Comportamento - Cronologia e cache + Cronologia e Cache Playlist Annulla Notifiche NewPipe @@ -211,23 +211,23 @@ Elemento eliminato Nulla da mostrare Vuoi eliminare questo elemento dalla cronologia? - Contenuto della pagina principale - Pagina vuota - Locandina - Pagina iscrizione - Pagina feed - Pagina del canale - Seleziona un canale - Nessuna iscrizione ad un canale - Seleziona una locandina + Contenuto della Pagina Principale + Pagina Vuota + Contenuti in Evidenza Personalizzati + Iscrizioni + Feed Iscrizioni + Canale Personalizzato + Seleziona Canale + Nessuna Iscrizione + Seleziona Contenuto Locandina Tendenze Top 50 New & hot - Mostra il suggerimento \"Tenere premuto per aggiungere video alla coda\" - Mostra suggerimento quando il pulsante per la riproduzione popup o in sottofondo viene premuto nella pagina dei dettagli del video - In coda al lettore multimediale in sottofondo - In coda al lettore multimediale a comparsa + Mostra Suggerimento \"Tieni Premuto per Accocodare\" + Mostra suggerimento quando il pulsante per la riproduzione \"popup\" o \"in sottofondo\" viene premuto nella pagina dei dettagli del video + In Coda in Sottofondo + In Coda in Modalità Popup Riproduci tutto Impossibile riprodurre questo flusso Si è verificato un errore irreversibile @@ -245,14 +245,14 @@ Avvia riproduzione in sottofondo Avvia riproduzione a comparsa Dona - Sito web - Visita il sito web di NewPipe per maggiori informazioni e novità. - NewPipe è sviluppato da volontari che trascorrono il loro tempo libero per offrire la migliore esperienza. Restituisci il favore per aiutare gli sviluppatori a rendere NewPipe ancora più piacevole mentre si gustano una tazza di caffè. + Sito + Visita il sito di NewPipe per informazioni e novità. + NewPipe è sviluppato da volontari che impiegano il loro tempo libero per offrire un\'esperienza migliore. Restituisci il favore, aiutandoli a rendere NewPipe ancora più piacevole, mentre si gustano una tazza di caffè. Restituisci - Paese predefinito per i contenuti + Paese Predefinito per Contenuti Cambia orientamento Passa alla riproduzione in background - Passa alla visualizzazione popup + Passa a Popup Passa alla produzione predefinita Servizio Apri il menu @@ -292,21 +292,21 @@ Sei sicuro di voler eliminare tutti gli elementi dalla cronologia? Ultima riproduzione I più riprodotti - Chiedi sempre - Nuova scaletta - Elimina scaletta - Rinomina scaletta + Chiedi ogni volta + Nuova Playlist + Elimina + Rinomina Nome Aggiunti alla playlist Imposta come miniatura della playlist Segnalibri playlist Rimuovi segnalibro - Eliminare questa scaletta\? + Eliminare la playlist\? Playlist creata - Aggiunti alla scaletta - Miniatura della scaletta cambiata. - Impossibile eliminare la scaletta. - No sottotitoli + Aggiunto alla Playlist + Miniatura della Playlist cambiata. + Impossibile eliminare la Playlist. + Nessun Sottotitolo Rientrato Pieno Ingrandito @@ -317,10 +317,10 @@ Il monitoraggio delle perdite di memoria potrebbe causare la mancata risposta dell\'applicazione durante il dumping dell\'heap Segnala Errori \"Out-of-lifecycle\" Forza la segnalazione di eccezioni Rx non consegnabili al di fuori del ciclo di vita dell\'attività dopo la chiusura - Usa la ricerca rapida ma imprecisa - La ricerca imprecisa permette al lettore multimediale di spostarsi nelle posizioni più velocemente con una precisione ridotta - Metti in coda automaticamente il prossimo flusso - Aggiungi automaticamente un contenuto correlato raggiunta la fine della coda se la ripetizione è disattivata + Usa Ricerca Rapida (Imprecisa) + Consente al lettore multimediale di spostarsi più velocemente, ma con precisione ridotta + Accoda Automaticamente l\'Elemento Successivo + Accoda un contenuto consigliato quando è in corso la riproduzione dell\'ultimo elemento, in una coda non ripetitiva File Nessuna cartella Nessun file o cartella che contiene sorgenti @@ -352,12 +352,12 @@ Tieni presente che questa operazione può consumare una grande quantità di traffico dati. \n \nVuoi continuare? - Carica miniature - Disabilita per prevenire il caricamento delle miniature, risparmiando dati e memoria. La modifica di questa opzione cancellerà la cache delle immagini in memoria e sul disco. - Pulizia della cache delle immagini completata - Pulisci la cache dei metadati - Rimuovi tutti i dati delle pagine web memorizzati nella cache - Pulizia della cache dei metadati completata + Carica Anteprime + Disabilita per prevenire il caricamento delle anteprime, risparmiando dati e memoria. La modifica di questa opzione cancellerà la cache delle immagini in memoria e sul disco. + Cache immagini svuotata + Pulisci Cache Metadati + Rimuovi i dati delle pagine web memorizzati nella cache + Cache metadati svuotata Controlli della velocità di riproduzione Tempo Tono @@ -367,7 +367,7 @@ \'Apri\' preferibilmente con Azione predefinita all\'apertura del contenuto — %s Sottotitoli - Modifica la dimensione e gli stili di sfondo dei sottotitoli. Per applicare le modifiche è richesto un riavvio. + Modifica dimensione e stile dei sottotitoli. Riavviare per applicare le modifiche. Nessuna app installata per riprodurre questo file Pulisci cronologia visualizzazioni Elimina la cronologia dei flussi riprodotti e la posizione di riproduzione @@ -378,9 +378,9 @@ Elimina l\'intera cronologia delle ricerche\? Cronologia delle ricerche eliminata. 1 elemento eliminato. - NewPipe è un software libero con licenza copyleft: si può utilizzarlo, studiarlo, condividerlo e migliorarlo a proprio piacimento. In particolare, è possibile ridistribuirlo e/o modificarlo secondo i termini della GNU General Public License pubblicata dalla Free Software Foundation, sia nella versione 3 della Licenza, sia (a propria discrezione) in qualsiasi versione successiva. + NewPipe è un software libero con licenza copyleft: si può utilizzare, studiare, condividere e migliorare a proprio piacimento. In particolare, è possibile ridistribuirlo e/o modificarlo secondo i termini della GNU General Public License (Free Software Foundation), nella versione 3 o successiva, a propria discrezione. Vuoi anche importare le impostazioni? - Informativa sulla privacy + Informativa sulla Privacy Il progetto NewPipe tiene molto alla tua privacy. Perciò, l\'app non raccoglie alcun dato senza il tuo consenso. \nL\'informativa sulla privacy di NewPipe spiega in dettaglio quali dati vengono inviati e memorizzati quando si invia un rapporto sugli arresti anomali. Leggi l\'informativa sulla privacy @@ -405,45 +405,45 @@ Disiscriviti Nuova scheda Scegli scheda - Movimenti per il controllo del volume + Movimenti Controllo Volume Utilizza i movimenti per controllare il volume del riproduttore - Movimenti per la gestione della luminosità + Movimenti Controllo Luminosità Utilizza i movimenti per controllare la luminosità del riproduttore Aggiornamenti File eliminato Notifiche di aggiornamenti dell\'applicazione Notifiche per una nuova versione di NewPipe Archiviazione esterna non disponibile - Impossibile effettuare il download sulla memoria esterna SD. Reimpostare la posizione della cartella di download\? + Impossibile scaricare sulla scheda SD esterna. Ripristinare la cartella dei download\? Utilizzando le schede predefinite, c\'è stato un errore durante la lettura delle schede salvate Ripristina predefiniti Davvero ripristinare i predefiniti\? Contatore degli iscritti non disponibile - Quali schede sono mostrate nella pagina principale + Schede mostrate nella pagina principale Selezione Aggiornamenti Mostra una notifica per suggerire l\'aggiornamento dell\'app se una nuova versione è disponibile Visualizzazione a lista Lista Griglia - Automatico - Cambia vista + Automatica + Cambia Visualizzazione Aggiornamento di NewPipe disponibile! Premi per scaricare Finito - In attesa di + In attesa in pausa in coda post-processo Accoda Azione negata dal sistema Download fallito - Download finito - %s download finiti + Download terminato + %s download terminati Genera un nome unico Sovrascrivi Esiste già un file scaricato con lo stesso nome - C\'è un download in progresso con questo nome + C\'è un download in corso con questo nome Mostra errore Codice Impossibile creare il file @@ -458,16 +458,16 @@ Post-processing fallito Pulisci i download completati Ferma - Tentativi massimi - Tentativi massimi prima di cancellare il download + Numero Massimo Tentativi + Quante volte provare prima di annullare il download Interrompi con le connessioni a consumo Utile quando si passa alla connessione dati mobile, altrimenti alcuni download potrebbero essere sospesi Eventi Conferenze Connesione finita - Mostra commenti + Mostra Commenti Disattiva per non visualizzare i commenti - Riproduzione automatica + Riproduzione Automatica Commenti @@ -475,11 +475,11 @@ Nessun commento Impossibile caricare i commenti Chiudi - Recupera riproduzione + Riprendi la Riproduzione Recupera l\'ultima posizione di riproduzione - Posizioni in lista - Mostra l indicatore di posizione di riproduzione nelle liste - Pulisci dati + Posizioni nelle Liste + Mostra indicatore di posizione di riproduzione nelle liste + Pulisci Dati Posizione di riproduzione eliminata. File spostato o cancellato Esiste già un file con questo nome @@ -489,16 +489,16 @@ Spazio insufficiente sul dispositivo Progresso perso poiché il file è stato eliminato Sei sicuro\? - Un download si avvierà allo stesso tempo + Sarà avviato un solo dowload per volta Avvia downloads Metti in pausa i downloads - Chiedi dove scaricare - Ti sarà chiesto dove salvare i file ogni volta + Chiedi Dove Scaricare + Ogni volta verrà chiesta la destinazione dei file Utilizza SAF - Limite download coda - Ti verrà chiesto dove salvare ogni download. + Limita Coda Download + Ogni volta verrà chiesta la destinazione dei file. \nScegli SAF se vuoi scaricare su una scheda SD esterna - Lo Storage Access Framework permette scaricamenti su una scheda SD esterna. + Lo Storage Access Framework consente di scaricare su una scheda SD esterna. \nNota: alcuni dispositivi non sono compatibili Elimina posizioni di riproduzione Elimina tutte le posizioni di riproduzione @@ -516,5 +516,21 @@ %s ascoltatori La lingua verrà cambiata al riavvio dell\'applicazione. - Pagina predefinita + Contenuti in Evidenza Predefiniti + Durata Avanzamento e Riavvolgimento Rapidi + Istanze PeerTube + Imposta le tue istanze PeerTube preferite + Trova le istanze più adatte a te su https://joinpeertube.org/instances#instances-list + Aggiungi Istanza + Inserisci URL Istanza + Impossibile convalidare l\'istanza + Sono supportati solo gli URL HTTPS + L\'istanza esiste già + Locale + Aggiunti di Recente + Più Piaciuti + Generato Automaticamente (nessun uploader trovato) + recupero + Impossibile recuperare questo download + Scegli un\'Istanza \ No newline at end of file From b9de3c202a14cfa5354c390fdb6773bd931835bf Mon Sep 17 00:00:00 2001 From: ButterflyOfFire Date: Sun, 29 Dec 2019 18:20:44 +0000 Subject: [PATCH 0060/1194] Translated using Weblate (Arabic) Currently translated at 100.0% (522 of 522 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 e42f1d7b4..e496cdc53 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -541,19 +541,19 @@ مستمعين تسريع إلى الأمام/-ترجيع وقت البحث - نموذج بيرتوب - تعيين حالات بيرتوب المفضلة لديك - ابحث عن النموذج التي يناسبك على https://joinpeertube.org/instances#instances-list - إضافة نموذج - أدخل رابط نموذج - فشل في التحقق من النموذج + مثيلات خوادم پيرتيوب + عيّن مثيلات خوادم پيرتيوب التي تُفضّلها + ابحث عن مثيلات الخوادم التي تناسبك على https://joinpeertube.org/instances#instances-list + إضافة مثيل خادم + أدخل رابط مثيل الخادم + فشل في التحقق من مثيل الخادم فقط عناوين https المدعومة - نموذج موجود بالفعل + مثيل الخادم موجود بالفعل محلي أضيف مؤخرا الأكثر إعجابا تم إنشاؤه-تلقائيًا (لم يتم العثور على برنامج تحميل) استرد لا يمكن استرداد هذا التنزيل - اختيار نموذج + اختيار مثيل خادم \ No newline at end of file From 867f633d16bf2c73191c343688c609a24dd5ae32 Mon Sep 17 00:00:00 2001 From: ButterflyOfFire Date: Mon, 30 Dec 2019 11:18:16 +0000 Subject: [PATCH 0061/1194] Translated using Weblate (French) Currently translated at 99.4% (519 of 522 strings) --- app/src/main/res/values-fr/strings.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index aecf113d1..c8e238487 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -517,4 +517,19 @@ %s auditeurs La langue changera lors du redémarrage de l\'application. + Avance/rembobinage rapide sur une durée + Instances PeerTube + Définissez vos instances peertube préférées + Cherchez des instances qui pourraient vous intéresser sur https://joinpeertube.org/instances#instances-list + Ajouter une instance + Entrez l’URL de l’instance + Échec de validation de l’instance + Sont prises en charge uniquement les URLs en https + L’instance existe déjà + Local + Ajoutées récemment + Les plus aimées + récupération + Impossible de récupérer ce téléchargement + Choisissez une instance \ No newline at end of file From 2227a7a6bd999da82ffd7d2413ea267d8884d92d Mon Sep 17 00:00:00 2001 From: MohammedSR Vevo Date: Sun, 29 Dec 2019 21:55:36 +0000 Subject: [PATCH 0062/1194] Translated using Weblate (Kurdish) Currently translated at 99.8% (521 of 522 strings) --- app/src/main/res/values-ku/strings.xml | 248 ++++++++++++++----------- 1 file changed, 141 insertions(+), 107 deletions(-) diff --git a/app/src/main/res/values-ku/strings.xml b/app/src/main/res/values-ku/strings.xml index f1917a36d..9fad2cf88 100644 --- a/app/src/main/res/values-ku/strings.xml +++ b/app/src/main/res/values-ku/strings.xml @@ -3,50 +3,51 @@ گرته‌ له‌ گه‌ڕان بكه‌ بۆ ده‌ستپێكردن %1$s بینراو بڵاوكراوه‌ته‌وه‌ له‌ %1$s - هیچ كارپێكه‌رێكی ڤیدیۆیی نه‌دۆزرایه‌وه‌، ده‌ته‌وێت VLC داگریت؟ - هیچ كارپێكه‌رێكی ڤیدیۆییت نییه‌ ده‌توانیت VLC داگریت بۆ لێدان - داگرتن + هیچ كارپێكه‌رێكی ڤیدیۆیی نه‌دۆزرایه‌وه‌. ده‌ته‌وێت VLC داگریت؟ + هیچ کارپێکەرێکی ڤیدیۆ نەدۆزرایەوە (دەتوانی کارپێکەری VLC دامەزرێنی) . + دامەزراندن پاشگه‌زبوونه‌وه‌ كردنه‌وه‌ له‌ وێبگه‌ر - كردنه‌وه‌ له‌ په‌نجه‌ره‌ی بچووك + كردنه‌وه‌ له‌ په‌نجه‌ره‌ی بچووک هاوبه‌شپێكردن داگرتن - .داگرتنی په‌ڕگه‌ + داگرتنی فایلی پەخش گه‌ڕان ڕێكخستنه‌كان - مه‌به‌ستت ئه‌مه‌یه‌: %1$s + مەبەستت ئەمەیە: +\n%1$s\? "هاوبه‌شپێكردن له‌گه‌ڵ " هه‌ڵبژاردنی وێبگه‌ر - سوڕان + لاربوونەوە به‌كارهێنانی كارپێكه‌ری ڤیدیۆی ده‌ره‌كی - هه‌نێ له‌ قه‌باره‌كان ده‌نگیان تێدا نابێت له‌حاڵه‌تی كارا كردنی ئه‌م بژارده‌یه‌ + هه‌نێ له‌ قه‌باره‌كان ده‌نگیان تێدا نابێت به‌كارهێنانی كارپێكه‌ری ده‌نگی ده‌ره‌كی - په‌نجه‌ره‌ی بچووك + په‌نجه‌ره‌ی بچووکی NewPipe به‌شداربوون به‌شداربوویت - به‌شدارنابیت له‌ كه‌ناڵ + به‌شداریت نەما له‌ كه‌ناڵ ناتوانیت گۆڕانكاری له‌م به‌شدارییه‌دا بكه‌یت ناتوانرێت به‌شداریكردنه‌كه‌ نوێبكرێته‌وه‌ پیشاندانی زانیاری سه‌ره‌كی به‌شدارییه‌كان - نیشانكردنه‌كان + لیستی کارپێکردنەکان نیشانەکران چی نوێ هه‌یه‌ - له‌پشته‌وه‌ - په‌نجه‌ره‌ - ناردن بۆ - شوێنی داگرتنی ڤیدیۆ - شوێنی ڤیدیۆ داگیراوه‌كان - نوسینی شوێنی داگرتنی ڤیدیۆكان - شوێنی داگرتنی ده‌نگ - شوێنی ده‌نگه‌ داگیراوه‌كان - نوسینی شوێنی داگرتنی ده‌نگه‌كان + لە پاشبنەما + په‌نجه‌ره‌ی بچووک + زیادکردن بۆ + فۆڵدەری داگرتنی ڤیدیۆ + ڤیدیۆ داگیراوەکان لێرەدا هەڵدەگیرێن + فۆڵدەری داگرتن بۆ ڤیدیۆکان هەڵبژێرە + فۆڵدەری داگرتنی ده‌نگ + دەنگە داگیراوەکان لێرەدا هەڵدەگیرێن + فۆڵدەری داگرتنی دەنگەکان هەڵبژێرە كاركردنی خۆكارانه‌ - قه‌باره‌ی سه‌ره‌كی - قه‌باره‌ی سه‌ره‌كی په‌نجه‌ره‌ + قه‌باره‌ی بنەڕەتی + قه‌باره‌ی بنەڕەتی په‌نجه‌ره‌ی بچووک پیشاندانی قه‌باره‌ی به‌رزتر - چه‌ند مۆبایلێك پشتگیری له‌ قه‌باره‌ی 2K/4K ده‌كه‌ن - كاركردن به‌ Kodi + تەنها چەند مۆبایلێک پشتگیری کارپێکردنی ڤیدیۆی 2K/4K دەکەن + كارپێكردن به‌ Kodi نه‌رمه‌واڵا نه‌دۆزرایه‌وه‌. دابمه‌زرێت؟ پیشاندانی بژارده‌ی “كاركردن به‌ Kodi” پیشاندانی بژارده‌ی كارپێكردنی ڤیدیۆ به‌ Kodi @@ -63,7 +64,7 @@ ناچالاكی بكه‌ بۆ ڕاگرتنی وێنۆچكه‌كان له‌ باركردن و پاشه‌كه‌وتبوون له‌سه‌ر بیرگه‌ی ئامێره‌كه‌ت. \nگۆڕینی ئه‌مه‌ ده‌بێته‌ هۆی سڕینه‌وه‌یان له‌سه‌ر بیرگه‌ی مۆبایله‌كه‌ت. پاشماوه‌ی وێنۆچكه‌كان سڕایه‌وه‌ - ڤیدیۆ لێبدرێ کاتێ NewPipe لە ئەپێکیتر کرایەوە + ڤیدیۆ کارپێبکرێ کاتێ NewPipe لە ئەپێکیتر کرایەوە بەکارهێنانی بەدواگەڕانی ناتەواوی خێرا خاوێنکردنەوەی پاشماوەی داتا سڕینەوەی پاشماوەی هەموو داتاکان @@ -153,7 +154,7 @@ سکاڵا زانیاری: چی ڕوویدا: - "لێدوانەکەت (بە ئینگلیزی):" + لێدوانەکەت (بە ئینگلیزی): وردەکارییەکان: وێنۆچکەی پیشاندانی ڤیدیۆ ماوەی لێدانی ڤیدیۆ: @@ -223,7 +224,7 @@ دەربارەی ئەپ ڕێکخستنەکان دەربارە - © %1$s by %2$s under %3$s + © %1$s لەلایەن %2$s لەژێر %3$s ناتوانرێ مۆڵەت باربکرێ کردنەوەی وێبسایت دەربارە @@ -398,7 +399,7 @@ %s گوێی لێدەگرێ %s گوێی لێدەگرن - + داواکردنی ناتەواو وا لە کارپێکەرەکە دەکات زۆر بەخێرایی شوێنەکان بگۆڕێت لەگەڵ وردییەکی داشکێنراو پاشکۆی خۆکاری پەخشێکی بەستراوە لەکاتی کارپێکردنی کۆتا پەخشدا کۆگای گەڕانی داواکاری نێوخۆیی گێڕانەوە لەدۆخی سەرنج @@ -409,89 +410,90 @@ ناتوانرێ واژووی بەستەری ڤیدیۆ بخوێنرێتەوە نەگێڕانەوەی کارپێکەر بۆ پێش کێشە ڕوویدا گێڕانەوەی کارپێکەر بۆکاتی پێش کێشە - - - - + هەمان فۆڵدەر بوونی نییە + هەمان فایل بوونی نییە + چی:\\nداواکراو:\\nناوەڕۆک:\\nلانگ:\\nخزمەتگوزاری:\\nGMT:\\nکات:\\nپاکێج:\\nوەشان:\\nوەشانی سیستەم: + |(تاقیکاری) داگرتنی خێرا بەبەکارهێنانی Tor بۆ زیادکردنی تایبەتێتی (پشتگیری پەخشە ڕاستەوخۆکان ناکات) . بەستەر هەڵەیە یاخوود بەئینتەرنێتەوە پەیوەست نەبوویت هێما ڕێگەپێدراوەکان لە فایلێکی ناویدا - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + هێما نادروستەکان بەم بەهایە جێگۆڕکێ دەکرێن + هێمای جێگۆڕین + مۆڵەتنامەی ئەپ + ئەپێکی خۆڕایی و کێشی کەم بۆ پەخشی ڕاستەوخۆ لەسەر ئەندرۆید. + مۆڵەتنامەی NewPipe + پەڕە بەتاڵە + پەڕەی کیۆسک + پەڕەی بەشدارییەکان + پەڕەی نوێترینەکان + پەڕەی کەناڵەکان + هەڵبژاردنی کەناڵ + هیچ کەناڵێکی بەشداری نییە + هەڵبژاردنی کیۆسک + خەزنکرا + هێنرایەوە + فایلی ZIP دروست نییە + ئاگاداربە: ناتوانرێ هەمان فایلەکان بهێنرێنەوە. + ئەمە لەسەر ڕێکخستنەکانی ئێستات جێگیردەبێت. + کیۆسک + پڕبینەرەکان + باشترین 50 + نوێ & چالاک + کارپێکەری پاشبنەما + داگرە تا ڕیزنەکران + ڕیزنەبوون لە پاشبنەما + ڕیزنەبوون لە پەنجەرەی بچووک + کردنەوەی پلیکانە + داخستنی پلیکانە + چاودێری دزەکردنی بیرگە ڕەنگە ببێتە هۆی وەڵامنەدانەوەی لەکاتی گەرمبوون + کرداری ’کردنەوە’ی پێشنیارکراو + کرداری بنەڕەتی لەکاتی کردنەوەی بابەت — %s + ئایا دەتەوێت ڕێکخستنەکانیش بهێنرێنەوە؟ + بۆ جێبەجێکردنی فرمانەکان لەگەڵ یاسای پاراستنی داتای گشتی ئەوروپیدا (GDPR) , ئێمە سەرنجت ڕادەکێشین بۆ سیاسەتە تایبەتییەکانی ئەپەکەمان. تکایە بەئاگادارییەوە بیخوێنەوە. +\nپێویستە قبوڵی بکەیت بۆ ناردنی سکاڵاکانت. + قبوڵکردن + ڕەتکردنەوە + بێ سنوور + سنووری قەبارە لەکاتی بەکارهێنانی داتای مۆبایل + بچوکبوونەوە لەکاتی گۆڕینی ئەپ + کرداری کاتی گۆڕین بۆ ئەپێکیتر لە کارپێکەری ڤیدیۆییەوە — %s + هیچیان + بچوککردنەوە بۆ کارپێکەری پاشبنەما + بچووککردنەوە بۆ پەنجەرەی بچووک + بردنەپێشەوەی خێرا لەکاتی بێدەنگکردن + هەنگاو + ڕێکخستنەوە پەڕە بنەڕەتییەکان بەکاردەبردرێن, ناتوانرێ پەڕە پاشەکەوتکراوەکان بخوێنرێنەوە - - - - - - - - - - - - - - - - - - - - - - - - - + چ پەڕەیەک نیشانبدرێ لە پەڕەی سەرەکی + هەڵبژاردن + نوێکارییەکان + پیشاندانی ئاگانامەیەک بۆ ئامادەبوونی ئەپ لەکاتی بەردەست بوونی وەشانی نوێ + لیستی شێوازی بینین + لیست + چوار خانە + خۆکار + گۆڕینی شێواز + وەشانی نوێی ئەپ بەردەستە! + گرتەبکە بۆ داگرتن + تەواوبوو + لە چاوەڕوانیدایە + ڕاگیراوە + لەڕیزدایە + چارەسەردەکرێت + لە ڕیز + کردار ڕەتکرایەوە لەلایەن سیستەمەوە + داگرتن شکستی هێنا + داگرتن تەواوبوو + %s داگرتن تەواوبوون + دانانی ناوی نوێ + جێگیرکردن + کۆنفرانسەکان + ناتوانرێ لێدوانەکان باربکرێ پیشاندانی نیشانەکەری شوێنی کارپێکراو لە لیستەکان - - - - - + فایلێک بەهەمان ناو هەیە + فایلێکی داگیراو بەم ناوەوە هەیە + ناتوانرێ لەسەر ئەو فایلە جێگیربکرێ + زمان دەگۆڕدرێ لەدوای داخستن و پاشان کردنەوەی ئەپ. + کیۆسکی بنەڕەتی خێرا بردنە پێشەوە\\ گێڕانەوە بۆکاتی سەرەتا دۆخی PeerTube ئارەزوومەندییەکانی دۆخی PeerTube ڕێکبخە @@ -501,4 +503,36 @@ ناتوانرێ پشتگیری دۆخەکە بکرێ تەنها بەستەرەکانی https پشتگیریکراون هەمان دۆخ کاراکراوە + نەدۆزرایەوە + چارەسەرکردن شکستی هێنا + سڕینەوەی داگرتنە تەواوبووەکان + ڕاوەستان + زیاترین هەوڵدانەکان + زۆرترین ژمارەی هەوڵدان پێش پاشگەزبوونەوە لە داگرتنەکە + ڕاوەستا لەسەر کێشەی هێڵ + بەسوودە بۆ کاتی گۆڕینی هێڵ بۆ داتای مۆبایل, لەگەڵ ئەوەشدا زۆربەی داگرتنەکان ڕاناگرێت + داخستن + NewPipe داخرا لەکاتی کارکردن لەسەر ئەو فایلە + بیرگەی ناوەکیت پڕبووە + کردارەکە شکستی هێنا, چونکە ئەو فایلە سڕاوەتەوە + هێڵی ئینتەرنێت نەما + ئایا دڵنیای؟ + سنوری ڕیزبوونی داگرتنەکان + تەنها یەک داگرتن کاردەکات لەیەک کاتدا + دەستپێکردنەوەی داگرتنەکان + ڕاگرتنی داگرتنەکان + پرسیاربکرێ لەکوێ دابگیرێ + پرسیارت لێ دەکرێت بۆ شوێنی داگرتنی هەر فایلێک + پرسیارت لێ دەکرێت بۆ شوێنی داگرتنی هەر فایلێک +\nدەتوانیت SAF بەکاربهێنیت گەر دەتەوێ لە بیرگەی دەرەکیدا فایلەکان دابگریت + بەکارهێنانی SAF + چوارچێوەی گەیشتن بە بیرگە ڕێگەدەدات بە داگرتنی فایلەکان لە بیرگەی دەرەکیدا. +\nتێبینی: هەندێ لە مۆبایلەکان پشتگیری ناکرێن + ناوخۆ + لەم ماوەیەدا بڵاوکرابێتەوە + زۆرترین بەدڵبوون + خۆکاری دانرا (هیچ بەرزکەرەوەیەک نەدۆزرایەوە) + دەگەڕێنرێتەوە + ناتوانرێ ئەم داگرتنە بهێنرێتەوە + دۆزێک هەڵبژێرە \ No newline at end of file From 87e29dbd840aaf2ecf1017f7bf72da28d5f1c141 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Mon, 30 Dec 2019 06:26:28 +0000 Subject: [PATCH 0063/1194] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (522 of 522 strings) --- app/src/main/res/values-zh-rTW/strings.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index cc0dbe639..9713e4665 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -513,4 +513,20 @@ 語言將會在重新啟動應用程式後變更。 + 快轉/快退搜尋持續時間 + PeerTube 站臺 + 設定您最愛的 PeerTube 站臺 + 在 https://joinpeertube.org/instances#instances-list 上找到最適合您的站臺 + 新增站臺 + 輸入站臺 URL + 驗證站臺失敗 + 僅支援 https URL + 站臺已存在 + 本機 + 最近新增 + 最喜歡 + 自動生成(未找到上傳者) + 正在恢復 + 無法復原此下載 + 選擇一個站臺 \ No newline at end of file From d063d39dbc2e07c8c03149f45ece54a2ca302f3b Mon Sep 17 00:00:00 2001 From: chr56 Date: Tue, 31 Dec 2019 16:02:47 +0000 Subject: [PATCH 0064/1194] Translated using Weblate (Chinese (Simplified)) Currently translated at 98.7% (515 of 522 strings) --- .../main/res/values-b+zh+HANS+CN/strings.xml | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-b+zh+HANS+CN/strings.xml b/app/src/main/res/values-b+zh+HANS+CN/strings.xml index 8714c6aca..f4c199e9e 100644 --- a/app/src/main/res/values-b+zh+HANS+CN/strings.xml +++ b/app/src/main/res/values-b+zh+HANS+CN/strings.xml @@ -39,7 +39,7 @@ 网络错误 视频 - + 禁用 背景 @@ -160,7 +160,7 @@ 使用第三方视频播放器 使用第三方视频播放器 音频下载文件夹 - 从其他应用打开 NewPipe 时就播放视频 + 从其他应用调用 NewPipe 时播放视频 默认分辨率 找不到Kore。是否安装? 显示“用Kodi播放”选项 @@ -507,7 +507,7 @@ 无人在线观看 %s 人在观看 - + 没人在听 @@ -515,4 +515,19 @@ 重新启动应用后,语言将更改。 + PeerTube 服务器 + 设置自己喜欢的peertube服务器 + 查找最适合你的服务器https://joinpeertube.org/instances#instances-list + 添加服务器 + 输入服务器网址 + 无法验证服务器 + 仅支持 https URL + 该服务器已存在 + 本地 + 最近添加 + 最喜欢的 + 自动生成的(未找到上传者) + 正在恢复 + 无法恢复此下载 + 选择一个服务器 \ No newline at end of file From 22a9a06b875d1640f91ba7c15d8f5ed0a17a1cc2 Mon Sep 17 00:00:00 2001 From: Ariel Shulman Date: Wed, 1 Jan 2020 08:24:52 +0000 Subject: [PATCH 0065/1194] Translated using Weblate (Hebrew) Currently translated at 100.0% (522 of 522 strings) --- app/src/main/res/values-he/strings.xml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml index 9eaedb71e..3e5f1aa8b 100644 --- a/app/src/main/res/values-he/strings.xml +++ b/app/src/main/res/values-he/strings.xml @@ -111,8 +111,8 @@ היסטוריית צפייה תיעוד הסרטונים שנצפו להמשיך את הניגון עם החזרת המיקוד - להמשיך לנגן לאחר הפרעות (למשל: שיחות טלפון) - להציג את העצה „להחזיק כדי להוסיף לרשימת נגינה” + המשך לנגן לאחר הפרעות (למשל: שיחות טלפון) + הצג את העצה „החזק כדי להוסיף לרשימת נגינה” להציג עצה בעת לחיצה על כפתור בנגן רקע או צף בעמוד פרטי סרטון נגן התנהגות @@ -122,7 +122,7 @@ רשימת נגינה רזולוציה מיטבית ביטול - לנגן הכול + נגן הכול התראה מ־NewPipe התראות עבור נגן הרקע והנגן הצף של NewPipe [לא ידוע] @@ -249,12 +249,12 @@ הסרה פרטים אפשרויות שמע - להחזיק כדי להוסיף לרשימת נגינה - להוסיף לרשימת הנגינה ברקע + החזק כדי להוסיף לרשימת נגינה + הוסף לרשימת הנגינה ברקע הוספה לתור בנגן צף חדש - להתחיל לנגן מכאן - להתחיל לנגן ברקע - להתחיל לנגן בחלון צף חדש + התחל לנגן מכאן + התחל לנגן ברקע + התחל לנגן בחלון צף חדש הורדת קובץ הזרמה הצגת מידע רשימות נגינה מסומנות @@ -338,7 +338,7 @@ כיבוי האפשרות מונע את טעינת התמונות הממוזערות, חוסך בתקשורת נתונים ובניצולת הזיכרון. שינויים באפשרות זו מוחקים את המטמון בזיכרון ובכונן. הסרת כל נתוני העמודים שבמטמון הוספת התזרים הבא לרשימת הנגינה אוטומטית - להוסיף אוטומטית תזרים דומה בעת נגינת התזרים האחרון בתור שאינו מחזורי + הוסף אוטומטית תזרים דומה בעת נגינת התזרים האחרון בתור שאינו מחזורי החלפת כיווניות העברה לראשי משכתב את ההיסטוריה והמינויים הנוכחיים שלך @@ -393,7 +393,7 @@ מזעור בעת מעבר בין יישומונים הפעולה לביצוע בעת מעבר ליישומון אחר מנגן הווידאו הראשי — %s כלום - מזעור לנגן הרקע + מזער לנגן הרקע הקטנה לנגן צף ביטול מינוי לשונית חדשה @@ -490,7 +490,7 @@ מיקומי הנגינה נמחקו. הקובץ הועבר או נמחק כבר קיים קובץ בשם הזה - לא ניתן לשכתב על הקובץ + לא ניתן לשכתב את הקובץ כבר יש הורדה ממתינה בשם הזה NewPipe נסגר בזמן העבודה על הקובץ לא נשאר מקום במכשיר From cc17d268fce0fea2028b7d7d5a91d1d357c4776b Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Wed, 1 Jan 2020 12:26:09 +0000 Subject: [PATCH 0066/1194] Translated using Weblate (Hebrew) Currently translated at 100.0% (522 of 522 strings) --- app/src/main/res/values-he/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml index 3e5f1aa8b..1b7444e1e 100644 --- a/app/src/main/res/values-he/strings.xml +++ b/app/src/main/res/values-he/strings.xml @@ -254,7 +254,7 @@ הוספה לתור בנגן צף חדש התחל לנגן מכאן התחל לנגן ברקע - התחל לנגן בחלון צף חדש + להתחיל כאן בנגן הצף הורדת קובץ הזרמה הצגת מידע רשימות נגינה מסומנות From a29df9a2dd374a39c46b8ad70be4a5f688862f89 Mon Sep 17 00:00:00 2001 From: Software In Interlingua Date: Tue, 31 Dec 2019 18:02:37 +0000 Subject: [PATCH 0067/1194] Translated using Weblate (Interlingua) Currently translated at 9.4% (49 of 522 strings) --- app/src/main/res/values-ia/strings.xml | 27 +++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-ia/strings.xml b/app/src/main/res/values-ia/strings.xml index a6b3daec9..1d053a370 100644 --- a/app/src/main/res/values-ia/strings.xml +++ b/app/src/main/res/values-ia/strings.xml @@ -1,2 +1,27 @@ - \ No newline at end of file + + Installar + Aperir in le navigator + Compartir + Discargar + Cercar + Configurationes + Compartir con + Seliger un navigator + Subscribite + Cancellar le subscription + Non poteva cambiar le subscription + Non poteva actualisar le subscription + Monstrar information + Principal + Subscriptiones + Nove scheda + Seliger le scheda + Novitates + Fundo + Emergente + Adder a + Dossier de discarga de video + Selige le dossier de discarga pro files de video + Dossier de discarga de audio + \ No newline at end of file From a3dc95bef1ee497e06daa1ad8633efe53bc3a6d9 Mon Sep 17 00:00:00 2001 From: MohammedSR Vevo Date: Wed, 1 Jan 2020 10:09:09 +0000 Subject: [PATCH 0068/1194] Translated using Weblate (Kurdish) Currently translated at 99.8% (521 of 522 strings) --- app/src/main/res/values-ku/strings.xml | 50 +++++++++++++------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/app/src/main/res/values-ku/strings.xml b/app/src/main/res/values-ku/strings.xml index 9fad2cf88..da2c3aa21 100644 --- a/app/src/main/res/values-ku/strings.xml +++ b/app/src/main/res/values-ku/strings.xml @@ -48,17 +48,17 @@ پیشاندانی قه‌باره‌ی به‌رزتر تەنها چەند مۆبایلێک پشتگیری کارپێکردنی ڤیدیۆی 2K/4K دەکەن كارپێكردن به‌ Kodi - نه‌رمه‌واڵا نه‌دۆزرایه‌وه‌. دابمه‌زرێت؟ - پیشاندانی بژارده‌ی “كاركردن به‌ Kodi” + ئەپەکە نه‌دۆزرایه‌وه‌. دابمه‌زرێت؟ + بژاردەی ”کارپێکردن بە Kodi“ پیشانبدرێت پیشاندانی بژارده‌ی كارپێكردنی ڤیدیۆ به‌ Kodi ده‌نگ - جۆری سه‌ره‌كی ده‌نگ - جۆری سه‌ره‌كی ڤیدیۆ + جۆری بنەڕەتی ده‌نگ + جۆری بنەڕەتی ڤیدیۆ ڕووكار - ڕووناك - تاریك + سپی + تاریک ڕه‌ش - بیرهاتنه‌وه‌ی شوێن و قه‌باره‌ی په‌نجه‌ره‌ + بیرهاتنه‌وه‌ی شوێن و قه‌باره‌ی په‌نجه‌ره‌ی بچووک بیرهاتنه‌وه‌ی كۆتا قه‌باره‌ و شوێنی په‌نجه‌ره‌ی بچووك باركردنی وێنۆچكه‌كان ناچالاكی بكه‌ بۆ ڕاگرتنی وێنۆچكه‌كان له‌ باركردن و پاشه‌كه‌وتبوون له‌سه‌ر بیرگه‌ی ئامێره‌كه‌ت. @@ -69,32 +69,32 @@ خاوێنکردنەوەی پاشماوەی داتا سڕینەوەی پاشماوەی هەموو داتاکان پاشماوەی داتاکان سڕانەوە - ڕیزکردنی خۆکاری لێدانی دواتر - کۆنتڕۆڵی لێدەر بەجوڵەی پەنجە + ڕیزکردنی خۆکاری کارپێکردنی دواتر + کۆنتڕۆڵی کارپێکەر بەجوڵەی پەنجە جوڵەی پەنجەت لەسەر ڕونما بەکاربهێنە بۆ گۆڕینی ئاستی دەنگ و ڕووناکی - گەڕان بەنێو پێشنیارکراوەکان + گەڕانی پێشنیارکراوەکان پیشاندانی پێشنیارەکان لەکاتی گەڕان مێژووی گەڕان مێژووی تەماشاکردن - هێشتنەوەی تراکی ڤیدیۆ لێدراوەکان - بەردەوام بوونی ڤیدیۆ لەدوای هەبوونی هەر بڕینێک (وەک پەیوەندیکردن) + هێشتنەوەی تراکی ڤیدیۆ کارپێکراوەکان + بەردەوام بوونی ڤیدیۆ لەدوای هەبوونی هەر بڕینێک (وەک پەیوەندی تەلەفۆنی) داگرتن دواتر - پیشاندانی دواتر و ڤیدیۆ هاوشێوەکان + پیشاندانی ’دواتر’ و ڤیدیۆ ’هاوشێوەکان’ بەستەرەکە پشتگیری نەکراوە - وڵاتی سەرەکی + وڵاتی بنەڕەتی خزمەتگوزاری - لێدەری ڤیدیۆیی + کارپێکەری ڤیدیۆ ڤیدیۆ & دەنگ مێژوو & پاشماوە پەنجەرەی بچووک ڕووکار هیتر ڕاستکردنەوە - لێدان لە پاشبنەما - لێدان لە پەنجەرەی بچووک - ڕیزکرا لە لێدان لە پاشبنەما - ڕیزکرا لە لێدان لە پەنجەرەی بچووک + کارپێکردن لە پاشبنەما + کارپێکردن لە پەنجەرەی بچووک + ڕیزکرا لە کارپێکردن لە پاشبنەما + ڕیزکرا لە کارپێکردن لە پەنجەرەی بچووک لێدان ناوەڕۆک سنوردانانی تەمەن @@ -345,7 +345,7 @@ جوڵەی پەنجەت لەسەر ڕونما بەکاربهێنە بۆ گۆڕینی ئاستی دەنگ کۆنترۆڵی ڕووناکی بەجوڵەی پەنجە جوڵەی پەنجەت لەسەر ڕونما بەکاربهێنە بۆ گۆڕینی ئاستی ڕووناکی ڕونما - زمانی سەرەکی + زمانی بنەڕەتی ئەپ نوێکارییەکان فایل سڕایەوە ئاگانامەی نوێکاری ئەپ @@ -369,15 +369,15 @@ ئەم ڕاژەیە ناتوانێ چەندین داگرتن لەیەک کاتدا بکات ڕووداوەکان پیشاندانی لێدوانەکان - ناچالاککردنی وەستان بۆ پیشاندانی لێدوانەکان - لێدانی خۆکاری + ناچالاککردن بۆ پیشان نەدانی لێدوانەکان + کارپێکردنی خۆکاری لێدوانەکان هیچ لێدوانێک نییە - لێدانەوەی لیست - لێدانەوەی لیست لە شوێنی پێشووتر + کارپێکردنەوەی لیست + گێڕانەوەی لیست بۆ شوێنی پێشووتر شوێنەکان لە لیستدا سڕینەوەی داتا مێژوو سڕایەوە. @@ -401,7 +401,7 @@ داواکردنی ناتەواو وا لە کارپێکەرەکە دەکات زۆر بەخێرایی شوێنەکان بگۆڕێت لەگەڵ وردییەکی داشکێنراو پاشکۆی خۆکاری پەخشێکی بەستراوە لەکاتی کارپێکردنی کۆتا پەخشدا - کۆگای گەڕانی داواکاری نێوخۆیی + کۆگای گەڕانی نێوخۆیی گێڕانەوە لەدۆخی سەرنج پیشاندانی ڕێنمایی ”داگرتن تا پاشکۆ” پیشاندانی ڕێنمایی کاتێ لە پاشبنەما یاخوود پەنجەرەی بچووکدا گرتە دەکرێ لەسەر وردەکاری ڤیدیۆیەک From a8e26238a8febfc01302ae4a9ac3e99d42a4b665 Mon Sep 17 00:00:00 2001 From: Matsuri Date: Wed, 1 Jan 2020 03:28:15 +0000 Subject: [PATCH 0069/1194] Translated using Weblate (Chinese (Simplified)) Currently translated at 98.7% (515 of 522 strings) --- app/src/main/res/values-b+zh+HANS+CN/strings.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-b+zh+HANS+CN/strings.xml b/app/src/main/res/values-b+zh+HANS+CN/strings.xml index f4c199e9e..e246d54eb 100644 --- a/app/src/main/res/values-b+zh+HANS+CN/strings.xml +++ b/app/src/main/res/values-b+zh+HANS+CN/strings.xml @@ -180,7 +180,7 @@ 错误报告 错误 无法加载所有缩略图 - 无法解密视频 URL 的签名 + 无法解密视频的 URL 签名 无法解析网址 无法完全解析网址 内容不可用 @@ -483,7 +483,7 @@ 命名冲突,已存在具有此名称文件 无法覆盖文件 有此名称的已暂停下载 - 处理文件时,NewPipe 已关闭 + NewPipe 在处理文件时被关闭 设备上没有剩余储存空间 进度丢失,文件已被删除 连接超时 @@ -511,8 +511,8 @@ 没人在听 - %s个听众 - + %s 人在听 + 重新启动应用后,语言将更改。 PeerTube 服务器 @@ -530,4 +530,5 @@ 正在恢复 无法恢复此下载 选择一个服务器 + 快进 / 快退的单位时间 \ No newline at end of file From ee65e892300d6aa7391239215871dbc27adf0b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Matuszewski?= Date: Wed, 30 Oct 2019 23:17:09 +0100 Subject: [PATCH 0070/1194] limit amount of notification thumbnail updates limits amount of calls to updateNotificationThumbnail in background player --- .../org/schabi/newpipe/player/BackgroundPlayer.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 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 ab07ded22..90af3c29f 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -95,6 +95,9 @@ public final class BackgroundPlayer extends Service { private boolean shouldUpdateOnProgress; + private static final int NOTIFICATION_UPDATES_BEFORE_RESET = 60; + private int timesNotificationUpdated; + /*////////////////////////////////////////////////////////////////////////// // Service's LifeCycle //////////////////////////////////////////////////////////////////////////*/ @@ -180,6 +183,7 @@ public final class BackgroundPlayer extends Service { private void resetNotification() { notBuilder = createNotification(); + timesNotificationUpdated = 0; } private NotificationCompat.Builder createNotification() { @@ -252,6 +256,7 @@ public final class BackgroundPlayer extends Service { if (bigNotRemoteView != null) bigNotRemoteView.setImageViewResource(R.id.notificationPlayPause, drawableId); } notificationManager.notify(NOTIFICATION_ID, notBuilder.build()); + timesNotificationUpdated++; } /*////////////////////////////////////////////////////////////////////////// @@ -351,8 +356,10 @@ public final class BackgroundPlayer extends Service { updateProgress(currentProgress, duration, bufferPercent); if (!shouldUpdateOnProgress) return; - resetNotification(); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O /*Oreo*/) updateNotificationThumbnail(); + if (timesNotificationUpdated > NOTIFICATION_UPDATES_BEFORE_RESET) { + resetNotification(); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O /*Oreo*/) updateNotificationThumbnail(); + } if (bigNotRemoteView != null) { if(cachedDuration != duration) { cachedDuration = duration; From 8e1d7f162d4360e4d789796d9e288f557a969106 Mon Sep 17 00:00:00 2001 From: Igor Nedoboy Date: Wed, 1 Jan 2020 18:08:43 +0000 Subject: [PATCH 0071/1194] Translated using Weblate (Russian) Currently translated at 100.0% (522 of 522 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 ef233baee..5230f00a2 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -265,7 +265,7 @@ Неверная ссылка Видеопотоки не найдены Аудиопотоки не найдены - Пожертвовать + Пожертвование Разработчики NewPipe ценой своего свободного времени делают вашу жизнь чуть удобнее. Отплатите им тем же — наслаждаясь чашечкой кофе, они смогут сделать NewPipe ещё круче. Воздать должное Веб-сайт From f04d2e76fa4cf2c81593b0cc52a04a2c3388a4a6 Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Wed, 1 Jan 2020 12:26:52 +0000 Subject: [PATCH 0072/1194] Translated using Weblate (Hebrew) Currently translated at 100.0% (522 of 522 strings) --- app/src/main/res/values-he/strings.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml index 1b7444e1e..f98fb7b3e 100644 --- a/app/src/main/res/values-he/strings.xml +++ b/app/src/main/res/values-he/strings.xml @@ -111,8 +111,8 @@ היסטוריית צפייה תיעוד הסרטונים שנצפו להמשיך את הניגון עם החזרת המיקוד - המשך לנגן לאחר הפרעות (למשל: שיחות טלפון) - הצג את העצה „החזק כדי להוסיף לרשימת נגינה” + להמשיך לנגן לאחר הפרעות (למשל: שיחות טלפון) + להציג את העצה „להחזיק כדי להוסיף לרשימת נגינה” להציג עצה בעת לחיצה על כפתור בנגן רקע או צף בעמוד פרטי סרטון נגן התנהגות @@ -122,7 +122,7 @@ רשימת נגינה רזולוציה מיטבית ביטול - נגן הכול + לנגן הכול התראה מ־NewPipe התראות עבור נגן הרקע והנגן הצף של NewPipe [לא ידוע] @@ -249,12 +249,12 @@ הסרה פרטים אפשרויות שמע - החזק כדי להוסיף לרשימת נגינה - הוסף לרשימת הנגינה ברקע + להחזיק כדי להוסיף לרשימת נגינה + להוסיף לרשימת הנגינה ברקע הוספה לתור בנגן צף חדש - התחל לנגן מכאן - התחל לנגן ברקע - להתחיל כאן בנגן הצף + להתחיל לנגן מכאן + להתחיל לנגן ברקע + להתחיל לנגן בנגן צף חדש הורדת קובץ הזרמה הצגת מידע רשימות נגינה מסומנות @@ -338,7 +338,7 @@ כיבוי האפשרות מונע את טעינת התמונות הממוזערות, חוסך בתקשורת נתונים ובניצולת הזיכרון. שינויים באפשרות זו מוחקים את המטמון בזיכרון ובכונן. הסרת כל נתוני העמודים שבמטמון הוספת התזרים הבא לרשימת הנגינה אוטומטית - הוסף אוטומטית תזרים דומה בעת נגינת התזרים האחרון בתור שאינו מחזורי + להוסיף אוטומטית תזרים דומה בעת נגינת התזרים האחרון בתור שאינו מחזורי החלפת כיווניות העברה לראשי משכתב את ההיסטוריה והמינויים הנוכחיים שלך @@ -393,7 +393,7 @@ מזעור בעת מעבר בין יישומונים הפעולה לביצוע בעת מעבר ליישומון אחר מנגן הווידאו הראשי — %s כלום - מזער לנגן הרקע + מזעור לנגן הרקע הקטנה לנגן צף ביטול מינוי לשונית חדשה From 33caad469000f45d5ec9e8d8cf26351849222e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Matuszewski?= Date: Sat, 14 Dec 2019 16:05:36 +0100 Subject: [PATCH 0073/1194] make main page tabs scrollable --- .../newpipe/fragments/MainFragment.java | 3 +- .../newpipe/views/ScrollableTabLayout.java | 83 +++++++++++++++++++ app/src/main/res/layout/fragment_main.xml | 3 +- 3 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java 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 720e0f216..88a4c9c63 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java @@ -30,6 +30,7 @@ import org.schabi.newpipe.settings.tabs.Tab; import org.schabi.newpipe.settings.tabs.TabsManager; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.ServiceHelper; +import org.schabi.newpipe.views.ScrollableTabLayout; import java.util.ArrayList; import java.util.List; @@ -37,7 +38,7 @@ import java.util.List; public class MainFragment extends BaseFragment implements TabLayout.OnTabSelectedListener { private ViewPager viewPager; private SelectedTabsPagerAdapter pagerAdapter; - private TabLayout tabLayout; + private ScrollableTabLayout tabLayout; private List tabsList = new ArrayList<>(); private TabsManager tabsManager; diff --git a/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java b/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java new file mode 100644 index 000000000..88b108052 --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java @@ -0,0 +1,83 @@ +package org.schabi.newpipe.views; + +import android.content.Context; +import android.os.Build; +import android.util.AttributeSet; +import android.util.Log; +import android.view.View; +import android.view.ViewTreeObserver.OnGlobalLayoutListener; + +import androidx.annotation.NonNull; + +import com.google.android.material.tabs.TabLayout; +import com.google.android.material.tabs.TabLayout.Tab; + +/** + * A TabLayout that is scrollable when tabs exceed its width. + */ +public class ScrollableTabLayout extends TabLayout { + private static final String TAG = ScrollableTabLayout.class.getSimpleName(); + + public ScrollableTabLayout(Context context) { + super(context); + } + + public ScrollableTabLayout(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public ScrollableTabLayout(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + } + + @Override + protected void onAttachedToWindow() { + super.onAttachedToWindow(); + + setTabMode(TabLayout.MODE_FIXED); + resetMode(); + } + + @Override + protected void onSizeChanged(int w, int h, int oldw, int oldh) { + super.onSizeChanged(w, h, oldw, oldh); + + resetMode(); + } + + @Override + public void addTab(@NonNull Tab tab, int position, boolean setSelected) { + super.addTab(tab, position, setSelected); + + resetMode(); + } + + @Override + public void removeTabAt(int position) { + super.removeTabAt(position); + + resetMode(); + } + + private void resetMode() { + if (getTabCount() == 0 || getTabAt(0).view == null) return; + setTabMode(TabLayout.MODE_FIXED); + + int layoutWidth = getWidth(); + int minimumWidth = ((View) getTabAt(0).view).getMinimumWidth(); + if (minimumWidth * getTabCount() > layoutWidth) { + setTabMode(TabLayout.MODE_SCROLLABLE); + return; + } + + int actualWidth = 0; + for (int i = 0; i < getTabCount(); ++i) { + if (getTabAt(i).view == null) return; + actualWidth += ((View) getTabAt(i).view).getWidth(); + if (actualWidth > layoutWidth) { + setTabMode(TabLayout.MODE_SCROLLABLE); + return; + } + } + } +} diff --git a/app/src/main/res/layout/fragment_main.xml b/app/src/main/res/layout/fragment_main.xml index 85614342d..1a2455691 100644 --- a/app/src/main/res/layout/fragment_main.xml +++ b/app/src/main/res/layout/fragment_main.xml @@ -6,12 +6,13 @@ android:layout_height="match_parent"> - Date: Sun, 15 Dec 2019 12:41:19 +0100 Subject: [PATCH 0074/1194] hide main page tab selector with single tab --- .../org/schabi/newpipe/views/ScrollableTabLayout.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java b/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java index 88b108052..ffbb804af 100644 --- a/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java +++ b/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java @@ -14,6 +14,7 @@ import com.google.android.material.tabs.TabLayout.Tab; /** * A TabLayout that is scrollable when tabs exceed its width. + * Hides when there are less than 2 tabs. */ public class ScrollableTabLayout extends TabLayout { private static final String TAG = ScrollableTabLayout.class.getSimpleName(); @@ -60,6 +61,13 @@ public class ScrollableTabLayout extends TabLayout { } private void resetMode() { + if (getTabCount() < 2) { + setVisibility(View.GONE); + return; + } else { + setVisibility(View.VISIBLE); + } + if (getTabCount() == 0 || getTabAt(0).view == null) return; setTabMode(TabLayout.MODE_FIXED); From b674cfec241acfa6006c3b13fb419ff23dbc2a70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Matuszewski?= Date: Mon, 16 Dec 2019 00:11:54 +0100 Subject: [PATCH 0075/1194] simplify ScrollableTabLayout tabs width checking --- .../newpipe/views/ScrollableTabLayout.java | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java b/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java index ffbb804af..40c021cec 100644 --- a/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java +++ b/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java @@ -25,18 +25,21 @@ public class ScrollableTabLayout extends TabLayout { public ScrollableTabLayout(Context context, AttributeSet attrs) { super(context, attrs); + setTabMode(TabLayout.MODE_FIXED); } public ScrollableTabLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); + setTabMode(TabLayout.MODE_FIXED); } @Override - protected void onAttachedToWindow() { - super.onAttachedToWindow(); + protected void onLayout(boolean changed, int l, int t, int r, int b) { + super.onLayout(changed, l, t, r, b); - setTabMode(TabLayout.MODE_FIXED); - resetMode(); + if (changed) { + resetMode(); + } } @Override @@ -68,21 +71,15 @@ public class ScrollableTabLayout extends TabLayout { setVisibility(View.VISIBLE); } - if (getTabCount() == 0 || getTabAt(0).view == null) return; + int layoutWidth = getWidth(); + if (layoutWidth == 0) return; + setTabMode(TabLayout.MODE_FIXED); - int layoutWidth = getWidth(); - int minimumWidth = ((View) getTabAt(0).view).getMinimumWidth(); - if (minimumWidth * getTabCount() > layoutWidth) { - setTabMode(TabLayout.MODE_SCROLLABLE); - return; - } - - int actualWidth = 0; + int tabsRequestedWidth = 0; for (int i = 0; i < getTabCount(); ++i) { - if (getTabAt(i).view == null) return; - actualWidth += ((View) getTabAt(i).view).getWidth(); - if (actualWidth > layoutWidth) { + tabsRequestedWidth += ((View) getTabAt(i).view).getMinimumWidth(); + if (tabsRequestedWidth > layoutWidth) { setTabMode(TabLayout.MODE_SCROLLABLE); return; } From 1393d3ad7f3f44b6dc8afeefd5696617699bc09f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Matuszewski?= Date: Tue, 17 Dec 2019 19:59:29 +0100 Subject: [PATCH 0076/1194] fix ScrollableTabLayout content width calculation fix bug where only minimum width requested by tab was counted even if actual content was wider --- .../newpipe/views/ScrollableTabLayout.java | 90 +++++++++++++------ 1 file changed, 65 insertions(+), 25 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java b/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java index 40c021cec..6dd6411e1 100644 --- a/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java +++ b/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java @@ -5,7 +5,6 @@ import android.os.Build; import android.util.AttributeSet; import android.util.Log; import android.view.View; -import android.view.ViewTreeObserver.OnGlobalLayoutListener; import androidx.annotation.NonNull; @@ -19,70 +18,111 @@ import com.google.android.material.tabs.TabLayout.Tab; public class ScrollableTabLayout extends TabLayout { private static final String TAG = ScrollableTabLayout.class.getSimpleName(); + private int layoutWidth = 0; + private int prevVisibility = View.GONE; + public ScrollableTabLayout(Context context) { super(context); } public ScrollableTabLayout(Context context, AttributeSet attrs) { super(context, attrs); - setTabMode(TabLayout.MODE_FIXED); } public ScrollableTabLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); - setTabMode(TabLayout.MODE_FIXED); } @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { super.onLayout(changed, l, t, r, b); - if (changed) { - resetMode(); - } + remeasureTabs(); } @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); - resetMode(); + layoutWidth = w; } @Override public void addTab(@NonNull Tab tab, int position, boolean setSelected) { super.addTab(tab, position, setSelected); - resetMode(); + hasMultipleTabs(); + + // Adding a tab won't decrease total tabs' width so tabMode won't have to change to FIXED + if (getTabMode() != MODE_SCROLLABLE) { + remeasureTabs(); + } } @Override public void removeTabAt(int position) { super.removeTabAt(position); - resetMode(); + hasMultipleTabs(); + + // Removing a tab won't increase total tabs' width so tabMode won't have to change to SCROLLABLE + if (getTabMode() != MODE_FIXED) { + remeasureTabs(); + } } - private void resetMode() { - if (getTabCount() < 2) { - setVisibility(View.GONE); - return; - } else { - setVisibility(View.VISIBLE); - } + @Override + protected void onVisibilityChanged(View changedView, int visibility) { + super.onVisibilityChanged(changedView, visibility); - int layoutWidth = getWidth(); + // Recheck content width in case some tabs have been added or removed while ScrollableTabLayout was invisible + // We don't have to check if it was GONE because then requestLayout() will be called + if (changedView == this) { + if (prevVisibility == View.INVISIBLE) { + remeasureTabs(); + } + prevVisibility = visibility; + } + } + + private void setMode(int mode) { + if (mode == getTabMode()) return; + + setTabMode(mode); + } + + /** + * Make ScrollableTabLayout not visible if there are less than two tabs + */ + private void hasMultipleTabs() { + if (getTabCount() > 1) { + setVisibility(View.VISIBLE); + } else { + setVisibility(View.GONE); + } + } + + /** + * Calculate minimal width required by tabs and set tabMode accordingly + */ + private void remeasureTabs() { + if (getVisibility() != View.VISIBLE) return; if (layoutWidth == 0) return; - setTabMode(TabLayout.MODE_FIXED); - - int tabsRequestedWidth = 0; - for (int i = 0; i < getTabCount(); ++i) { - tabsRequestedWidth += ((View) getTabAt(i).view).getMinimumWidth(); - if (tabsRequestedWidth > layoutWidth) { - setTabMode(TabLayout.MODE_SCROLLABLE); - return; + final int count = getTabCount(); + int contentWidth = 0; + for (int i = 0; i < count; i++) { + View child = getTabAt(i).view; + if (child.getVisibility() == View.VISIBLE) { + // Use tab's minimum requested width should actual content be too small + contentWidth += Math.max(child.getMinimumWidth(), child.getMeasuredWidth()); } } + + if (contentWidth > layoutWidth) { + setMode(TabLayout.MODE_SCROLLABLE); + } else { + setMode(TabLayout.MODE_FIXED); + } } } From 3625a38a234ebf8a92f2ac05c562c4440248b5b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Matuszewski?= Date: Wed, 1 Jan 2020 14:12:45 +0100 Subject: [PATCH 0077/1194] improve code consistency in ScrollableTabLayout --- .../main/java/org/schabi/newpipe/views/ScrollableTabLayout.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java b/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java index 6dd6411e1..48327220a 100644 --- a/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java +++ b/app/src/main/java/org/schabi/newpipe/views/ScrollableTabLayout.java @@ -106,7 +106,7 @@ public class ScrollableTabLayout extends TabLayout { * Calculate minimal width required by tabs and set tabMode accordingly */ private void remeasureTabs() { - if (getVisibility() != View.VISIBLE) return; + if (prevVisibility != View.VISIBLE) return; if (layoutWidth == 0) return; final int count = getTabCount(); From f44883e79fbb3d20e45902d3cfd4c4875f86f165 Mon Sep 17 00:00:00 2001 From: k1rakishou Date: Fri, 4 Oct 2019 21:47:01 +0300 Subject: [PATCH 0078/1194] Show video thumbnail on the lock screen --- .../newpipe/player/BackgroundPlayer.java | 61 ++++++++++++++----- .../player/helper/MediaSessionManager.java | 43 +++++++++++-- .../org/schabi/newpipe/util/BitmapUtils.java | 42 +++++++++++++ 3 files changed, 125 insertions(+), 21 deletions(-) create mode 100644 app/src/main/java/org/schabi/newpipe/util/BitmapUtils.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 90af3c29f..6486f4b03 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -25,6 +25,7 @@ import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import android.content.res.Resources; import android.graphics.Bitmap; import android.os.Build; import android.os.IBinder; @@ -48,6 +49,7 @@ import org.schabi.newpipe.player.helper.LockManager; import org.schabi.newpipe.player.playqueue.PlayQueueItem; import org.schabi.newpipe.player.resolver.AudioPlaybackResolver; import org.schabi.newpipe.player.resolver.MediaSourceTag; +import org.schabi.newpipe.util.BitmapUtils; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.ThemeHelper; @@ -193,18 +195,37 @@ public final class BackgroundPlayer extends Service { setupNotification(notRemoteView); setupNotification(bigNotRemoteView); - 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) - .setCustomContentView(notRemoteView) - .setCustomBigContentView(bigNotRemoteView); + NotificationCompat.Builder builder = new NotificationCompat.Builder(this, getString(R.string.notification_channel_id)); + builder.setOngoing(true); + builder.setSmallIcon(R.drawable.ic_newpipe_triangle_white); + builder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC); + builder.setCustomContentView(notRemoteView); + builder.setCustomBigContentView(bigNotRemoteView); + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + basePlayerImpl.mediaSessionManager.setLockScreenArt( + builder, + getCenteredThumbnailBitmap() + ); + } + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) { builder.setPriority(NotificationCompat.PRIORITY_MAX); } return builder; } + @Nullable + private Bitmap getCenteredThumbnailBitmap() { + int screenWidth = Resources.getSystem().getDisplayMetrics().widthPixels; + int screenHeight = Resources.getSystem().getDisplayMetrics().heightPixels; + + return BitmapUtils.centerCrop( + basePlayerImpl.getThumbnail(), + screenWidth, + screenHeight); + } + private void setupNotification(RemoteViews remoteViews) { if (basePlayerImpl == null) return; @@ -252,8 +273,10 @@ public final class BackgroundPlayer extends Service { //if (DEBUG) Log.d(TAG, "updateNotification() called with: drawableId = [" + drawableId + "]"); if (notBuilder == null) return; if (drawableId != -1) { - if (notRemoteView != null) notRemoteView.setImageViewResource(R.id.notificationPlayPause, drawableId); - if (bigNotRemoteView != null) bigNotRemoteView.setImageViewResource(R.id.notificationPlayPause, drawableId); + if (notRemoteView != null) + notRemoteView.setImageViewResource(R.id.notificationPlayPause, drawableId); + if (bigNotRemoteView != null) + bigNotRemoteView.setImageViewResource(R.id.notificationPlayPause, drawableId); } notificationManager.notify(NOTIFICATION_ID, notBuilder.build()); timesNotificationUpdated++; @@ -280,7 +303,8 @@ public final class BackgroundPlayer extends Service { protected class BasePlayerImpl extends BasePlayer { - @NonNull final private AudioPlaybackResolver resolver; + @NonNull + final private AudioPlaybackResolver resolver; private int cachedDuration; private String cachedDurationString; @@ -299,8 +323,10 @@ public final class BackgroundPlayer extends Service { super.handleIntent(intent); resetNotification(); - if (bigNotRemoteView != null) bigNotRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 0, false); - if (notRemoteView != null) notRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 0, false); + if (bigNotRemoteView != null) + bigNotRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 0, false); + if (notRemoteView != null) + notRemoteView.setProgressBar(R.id.notificationProgressBar, 100, 0, false); startForeground(NOTIFICATION_ID, notBuilder.build()); } @@ -335,6 +361,7 @@ public final class BackgroundPlayer extends Service { updateNotificationThumbnail(); updateNotification(-1); } + /*////////////////////////////////////////////////////////////////////////// // States Implementation //////////////////////////////////////////////////////////////////////////*/ @@ -358,10 +385,12 @@ public final class BackgroundPlayer extends Service { if (!shouldUpdateOnProgress) return; if (timesNotificationUpdated > NOTIFICATION_UPDATES_BEFORE_RESET) { resetNotification(); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O /*Oreo*/) updateNotificationThumbnail(); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O /*Oreo*/) + updateNotificationThumbnail(); } + if (bigNotRemoteView != null) { - if(cachedDuration != duration) { + if (cachedDuration != duration) { cachedDuration = duration; cachedDurationString = getTimeString(duration); } @@ -389,8 +418,10 @@ public final class BackgroundPlayer extends Service { @Override public void destroy() { super.destroy(); - if (notRemoteView != null) notRemoteView.setImageViewBitmap(R.id.notificationCover, null); - if (bigNotRemoteView != null) bigNotRemoteView.setImageViewBitmap(R.id.notificationCover, null); + if (notRemoteView != null) + notRemoteView.setImageViewBitmap(R.id.notificationCover, null); + if (bigNotRemoteView != null) + bigNotRemoteView.setImageViewBitmap(R.id.notificationCover, null); } /*////////////////////////////////////////////////////////////////////////// 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 a5c703837..ec53e72fe 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 @@ -2,12 +2,18 @@ package org.schabi.newpipe.player.helper; import android.content.Context; import android.content.Intent; +import android.graphics.Bitmap; +import android.media.MediaMetadata; +import android.os.Build; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import android.support.annotation.RequiresApi; +import android.support.v4.app.NotificationCompat; +import android.support.v4.media.MediaMetadataCompat; +import android.support.v4.media.session.MediaButtonReceiver; import android.support.v4.media.session.MediaSessionCompat; import android.view.KeyEvent; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.media.session.MediaButtonReceiver; +import android.support.v4.media.app.NotificationCompat.MediaStyle; import com.google.android.exoplayer2.Player; import com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector; @@ -40,13 +46,38 @@ public class MediaSessionManager { return MediaButtonReceiver.handleIntent(mediaSession, intent); } + @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) + public void setLockScreenArt( + NotificationCompat.Builder builder, + @Nullable Bitmap thumbnailBitmap + ) { + if (thumbnailBitmap == null) { + return; + } + + if (!mediaSession.isActive()) { + return; + } + + mediaSession.setMetadata( + new MediaMetadataCompat.Builder() + .putBitmap(MediaMetadata.METADATA_KEY_ALBUM_ART, thumbnailBitmap) + .build() + ); + + MediaStyle mediaStyle = new MediaStyle() + .setMediaSession(mediaSession.getSessionToken()); + + builder.setStyle(mediaStyle); + } + /** * Should be called on player destruction to prevent leakage. - * */ + */ public void dispose() { this.sessionConnector.setPlayer(null); this.sessionConnector.setQueueNavigator(null); this.mediaSession.setActive(false); this.mediaSession.release(); - } + } } diff --git a/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java b/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java new file mode 100644 index 000000000..2dac94912 --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java @@ -0,0 +1,42 @@ +package org.schabi.newpipe.util; + +import android.graphics.Bitmap; +import android.support.annotation.Nullable; + +public class BitmapUtils { + + @Nullable + public static Bitmap centerCrop(Bitmap inputBitmap, int newWidth, int newHeight) { + if (inputBitmap == null || inputBitmap.isRecycled()) { + return null; + } + + float sourceWidth = inputBitmap.getWidth(); + float sourceHeight = inputBitmap.getHeight(); + + float xScale = newWidth / sourceWidth; + float yScale = newHeight / sourceHeight; + + float newXScale; + float newYScale; + + if (yScale > xScale) { + newXScale = (1.0f / yScale) * xScale; + newYScale = 1.0f; + } else { + newXScale = 1.0f; + newYScale = (1.0f / xScale) * yScale; + } + + float scaledWidth = newXScale * sourceWidth; + float scaledHeight = newYScale * sourceHeight; + + int left = (int) ((sourceWidth - scaledWidth) / 2); + int top = (int) ((sourceHeight - scaledHeight) / 2); + int width = (int) scaledWidth; + int height = (int) scaledHeight; + + return Bitmap.createBitmap(inputBitmap, left, top, width, height); + } + +} From 96de70b71e62cb70339a6185e6b53f4a31f8f5d3 Mon Sep 17 00:00:00 2001 From: k1rakishou Date: Fri, 8 Nov 2019 20:47:42 +0300 Subject: [PATCH 0079/1194] Rebase onto the latest dev, update appcompat dependencies to use androidx --- .../player/helper/MediaSessionManager.java | 21 +++++++++++-------- .../org/schabi/newpipe/util/BitmapUtils.java | 3 ++- 2 files changed, 14 insertions(+), 10 deletions(-) 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 ec53e72fe..b75ddb706 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 @@ -5,15 +5,16 @@ import android.content.Intent; import android.graphics.Bitmap; import android.media.MediaMetadata; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.RequiresApi; -import android.support.v4.app.NotificationCompat; import android.support.v4.media.MediaMetadataCompat; -import android.support.v4.media.session.MediaButtonReceiver; import android.support.v4.media.session.MediaSessionCompat; import android.view.KeyEvent; -import android.support.v4.media.app.NotificationCompat.MediaStyle; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; +import androidx.core.app.NotificationCompat; +import androidx.media.session.MediaButtonReceiver; +import androidx.media.app.NotificationCompat.MediaStyle; import com.google.android.exoplayer2.Player; import com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector; @@ -25,8 +26,10 @@ import org.schabi.newpipe.player.mediasession.PlayQueuePlaybackController; public class MediaSessionManager { private static final String TAG = "MediaSessionManager"; - @NonNull private final MediaSessionCompat mediaSession; - @NonNull private final MediaSessionConnector sessionConnector; + @NonNull + private final MediaSessionCompat mediaSession; + @NonNull + private final MediaSessionConnector sessionConnector; public MediaSessionManager(@NonNull final Context context, @NonNull final Player player, @@ -72,7 +75,7 @@ public class MediaSessionManager { } /** - * Should be called on player destruction to prevent leakage. + * Should be called on player destruction to prevent leakage.BitmapUtils */ public void dispose() { this.sessionConnector.setPlayer(null); diff --git a/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java b/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java index 2dac94912..a0e7de4ac 100644 --- a/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java +++ b/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java @@ -1,7 +1,8 @@ package org.schabi.newpipe.util; import android.graphics.Bitmap; -import android.support.annotation.Nullable; + +import androidx.annotation.Nullable; public class BitmapUtils { From 0395dc6e9e81e04aee8bb420383401832193054f Mon Sep 17 00:00:00 2001 From: k1rakishou Date: Thu, 28 Nov 2019 21:46:37 +0300 Subject: [PATCH 0080/1194] Add a setting for the lock screen thumbnail feature --- .../newpipe/player/BackgroundPlayer.java | 28 ++++++++++++++++--- .../player/helper/MediaSessionManager.java | 14 ++++++++++ app/src/main/res/values/settings_keys.xml | 1 + app/src/main/res/values/strings.xml | 2 ++ app/src/main/res/xml/video_audio_settings.xml | 7 +++++ 5 files changed, 48 insertions(+), 4 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 6486f4b03..cbcd702f4 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -25,13 +25,17 @@ import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import android.content.SharedPreferences; import android.content.res.Resources; import android.graphics.Bitmap; import android.os.Build; import android.os.IBinder; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; import androidx.core.app.NotificationCompat; + +import android.preference.PreferenceManager; import android.util.Log; import android.view.View; import android.widget.RemoteViews; @@ -77,6 +81,7 @@ public final class BackgroundPlayer extends Service { private BasePlayerImpl basePlayerImpl; private LockManager lockManager; + private SharedPreferences sharedPreferences; /*////////////////////////////////////////////////////////////////////////// // Service-Activity Binder @@ -109,6 +114,7 @@ public final class BackgroundPlayer extends Service { if (DEBUG) Log.d(TAG, "onCreate() called"); notificationManager = ((NotificationManager) getSystemService(NOTIFICATION_SERVICE)); lockManager = new LockManager(this); + sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); ThemeHelper.setTheme(this); basePlayerImpl = new BasePlayerImpl(this); @@ -203,10 +209,7 @@ public final class BackgroundPlayer extends Service { builder.setCustomBigContentView(bigNotRemoteView); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - basePlayerImpl.mediaSessionManager.setLockScreenArt( - builder, - getCenteredThumbnailBitmap() - ); + setLockScreenThumbnail(builder); } if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN) { @@ -215,6 +218,23 @@ public final class BackgroundPlayer extends Service { return builder; } + @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) + private void setLockScreenThumbnail(NotificationCompat.Builder builder) { + boolean isLockScreenThumbnailEnabled = sharedPreferences.getBoolean( + getString(R.string.enable_lock_screen_video_thumbnail_key), + true + ); + + if (isLockScreenThumbnailEnabled) { + basePlayerImpl.mediaSessionManager.setLockScreenArt( + builder, + getCenteredThumbnailBitmap() + ); + } else { + basePlayerImpl.mediaSessionManager.clearLockScreenArt(builder); + } + } + @Nullable private Bitmap getCenteredThumbnailBitmap() { int screenWidth = Resources.getSystem().getDisplayMetrics().widthPixels; 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 b75ddb706..64022e39c 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 @@ -74,6 +74,20 @@ public class MediaSessionManager { builder.setStyle(mediaStyle); } + @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) + public void clearLockScreenArt(NotificationCompat.Builder builder) { + mediaSession.setMetadata( + new MediaMetadataCompat.Builder() + .putBitmap(MediaMetadata.METADATA_KEY_ALBUM_ART, null) + .build() + ); + + MediaStyle mediaStyle = new MediaStyle() + .setMediaSession(mediaSession.getSessionToken()); + + builder.setStyle(mediaStyle); + } + /** * Should be called on player destruction to prevent leakage.BitmapUtils */ diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 6aaaa0630..4813833d1 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -175,6 +175,7 @@ main_page_content enable_playback_resume enable_playback_state_lists + enable_lock_screen_video_thumbnail import_data export_data diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6021df15e..a296e2db7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -58,7 +58,9 @@ Kore app not found. Install it? org.xbmc.kore Show \"Play with Kodi\" option + Enable lock screen video thumbnail Display an option to play a video via Kodi media center + When using the background player a video thumbnail will be displayed on the lock screen Audio Default audio format Default video format diff --git a/app/src/main/res/xml/video_audio_settings.xml b/app/src/main/res/xml/video_audio_settings.xml index 0ff43ce90..ddf85811a 100644 --- a/app/src/main/res/xml/video_audio_settings.xml +++ b/app/src/main/res/xml/video_audio_settings.xml @@ -81,6 +81,13 @@ android:summary="@string/show_play_with_kodi_summary" android:title="@string/show_play_with_kodi_title"/> + + Date: Wed, 1 Jan 2020 17:18:58 +0100 Subject: [PATCH 0081/1194] Enable lockscreen video thumbnail by default --- .../org/schabi/newpipe/player/helper/MediaSessionManager.java | 2 +- app/src/main/res/xml/video_audio_settings.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 64022e39c..51684f506 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 @@ -89,7 +89,7 @@ public class MediaSessionManager { } /** - * Should be called on player destruction to prevent leakage.BitmapUtils + * Should be called on player destruction to prevent leakage. */ public void dispose() { this.sessionConnector.setPlayer(null); diff --git a/app/src/main/res/xml/video_audio_settings.xml b/app/src/main/res/xml/video_audio_settings.xml index ddf85811a..d1757919b 100644 --- a/app/src/main/res/xml/video_audio_settings.xml +++ b/app/src/main/res/xml/video_audio_settings.xml @@ -83,7 +83,7 @@ From 718acb505930e4a7d2dbd7b3840b73677f5512bb Mon Sep 17 00:00:00 2001 From: TobiGr Date: Thu, 2 Jan 2020 15:00:22 +0100 Subject: [PATCH 0082/1194] Code improvements --- .../newpipe/player/helper/MediaSessionManager.java | 11 ++--------- .../java/org/schabi/newpipe/util/BitmapUtils.java | 4 ++-- 2 files changed, 4 insertions(+), 11 deletions(-) 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 51684f506..8b9369613 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 @@ -50,15 +50,8 @@ public class MediaSessionManager { } @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) - public void setLockScreenArt( - NotificationCompat.Builder builder, - @Nullable Bitmap thumbnailBitmap - ) { - if (thumbnailBitmap == null) { - return; - } - - if (!mediaSession.isActive()) { + public void setLockScreenArt(NotificationCompat.Builder builder, @Nullable Bitmap thumbnailBitmap) { + if (thumbnailBitmap == null || !mediaSession.isActive()) { return; } diff --git a/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java b/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java index a0e7de4ac..7ad71eb5c 100644 --- a/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java +++ b/app/src/main/java/org/schabi/newpipe/util/BitmapUtils.java @@ -22,11 +22,11 @@ public class BitmapUtils { float newYScale; if (yScale > xScale) { - newXScale = (1.0f / yScale) * xScale; + newXScale = xScale / yScale; newYScale = 1.0f; } else { newXScale = 1.0f; - newYScale = (1.0f / xScale) * yScale; + newYScale = yScale / xScale; } float scaledWidth = newXScale * sourceWidth; From c46a0f7b2ebd9fbe73c3bc33c5b62ae64c529a23 Mon Sep 17 00:00:00 2001 From: k1rakishou Date: Fri, 3 Jan 2020 13:00:53 +0300 Subject: [PATCH 0083/1194] Code-review changes --- .../org/schabi/newpipe/player/BackgroundPlayer.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 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 f36e352a6..9e896b14f 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -201,12 +201,12 @@ public final class BackgroundPlayer extends Service { setupNotification(notRemoteView); setupNotification(bigNotRemoteView); - NotificationCompat.Builder builder = new NotificationCompat.Builder(this, getString(R.string.notification_channel_id)); - builder.setOngoing(true); - builder.setSmallIcon(R.drawable.ic_newpipe_triangle_white); - builder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC); - builder.setCustomContentView(notRemoteView); - builder.setCustomBigContentView(bigNotRemoteView); + 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) + .setCustomContentView(notRemoteView) + .setCustomBigContentView(bigNotRemoteView); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { setLockScreenThumbnail(builder); From eb5fb42da9776149db8c882cf16a4da4f8531c9f Mon Sep 17 00:00:00 2001 From: k1rakishou Date: Fri, 3 Jan 2020 16:29:04 +0300 Subject: [PATCH 0084/1194] Couple more code review changes --- .../org/schabi/newpipe/player/BackgroundPlayer.java | 10 +++++++--- .../newpipe/player/helper/MediaSessionManager.java | 2 +- 2 files changed, 8 insertions(+), 4 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 9e896b14f..76da7da36 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -403,9 +403,13 @@ public final class BackgroundPlayer extends Service { updateProgress(currentProgress, duration, bufferPercent); if (!shouldUpdateOnProgress) return; - if (timesNotificationUpdated > NOTIFICATION_UPDATES_BEFORE_RESET) {resetNotification(); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O /*Oreo*/) - updateNotificationThumbnail();} + if (timesNotificationUpdated > NOTIFICATION_UPDATES_BEFORE_RESET) { + resetNotification(); + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O /*Oreo*/) { + updateNotificationThumbnail(); + } + } if (bigNotRemoteView != null) { if (cachedDuration != duration) { cachedDuration = duration; 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 9134d6144..8b9369613 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 @@ -82,7 +82,7 @@ public class MediaSessionManager { } /** - * Should be called on player destruction to prevent leakage.BitmapUtils + * Should be called on player destruction to prevent leakage. */ public void dispose() { this.sessionConnector.setPlayer(null); From dea1e0dcb9652dbaddcd1f1de68d8a5d340426a2 Mon Sep 17 00:00:00 2001 From: bopol Date: Sat, 4 Jan 2020 21:38:27 +0100 Subject: [PATCH 0085/1194] Update localizations settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1) now, on « content language » change, it will also change the app language 2) added Esperanto to the list of language in content language --- app/src/main/java/org/schabi/newpipe/MainActivity.java | 5 +++++ .../java/org/schabi/newpipe/util/Localization.java | 10 ++++++++++ app/src/main/res/values/settings_keys.xml | 2 ++ 3 files changed, 17 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 90d299c7f..cac814085 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -67,6 +67,7 @@ import org.schabi.newpipe.fragments.list.search.SearchFragment; import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.util.Constants; import org.schabi.newpipe.util.KioskTranslator; +import org.schabi.newpipe.util.Localization; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.PeertubeHelper; import org.schabi.newpipe.util.PermissionHelper; @@ -78,6 +79,8 @@ import org.schabi.newpipe.util.ThemeHelper; import java.util.ArrayList; import java.util.List; +import static org.schabi.newpipe.util.Localization.changeAppLanguage; + public class MainActivity extends AppCompatActivity { private static final String TAG = "MainActivity"; public static final boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release"); @@ -116,6 +119,8 @@ public class MainActivity extends AppCompatActivity { ThemeHelper.setTheme(this, ServiceHelper.getSelectedServiceId(this)); + changeAppLanguage(Localization.getPreferredLocale(getApplicationContext()), getResources()); + super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); diff --git a/app/src/main/java/org/schabi/newpipe/util/Localization.java b/app/src/main/java/org/schabi/newpipe/util/Localization.java index 9274df848..6b0b4cd0c 100644 --- a/app/src/main/java/org/schabi/newpipe/util/Localization.java +++ b/app/src/main/java/org/schabi/newpipe/util/Localization.java @@ -2,8 +2,11 @@ package org.schabi.newpipe.util; import android.content.Context; import android.content.SharedPreferences; +import android.content.res.Configuration; +import android.content.res.Resources; import android.preference.PreferenceManager; import android.text.TextUtils; +import android.util.DisplayMetrics; import org.ocpsoft.prettytime.PrettyTime; import org.ocpsoft.prettytime.units.Decade; @@ -216,4 +219,11 @@ public class Localization { public static String relativeTime(Calendar calendarTime) { return getPrettyTime().formatUnrounded(calendarTime); } + + public static void changeAppLanguage(Locale loc, Resources res) { + DisplayMetrics dm = res.getDisplayMetrics(); + Configuration conf = res.getConfiguration(); + conf.setLocale(loc); + res.updateConfiguration(conf, dm); + } } diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 6aaaa0630..3f361226d 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -272,6 +272,7 @@ cs da de + eo et en-GB en @@ -351,6 +352,7 @@ Čeština Dansk Deutsch + Esperanto Eesti English (UK) English (US) From 014682664d46f09b7c9a4b4312d16303c2ffee04 Mon Sep 17 00:00:00 2001 From: ssantos Date: Thu, 2 Jan 2020 07:38:24 +0000 Subject: [PATCH 0086/1194] Translated using Weblate (German) Currently translated at 100.0% (522 of 522 strings) --- app/src/main/res/values-de/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index e16d7d69b..17c2e55d0 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -529,4 +529,8 @@ Wähle eine Instanz Bevorzugte Peertube-Instanzen festlegen Es werden nur https-Adressen unterstützt + Dauer der Suche bei schnellem Vor-/Zurückspulen + Am beliebtesten + Wiederherstellen + Dieser Download kann nicht wiederhergestellt werden \ No newline at end of file From f17b92512c7713e414bb364f0ea2fa722875561d Mon Sep 17 00:00:00 2001 From: THANOS SIOURDAKIS Date: Wed, 1 Jan 2020 18:36:11 +0000 Subject: [PATCH 0087/1194] Translated using Weblate (Greek) Currently translated at 97.9% (511 of 522 strings) --- app/src/main/res/values-el/strings.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 142813119..dd6643755 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -206,7 +206,7 @@ Λυπούμαστε, αυτό δεν έπρεπε να έχει συμβεί. Αναφορά σφάλματος με ηλεκτρονικό ταχυδρομίο Λυπούμαστε, συνέβησαν κάποια σφάλματα. - What:\\nΑίτημα:\\nΓλώσσα περιεχομένου:\\nΥπηρεσία:\\nΏρα GMT:\\nΠακέτο:\\nΈκδοση:\\nΈκδοση λειτουργικού: + Τι:\\nΑίτημα:\\nΓλώσσα περιεχομένου:\\nΥπηρεσία:\\nΏρα GMT:\\nΠακέτο:\\nΈκδοση:\\nΈκδοση λειτουργικού συστήματος: Αναφορά χρήστη Κανένα αποτέλεσμα Δεν υπάρχει τίποτα εδώ @@ -516,4 +516,10 @@ Η γλώσσα θα αλλάξει μόλις θα επανεκκινηθεί η εφαρμογή. Προεπιλεγμένο περίπτερο + Υποστηρίζονται μόνο διευθύνσεις URL HTTPS + Τοπικό + Προστέθηκε πρόσφατα + Δημιουργήθηκε αυτόματα (δεν βρέθηκε χρήστης μεταφόρτωσης) + Ανάκτηση + Δεν είναι δυνατή η ανάκτηση αυτής της λήψης \ No newline at end of file From 21895caa3a94e5743f1974bfd342f16bc61decf3 Mon Sep 17 00:00:00 2001 From: B0pol Date: Wed, 1 Jan 2020 22:05:58 +0000 Subject: [PATCH 0088/1194] Translated using Weblate (Esperanto) Currently translated at 100.0% (522 of 522 strings) --- app/src/main/res/values-eo/strings.xml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index c14195276..784357da3 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -61,7 +61,7 @@ Signali eraron per retpoŝto SIGNALI Informoj: - Via komento (en la angla): + Via komento (angle): Detaloj: Signali eraron Filmeto @@ -80,7 +80,7 @@ Montri informojn Ĉefa Abonoj - Legosigno + Konservitaj ludlistoj Kio novas Fono Ŝprucfenestro @@ -516,4 +516,20 @@ %s aŭskultantoj La lingvo ŝanĝos kiam la apo restartos. + Rapida antaŭen / posten daŭron + Instancoj de PeerTube + Registri viajn preferitajn instancojn de PeerTube + Trovu la instancojn kiu vi povus ŝati ĉe https://joinpeertube.org/instances#instances-list + Aldoni instanco + Eniri la ligilon de la instanco + Malsukcesis validigi instanco + Nur https ligiloj estas subtenitaj + La instanco jam ekzistas + Loka + Freŝdate ĝisdatigita + La plej ŝatitatj + Aŭtomate generita (neniu alŝutilo trovita) + Reakiranta + Ne povas reakiri tion elŝuton + Elektu instancon \ No newline at end of file From 8fb29ae6c29139b45ec08c89edb5c4cd7a9d9a0a Mon Sep 17 00:00:00 2001 From: Osoitz Date: Thu, 2 Jan 2020 04:55:59 +0000 Subject: [PATCH 0089/1194] Translated using Weblate (Basque) Currently translated at 99.8% (521 of 522 strings) --- app/src/main/res/values-eu/strings.xml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index adf7d6720..2233c42ba 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -500,13 +500,13 @@ Aldatu deskargen karpetak indarrean jartzeko Ez dago inor ikusten - %s ikusten - %s ikusten + ikusle %s + %s ikusle Ez dago inor entzuten - %s entzuten - %s entzuten + entzule %s + %s entzule SAF erabili Biltegian Sartzeko Armazoiak kanpoko SD txartel betera jaitsierak egitea ahalbidetzen du. @@ -517,4 +517,20 @@ Aktibatu zerbitzua, orain hautatua: Hizkuntza aldatuko da aplikazioa berrabiarazterakoan. Kiosko Lehenetsia + Aurreratze/atzeratze bilaketaren iraupena + PeerTube instantziak + Ezarri zure gogoko peertube instantziak + Aurkitu instantziak hemen: https://joinpeertube.org/instances#instances-list + Gehitu instantzia + Sartu instantziaren URLa + Huts egin du instantzia balioztatzean + https URLak onartzen dira soilik + Instantzia badago aurretik + Lokala + Berriki gehitua + Gogokoenak + Automatikoki sortua (igotzailea ez da aurkitu) + berreskuratzen + Ezin da deskarga hau berreskuratu + Aukeratu instantzia \ No newline at end of file From 21a39b06e7df69fd8fbf702e76f15f2df1366252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Thu, 2 Jan 2020 08:35:14 +0000 Subject: [PATCH 0090/1194] Translated using Weblate (Ukrainian) Currently translated at 98.1% (512 of 522 strings) --- app/src/main/res/values-uk/strings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index ff9907890..6aea1ad79 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -522,4 +522,10 @@ %s слухачів Мова зміниться після перезапуску програми. + Швидке перемотування + Не вдалося перевірити екземпляр + Оберіть ваш улюблений екземпляр peertube. + Знайдіть екземпляри, які найбільше підходять вам на https://joinpeertube.org/instance#instance-list + Додати екземпляр + Введіть посилання на екземпляр \ No newline at end of file From 28063c35c29f6aaa71a4a5f030f77df9a4c1f628 Mon Sep 17 00:00:00 2001 From: Enol P Date: Fri, 3 Jan 2020 14:24:55 +0000 Subject: [PATCH 0091/1194] Translated using Weblate (Asturian) Currently translated at 49.2% (257 of 522 strings) --- app/src/main/res/values-b+ast/strings.xml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-b+ast/strings.xml b/app/src/main/res/values-b+ast/strings.xml index 4ea5dae26..08b22c616 100644 --- a/app/src/main/res/values-b+ast/strings.xml +++ b/app/src/main/res/values-b+ast/strings.xml @@ -206,7 +206,7 @@ Sotítulos Aceutar ¿Quies reafitar los valores\? - + El sirvidor nun aceuta descargues multifilu, volvi probar con @string/msg_threads = 1 Nun hai comentarios Llimpieza de datos @@ -243,4 +243,18 @@ Siguir cola reproducción Les llingüetes que s\'amuesen na páxina principal Entrugar ánde baxar - + Descargues + Descargues + + Vídeos + + + Control per xestos del reproductor + Cargando\'l conteníu solicitáu + Política de Privacidá de NewPipe + Control per xestos del volume + Control per xestos del brilléu + El ficheru nun pue crease + El sirvidor nun unvia datos + La llingua va camudar namái que se reanicie l\'aplicación. + \ No newline at end of file From 23f9ffdab718ee9a044a41b3e3a47970fbf3af85 Mon Sep 17 00:00:00 2001 From: ssantos Date: Fri, 3 Jan 2020 22:19:09 +0000 Subject: [PATCH 0092/1194] Translated using Weblate (Portuguese) Currently translated at 100.0% (522 of 522 strings) --- app/src/main/res/values-pt/strings.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index c26c57aad..4bf692801 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -516,4 +516,20 @@ %s ouvintes O idioma mudará quando a app for reiniciada. + Duração da busca de avanço/retrocesso rápido + Instâncias do PeerTube + Defina as suas instâncias favoritas de peertube + Encontre as instâncias que lhe melhor convêm em https://joinpeertube.org/instances#instances-list + Adicionar instância + Digite o URL da instância + Falha ao validar a instância + Somente URLs HTTPS são suportadas + A instância já existe + Local + Recentemente adicionado + Os mais apreciados + Geração automática (não foi encontrado nenhum enviador) + recuperando + Não é possível recuperar este descarregamento + Escolha uma instância \ No newline at end of file From db87df743df00dfcb5e8a7b2e0b5aaecf16cd27b Mon Sep 17 00:00:00 2001 From: pietrasagh Date: Sat, 4 Jan 2020 13:13:50 +0000 Subject: [PATCH 0093/1194] Translated using Weblate (Polish) Currently translated at 100.0% (522 of 522 strings) --- app/src/main/res/values-pl/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 0b52d3c79..75ce1029d 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -523,7 +523,7 @@ %s słuchaczy Język zmieni się po ponownym uruchomieniu aplikacji. - Szybkie przewijanie do przodu/do tyłu szukaj czasu trwania + Krok czasu przewijania Wystąpienia PeerTube Ustaw swoje ulubione instancje peertube Znajdź instancje, które najbardziej Ci odpowiadają, na https://joinpeertube.org/instances#instances-list From e2ec95e6ffa305de0f1689a679cc3339c6d14d9c Mon Sep 17 00:00:00 2001 From: Software In Interlingua Date: Thu, 2 Jan 2020 17:04:44 +0000 Subject: [PATCH 0094/1194] Translated using Weblate (Interlingua) Currently translated at 10.9% (57 of 522 strings) --- app/src/main/res/values-ia/strings.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/res/values-ia/strings.xml b/app/src/main/res/values-ia/strings.xml index 1d053a370..981724304 100644 --- a/app/src/main/res/values-ia/strings.xml +++ b/app/src/main/res/values-ia/strings.xml @@ -24,4 +24,12 @@ Dossier de discarga de video Selige le dossier de discarga pro files de video Dossier de discarga de audio + Cancellar + Subscriber + Selige le dossier de discarga pro files de audio + Thema + Monstrar le commentos + Initiar discargas + Pausar le discargas + Seliger un instantia \ No newline at end of file From 2ea404659bd0e0534fc4d2f84474886625f2fe3f Mon Sep 17 00:00:00 2001 From: JoC Date: Sat, 4 Jan 2020 15:38:24 +0000 Subject: [PATCH 0095/1194] Translated using Weblate (Spanish) Currently translated at 100.0% (522 of 522 strings) --- app/src/main/res/values-es/strings.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 5691c2ab6..eacda9f4a 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -518,4 +518,18 @@ %s escuchas El idioma cambiará luego de que la app sea reiniciada. + Duración de búsqueda al avanzar y/o retroceder + Instancias de PeerTube + Elige tus instancias favoritas de PeerTube + Encuentra las mejores instancias para ti en https://joinpeertube.org/instances#instances-list + Agregar instancia + Dirección URL de la instancia + Error al validar la instancia + Sólo URLs con HTTPS + La instancia ya existe + Local + Agregados recientemente + Más gustados + Generado automáticamente (no se encontró creador) + Elige una instancia \ No newline at end of file From 594d77e713440515373707baea3e40976547be66 Mon Sep 17 00:00:00 2001 From: MohammedSR Vevo Date: Fri, 3 Jan 2020 17:20:48 +0000 Subject: [PATCH 0096/1194] Translated using Weblate (Kurdish) Currently translated at 100.0% (522 of 522 strings) --- app/src/main/res/values-ku/strings.xml | 145 +++++++++++++------------ 1 file changed, 73 insertions(+), 72 deletions(-) diff --git a/app/src/main/res/values-ku/strings.xml b/app/src/main/res/values-ku/strings.xml index da2c3aa21..938175f71 100644 --- a/app/src/main/res/values-ku/strings.xml +++ b/app/src/main/res/values-ku/strings.xml @@ -95,16 +95,16 @@ کارپێکردن لە پەنجەرەی بچووک ڕیزکرا لە کارپێکردن لە پاشبنەما ڕیزکرا لە کارپێکردن لە پەنجەرەی بچووک - لێدان + کارپێکردن ناوەڕۆک سنوردانانی تەمەن - ڕاستەوخۆ + زیندو داگرتنەکان داگرتنەکان ناتوانرێ سکاڵابکرێ هەمووی کەناڵ - لیستی ڤیدیۆ + لیستی کارپێکردن بەڵێ دواتر ناچالاککراوە @@ -114,34 +114,34 @@ قەبارە دانانەوە باشترین قەبارە گەڕانەوە - لێدانی هەمووی + کارپێکردنی هەمووی هەمیشە تەنها ئێستا فایل - ئاگانامەکانی ئەپ - ئاگانامەکانی ئەپەکە بۆ پاشبنەما و لێدانەکانی پەنجەرەی بچووک + ئاگانامەکانی NewPipe + ئاگانامەکانی NewPipe بۆ پاشبنەما و کارپێکردنەکانی پەنجەرەی بچووک (نەزانراو) چەسپاندنی لاربوونەوە گۆڕین بۆ پاشبنەما گۆڕین بۆ پەنجەرەی بچووک گۆڕین بۆ سەرەکی - هێنانی داتابەیس - دەرکردنی داتابەیس - جێگەی مێژوو و بەشداربووەکانی ئێستات دەگرێتەوە - زەخیرەکردنی مێژوو و بەشداربوون و لیستەکان + هێنانەوەی بنکەی زانیاریەکان + دەرکردنی بنکەی زانیارییەکان + لەسەر مێژوو و بەشداربووەکانی ئێستات جێگیردەبێت + خەزنکردنی مێژوو و بەشداربوون و لیستەکان هەڵەیەک ڕوویدا کێشە لە هێڵەکەتدا هەیە ناتوانرێ هەموو وێنۆچکەکان باربکرێن - ناتوانرێ وێبسایت شیبکرێتەوە - ناتوانرێ وێبسایت بەتەواوی شیبکرێتەوە + ناتوانرێ ماڵپەڕ شیبکرێتەوە + ناتوانرێ ماڵپەڕ بەتەواوی شیبکرێتەوە ناوەڕۆک بوونی نییە ناتوانرێ لیستی داگرتن دابنرێ پەخشی ڕاستەوخۆ پشتگیری ناکرێ لەئێستادا هیچ پەخشێ نەدۆزرایەوە ناتوانرێ وێنە باربکرێ - ئەپ کڕاشبوو + ئەپ/ڕووکار ڕاوەستا ناتوانرێ ئەم پەخشە لێبدرێ - لێدەرە ڤیدیۆییە دەرەکییەکان پشتگیری ئەم جۆرە بەستەرانە ناکەن + کارپێکەرە ڤیدیۆییە دەرەکییەکان پشتگیری ئەم جۆرە بەستەرانە ناکەن بەستەر هەڵەیە هیچ پەخشێکی ڤیدیۆیی نەدۆزرایەوە پەخشی هیچ دەنگێک نەدۆزرایەوە @@ -157,7 +157,7 @@ لێدوانەکەت (بە ئینگلیزی): وردەکارییەکان: وێنۆچکەی پیشاندانی ڤیدیۆ - ماوەی لێدانی ڤیدیۆ: + کارپێکردنی ڤیدیۆ، ماوەی: وێنۆچکەی کەسی بەرزکەرەوە بەدڵبوون بەدڵنەبوون @@ -183,32 +183,32 @@ هیچ بینراوێک نییە - %s بینراو - %s بینرااو + %s بینرااو + %s بینراو هیچ ڤیدیۆیەک نییە - ڤیدیۆکان - + ڤیدیۆ + ڤیدیۆکان دەستپێکردن ڕاگرتن - لێدان + کارپێکردن دروستکردن سڕینەوە - سڕینەوەی یەکیان + سڕینەوەی یەک دانە سڕینەوەی هەمووی تاقیکردنەوەی هێڵێک ڕێپێنەدان دانانەوەی ناو - فرمانی نوێ + ئەرکی نوێ باشە ناوی فایل دابەشکراوەکان کێشە ڕوویدا سێرڤەر پشتگیرینەکراوە فایل بوونی هەیە - داگرتنەکانی ئەپ + داگرتنەکانی NewPipe گرتەبکە بۆ وردەکاری تکایە چاوەڕێبکە… لەبەرگیرایەوە @@ -217,28 +217,28 @@ \nکردنەوەی پەنجەرەی بچووک reCAPTCHA reCAPTCHA داواکاری - reCAPTCHA challenge requested + reCAPTCHA داواکراوە داگرتن پیت و ژمارەکان - کارەکتەرە تایبەتییەکان - دەربارەی ئەپ + هێما تایبەتییەکان + دەربارەی NewPipe ڕێکخستنەکان دەربارە © %1$s لەلایەن %2$s لەژێر %3$s ناتوانرێ مۆڵەت باربکرێ - کردنەوەی وێبسایت + کردنەوەی ماڵپەڕ دەربارە هاوبەشەکان مۆڵەتەکان هاوبەشبوون - Whether you have ideas of; translation, design changes, code cleaning, or real heavy code changes—help is always welcome. The more is done the better it gets! - View on GitHub + هەرکاتێ بیرۆکەیەکت هەبوو وەک ; وەرگێڕان، گۆڕینی دیزاین ، سڕینەوەی کۆد ،یان هەر گۆڕانکارییەکیتر ئەوا یارمەتییەکەت لەسەرچاوانمانە. ئێمە هەمیشە دەمانەوێ ئەپەکە زیاتر بەرەوپێش ببەین! + بینین لە GitHub بەخشین - NewPipe is developed by volunteers spending time bringing you the best experience. Give back to help developers make NewPipe even better while enjoying a cup of coffee. + ئەم ئەپە لەلایەن چەند خۆبەخشێکەوە دروستکراوە کەکاتی خۆیان پێ بەخشیووە تاکو باشترین خزمەتگوزاریت پێشکەش بکەن. هیچ نەبێت بە کڕینی کوپێک قاوە یارمەتی گەشەپێدەرەکانمان بدە بۆ ئەوەی کاتی زیاتر تەرخان بکەین بۆ بەرەوپێشبردنی NewPipe. پێدانەوە - وێبسایت - سەردانی وێبسایتی NewPipe بکە بۆ زانیاری و هەواڵی نوێ. - Read license + ماڵپەڕ + سەردانی ماڵپەڕی NewPipe بکە بۆ زانیاری و هەواڵی نوێ. + خوێندنەوەی مۆڵەتنامە مێژوو گەڕا تەماشاکراوە @@ -250,10 +250,10 @@ ئایا دەتەوێ ئەم بابەتە لە مێژووی گەڕان بسڕدرێتەوە؟ ئایا دەتەوێ ئەم بابەتە لە مێژووی تەماشاکردن بسڕدرێتەوە؟ ئایا دڵنیای لە سڕینەوەی هەموو بابەتەکان لە مێژوودا؟ - دواین لێدراو - زۆرترین لێدان + دواین کارپێکراو + زۆرترین کارپێکردن ناوەڕۆکی پەڕەی سەرەکی - لێدانی پەنجەرەی بچووک + کارپێکەری پەنجەرەی بچووک لادان وردەکارییەکان ڕێکخستنەکانی دەنگ @@ -261,9 +261,9 @@ دەستپێکردنی لێدان لە پاشبنەماوە دەستپێکردنی لێدان لە پەنجەرەی بچووکەوە بەمزووانە شتێک لێرەدا دەردەکەوێ :D - لێدەری ڤیدیۆیی - لێدەری پاشبنەما - لێدەری پەنجەرەی بچووک + کارپێکەری ڤیدیۆیی + کارپێکەری پاشبنەما + کارپێکەری پەنجەرەی بچووک هەمیشە بپرسە دەستکەوتنی زانیاری… بارکردنی ناوەڕۆکی داواکراو @@ -284,10 +284,10 @@ گونجاو بە ڕونما پڕ بە ڕونما هێنانەپێش - خۆکاری دانرا + دانانی خۆکاری چالاککردنی LeakCanary سکاڵا لەسەر کێشەکان - Force reporting of undeliverable Rx exceptions outside of fragment or activity lifecycle after disposal + سکاڵاکردن لەسەر نەگەیاندنی Rx ی پەسەندنەکرا لە دەرەوەی پارچە یان چالاکی لەدوای پوختەکردن هێنانەوە/خەزنکردن هێنانەوە هێنانەوە لە @@ -303,13 +303,13 @@ \n1. ئەم بەستەرە بکەوە: %1$ \n2. بچۆرەژوورەوە گەر داوای‌ کرد \n3. داگرتنێک دەست پێدەکات (ئەمە فایلی خەزنکراوە) - Import a SoundCloud profile by typing either the URL or your ID: + هێنانەوەی پەڕەی کەسی SoundCloud بەدانانی بەستەر یاخوود ئایدی: \n -\n1. Enable \"desktop mode\" in a web-browser (the site is not available for mobile devices) -\n2. Go to this URL: %1$s -\n3. Log in when asked -\n4. Copy the profile URL you were redirected to. - yourID, soundcloud.com/yourid +\n1. دۆخی ”Desktop mode” لە وێبگەرەکەتدا چالاک بکە (ئەم ماڵپەڕە بۆ وێبگەری مۆبایلەکان بەردەست نییە) +\n2. ئەم بەستەرە بکەرەوە : %1$s +\n3. بچۆرە ژوورەوە گەر داواکرا +\n4. بەستەری پەڕەی کەسییەکەت دابنێ. + ئایدییەکەت , soundcloud.com/yourid ئەوە بزانە ئەم کردارە پێویستی بە هێڵێکی گران هەیە. \n \nدەتەوێ بەردەوامبیت؟ @@ -320,22 +320,23 @@ هیچ پەخشێک نییە بۆ داگرتن ژێرنووس بەهۆی گۆڕانکاری لە شێوەی ژێرنووسکردنەکە. پێویستە ئەپەکە دابخەیت و دیسانەوە بیکەیتەوە. - هیچ ئەپێک دانەمەزراوە بۆ لێدانی ئەم فایلە - سڕینەوەی مێژوو - مێژوو دەسڕێتەوە لەگەڵ ڤیدیۆ لێدراوەکان و شوێنی لیستە ڤیدیۆییەکان - سڕینەوەی تەواوی مێژوو؟ + هیچ ئەپێک دانەمەزراوە بۆ کارپێکردنی ئەم فایلە + سڕینەوەی مێژووی تەماشاکردن + مێژوو دەسڕێتەوە لەگەڵ ڤیدیۆ کارپێکراوەکان و شوێنی لیستە ڤیدیۆییەکان + سڕینەوەی تەواوی مێژووی تەماشاکردن؟ سڕینەوەی مێژووی گەڕان مێژووی گەڕانەکانت دەسڕێتەوە تەواوی گەڕانەکانت بسڕدرێنەوە؟ مێژووی گەڕانەکانت سڕانەوە. 1 بابەت سڕایەوە. - NewPipe is copyleft libre software: You can use, study share and improve it at will. Specifically you can redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - NewPipe\'s Privacy Policy - The NewPipe project takes your privacy very seriously. Therefore, the app does not collect any data without your consent. -\nNewPipe\'s privacy policy explains in detail what data is sent and stored when you send a crash report. - Read privacy policy + ئەم ئەپە سەرچاوە کراوەیە : دەتوانی بەکاریبهێنی، بیخوێنیتەوە و هاوبەشی پێبکەیت و بەرەوپێشی ببەیت. +\nبەتایبەتی دەتوانی دابەشیبکەیتەوە یاخوود بگۆڕیت بەپێی مەرجەکانی GNU مۆڵەتنامەی گشتی وەک ئەپێکی بڵاوی خۆڕایی! + سیاسەتی تایبەتی NewPipe + پڕۆژەی NewPipe زانیارییە تایبەتییەکانت بەوردی دەپارێزێ. هەروەها ئەپەکە هیچ داتایەک بەبێ ئاگاداری تۆ بەکارنابات. +\nسیاسەتی تایبەتی NewPipe بەوردەکاری ڕوونکردنەوەت دەداتێ لەسەر ئەو داتایانەی وەریاندەگرێ و بەکاریاندەبات. + خوێندنەوەی سیاسەتی تایبەتی کەناڵەکان - لیستی ڤیدیۆکان + لیستی کارپێکردنەکان تراکەکان بەکاربەرەکان بەشدارنەبوون @@ -349,12 +350,12 @@ نوێکارییەکان فایل سڕایەوە ئاگانامەی نوێکاری ئەپ - ئاگانامەکانی وەشانی نوێی ئەپ + ئاگانامەکانی وەشانی نوێی NewPipe بیرگەی دەرەکی بەردەست نییە داگرتن لە بیرگەی دەرەکی ناکرێت. \nشوێنی فۆڵدەری داگرتنەکان دابنرێتەوە؟ - گێڕانەوە بۆ شێوازی سەرەکی - ئایا دەتەوێ بگەڕێنرێتەوە بۆ شێوازی سەرەکی؟ + گێڕانەوە بۆ بنەڕەتی + ئایا دەتەوێ بگەڕێنرێتەوە بۆ شێوازی بنەڕەتی؟ ژمارەی بەشداربووان نادیارە داگرتنێکیترت هەیە بەهەمان ناو پیشاندانی کێشە @@ -372,21 +373,21 @@ ناچالاککردن بۆ پیشان نەدانی لێدوانەکان کارپێکردنی خۆکاری - لێدوانەکان - + لێدوان + لێدوانەکان هیچ لێدوانێک نییە کارپێکردنەوەی لیست گێڕانەوەی لیست بۆ شوێنی پێشووتر شوێنەکان لە لیستدا سڕینەوەی داتا - مێژوو سڕایەوە. - شوێنی لیستەکان سڕانەوە. + مێژووی تەماشاکردن سڕایەوە. + شوێنی کارپێکراوەکان سڕانەوە. شوێنی فایل گۆڕدراوە یان سڕاوەتەوە داگرتنێکیتر هەیە بەهەمان ناو - سڕینەوەی شوێنی لیستەکان - شوێنی هەموو لیستەکان دەسڕێتەوە - شوێنی هەموو لیستەکان بسڕدرێتەوە؟ + سڕینەوەی شوێنی کارپێکراوەکان + شوێنی هەموو کارپێکراوەکان دەسڕێتەوە + شوێنی هەموو کارپێکراوەکان بسڕدرێتەوە؟ فۆڵدەری داگرتن بگۆڕە بۆ ئەنجامدانی کاریگەری خزمەتگوزاری چەسپاو، ئێستا هەڵبژێردراو: هیچ کەسێک تەماشای ناکات @@ -394,7 +395,7 @@ %s تەماشا دەکات %s تەماشا دەکەن - هیچ کەسێ گوێناگرێ + هیچ کەسێ گوێی لێ ناگرێ %s گوێی لێدەگرێ %s گوێی لێدەگرن @@ -411,7 +412,7 @@ نەگێڕانەوەی کارپێکەر بۆ پێش کێشە ڕوویدا گێڕانەوەی کارپێکەر بۆکاتی پێش کێشە هەمان فۆڵدەر بوونی نییە - هەمان فایل بوونی نییە + هەمان فایل/بابەت بوونی نییە چی:\\nداواکراو:\\nناوەڕۆک:\\nلانگ:\\nخزمەتگوزاری:\\nGMT:\\nکات:\\nپاکێج:\\nوەشان:\\nوەشانی سیستەم: |(تاقیکاری) داگرتنی خێرا بەبەکارهێنانی Tor بۆ زیادکردنی تایبەتێتی (پشتگیری پەخشە ڕاستەوخۆکان ناکات) . بەستەر هەڵەیە یاخوود بەئینتەرنێتەوە پەیوەست نەبوویت @@ -421,7 +422,7 @@ مۆڵەتنامەی ئەپ ئەپێکی خۆڕایی و کێشی کەم بۆ پەخشی ڕاستەوخۆ لەسەر ئەندرۆید. مۆڵەتنامەی NewPipe - پەڕە بەتاڵە + پەڕەی بەتاڵ پەڕەی کیۆسک پەڕەی بەشدارییەکان پەڕەی نوێترینەکان @@ -439,7 +440,7 @@ باشترین 50 نوێ & چالاک کارپێکەری پاشبنەما - داگرە تا ڕیزنەکران + پەنجەت داگرە بۆ ڕیزنەبوون ڕیزنەبوون لە پاشبنەما ڕیزنەبوون لە پەنجەرەی بچووک کردنەوەی پلیکانە @@ -534,5 +535,5 @@ خۆکاری دانرا (هیچ بەرزکەرەوەیەک نەدۆزرایەوە) دەگەڕێنرێتەوە ناتوانرێ ئەم داگرتنە بهێنرێتەوە - دۆزێک هەڵبژێرە + دۆخێک هەڵبژێرە \ No newline at end of file From deeac118a1661af4fbb961378850bceb0648a86b Mon Sep 17 00:00:00 2001 From: Daniele Lira Mereb Date: Mon, 6 Jan 2020 16:18:31 +0000 Subject: [PATCH 0097/1194] Translated using Weblate (Portuguese (Brazil)) Currently translated at 97.3% (508 of 522 strings) --- app/src/main/res/values-pt-rBR/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index febc9ef41..9aeb53b3b 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -525,4 +525,6 @@ abrir em modo popup %s ouvintes O idioma será atualizado assim que o aplicativo for reiniciado. + Duração do avançar/retroceder rápido + Instâncias PeerTube \ No newline at end of file From 41e18ae6948ef30475fe1e317d94de183f852ca4 Mon Sep 17 00:00:00 2001 From: pjammo Date: Mon, 6 Jan 2020 08:24:21 +0000 Subject: [PATCH 0098/1194] Translated using Weblate (Italian) Currently translated at 100.0% (522 of 522 strings) --- app/src/main/res/values-it/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 3af36f579..4942f4720 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -1,6 +1,6 @@ - %1$s visualizzazioni + %1$ visualizzazioni Pubblicato il %1$s Nessun lettore multimediale trovato. Vuoi installare VLC\? Installa @@ -121,7 +121,7 @@ Modalità popup di NewPipe Riproduzione in Modalità Popup Disattivato - Non riproduce l\'audio con ALCUNE risoluzioni + L\'audio potrebbe non essere disponibile per ALCUNE risoluzioni In sottofondo Popup Risoluzione Predefinita Popup From dad88b83fb4e9236c6d71521fd6a0edbd1a2e06d Mon Sep 17 00:00:00 2001 From: TobiGr Date: Tue, 7 Jan 2020 22:32:54 +0100 Subject: [PATCH 0099/1194] Fix Arabic translation --- app/src/main/res/values-ar/strings.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index f0e2f9d0a..b1dad5672 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -544,7 +544,6 @@ مثيلات خوادم پيرتيوب عيّن مثيلات خوادم پيرتيوب التي تُفضّلها إضافة نموذج - إضافة مثيل خادم أدخل رابط مثيل الخادم فشل في التحقق من مثيل الخادم فقط عناوين https المدعومة From 8de367e03f1d9b1640e730e35988a292f022cbf5 Mon Sep 17 00:00:00 2001 From: decarvalhobo Date: Mon, 2 Dec 2019 22:20:43 +0100 Subject: [PATCH 0100/1194] fix issue: thumbnail update when element deleted + thumbnail update when element added and no thumbnail --- .../local/dialog/PlaylistAppendDialog.java | 16 +++++++++++++--- .../local/playlist/LocalPlaylistFragment.java | 14 ++++++++++++++ .../local/playlist/LocalPlaylistManager.java | 4 ++++ 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java index ac02b0b37..72df33576 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java @@ -152,9 +152,19 @@ public final class PlaylistAppendDialog extends PlaylistDialog { final Toast successToast = Toast.makeText(getContext(), R.string.playlist_add_stream_success, Toast.LENGTH_SHORT); - playlistDisposables.add(manager.appendToPlaylist(playlist.uid, streams) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(ignored -> successToast.show())); + if(playlist.thumbnailUrl.equals("https://i.ytimg.com/")){ //empty playlist + playlistDisposables.add(manager.createPlaylist(playlist.name, streams) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(ignored -> successToast.show())); + playlistDisposables.add(manager.deletePlaylist(playlist.uid) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(ignored -> successToast.show())); + } + else { + playlistDisposables.add(manager.appendToPlaylist(playlist.uid, streams) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(ignored -> successToast.show())); + } getDialog().dismiss(); } diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java index c60cdac3f..35451d344 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java @@ -413,10 +413,24 @@ public class LocalPlaylistFragment extends BaseLocalListFragment modifyPlaylist(final long playlistId, @Nullable final String name, @Nullable final String thumbnailUrl) { From e9a4caaf0b35ec6ad3e4269dd1a6b924860c2101 Mon Sep 17 00:00:00 2001 From: De Carvalho Marcio Antonio Date: Tue, 3 Dec 2019 01:18:41 +0100 Subject: [PATCH 0101/1194] remove comments --- .../schabi/newpipe/local/playlist/LocalPlaylistFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java index 35451d344..34278382a 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java @@ -428,7 +428,7 @@ public class LocalPlaylistFragment extends BaseLocalListFragment Date: Tue, 3 Dec 2019 01:19:48 +0100 Subject: [PATCH 0102/1194] remove comments --- .../org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java index 72df33576..f34e016b7 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java @@ -152,7 +152,7 @@ public final class PlaylistAppendDialog extends PlaylistDialog { final Toast successToast = Toast.makeText(getContext(), R.string.playlist_add_stream_success, Toast.LENGTH_SHORT); - if(playlist.thumbnailUrl.equals("https://i.ytimg.com/")){ //empty playlist + if(playlist.thumbnailUrl.equals("https://i.ytimg.com/")){ playlistDisposables.add(manager.createPlaylist(playlist.name, streams) .observeOn(AndroidSchedulers.mainThread()) .subscribe(ignored -> successToast.show())); From 752a76eb443c1b78a804b2c391cd5f903f8eca75 Mon Sep 17 00:00:00 2001 From: decarvalhobo Date: Wed, 4 Dec 2019 19:24:34 +0100 Subject: [PATCH 0103/1194] Usage of drawable instead of remote image + refactor the append to an empty playlist by just updating the thumbnail before adding the item in it. --- .../local/dialog/PlaylistAppendDialog.java | 16 ++++++---------- .../local/playlist/LocalPlaylistFragment.java | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java index f34e016b7..884fec599 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java @@ -152,20 +152,16 @@ public final class PlaylistAppendDialog extends PlaylistDialog { final Toast successToast = Toast.makeText(getContext(), R.string.playlist_add_stream_success, Toast.LENGTH_SHORT); - if(playlist.thumbnailUrl.equals("https://i.ytimg.com/")){ - playlistDisposables.add(manager.createPlaylist(playlist.name, streams) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(ignored -> successToast.show())); - playlistDisposables.add(manager.deletePlaylist(playlist.uid) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(ignored -> successToast.show())); - } - else { - playlistDisposables.add(manager.appendToPlaylist(playlist.uid, streams) + if(playlist.thumbnailUrl.equals("drawable://" + R.drawable.dummy_thumbnail_playlist)){ + playlistDisposables.add(manager.changePlaylistThumbnail(playlist.uid,streams.get(0).getThumbnailUrl()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(ignored -> successToast.show())); } + playlistDisposables.add(manager.appendToPlaylist(playlist.uid, streams) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(ignored -> successToast.show())); + getDialog().dismiss(); } } diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java index 34278382a..af9ef0037 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java @@ -419,7 +419,7 @@ public class LocalPlaylistFragment extends BaseLocalListFragment Date: Tue, 7 Jan 2020 22:48:35 +0100 Subject: [PATCH 0104/1194] Fix code style and improve imports --- .../local/dialog/PlaylistAppendDialog.java | 13 ++++++------ .../local/playlist/LocalPlaylistFragment.java | 20 ++++++++++--------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java index 884fec599..81058eee6 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistAppendDialog.java @@ -1,15 +1,16 @@ package org.schabi.newpipe.local.dialog; import android.os.Bundle; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import org.schabi.newpipe.NewPipeDatabase; import org.schabi.newpipe.R; import org.schabi.newpipe.database.LocalItem; @@ -152,8 +153,8 @@ public final class PlaylistAppendDialog extends PlaylistDialog { final Toast successToast = Toast.makeText(getContext(), R.string.playlist_add_stream_success, Toast.LENGTH_SHORT); - if(playlist.thumbnailUrl.equals("drawable://" + R.drawable.dummy_thumbnail_playlist)){ - playlistDisposables.add(manager.changePlaylistThumbnail(playlist.uid,streams.get(0).getThumbnailUrl()) + if (playlist.thumbnailUrl.equals("drawable://" + R.drawable.dummy_thumbnail_playlist)) { + playlistDisposables.add(manager.changePlaylistThumbnail(playlist.uid, streams.get(0).getThumbnailUrl()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(ignored -> successToast.show())); } diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java index af9ef0037..9f21e05ff 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java @@ -4,11 +4,6 @@ import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.os.Parcelable; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.appcompat.app.AlertDialog; -import androidx.recyclerview.widget.RecyclerView; -import androidx.recyclerview.widget.ItemTouchHelper; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; @@ -18,6 +13,12 @@ import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.recyclerview.widget.ItemTouchHelper; +import androidx.recyclerview.widget.RecyclerView; + import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; import org.schabi.newpipe.NewPipeDatabase; @@ -416,10 +417,11 @@ public class LocalPlaylistFragment extends BaseLocalListFragment Date: Sun, 29 Dec 2019 17:56:32 -0300 Subject: [PATCH 0105/1194] fixup * [DownloadDialog.java] use *.opus extension instead of *.webm (bad change from https://github.com/TeamNewPipe/NewPipe/pull/2679/commits/844f80a5f1b0762a043afd2b4aec63b402830e53) * [StreamItemAdapter.java] show "opus" in format label instead of "WebM Opus" --- .../org/schabi/newpipe/download/DownloadDialog.java | 12 ++++++++++-- .../org/schabi/newpipe/util/StreamItemAdapter.java | 10 +++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java index 4fbf4ab5f..853bb6d68 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java @@ -559,8 +559,16 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck case R.id.audio_button: mainStorage = mainStorageAudio; format = audioStreamsAdapter.getItem(selectedAudioIndex).getFormat(); - mime = format.mimeType; - filename += format.suffix; + switch(format) { + case WEBMA_OPUS: + mime = "audio/ogg"; + filename += "opus"; + break; + default: + mime = format.mimeType; + filename += format.suffix; + break; + } break; case R.id.video_button: mainStorage = mainStorageVideo; diff --git a/app/src/main/java/org/schabi/newpipe/util/StreamItemAdapter.java b/app/src/main/java/org/schabi/newpipe/util/StreamItemAdapter.java index 312c47263..cb2fae4f0 100644 --- a/app/src/main/java/org/schabi/newpipe/util/StreamItemAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/util/StreamItemAdapter.java @@ -140,7 +140,15 @@ public class StreamItemAdapter extends BaseA if (stream instanceof SubtitlesStream) { formatNameView.setText(((SubtitlesStream) stream).getLanguageTag()); } else { - formatNameView.setText(stream.getFormat().getName()); + switch (stream.getFormat()) { + case WEBMA_OPUS: + // noinspection AndroidLintSetTextI18n + formatNameView.setText("opus"); + break; + default: + formatNameView.setText(stream.getFormat().getName()); + break; + } } qualityView.setText(qualityString); From e2e0a9bfa2193ed9d9487832daf5ee73882db6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Wed, 8 Jan 2020 17:51:35 +0100 Subject: [PATCH 0106/1194] Spelling: Could not, PeerTube, HTTPS, URL --- app/src/main/res/values/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a296e2db7..0e4bdf751 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -113,13 +113,13 @@ Service Default content language PeerTube instances - Set your favorite peertube instances + Set your favorite PeerTube instances Find the instances that best suit you on %s https://joinpeertube.org/instances#instances-list Add instance - Enter instance url - Failed to validate instance - Only https urls are supported + Enter instance URL + Could not validate instance + Only HTTPS URLs are supported Instance already exists Player Behavior From d316bbad442da95a58a79ae0d2101d51ebf73675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Wed, 8 Jan 2020 18:22:17 +0100 Subject: [PATCH 0107/1194] Select your favorite Co-Authored-By: Stypox --- app/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0e4bdf751..54ae40d1d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -113,7 +113,7 @@ Service Default content language PeerTube instances - Set your favorite PeerTube instances + Select your favorite PeerTube instances Find the instances that best suit you on %s https://joinpeertube.org/instances#instances-list Add instance From 1602ecbaf9ceb6e69516f10d8890439ab3fed3b3 Mon Sep 17 00:00:00 2001 From: Software In Interlingua Date: Wed, 8 Jan 2020 03:47:45 +0000 Subject: [PATCH 0108/1194] Translated using Weblate (Interlingua) Currently translated at 11.1% (58 of 522 strings) --- app/src/main/res/values-ia/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/res/values-ia/strings.xml b/app/src/main/res/values-ia/strings.xml index 981724304..f077e3e24 100644 --- a/app/src/main/res/values-ia/strings.xml +++ b/app/src/main/res/values-ia/strings.xml @@ -32,4 +32,5 @@ Initiar discargas Pausar le discargas Seliger un instantia + Non poteva connecter con le servitor \ No newline at end of file From 99bcd8d043f15bfc6d2c6cd7f6ad04e23f258910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Wed, 8 Jan 2020 16:44:00 +0000 Subject: [PATCH 0109/1194] =?UTF-8?q?Translated=20using=20Weblate=20(Norwe?= =?UTF-8?q?gian=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 96.0% (501 of 522 strings) --- app/src/main/res/values-nb-rNO/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index d874e9b0e..8afd21f54 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -516,4 +516,5 @@ Språk vil ikke bli endret før programmet startes på ny. Forvalgt kiosk + PeerTube-instanser \ No newline at end of file From 694013c9df5c4ace38ca4a825b38e9db9c3b487b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Wed, 8 Jan 2020 21:55:17 +0100 Subject: [PATCH 0110/1194] Spelling: Language reworked 2 --- app/src/main/res/values/strings.xml | 74 ++++++++++++++--------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 54ae40d1d..0b20edd7d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,10 +1,10 @@ NewPipe - Tap search to get started + Tap \"Search\" to get started %1$s views Published on %1$s - No stream player found. Do you want to install VLC? + No stream player found. Install VLC? No stream player found (you can install VLC to play it). Install Cancel @@ -16,14 +16,14 @@ Download stream file Search Settings - Did you mean: %1$s\? + Did you mean: %1$s? Share with Choose browser rotation Use external video player - Removes audio at SOME resolutions + Removes audio at some resolutions Use external audio player - NewPipe popup mode + Popup mode RSS Subscribe Subscribed @@ -43,24 +43,24 @@ Add To Video download folder Downloaded video files are stored here - Choose the download folder for video files + Choose download folder for video files Audio download folder Downloaded audio files are stored here - Choose the download folder for audio files + Choose download folder for audio files Change the download folders to take effect Autoplay Plays a video when NewPipe is called from another app Default resolution Default popup resolution Show higher resolutions - Only some devices support playing 2K/4K videos + Only some devices can play 2K/4K videos Play with Kodi - Kore app not found. Install it? + Install missing Kore app? org.xbmc.kore Show \"Play with Kodi\" option - Enable lock screen video thumbnail - Display an option to play a video via Kodi media center - When using the background player a video thumbnail will be displayed on the lock screen + Lock screen video thumbnail + Displayed option to play a video via Kodi media center + Using the background player displays a video thumbnail on the lock screen Audio Default audio format Default video format @@ -75,20 +75,20 @@ Fast-forward/-rewind seek duration Load thumbnails Show comments - Disable to stop showing comments + Turn off to hide comments Turn off to prevent loading thumbnails, saving data and memory usage. Changes clear both in-memory and on-disk image cache. Image cache wiped Wipe cached metadata Remove all cached webpage data Metadata cache wiped Auto-queue next stream - Auto-append a related stream when playing the last stream in a non-repeating queue + Auto-append a related stream (to non-repeating queue) after last file Volume gesture control - Use gestures to control the volume of the player + Use gestures to control player volume Brightness gesture control - Use gestures to control the brightness of the player + Use gestures to control player brightness Player gesture controls - Use gestures to control the brightness and volume of the player + Use gestures to control player brightness and volume Search suggestions Show suggestions when searching Search history @@ -100,21 +100,21 @@ Show playback position indicators in lists Clear data Keep track of watched videos - Resume on focus gain - Continue playing after interruptions (e.g. phone calls) + Resumed playing + Continue playing after interruptions (e.g. phonecalls) Download Next Autoplay Show \'Next\' and \'Similar\' videos Show \"Hold to append\" tip - Show tip when background or popup button is pressed on video details page + Show tip when pressing the background or the popup button in video \"Details:\" Unsupported URL Default content country Service Default content language PeerTube instances Select your favorite PeerTube instances - Find the instances that best suit you on %s + Find the instances you like on %s https://joinpeertube.org/instances#instances-list Add instance Enter instance URL @@ -138,9 +138,9 @@ Play Content Age restricted content - Show age restricted video. Allowing such material is possible from Settings. - LIVE - LIVE + Show age restricted video. Future changes are possible from \"Settings\". + Live + Live Downloads Downloads Error report @@ -198,7 +198,7 @@ Error External storage unavailable - Downloading to external SD card not possible. Reset download folder location\? + Downloading to external SD card not possible. Reset download folder location? Network error Could not load all thumbnails Could not decrypt video URL signature @@ -224,15 +224,15 @@ Filename cannot be empty An error occurred: %1$s No streams available to download - Using default tabs, error while reading saved tabs + Could not read saved tabs, so using default ones Restore defaults - Do you want to restore the defaults? + Do you want to restore defaults? Sorry, that should not have happened. Guru Meditation. - Report error via e-mail + Report this per e-mail Sorry, some errors occurred. - REPORT + Report Info: What happened: What:\\nRequest:\\nContent Lang:\\nService:\\nGMT Time:\\nPackage:\\nVersion:\\nOS version: @@ -246,7 +246,7 @@ Dislikes Use Tor (Experimental) Force download traffic through Tor for increased privacy (streaming videos not yet supported). - Report an Error + Report Error User report No results @string/no_videos @@ -258,7 +258,7 @@ Video Audio Retry - Storage access permission denied + Grant access to storage first k M B @@ -269,7 +269,7 @@ %s subscriber %s subscribers - Subscribers count not available + Subscriber count unavailable No views %s view @@ -355,7 +355,7 @@ https://github.com/TeamNewPipe/NewPipe View on GitHub Donate - NewPipe is developed by volunteers spending time bringing you the best experience. Give back to help developers make NewPipe even better while enjoying a cup of coffee. + NewPipe is developed by volunteers spending time bringing you the best experience. Give back to help make NewPipe even better. https://newpipe.schabi.org/donate Give back Website @@ -466,7 +466,7 @@ Captions Modify player caption text scale and background styles. Requires app restart to take effect. - Enable LeakCanary + LeakCanary Memory leak monitoring may cause the app to become unresponsive when heap dumping Report out-of-lifecycle errors Force reporting of undeliverable Rx exceptions outside of fragment or activity lifecycle after disposal @@ -529,7 +529,7 @@ Auto Switch View - NewPipe Update Available! + There is a fresh NewPipe version available! Tap to download Finished Pending @@ -557,7 +557,7 @@ The file can not be created The destination folder can not be created Permission denied by the system - Secure connection failed + Could not connect securely Could not find the server Can not connect to the server The server does not send data @@ -585,7 +585,7 @@ You will be asked where to save each download You will be asked where to save each download.\nChoose SAF if you want to download to an external SD card Use SAF - The Storage Access Framework allows downloads to an external SD card.\nNote: some devices are not compatible + The Storage Access Framework allows downloads to an external SD card.\nNote: Some devices are incompatible Choose an instance From bff5371e419002e4a5965fe8047bed8e26098d72 Mon Sep 17 00:00:00 2001 From: Igor Nedoboy Date: Thu, 9 Jan 2020 01:44:21 +0000 Subject: [PATCH 0111/1194] Translated using Weblate (Russian) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-ru/strings.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 5230f00a2..f3fdbbc18 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -524,12 +524,12 @@ Язык будет изменён после перезапуска Перемотка двойным нажатием Серверы PeerTube - Настройте предпочтительные серверы PeerTube - Выберите подходящие серверы на https://joinpeertube.org/instances#instances-list + Выберите предпочтительные серверы PeerTube + Выберите подходящие серверы на %s Новый сервер URL сервера Не удалось проверить сервер - Поддерживается только https + Поддерживается только HTTPS Сервер уже существует Локальное Новое @@ -538,4 +538,6 @@ восстановление Не удалось восстановить загрузку Выберите сервер + Миниатюра на экране блокировки + Показать миниатюру видео на экране блокировки при воспроизведении в фоне \ No newline at end of file From 6bc697f92601b966702fc15a30add41b7772ce51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Thu, 9 Jan 2020 04:36:39 +0100 Subject: [PATCH 0112/1194] Continue ending playback queue --- app/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0b20edd7d..f1896c7ba 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -82,7 +82,7 @@ Remove all cached webpage data Metadata cache wiped Auto-queue next stream - Auto-append a related stream (to non-repeating queue) after last file + Continue ending (non-repeating) playback queue by appending a related stream Volume gesture control Use gestures to control player volume Brightness gesture control From bca547ce44021c32a6b99a1ab059174a2f215177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Thu, 9 Jan 2020 04:38:47 +0100 Subject: [PATCH 0113/1194] \'Storage Access Framework\' --- app/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f1896c7ba..940008aae 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -585,7 +585,7 @@ You will be asked where to save each download You will be asked where to save each download.\nChoose SAF if you want to download to an external SD card Use SAF - The Storage Access Framework allows downloads to an external SD card.\nNote: Some devices are incompatible + The \'Storage Access Framework\' allows downloads to an external SD card.\nNote: Some devices are incompatible Choose an instance From 3ad0e313caee037d42ea9a4ef89e80fbd04d9a2f Mon Sep 17 00:00:00 2001 From: bopol Date: Thu, 9 Jan 2020 09:40:05 +0100 Subject: [PATCH 0114/1194] =?UTF-8?q?changed=20the=20way=20to=20change=20l?= =?UTF-8?q?anguage,=20now=20is=20=C2=ABNewPipe's=20language=C2=BB=20select?= =?UTF-8?q?or?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/schabi/newpipe/MainActivity.java | 8 +- .../schabi/newpipe/about/AboutActivity.java | 6 + .../newpipe/download/DownloadActivity.java | 6 + .../settings/ContentSettingsFragment.java | 5 +- .../newpipe/settings/SettingsActivity.java | 7 +- .../org/schabi/newpipe/util/Localization.java | 26 ++- app/src/main/res/values-ur/strings.xml | 10 +- app/src/main/res/values/settings_keys.xml | 159 ++++++++++++++++-- app/src/main/res/values/strings.xml | 1 + app/src/main/res/xml/content_settings.xml | 10 ++ 10 files changed, 209 insertions(+), 29 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index cac814085..05e224013 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -56,7 +56,6 @@ import androidx.fragment.app.FragmentManager; import com.google.android.material.navigation.NavigationView; import org.schabi.newpipe.extractor.NewPipe; -import org.schabi.newpipe.extractor.ServiceList; import org.schabi.newpipe.extractor.StreamingService; import org.schabi.newpipe.extractor.exceptions.ExtractionException; import org.schabi.newpipe.extractor.services.peertube.PeertubeInstance; @@ -67,7 +66,6 @@ import org.schabi.newpipe.fragments.list.search.SearchFragment; import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.util.Constants; import org.schabi.newpipe.util.KioskTranslator; -import org.schabi.newpipe.util.Localization; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.PeertubeHelper; import org.schabi.newpipe.util.PermissionHelper; @@ -78,8 +76,10 @@ import org.schabi.newpipe.util.ThemeHelper; import java.util.ArrayList; import java.util.List; +import java.util.Locale; import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLanguage; public class MainActivity extends AppCompatActivity { private static final String TAG = "MainActivity"; @@ -116,10 +116,9 @@ public class MainActivity extends AppCompatActivity { if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) { TLSSocketFactoryCompat.setAsDefault(); } - ThemeHelper.setTheme(this, ServiceHelper.getSelectedServiceId(this)); - changeAppLanguage(Localization.getPreferredLocale(getApplicationContext()), getResources()); + changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); @@ -424,6 +423,7 @@ public class MainActivity extends AppCompatActivity { @Override protected void onResume() { + changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); super.onResume(); // close drawer on return, and don't show animation, so its looks like the drawer isn't open diff --git a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java index 2326e795e..4da1611d3 100644 --- a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java +++ b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java @@ -25,6 +25,11 @@ import org.schabi.newpipe.R; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.ThemeHelper; +import java.util.Locale; + +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLanguage; + public class AboutActivity extends AppCompatActivity { /** @@ -62,6 +67,7 @@ public class AboutActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { + changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); super.onCreate(savedInstanceState); ThemeHelper.setTheme(this); diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java index 449a790e8..b8bfcf480 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java @@ -15,9 +15,14 @@ import org.schabi.newpipe.R; import org.schabi.newpipe.settings.SettingsActivity; import org.schabi.newpipe.util.ThemeHelper; +import java.util.Locale; + import us.shandian.giga.service.DownloadManagerService; import us.shandian.giga.ui.fragment.MissionsFragment; +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLanguage; + public class DownloadActivity extends AppCompatActivity { private static final String MISSIONS_FRAGMENT_TAG = "fragment_tag"; @@ -29,6 +34,7 @@ public class DownloadActivity extends AppCompatActivity { i.setClass(this, DownloadManagerService.class); startService(i); + changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); ThemeHelper.setTheme(this); super.onCreate(savedInstanceState); setContentView(R.layout.activity_downloader); 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 0c7a4b46e..88c700582 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java @@ -56,6 +56,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment { private Localization initialSelectedLocalization; private ContentCountry initialSelectedContentCountry; + private String initialLanguage; @Override public void onCreate(@Nullable Bundle savedInstanceState) { @@ -64,6 +65,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment { initialSelectedLocalization = org.schabi.newpipe.util.Localization.getPreferredLocalization(requireContext()); initialSelectedContentCountry = org.schabi.newpipe.util.Localization.getPreferredContentCountry(requireContext()); + initialLanguage = androidx.preference.PreferenceManager.getDefaultSharedPreferences(getContext()).getString("newpipes_language_key", "en"); } @Override @@ -125,9 +127,10 @@ public class ContentSettingsFragment extends BasePreferenceFragment { .getPreferredLocalization(requireContext()); final ContentCountry selectedContentCountry = org.schabi.newpipe.util.Localization .getPreferredContentCountry(requireContext()); + final String selectedLanguage = androidx.preference.PreferenceManager.getDefaultSharedPreferences(getContext()).getString("newpipes_language_key", "en"); if (!selectedLocalization.equals(initialSelectedLocalization) - || !selectedContentCountry.equals(initialSelectedContentCountry)) { + || !selectedContentCountry.equals(initialSelectedContentCountry) || !selectedLanguage.equals(initialLanguage)) { Toast.makeText(requireContext(), R.string.localization_changes_requires_app_restart, Toast.LENGTH_LONG).show(); NewPipe.setupLocalization(selectedLocalization, selectedContentCountry); diff --git a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java index a3f218074..40af9f460 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java +++ b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java @@ -14,6 +14,11 @@ import android.view.MenuItem; import org.schabi.newpipe.R; import org.schabi.newpipe.util.ThemeHelper; +import java.util.Locale; + +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLanguage; + /* * Created by Christian Schabesberger on 31.08.15. @@ -44,7 +49,7 @@ public class SettingsActivity extends AppCompatActivity implements BasePreferenc @Override protected void onCreate(Bundle savedInstanceBundle) { setTheme(ThemeHelper.getSettingsThemeStyle(this)); - + changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); super.onCreate(savedInstanceBundle); setContentView(R.layout.settings_layout); diff --git a/app/src/main/java/org/schabi/newpipe/util/Localization.java b/app/src/main/java/org/schabi/newpipe/util/Localization.java index 6b0b4cd0c..7d742b04a 100644 --- a/app/src/main/java/org/schabi/newpipe/util/Localization.java +++ b/app/src/main/java/org/schabi/newpipe/util/Localization.java @@ -7,6 +7,11 @@ import android.content.res.Resources; import android.preference.PreferenceManager; import android.text.TextUtils; import android.util.DisplayMetrics; +import android.widget.Toast; + +import androidx.annotation.NonNull; +import androidx.annotation.PluralsRes; +import androidx.annotation.StringRes; import org.ocpsoft.prettytime.PrettyTime; import org.ocpsoft.prettytime.units.Decade; @@ -21,10 +26,6 @@ import java.util.Date; import java.util.List; import java.util.Locale; -import androidx.annotation.NonNull; -import androidx.annotation.PluralsRes; -import androidx.annotation.StringRes; - /* * Created by chschtsch on 12/29/15. * @@ -226,4 +227,21 @@ public class Localization { conf.setLocale(loc); res.updateConfiguration(conf, dm); } + + public static Locale getAppLanguage(Context context) { + SharedPreferences prefs = androidx.preference.PreferenceManager.getDefaultSharedPreferences(context); + String lang = prefs.getString("newpipes_language_key", "en"); + Locale loc; + if (lang.equals("system")) { + loc = Locale.getDefault(); + } else if (lang.matches(".*-.*")) { + String[] localisation = lang.split("-"); + lang = localisation[0]; + String country = localisation[1]; + loc = new Locale(lang, country); + } else { + loc = new Locale(lang); + } + return loc; + } } diff --git a/app/src/main/res/values-ur/strings.xml b/app/src/main/res/values-ur/strings.xml index 089b793c8..ce6f3f651 100644 --- a/app/src/main/res/values-ur/strings.xml +++ b/app/src/main/res/values-ur/strings.xml @@ -193,13 +193,13 @@ بی کوئی صارفین نہیں - % s صارف - % s صارفین + %s صارف + %s صارفین کوئی مناظر نہیں - % s منظر - % s مناظر + %s منظر + %s مناظر ویڈیوز دستیاب نہیں @@ -388,7 +388,7 @@ کوئی حد نہیں موبائل ڈیٹا کا استعمال کرتے وقت ریذولوشن کو محدود کریں ایپ سوئچ کو کم سے کم کریں - اہم ویڈیو پلیئر سے دوسرے ایپ میں سوئچنگ کرتے وقت کارروائی-% s + اہم ویڈیو پلیئر سے دوسرے ایپ میں سوئچنگ کرتے وقت کارروائی-s% کوئی نہیں پس منظری پلیر میں کم کریں پاپ اپ پلیر میں کم کریں diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 3f361226d..299803a43 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -31,20 +31,20 @@ seek_duration 10000 - 5 seconds - 10 seconds - 15 seconds - 20 seconds - 25 seconds - 30 seconds + 5 seconds + 10 seconds + 15 seconds + 20 seconds + 25 seconds + 30 seconds - 5000 - 10000 - 15000 - 20000 - 25000 - 30000 + 5000 + 10000 + 15000 + 20000 + 25000 + 30000 minimize_on_exit_key @@ -175,6 +175,7 @@ main_page_content enable_playback_resume enable_playback_state_lists + newpipes_language_key import_data export_data @@ -272,7 +273,6 @@ cs da de - eo et en-GB en @@ -352,7 +352,6 @@ Čeština Dansk Deutsch - Esperanto Eesti English (UK) English (US) @@ -925,6 +924,137 @@ ZW + + + system + ar + az + ast + be + bg-bd + bn + ca + cs + da + de + el + en + eo + es + et + eu + fa + fi + fil + fr + gl + he + hi + hr + hu + hy + ia + ind + it + ja + ko + ku + lt + mk + ms + nb-no + ne + nl + nl-be + pa + pl + pr + pt + pt-br + ro + ru + sk + sl + sq + sr + sv + ta + te + th + tr + uk + ur + vi + zh + zh-hans + zh-tw + + + @string/system + العربية + Azərbaycan dili + Asturianu + Беларуская + български език + বাংলা + Català + Čeština + Dansk + Deutsch + Ελληνικά + English + Esperanto + Español + Eesti keel + Euskara + فارسی + Suomen kieli + Wikang Filipino + Français + Galego + עברית + हिन्दी + Hrvatski + magyar + Հայերեն + Interlingua + Bahasa Indonesia + Italiano + 日本語 + 한국어 + کوردی + Lietuvių kalba + македонски јазик + Bahasa Melayu + Norsk bokmål + Nनेपाली + Nederlands (NL) + Nederlands (BE) + ਪੰਜਾਬੀ + Polski + Pirate Language + Português (PT) + Português (BR) + Română + русский язык + Slovenčina + Slovenščina + Shqip + Српски + Svenska + தமிழ் + తెలుగు + ไทย + Türkçe + українська мова + اردو + Tiếng Việt + 官话 + 简化字 + 臺灣華語 + + + limit_mobile_data_usage limit_data_usage_none @@ -943,6 +1073,7 @@ list_view_mode auto + System auto diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6021df15e..12a96fe74 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -585,5 +585,6 @@ Use SAF The Storage Access Framework allows downloads to an external SD card.\nNote: some devices are not compatible Choose an instance + NewPipe\'s language diff --git a/app/src/main/res/xml/content_settings.xml b/app/src/main/res/xml/content_settings.xml index 4044e92d8..ab9896cde 100644 --- a/app/src/main/res/xml/content_settings.xml +++ b/app/src/main/res/xml/content_settings.xml @@ -3,6 +3,16 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:title="@string/content"> + + + Date: Thu, 9 Jan 2020 12:15:01 +0100 Subject: [PATCH 0115/1194] removed unused imports --- app/src/main/java/org/schabi/newpipe/MainActivity.java | 1 - app/src/main/java/org/schabi/newpipe/about/AboutActivity.java | 2 -- .../main/java/org/schabi/newpipe/download/DownloadActivity.java | 2 -- .../main/java/org/schabi/newpipe/settings/SettingsActivity.java | 2 -- 4 files changed, 7 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 05e224013..eb5f11987 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -76,7 +76,6 @@ import org.schabi.newpipe.util.ThemeHelper; import java.util.ArrayList; import java.util.List; -import java.util.Locale; import static org.schabi.newpipe.util.Localization.changeAppLanguage; import static org.schabi.newpipe.util.Localization.getAppLanguage; diff --git a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java index 4da1611d3..3555ecefe 100644 --- a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java +++ b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java @@ -25,8 +25,6 @@ import org.schabi.newpipe.R; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.ThemeHelper; -import java.util.Locale; - import static org.schabi.newpipe.util.Localization.changeAppLanguage; import static org.schabi.newpipe.util.Localization.getAppLanguage; diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java index b8bfcf480..bf546bf85 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java @@ -15,8 +15,6 @@ import org.schabi.newpipe.R; import org.schabi.newpipe.settings.SettingsActivity; import org.schabi.newpipe.util.ThemeHelper; -import java.util.Locale; - import us.shandian.giga.service.DownloadManagerService; import us.shandian.giga.ui.fragment.MissionsFragment; diff --git a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java index 40af9f460..781c033b8 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java +++ b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java @@ -14,8 +14,6 @@ import android.view.MenuItem; import org.schabi.newpipe.R; import org.schabi.newpipe.util.ThemeHelper; -import java.util.Locale; - import static org.schabi.newpipe.util.Localization.changeAppLanguage; import static org.schabi.newpipe.util.Localization.getAppLanguage; From b32935a1b087bbc6d19fb7e50493273796d2ffb4 Mon Sep 17 00:00:00 2001 From: bopol Date: Thu, 9 Jan 2020 15:51:41 +0100 Subject: [PATCH 0116/1194] app language now changes time formatting (3hrs ago), was system language b4 --- app/src/main/java/org/schabi/newpipe/App.java | 2 +- .../java/org/schabi/newpipe/MainActivity.java | 8 +++++--- .../org/schabi/newpipe/about/AboutActivity.java | 4 ++-- .../newpipe/download/DownloadActivity.java | 4 ++-- .../newpipe/settings/SettingsActivity.java | 4 ++-- .../org/schabi/newpipe/util/Localization.java | 17 ++++++++--------- 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/App.java b/app/src/main/java/org/schabi/newpipe/App.java index 7f050e6c7..dae143b6c 100644 --- a/app/src/main/java/org/schabi/newpipe/App.java +++ b/app/src/main/java/org/schabi/newpipe/App.java @@ -99,7 +99,7 @@ public class App extends Application { NewPipe.init(getDownloader(), Localization.getPreferredLocalization(this), Localization.getPreferredContentCountry(this)); - Localization.init(); + Localization.init(getApplicationContext()); StateSaver.init(this); initNotificationChannel(); diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index eb5f11987..d48db1035 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -66,6 +66,7 @@ import org.schabi.newpipe.fragments.list.search.SearchFragment; import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.util.Constants; import org.schabi.newpipe.util.KioskTranslator; +import org.schabi.newpipe.util.Localization; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.PeertubeHelper; import org.schabi.newpipe.util.PermissionHelper; @@ -78,7 +79,7 @@ import java.util.ArrayList; import java.util.List; import static org.schabi.newpipe.util.Localization.changeAppLanguage; -import static org.schabi.newpipe.util.Localization.getAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; public class MainActivity extends AppCompatActivity { private static final String TAG = "MainActivity"; @@ -117,7 +118,7 @@ public class MainActivity extends AppCompatActivity { } ThemeHelper.setTheme(this, ServiceHelper.getSelectedServiceId(this)); - changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); @@ -422,7 +423,8 @@ public class MainActivity extends AppCompatActivity { @Override protected void onResume() { - changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); + Localization.init(getApplicationContext()); //change the date format to match the selected language on resume super.onResume(); // close drawer on return, and don't show animation, so its looks like the drawer isn't open diff --git a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java index 3555ecefe..795feceb0 100644 --- a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java +++ b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java @@ -26,7 +26,7 @@ import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.ThemeHelper; import static org.schabi.newpipe.util.Localization.changeAppLanguage; -import static org.schabi.newpipe.util.Localization.getAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; public class AboutActivity extends AppCompatActivity { @@ -65,7 +65,7 @@ public class AboutActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { - changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); super.onCreate(savedInstanceState); ThemeHelper.setTheme(this); diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java index bf546bf85..fd0d28a0e 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java @@ -19,7 +19,7 @@ import us.shandian.giga.service.DownloadManagerService; import us.shandian.giga.ui.fragment.MissionsFragment; import static org.schabi.newpipe.util.Localization.changeAppLanguage; -import static org.schabi.newpipe.util.Localization.getAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; public class DownloadActivity extends AppCompatActivity { @@ -32,7 +32,7 @@ public class DownloadActivity extends AppCompatActivity { i.setClass(this, DownloadManagerService.class); startService(i); - changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); ThemeHelper.setTheme(this); super.onCreate(savedInstanceState); setContentView(R.layout.activity_downloader); diff --git a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java index 781c033b8..6804f9831 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java +++ b/app/src/main/java/org/schabi/newpipe/settings/SettingsActivity.java @@ -15,7 +15,7 @@ import org.schabi.newpipe.R; import org.schabi.newpipe.util.ThemeHelper; import static org.schabi.newpipe.util.Localization.changeAppLanguage; -import static org.schabi.newpipe.util.Localization.getAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; /* @@ -47,7 +47,7 @@ public class SettingsActivity extends AppCompatActivity implements BasePreferenc @Override protected void onCreate(Bundle savedInstanceBundle) { setTheme(ThemeHelper.getSettingsThemeStyle(this)); - changeAppLanguage(getAppLanguage(getApplicationContext()), getResources()); + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); super.onCreate(savedInstanceBundle); setContentView(R.layout.settings_layout); diff --git a/app/src/main/java/org/schabi/newpipe/util/Localization.java b/app/src/main/java/org/schabi/newpipe/util/Localization.java index 7d742b04a..695a73295 100644 --- a/app/src/main/java/org/schabi/newpipe/util/Localization.java +++ b/app/src/main/java/org/schabi/newpipe/util/Localization.java @@ -7,7 +7,6 @@ import android.content.res.Resources; import android.preference.PreferenceManager; import android.text.TextUtils; import android.util.DisplayMetrics; -import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.PluralsRes; @@ -54,8 +53,8 @@ public class Localization { private Localization() { } - public static void init() { - initPrettyTime(); + public static void init(Context context) { + initPrettyTime(context); } @NonNull @@ -203,17 +202,17 @@ public class Localization { // Pretty Time //////////////////////////////////////////////////////////////////////////*/ - private static void initPrettyTime() { - prettyTime = new PrettyTime(Locale.getDefault()); + private static void initPrettyTime(Context context) { + prettyTime = new PrettyTime(getAppLocale(context)); // Do not use decades as YouTube doesn't either. prettyTime.removeUnit(Decade.class); } private static PrettyTime getPrettyTime() { // If pretty time's Locale is different, init again with the new one. - if (!prettyTime.getLocale().equals(Locale.getDefault())) { - initPrettyTime(); - } +// if (!prettyTime.getLocale().equals(Locale.getDefault())) { +// initPrettyTime(); +// } return prettyTime; } @@ -228,7 +227,7 @@ public class Localization { res.updateConfiguration(conf, dm); } - public static Locale getAppLanguage(Context context) { + public static Locale getAppLocale(Context context) { SharedPreferences prefs = androidx.preference.PreferenceManager.getDefaultSharedPreferences(context); String lang = prefs.getString("newpipes_language_key", "en"); Locale loc; From 99cdaec40e98b30cd04ea372dc5db8bee235cd7b Mon Sep 17 00:00:00 2001 From: TobiGr Date: Wed, 8 Jan 2020 19:58:11 +0000 Subject: [PATCH 0117/1194] Translated using Weblate (German) Currently translated at 99.0% (520 of 525 strings) --- app/src/main/res/values-de/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 17c2e55d0..6d4fe2e13 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -202,8 +202,8 @@ Keine Videos - Video - Videos + %s Video + %s Videos Die meisten Sonderzeichen Element gelöscht @@ -518,7 +518,7 @@ Die Sprache ändert sich, sobald die App neu gestartet wird. PeerTube-Instanzen - Finde auf https://joinpeertube.org/instances#instances-list die Instanzen, die am besten zu dir passen + "Finde auf %s die Instanzen, die am besten zu dir passen" Instanz hinzufügen Gib die URL der Instanz ein Validieren der Instanz fehlgeschlagen From 8f46432391578b6602cea69ef344817857f75a7e Mon Sep 17 00:00:00 2001 From: bopol Date: Fri, 10 Jan 2020 15:50:15 +0100 Subject: [PATCH 0118/1194] fixed some activities where the wrong languages would be set --- app/src/main/java/org/schabi/newpipe/MainActivity.java | 1 - .../java/org/schabi/newpipe/about/AboutActivity.java | 1 + .../java/org/schabi/newpipe/player/BackgroundPlayer.java | 4 +++- .../java/org/schabi/newpipe/player/MainVideoPlayer.java | 9 +++++++-- .../java/org/schabi/newpipe/player/PopupVideoPlayer.java | 3 +++ .../org/schabi/newpipe/player/ServicePlayerActivity.java | 3 +++ .../java/org/schabi/newpipe/report/ErrorActivity.java | 4 ++++ .../main/java/org/schabi/newpipe/util/Localization.java | 4 ---- 8 files changed, 21 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index d48db1035..c5aedb85b 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -119,7 +119,6 @@ public class MainActivity extends AppCompatActivity { ThemeHelper.setTheme(this, ServiceHelper.getSelectedServiceId(this)); changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); - super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); diff --git a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java index 795feceb0..c8c62bbe7 100644 --- a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java +++ b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java @@ -68,6 +68,7 @@ public class AboutActivity extends AppCompatActivity { changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); super.onCreate(savedInstanceState); ThemeHelper.setTheme(this); + this.setTitle(getString(R.string.title_activity_about)); setContentView(R.layout.activity_about); 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 76da7da36..c74882161 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -58,6 +58,8 @@ import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.ThemeHelper; import static org.schabi.newpipe.player.helper.PlayerHelper.getTimeString; +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; /** @@ -115,7 +117,7 @@ public final class BackgroundPlayer extends Service { notificationManager = ((NotificationManager) getSystemService(NOTIFICATION_SERVICE)); lockManager = new LockManager(this); sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); - + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); ThemeHelper.setTheme(this); basePlayerImpl = new BasePlayerImpl(this); basePlayerImpl.setup(); 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 7a3e60c66..284d10b42 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -93,6 +93,8 @@ import static org.schabi.newpipe.util.AnimationUtils.Type.SCALE_AND_ALPHA; import static org.schabi.newpipe.util.AnimationUtils.Type.SLIDE_AND_ALPHA; import static org.schabi.newpipe.util.AnimationUtils.animateRotation; import static org.schabi.newpipe.util.AnimationUtils.animateView; +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; import static org.schabi.newpipe.util.StateSaver.KEY_SAVED_STATE; /** @@ -123,6 +125,7 @@ public final class MainVideoPlayer extends AppCompatActivity @Override protected void onCreate(@Nullable Bundle savedInstanceState) { + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); super.onCreate(savedInstanceState); if (DEBUG) Log.d(TAG, "onCreate() called with: savedInstanceState = [" + savedInstanceState + "]"); defaultPreferences = PreferenceManager.getDefaultSharedPreferences(this); @@ -190,6 +193,7 @@ public final class MainVideoPlayer extends AppCompatActivity @Override protected void onResume() { if (DEBUG) Log.d(TAG, "onResume() called"); + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); super.onResume(); if (globalScreenOrientationLocked()) { @@ -220,6 +224,7 @@ public final class MainVideoPlayer extends AppCompatActivity @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); if (playerImpl.isSomePopupMenuVisible()) { playerImpl.getQualityPopupMenu().dismiss(); @@ -364,8 +369,8 @@ public final class MainVideoPlayer extends AppCompatActivity } private boolean globalScreenOrientationLocked() { - // 1: Screen orientation changes using acelerometer - // 0: Screen orientatino is locked + // 1: Screen orientation changes using accelerometer + // 0: Screen orientation is locked return !(android.provider.Settings.System.getInt(getContentResolver(), Settings.System.ACCELEROMETER_ROTATION, 0) == 1); } 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 969c47990..b173448d0 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -80,6 +80,8 @@ import static org.schabi.newpipe.player.BasePlayer.STATE_PLAYING; import static org.schabi.newpipe.player.VideoPlayer.DEFAULT_CONTROLS_DURATION; import static org.schabi.newpipe.player.VideoPlayer.DEFAULT_CONTROLS_HIDE_TIME; import static org.schabi.newpipe.util.AnimationUtils.animateView; +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; /** * Service Popup Player implementing VideoPlayer @@ -142,6 +144,7 @@ public final class PopupVideoPlayer extends Service { @Override public void onCreate() { + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); windowManager = (WindowManager) getSystemService(WINDOW_SERVICE); notificationManager = ((NotificationManager) getSystemService(NOTIFICATION_SERVICE)); 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 2207808ac..d5ee59a7e 100644 --- a/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java +++ b/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java @@ -46,6 +46,8 @@ import java.util.List; import static org.schabi.newpipe.player.helper.PlayerHelper.formatPitch; import static org.schabi.newpipe.player.helper.PlayerHelper.formatSpeed; +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; public abstract class ServicePlayerActivity extends AppCompatActivity implements PlayerEventListener, SeekBar.OnSeekBarChangeListener, @@ -116,6 +118,7 @@ public abstract class ServicePlayerActivity extends AppCompatActivity @Override protected void onCreate(Bundle savedInstanceState) { + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); super.onCreate(savedInstanceState); ThemeHelper.setTheme(this); setContentView(R.layout.activity_player_queue_control); diff --git a/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java b/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java index e7a6319e3..05dfe33ca 100644 --- a/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java +++ b/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java @@ -46,6 +46,9 @@ import java.util.List; import java.util.TimeZone; import java.util.Vector; +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; + /* * Created by Christian Schabesberger on 24.10.15. * @@ -171,6 +174,7 @@ public class ErrorActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); super.onCreate(savedInstanceState); ThemeHelper.setTheme(this); setContentView(R.layout.activity_error); diff --git a/app/src/main/java/org/schabi/newpipe/util/Localization.java b/app/src/main/java/org/schabi/newpipe/util/Localization.java index 695a73295..3f555fcfd 100644 --- a/app/src/main/java/org/schabi/newpipe/util/Localization.java +++ b/app/src/main/java/org/schabi/newpipe/util/Localization.java @@ -209,10 +209,6 @@ public class Localization { } private static PrettyTime getPrettyTime() { - // If pretty time's Locale is different, init again with the new one. -// if (!prettyTime.getLocale().equals(Locale.getDefault())) { -// initPrettyTime(); -// } return prettyTime; } From 11d06dc86d8e1f0e2614251a1359e36dd537a81c Mon Sep 17 00:00:00 2001 From: bopol Date: Fri, 10 Jan 2020 16:03:24 +0100 Subject: [PATCH 0119/1194] remove todo as it's already done --- app/src/main/res/values/settings_keys.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 4bb66bf62..18f42fe46 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -1054,7 +1054,6 @@ 官话 简化字 臺灣華語 - From 707e4f7167b537804b6abf9ae11dbe5a128b3bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Szcz=C4=99k?= Date: Fri, 11 Oct 2019 15:07:51 +0200 Subject: [PATCH 0120/1194] Add option to remove downloaded files when clearing finished downloads --- .../shandian/giga/ui/adapter/MissionAdapter.java | 12 +++++++++++- .../giga/ui/fragment/MissionsFragment.java | 8 +++++++- app/src/main/res/layout/delete_files_checkbox.xml | 14 ++++++++++++++ app/src/main/res/values/strings.xml | 2 +- 4 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 app/src/main/res/layout/delete_files_checkbox.xml diff --git a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java index 8420e343b..e20417aa9 100644 --- a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java +++ b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java @@ -19,6 +19,7 @@ import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.webkit.MimeTypeMap; +import android.widget.CheckBox; import android.widget.ImageView; import android.widget.PopupMenu; import android.widget.TextView; @@ -557,7 +558,16 @@ public class MissionAdapter extends Adapter implements Handler.Callb ); } - public void clearFinishedDownloads() { + public void clearFinishedDownloads(boolean delete) { + if (delete && mIterator.hasFinishedMissions()) { + for(int i=0; i mAdapter.clearFinishedDownloads()); + prompt.setView(checkBoxView); + prompt.setPositiveButton(android.R.string.ok, (dialog, which) -> { + CheckBox checkBox = checkBoxView.findViewById(R.id.delete_files_checkbox); + mAdapter.clearFinishedDownloads(checkBox.isChecked()); + }); prompt.setNegativeButton(R.string.cancel, null); prompt.create().show(); return true; diff --git a/app/src/main/res/layout/delete_files_checkbox.xml b/app/src/main/res/layout/delete_files_checkbox.xml new file mode 100644 index 000000000..cbc6ecd10 --- /dev/null +++ b/app/src/main/res/layout/delete_files_checkbox.xml @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 54ae40d1d..d3899583b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -587,5 +587,5 @@ Use SAF The Storage Access Framework allows downloads to an external SD card.\nNote: some devices are not compatible Choose an instance - + Delete downloaded files From f6bbc69cf9a8db92aafb4c20bde999f3c90598c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Szcz=C4=99k?= Date: Fri, 11 Oct 2019 16:16:10 +0200 Subject: [PATCH 0121/1194] Remove unnecessary import --- .../main/java/us/shandian/giga/ui/adapter/MissionAdapter.java | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java index e20417aa9..ab3f22886 100644 --- a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java +++ b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java @@ -19,7 +19,6 @@ import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.webkit.MimeTypeMap; -import android.widget.CheckBox; import android.widget.ImageView; import android.widget.PopupMenu; import android.widget.TextView; From b18236a27e05076225f2b151560511d6279e36ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Szcz=C4=99k?= Date: Fri, 11 Oct 2019 16:36:47 +0200 Subject: [PATCH 0122/1194] Put call to forget finished downloads in an else statement to prevent potential bugs --- .../main/java/us/shandian/giga/ui/adapter/MissionAdapter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java index ab3f22886..4842e6b2e 100644 --- a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java +++ b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java @@ -566,8 +566,9 @@ public class MissionAdapter extends Adapter implements Handler.Callb mContext.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, mission.storage.getUri())); } } + } else if (!delete) { + mDownloadManager.forgetFinishedDownloads(); } - mDownloadManager.forgetFinishedDownloads(); applyChanges(); } From cfad3fb5ded10334317501fde5b18cf7859c6746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Szcz=C4=99k?= Date: Wed, 11 Dec 2019 15:56:04 +0100 Subject: [PATCH 0123/1194] Fix inconsistent style --- .../main/java/us/shandian/giga/ui/adapter/MissionAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java index 4842e6b2e..eea3f2795 100644 --- a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java +++ b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java @@ -559,7 +559,7 @@ public class MissionAdapter extends Adapter implements Handler.Callb public void clearFinishedDownloads(boolean delete) { if (delete && mIterator.hasFinishedMissions()) { - for(int i=0; i Date: Fri, 13 Dec 2019 11:48:01 +0100 Subject: [PATCH 0124/1194] Use a dialog option instead of a checkbox --- .../giga/ui/fragment/MissionsFragment.java | 8 ++------ app/src/main/res/layout/delete_files_checkbox.xml | 14 -------------- app/src/main/res/values/strings.xml | 2 +- 3 files changed, 3 insertions(+), 21 deletions(-) delete mode 100644 app/src/main/res/layout/delete_files_checkbox.xml diff --git a/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java b/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java index edaa01e0f..98231cffe 100644 --- a/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java +++ b/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java @@ -190,14 +190,10 @@ public class MissionsFragment extends Fragment { return true; case R.id.clear_list: AlertDialog.Builder prompt = new AlertDialog.Builder(mContext); - View checkBoxView = View.inflate(this.getContext(), R.layout.delete_files_checkbox, null); prompt.setTitle(R.string.clear_finished_download); prompt.setMessage(R.string.confirm_prompt); - prompt.setView(checkBoxView); - prompt.setPositiveButton(android.R.string.ok, (dialog, which) -> { - CheckBox checkBox = checkBoxView.findViewById(R.id.delete_files_checkbox); - mAdapter.clearFinishedDownloads(checkBox.isChecked()); - }); + prompt.setPositiveButton(R.string.clear_finished_download, (dialog, which) -> mAdapter.clearFinishedDownloads(false)); + prompt.setNeutralButton(R.string.delete_downloaded_files, (dialog, which) -> mAdapter.clearFinishedDownloads(true)); prompt.setNegativeButton(R.string.cancel, null); prompt.create().show(); return true; diff --git a/app/src/main/res/layout/delete_files_checkbox.xml b/app/src/main/res/layout/delete_files_checkbox.xml deleted file mode 100644 index cbc6ecd10..000000000 --- a/app/src/main/res/layout/delete_files_checkbox.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d3899583b..94a50972f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -570,7 +570,7 @@ Connection timeout Cannot recover this download Clear finished downloads - Are you sure? + Do you want to clear your download history or delete all downloaded files? Stop Maximum retries Maximum number of attempts before canceling the download From 986acc5fc5962e67fd85f4034c4118932da136f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Szcz=C4=99k?= Date: Thu, 26 Dec 2019 16:15:30 +0100 Subject: [PATCH 0125/1194] Reorder buttons in clear downloads dialog --- .../us/shandian/giga/ui/fragment/MissionsFragment.java | 9 +++++---- app/src/main/res/menu/download_menu.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java b/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java index 98231cffe..be0b0bb25 100644 --- a/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java +++ b/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java @@ -190,11 +190,12 @@ public class MissionsFragment extends Fragment { return true; case R.id.clear_list: AlertDialog.Builder prompt = new AlertDialog.Builder(mContext); - prompt.setTitle(R.string.clear_finished_download); + prompt.setTitle(R.string.clear_download_history); prompt.setMessage(R.string.confirm_prompt); - prompt.setPositiveButton(R.string.clear_finished_download, (dialog, which) -> mAdapter.clearFinishedDownloads(false)); - prompt.setNeutralButton(R.string.delete_downloaded_files, (dialog, which) -> mAdapter.clearFinishedDownloads(true)); - prompt.setNegativeButton(R.string.cancel, null); + // Intentionally misusing button's purpose in order to achieve good order + prompt.setNegativeButton(R.string.clear_download_history, (dialog, which) -> mAdapter.clearFinishedDownloads(false)); + prompt.setPositiveButton(R.string.delete_downloaded_files, (dialog, which) -> mAdapter.clearFinishedDownloads(true)); + prompt.setNeutralButton(R.string.cancel, null); prompt.create().show(); return true; case R.id.start_downloads: diff --git a/app/src/main/res/menu/download_menu.xml b/app/src/main/res/menu/download_menu.xml index f91f8ad7b..8728e146e 100644 --- a/app/src/main/res/menu/download_menu.xml +++ b/app/src/main/res/menu/download_menu.xml @@ -24,7 +24,7 @@ Progress lost, because the file was deleted Connection timeout Cannot recover this download - Clear finished downloads + Clear download history Do you want to clear your download history or delete all downloaded files? Stop Maximum retries From d071891b2af8b71f428d2a16815d783f16fca089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Szcz=C4=99k?= Date: Sun, 5 Jan 2020 14:01:54 +0100 Subject: [PATCH 0126/1194] Add a snackbar to allow user to undo file deletion --- .../giga/ui/adapter/MissionAdapter.java | 52 +++++++++++++++++-- app/src/main/res/values/strings.xml | 1 + 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java index eea3f2795..11cdf5a3d 100644 --- a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java +++ b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java @@ -5,6 +5,7 @@ import android.app.Activity; import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; +import android.graphics.Color; import android.net.Uri; import android.os.AsyncTask; import android.os.Build; @@ -35,6 +36,8 @@ import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView.Adapter; import androidx.recyclerview.widget.RecyclerView.ViewHolder; +import com.google.android.material.snackbar.Snackbar; + import org.schabi.newpipe.BuildConfig; import org.schabi.newpipe.R; import org.schabi.newpipe.extractor.NewPipe; @@ -46,6 +49,7 @@ import java.io.File; import java.lang.ref.WeakReference; import java.net.URI; import java.util.ArrayList; +import java.util.Iterator; import us.shandian.giga.get.DownloadMission; import us.shandian.giga.get.FinishedMission; @@ -84,6 +88,7 @@ public class MissionAdapter extends Adapter implements Handler.Callb private static final String UNDEFINED_PROGRESS = "--.-%"; private static final String DEFAULT_MIME_TYPE = "*/*"; private static final String UNDEFINED_ETA = "--:--"; + private static final int TIMEOUT = 5000;// ms static { @@ -104,8 +109,12 @@ public class MissionAdapter extends Adapter implements Handler.Callb private MenuItem mPauseButton; private View mEmptyMessage; private RecoverHelper mRecover; + private View mView; + private ArrayList mHidden; + private Snackbar mSnackbar; private final Runnable rUpdater = this::updater; + private final Runnable rDelete = this::deleteFinishedDownloads; public MissionAdapter(Context context, @NonNull DownloadManager downloadManager, View emptyMessage, View root) { mContext = context; @@ -122,6 +131,10 @@ public class MissionAdapter extends Adapter implements Handler.Callb mDeleter = new Deleter(root, mContext, this, mDownloadManager, mIterator, mHandler); + mView = root; + + mHidden = new ArrayList<>(); + checkEmptyMessageVisibility(); onResume(); } @@ -558,18 +571,49 @@ public class MissionAdapter extends Adapter implements Handler.Callb } public void clearFinishedDownloads(boolean delete) { - if (delete && mIterator.hasFinishedMissions()) { + if (delete && mIterator.hasFinishedMissions() && mHidden.isEmpty()) { for (int i = 0; i < mIterator.getOldListSize(); i++) { FinishedMission mission = mIterator.getItem(i).mission instanceof FinishedMission ? (FinishedMission) mIterator.getItem(i).mission : null; if (mission != null) { - mDownloadManager.deleteMission(mission); - mContext.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, mission.storage.getUri())); + mIterator.hide(mission); + mHidden.add(mission); } } + applyChanges(); + + String msg = String.format(mContext.getString(R.string.deleted_downloads), String.valueOf(mHidden.size())); + mSnackbar = Snackbar.make(mView, msg, Snackbar.LENGTH_INDEFINITE); + mSnackbar.setAction(R.string.undo, s -> { + Iterator i = mHidden.iterator(); + while (i.hasNext()) { + mIterator.unHide(i.next()); + i.remove(); + } + applyChanges(); + mHandler.removeCallbacks(rDelete); + }); + mSnackbar.setActionTextColor(Color.YELLOW); + mSnackbar.show(); + + mHandler.postDelayed(rDelete, TIMEOUT); } else if (!delete) { mDownloadManager.forgetFinishedDownloads(); + applyChanges(); + } + } + + private void deleteFinishedDownloads() { + if(mSnackbar != null) mSnackbar.dismiss(); + + Iterator i = mHidden.iterator(); + while (i.hasNext()) { + Mission mission = i.next(); + if (mission != null) { + mDownloadManager.deleteMission(mission); + mContext.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, mission.storage.getUri())); + } + i.remove(); } - applyChanges(); } private boolean handlePopupItem(@NonNull ViewHolderItem h, @NonNull MenuItem option) { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bc3389062..9e3f89357 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -588,4 +588,5 @@ The Storage Access Framework allows downloads to an external SD card.\nNote: some devices are not compatible Choose an instance Delete downloaded files + Deleted %s downloads From 2c8222fd559d4d536b4f2f35cf1f0b6ed87223ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Szcz=C4=99k?= Date: Sat, 11 Jan 2020 15:19:24 +0100 Subject: [PATCH 0127/1194] Style corrected --- .../java/us/shandian/giga/ui/adapter/MissionAdapter.java | 5 ++--- app/src/main/res/values/strings.xml | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java index 11cdf5a3d..fac196e0b 100644 --- a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java +++ b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java @@ -88,7 +88,6 @@ public class MissionAdapter extends Adapter implements Handler.Callb private static final String UNDEFINED_PROGRESS = "--.-%"; private static final String DEFAULT_MIME_TYPE = "*/*"; private static final String UNDEFINED_ETA = "--:--"; - private static final int TIMEOUT = 5000;// ms static { @@ -595,7 +594,7 @@ public class MissionAdapter extends Adapter implements Handler.Callb mSnackbar.setActionTextColor(Color.YELLOW); mSnackbar.show(); - mHandler.postDelayed(rDelete, TIMEOUT); + mHandler.postDelayed(rDelete, 5000); } else if (!delete) { mDownloadManager.forgetFinishedDownloads(); applyChanges(); @@ -603,7 +602,7 @@ public class MissionAdapter extends Adapter implements Handler.Callb } private void deleteFinishedDownloads() { - if(mSnackbar != null) mSnackbar.dismiss(); + if (mSnackbar != null) mSnackbar.dismiss(); Iterator i = mHidden.iterator(); while (i.hasNext()) { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9e3f89357..431f05d5a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -571,6 +571,8 @@ Cannot recover this download Clear download history Do you want to clear your download history or delete all downloaded files? + Delete downloaded files + Deleted %s downloads Stop Maximum retries Maximum number of attempts before canceling the download @@ -587,6 +589,4 @@ Use SAF The Storage Access Framework allows downloads to an external SD card.\nNote: some devices are not compatible Choose an instance - Delete downloaded files - Deleted %s downloads From 69c090b5a1148f11f4718ad5acae00c317552137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=2E=20R=C3=BCdinger?= Date: Thu, 9 Jan 2020 16:23:03 +0000 Subject: [PATCH 0128/1194] Translated using Weblate (German) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-de/strings.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 6d4fe2e13..d72051d18 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -14,7 +14,7 @@ Meintest du: %1$s\? Teilen mit Browser auswählen - Drehen des Geräts + Bildschirm drehen Downloadordner für Videos Heruntergeladene Videodateien werden hier gespeichert Wähle den Downloadordner für Videodateien aus @@ -278,7 +278,7 @@ Dies wird deine aktuellen Einstellungen überschreiben. Infos anzeigen Lesezeichen für Wiedergabelisten - Hinzufügen zu + Hinzufügen Zum Neuordnen ziehen Erstellen Einen löschen @@ -395,7 +395,7 @@ Keine Zum Hintergrund-Player minimieren Zum Popup-Player minimieren - Vorspulen während der Stille + Vorspulen bei Stille Schritt Zurücksetzen Kanäle @@ -518,17 +518,17 @@ Die Sprache ändert sich, sobald die App neu gestartet wird. PeerTube-Instanzen - "Finde auf %s die Instanzen, die am besten zu dir passen" + Finde auf %s die Instanzen, die am besten zu dir passen Instanz hinzufügen Gib die URL der Instanz ein - Validieren der Instanz fehlgeschlagen - Diese Instanz existiert bereits + Validierung der Instanz fehlgeschlagen + Instanz existiert bereits Lokal Kürzlich hinzugefügt Auto-generiert (kein Uploader gefunden) Wähle eine Instanz - Bevorzugte Peertube-Instanzen festlegen - Es werden nur https-Adressen unterstützt + Bevorzugte Peertube-Instanzen auswählen + Es werden nur HTTPS-Adressen unterstützt Dauer der Suche bei schnellem Vor-/Zurückspulen Am beliebtesten Wiederherstellen From 78c9e4e1ad78ec8e48df268e8f02714862463d5c Mon Sep 17 00:00:00 2001 From: nautilusx Date: Fri, 10 Jan 2020 07:10:50 +0000 Subject: [PATCH 0129/1194] Translated using Weblate (German) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-de/strings.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index d72051d18..586da69ee 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -123,7 +123,8 @@ Bevorzugtes Videoformat Im Pop-up Modus abspielen NewPipe-Pop-up-Modus - Diese Berechtigung ist für das Öffnen im Pop-up-Modus erforderlich + Diese Berechtigung ist für das +\nÖffnen im Pop-up-Modus erforderlich Standardauflösung des Pop-ups Höhere Auflösungen anzeigen Nur manche Geräte unterstützen das Abspielen von 2K-/4K-Videos @@ -520,7 +521,7 @@ PeerTube-Instanzen Finde auf %s die Instanzen, die am besten zu dir passen Instanz hinzufügen - Gib die URL der Instanz ein + URL der Instanz eingeben Validierung der Instanz fehlgeschlagen Instanz existiert bereits Lokal @@ -533,4 +534,6 @@ Am beliebtesten Wiederherstellen Dieser Download kann nicht wiederhergestellt werden + Video-Vorschaubild für Sperrbildschirm aktivieren + Bei Verwendung des Hintergrundplayers wird ein Video-Miniaturbild auf dem Sperrbildschirm angezeigt \ No newline at end of file From 3f67b3b73c616d218cbd6cff4841be2326bf2cb7 Mon Sep 17 00:00:00 2001 From: B0pol Date: Fri, 10 Jan 2020 19:56:16 +0000 Subject: [PATCH 0130/1194] Translated using Weblate (French) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-fr/strings.xml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index c8e238487..463057480 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -519,12 +519,12 @@ La langue changera lors du redémarrage de l\'application. Avance/rembobinage rapide sur une durée Instances PeerTube - Définissez vos instances peertube préférées - Cherchez des instances qui pourraient vous intéresser sur https://joinpeertube.org/instances#instances-list + Choisissez vos instances PeerTube préférées + Cherchez des instances qui pourraient vous intéresser sur %s Ajouter une instance Entrez l’URL de l’instance Échec de validation de l’instance - Sont prises en charge uniquement les URLs en https + Sont prises en charge uniquement les URLs en HTTPS L’instance existe déjà Local Ajoutées récemment @@ -532,4 +532,7 @@ récupération Impossible de récupérer ce téléchargement Choisissez une instance + Généré automatiquement (pas de téléverseur trouvé) + Activer la vidéo miniaturisée sur l\'écran de verrouillage + En utilisant le lecteur en arrière-plan, une vidéo miniaturisé sera affichée sur l\'écran de verrouillage \ No newline at end of file From c3e41e2427f3ad32f2835eecf415aa0c1b77cbe8 Mon Sep 17 00:00:00 2001 From: ssantos Date: Sat, 11 Jan 2020 12:18:48 +0000 Subject: [PATCH 0131/1194] Translated using Weblate (Portuguese) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-pt/strings.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 4bf692801..98b85bcab 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -518,12 +518,12 @@ O idioma mudará quando a app for reiniciada. Duração da busca de avanço/retrocesso rápido Instâncias do PeerTube - Defina as suas instâncias favoritas de peertube - Encontre as instâncias que lhe melhor convêm em https://joinpeertube.org/instances#instances-list + Defina as suas instâncias favoritas de PeerTube + Encontre as instâncias que lhe melhor convêm em %s Adicionar instância Digite o URL da instância Falha ao validar a instância - Somente URLs HTTPS são suportadas + Somente URLs HTTPS são suportada A instância já existe Local Recentemente adicionado @@ -532,4 +532,6 @@ recuperando Não é possível recuperar este descarregamento Escolha uma instância + Ativar miniatura do vídeo no ecrã de bloqueio + Ao usar o reprodutor de fundo, uma miniatura de vídeo será exibida no ecrã de bloqueio \ No newline at end of file From b83e1716fe9c084f8b423d8cfc8efcdce18aa5dc Mon Sep 17 00:00:00 2001 From: Osoitz Date: Sun, 12 Jan 2020 11:31:39 +0000 Subject: [PATCH 0132/1194] Translated using Weblate (Basque) Currently translated at 99.4% (522 of 525 strings) --- app/src/main/res/values-eu/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index 2233c42ba..b376f1f6d 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -519,12 +519,12 @@ Kiosko Lehenetsia Aurreratze/atzeratze bilaketaren iraupena PeerTube instantziak - Ezarri zure gogoko peertube instantziak - Aurkitu instantziak hemen: https://joinpeertube.org/instances#instances-list + Hautatu zure gogoko PeerTube instantziak + Aurkitu instantziak hemen: %s Gehitu instantzia Sartu instantziaren URLa - Huts egin du instantzia balioztatzean - https URLak onartzen dira soilik + Ezin izan da instantzia balioztatu + HTTPS URLak onartzen dira soilik Instantzia badago aurretik Lokala Berriki gehitua From 7c4b9d8843900e4ccdd22cd0d3df7a3fcdd20782 Mon Sep 17 00:00:00 2001 From: Petros Grammatikopoulos Date: Sun, 12 Jan 2020 23:02:25 +0000 Subject: [PATCH 0133/1194] Translated using Weblate (Greek) Currently translated at 97.7% (513 of 525 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 dd6643755..3d2397a0c 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -522,4 +522,6 @@ Δημιουργήθηκε αυτόματα (δεν βρέθηκε χρήστης μεταφόρτωσης) Ανάκτηση Δεν είναι δυνατή η ανάκτηση αυτής της λήψης + Ενεργοποίηση μικρογραφίας βίντεο στην οθόνη κλειδώματος + Όταν χρησιμοποιείται αναπαραγωγή παρασκηνίου μια μικρογραφία βίντεο θα εμφανίζεται στην οθόνη κλειδώματος \ No newline at end of file From 88e5be237e1f78a49d04c937d4168ddb410b0007 Mon Sep 17 00:00:00 2001 From: B0pol Date: Fri, 10 Jan 2020 17:12:12 +0000 Subject: [PATCH 0134/1194] Translated using Weblate (Esperanto) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-eo/strings.xml | 42 ++++++++++++++------------ 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 784357da3..6d19f8213 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -41,12 +41,12 @@ Neniu elsendlflua ludilo trovita. Ĉu vi volas instali la aplikaĵon VLC\? La aplikaĵo Kore ne estas trovita. Ĉu instali ĝin? Montri la sekvan filmeton kaj similajn filmetojn - Ĉiuj miniaturoj ne ŝargeblas + Ĉiuj bildetoj ne ŝargeblas La subskribo de la ligilo de la filmeto ne malĉifreblas La retejo ne analizeblas - Miniaturo de la antaŭrigardo de la filmeto + Bildeto de la antaŭrigardo de la filmeto Legi filmeton, daŭro: - Miniaturo de la bildo de la alŝutinto + Bildeto de la alŝutinto La elŝutujo \'%1$s\' ne kreeblas Elŝutujo \'%1$s\' kreita Elŝutujo por filmetoj @@ -61,7 +61,7 @@ Signali eraron per retpoŝto SIGNALI Informoj: - Via komento (angle): + Vian komenton (angle): Detaloj: Signali eraron Filmeto @@ -71,7 +71,7 @@ Malfermi en ŝprucfenestron modon Forigas aŭdion ĉe KELKAJ distingivoj NewPipe ŝprucfenestron modon - Abonu + Aboni Abonita Kanalo malabonita Ne povis ŝanĝi abonon @@ -210,16 +210,16 @@ Tia dosierujo ne ekzistas Tia dosiero/enhavo ne ekzistas Dosiernomo ne povas esti malplena - Eraro okazis : %1$s - Importu Jutubajn abonaĵojn per elŝuti la dosieron de eksporto : -\n -\n1. Iru ĉe tie retpaĝo : %1$s -\n2. Ensalutu kiam oni petas vin + Eraro okazis: %1$s + Importu Jutubajn abonaĵojn per elŝuti la dosieron de eksporto : +\n +\n1. Iru ĉe tiu retpaĝo: %1$s +\n2. Ensalutu kiam oni petas vin \n3. Elŝuto devus komenci (ĝi estas la dosiero de eksporto) - Importu Soundcloud-n profilon per elŝuti la dosieron de eksporto : + Importu Soundcloud-n profilon tajpante ĉu la ligilon, ĉu vian ID : \n \n1. Ebligu komputilon modon en krozilo (la retejo malhaveblas por poŝtelefonoj) -\n2. Iru al tie retpaĝo : %1$s +\n2. Iru tien: %1$s \n3. Ensalutu kiam oni petas vin \n4. Kopiu la ligilon de profilo ke oni kondikis vin. Malŝaltu por malebligi ŝarĝajn bildetojn, konservi datumojn kaj uzadon de memoro. Ŝanĝoj forviŝas ambaŭ en-memoro kaj sur-disko bildo kaŝmemoro. @@ -242,7 +242,7 @@ Ludlistoj Spuroj Uzantoj - Malabonu + Malaboni Nova ongleto Elektu ongleton Kontrolo de volumena gesto @@ -291,8 +291,8 @@ Oni petos vin kie konservi ĉion elŝutaĵon. \nElektu AFM se vi volas elŝuti al ekstera SD-karto Uzu AFM - La Atinga Framo al la Memoro ebligas elŝuti al ekstera SD-karto. -\nKomento : kelkaj aparatoj ne kongruas + La Atinga Framo al la Memoro ebligas elŝuti al ekstera SD-karto. +\nKomento: kelkaj aparatoj ne kongruas Forviŝi ludajn poziciojn Forviŝi la totalon de ludaj pozicioj Ĉu vi volas forviŝi ĉiujn ludajn poziciojn \? @@ -437,7 +437,7 @@ Subtitoloj Modifi la dimension de la teksto kaj la fonajn stilojn de la subtitoloj de la ludilo. Ĝi bezonas restarto de la apo por efektiviĝi. 1 ero forviŝita. - NewPipe estas programaro sub rajtoceda permesilo: Vi povas uzi, studi, komuniki kaj plibonigi ĝin kiel vi volas. Precize, vi povas redistribui kaj/aŭ modifi ĝin sub la kondiĉojn de la Ĝenerala Publika Permesilo de GNU, kiel publikigita per la Free Software Foundation, ĉu en la versio 3, ĉu (se vi volas) ajna posta versio. + NewPipe estas programaro sub rajtoceda permesilo: Vi povas uzi, studi, komuniki kaj plibonigi ĝin kiel vi volas. Precize, vi povas redistribui kaj/aŭ modifi ĝin sub la kondiĉoj de la Ĝenerala Publika Permesilo de GNU, kiel publikigita per la Free Software Foundation, ĉu en la versio 3, ĉu (se vi volas) ajna posta versio. Ĉu vi volas ankaŭ importi agordojn\? Privateca politiko de NewPipe La NewPipe projekto respektas vian privatecon serioze. Konsekvence, la apo ne kolektas ajnan datumo sen via konsento. @@ -518,12 +518,12 @@ La lingvo ŝanĝos kiam la apo restartos. Rapida antaŭen / posten daŭron Instancoj de PeerTube - Registri viajn preferitajn instancojn de PeerTube - Trovu la instancojn kiu vi povus ŝati ĉe https://joinpeertube.org/instances#instances-list + Elekti viajn preferitajn instancojn de PeerTube + Trovu la instancojn kiu vi povus ŝati ĉe %s Aldoni instanco Eniri la ligilon de la instanco - Malsukcesis validigi instanco - Nur https ligiloj estas subtenitaj + Ne povis validigi instanco + Nur HTTPS ligiloj estas subtenitaj La instanco jam ekzistas Loka Freŝdate ĝisdatigita @@ -532,4 +532,6 @@ Reakiranta Ne povas reakiri tion elŝuton Elektu instancon + Enablu bildeta filmeton ĉe ŝlosita ekrano + Uzante la fona ludilo, bildeta filmeto vidiĝos ĉe ŝlosita ekrano \ No newline at end of file From 3afce82aa7352ccb4feccaca01982858868faca7 Mon Sep 17 00:00:00 2001 From: zmni Date: Sat, 11 Jan 2020 14:06:30 +0000 Subject: [PATCH 0135/1194] Translated using Weblate (Indonesian) Currently translated at 99.6% (523 of 525 strings) --- app/src/main/res/values-id/strings.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index 938837bd5..8677df678 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -510,4 +510,21 @@ %s mendengarkan Bahasa akan diterapkan setelah aplikasi dimulai ulang. + Situs PeerTube + Pilih situs PeerTube favorit anda + Temukan situs yang sesuai dengan anda di %s + Tambah situs + Masukkan URL situs + Tidak bisa memvalidasi situs + Hanya mendukung URL HTTPS + Situs sudah ada + Lokal + Baru-baru ini ditambahkan + Disukai terbanyak + Dibuat otomatis (pengunggah tidak ditemukan) + memulihkan + Tidak bisa memulihkan unduhan ini + Pilih situs + Aktifkan kunci layar thumbnail video + Ketika menggunakan pemutar latar belakang, thumbnail video akan ditampilkan di tampilan kunci layar \ No newline at end of file From 46cc21512039bbdd424239bef6e2d15649e14b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Wed, 8 Jan 2020 20:22:06 +0000 Subject: [PATCH 0136/1194] Translated using Weblate (Turkish) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-tr/strings.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 533c0d736..1ea8ad817 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -519,12 +519,12 @@ Uygulama yeniden başlatıldıktan sonra dil değişecektir. Hızlı ileri/geri sarma süresi PeerTube örnekleri - Favori peertube örneklerinizi ayarlayın - https://joinpeertube.org/instances#instances-list adresinde size en uygun örnekleri bulun + Favori PeerTube örneklerinizi seçin + %s adresinde size en uygun örnekleri bulun Örnek ekle Örnek URL\'sini girin Örnek doğrulanamadı - Yalnızca https URL\'leri desteklenmektedir + Yalnızca HTTPS URL\'leri desteklenmektedir Örnek zaten var Yerel Son eklenen @@ -533,4 +533,6 @@ kurtarılıyor Bu indirme kurtarılamıyor Bir örnek seçin + Kilit ekranı video küçük resmini etkinleştir + Arka plan oynatıcıyı kullanırken kilit ekranında bir video küçük resmi görüntülenecektir \ No newline at end of file From 2038df976c055ad45352e1ceec7e069da3f3bd07 Mon Sep 17 00:00:00 2001 From: WaldiS Date: Thu, 9 Jan 2020 18:26:47 +0000 Subject: [PATCH 0137/1194] Translated using Weblate (Polish) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-pl/strings.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 75ce1029d..e2a2ae80b 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -525,12 +525,12 @@ Język zmieni się po ponownym uruchomieniu aplikacji. Krok czasu przewijania Wystąpienia PeerTube - Ustaw swoje ulubione instancje peertube - Znajdź instancje, które najbardziej Ci odpowiadają, na https://joinpeertube.org/instances#instances-list + Wybierz swoje ulubione instancje PeerTube + Znajdź wystąpienia, które najbardziej Ci odpowiadają na %s Dodaj instancję Wprowadź adres URL instancji - Nie udało się sprawdzić poprawności instancji - Obsługiwane są tylko adresy URL https + Nie można sprawdzić poprawności instancji + Obsługiwane są tylko adresy URL HTTPS Instancja już istnieje Lokalny Ostatnio dodane @@ -539,4 +539,6 @@ odzyskiwanie Nie można odzyskać tego pobrania Wybierz instancję + Włącz miniaturę wideo na ekranie blokady + Podczas korzystania z odtwarzacza w tle na ekranie blokady zostanie wyświetlona miniatura filmu \ No newline at end of file From 31b830d6d0839427b328c7ae9f2b69741bd05089 Mon Sep 17 00:00:00 2001 From: Daniele Lira Mereb Date: Fri, 10 Jan 2020 01:09:46 +0000 Subject: [PATCH 0138/1194] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-pt-rBR/strings.xml | 40 +++++++++++++++------- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 9aeb53b3b..45fe51010 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -23,7 +23,7 @@ Noite Formato de áudio padrão Resolução padrão - Excluir + Apagar Não curtidas Curtidas Baixar @@ -134,7 +134,7 @@ abrir em modo popup Popup Segundo plano Lembrar tamanho e posição do popup - Lembrar do último tamanho e posição definido para o popup + Lembra da última posição e o tamanho usado no popup Popup Redimensionando Remove o áudio em ALGUMAS resoluções @@ -256,7 +256,7 @@ abrir em modo popup Sempre Uma vez Alterar orientação - Alterar para segundo plano + Trocar para segundo plano Trocar para popup Trocar para principal Players externos não suportam estes tipos de links @@ -271,7 +271,7 @@ abrir em modo popup Importar base de dados Exportar base de dados Sobrescreve seus dados como históricos e inscrições - Exportar históricos, inscrições e playlists + Exporta históricos, inscrições e playlists Exportado Importado Não há nenhum arquivo ZIP válido @@ -318,7 +318,7 @@ abrir em modo popup Usar pesquisa rápida A pesquisa rápida permite que o player procure resultados mais rapidamente porém com precisão reduzida Adicionar o próximo vídeo à fila automaticamente - Adicionar automaticamente um vídeo relacionado ao último da lista quando a repetição estiver desativada + Adiciona automaticamente um vídeo relacionado ao último da lista quando a repetição estiver desativada Arquivo Pasta não encontrada Origem do arquivo/conteúdo não encontrada @@ -361,7 +361,7 @@ abrir em modo popup Carregar capas Cache de imagens limpo Limpar metadados em cache - Exclui todos os dados de páginas em cache + Apaga todos os dados de páginas em cache Cache de metadados limpo Controles de velocidade de reprodução "Tempo " @@ -377,7 +377,7 @@ abrir em modo popup Altere o tamanho da legenda e o estilo da tela de fundo. É necessário reiniciar o aplicativo para ter efeito. Nenhum player instalado para reproduzir este arquivo Limpar histórico de assistidos - Apaga o histórico de vídeos assistidos e a lista de reprodução + Apaga o histórico de vídeos assistidos e a posição nas reproduções Apagar todo o histórico de assistidos\? Histórico de assistidos limpo. Limpar histórico de pesquisas @@ -485,9 +485,9 @@ abrir em modo popup Retomar a reprodução Retorna para a última posição em reprodução Posições em listas - Mostrar indicadores de posição em listas + Mostra indicadores de posição em listas Limpar dados - Posições de reprodução apagadas. + Posição nas reproduções apagadas. Arquivo movido ou excluído Já existe um arquivo com este nome Não foi possível sobrescrever o arquivo @@ -508,9 +508,9 @@ abrir em modo popup Usar SAF A Estrutura de Acesso ao Armazenamento permite baixar para um cartão SD. \nAviso: alguns dispositivos não são compatíveis - Apagar lista de reprodução - Deletar todo o histórico de reprodução - Deletar todo o histórico de reprodução\? + Limpar posição nas reproduções + Apaga o histórico de posição nas reproduções + Apagar toda posição nas reproduções\? Mude as pastas de download para surtir efeito Alterar serviço, selecionados: Quiosque Padrão @@ -527,4 +527,20 @@ abrir em modo popup O idioma será atualizado assim que o aplicativo for reiniciado. Duração do avançar/retroceder rápido Instâncias PeerTube + Selecione instâncias PeerTube favoritas + Encontre instâncias PeerTube em %s + Adicionar instância + Insira o link aqui + Não foi possível acessá-la + Apenas HTTPS são suportados + Instância já existe + Local + Recentes + Em alta + Gerado automaticamente (sem criador) + recuperando + Não foi possível recuperar o download + Escolha uma instância + Ativar capa do vídeo na tela de bloqueio + Mostra capa do vídeo na tela de bloqueio ao usar player em segundo plano \ No newline at end of file From 948d57d3d12df5691373fab78e9d280656432f11 Mon Sep 17 00:00:00 2001 From: Matsuri Date: Fri, 10 Jan 2020 03:54:47 +0000 Subject: [PATCH 0139/1194] Translated using Weblate (Chinese (Simplified)) Currently translated at 97.3% (511 of 525 strings) --- app/src/main/res/values-b+zh+HANS+CN/strings.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-b+zh+HANS+CN/strings.xml b/app/src/main/res/values-b+zh+HANS+CN/strings.xml index e246d54eb..cfa443afc 100644 --- a/app/src/main/res/values-b+zh+HANS+CN/strings.xml +++ b/app/src/main/res/values-b+zh+HANS+CN/strings.xml @@ -512,7 +512,7 @@ 没人在听 %s 人在听 - + 重新启动应用后,语言将更改。 PeerTube 服务器 @@ -531,4 +531,6 @@ 无法恢复此下载 选择一个服务器 快进 / 快退的单位时间 + 在锁屏界面显示视频缩略图 + 在后台播放时,锁屏界面将会显示视频的缩略图 \ No newline at end of file From bd8014bcbdac1cb9187424e14d77a44ffbbdf7af Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Thu, 9 Jan 2020 03:16:04 +0000 Subject: [PATCH 0140/1194] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-zh-rTW/strings.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 9713e4665..6cb16623f 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -515,12 +515,12 @@ 語言將會在重新啟動應用程式後變更。 快轉/快退搜尋持續時間 PeerTube 站臺 - 設定您最愛的 PeerTube 站臺 - 在 https://joinpeertube.org/instances#instances-list 上找到最適合您的站臺 + 選取您最愛的 PeerTube 站臺 + 在 %s 上找到最適合您的站臺 新增站臺 輸入站臺 URL - 驗證站臺失敗 - 僅支援 https URL + 無法驗證站臺 + 僅支援 HTTPS URL 站臺已存在 本機 最近新增 @@ -529,4 +529,6 @@ 正在恢復 無法復原此下載 選擇一個站臺 + 啟用鎖定畫面影片縮圖 + 使用背景播放器時,鎖定畫面上將會顯示影片縮圖 \ No newline at end of file From bfead79c07a3fd5593e5aae576d495426ba8a05c Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Wed, 8 Jan 2020 19:54:22 +0000 Subject: [PATCH 0141/1194] Translated using Weblate (Hebrew) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-he/strings.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml index f98fb7b3e..d1a72739d 100644 --- a/app/src/main/res/values-he/strings.xml +++ b/app/src/main/res/values-he/strings.xml @@ -531,12 +531,12 @@ קיוסק בררת מחדל משך קפיצה מהירה קדימה/אחורה מופעים של PeerTube - נא להגדיר את מופעי ה־peertube המועדפים עליך - איתור המופעים שהכי מתאימים לך תחת https://joinpeertube.org/instances#instances-list + נא לבחור את מופעי ה־PeerTube המועדפים עליך + איתור המופעים שהכי מתאימים לך תחת %s הוספת מופע נא להכניס כתובת מופע - אימות המופע נכשל - יש תמיכה בכתובות https בלבד + לא ניתן לאמת את המופע + יש תמיכה בכתובות HTTPS בלבד המופע כבר קיים מקומי נוספו לאחרונה @@ -545,4 +545,6 @@ בשחזור לא ניתן לשחזר את ההורדה הזאת נא לבחור מופע + הפעלת תמונה מוקטנת של הסרטון במסך הנעילה + בעת השימוש בנגן הרקע תופיע תמונה מוקטנת של הסרטון על מסך הנעילה \ No newline at end of file From 335e5c05dbe59a51442d4023be295ab9bf2eb84f Mon Sep 17 00:00:00 2001 From: MohammedSR Vevo Date: Thu, 9 Jan 2020 19:32:30 +0000 Subject: [PATCH 0142/1194] Translated using Weblate (Kurdish) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-ku/strings.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-ku/strings.xml b/app/src/main/res/values-ku/strings.xml index 938175f71..50350e1b3 100644 --- a/app/src/main/res/values-ku/strings.xml +++ b/app/src/main/res/values-ku/strings.xml @@ -497,8 +497,8 @@ کیۆسکی بنەڕەتی خێرا بردنە پێشەوە\\ گێڕانەوە بۆکاتی سەرەتا دۆخی PeerTube - ئارەزوومەندییەکانی دۆخی PeerTube ڕێکبخە - ئەو دۆخانە بدۆزەرەوە کە لەگەڵ خۆتدا دەگونجێن لە https://joinpeertube.org/instances#instances-list + ئارەزوومەندییەکانی دۆخی پێرتوبی ڕێکبخە + ئەو دۆخانە بدۆزەرەوە کە لەگەڵ خۆتدا دەگونجێن لە %s زیادکردنی دۆخ بەستەری دۆخ دابنێ ناتوانرێ پشتگیری دۆخەکە بکرێ @@ -536,4 +536,6 @@ دەگەڕێنرێتەوە ناتوانرێ ئەم داگرتنە بهێنرێتەوە دۆخێک هەڵبژێرە + چالاککردنی وێنۆچکەی ڤیدیۆی داخستنی ڕوونما + کاتێ کارپێکەری پاشبنەما کاردەکات ئەوا وێنۆچکەی ڤیدیۆکە لە ڕوونما داخراوەکەدا نیشاندەدرێت \ No newline at end of file From 92b1fa5743bbeed427685622ff1b996d45dca68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Thu, 9 Jan 2020 17:28:27 +0000 Subject: [PATCH 0143/1194] =?UTF-8?q?Translated=20using=20Weblate=20(Norwe?= =?UTF-8?q?gian=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 96.2% (505 of 525 strings) --- app/src/main/res/values-nb-rNO/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 8afd21f54..1038d15c4 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -517,4 +517,8 @@ Språk vil ikke bli endret før programmet startes på ny. Forvalgt kiosk PeerTube-instanser + Lokal + Nylig lagt til + Mest likt + Velg en instans \ No newline at end of file From 1a8be2bbf5aaba87fe82edab61477c002122ae84 Mon Sep 17 00:00:00 2001 From: Software In Interlingua Date: Sat, 11 Jan 2020 11:58:45 +0000 Subject: [PATCH 0144/1194] Translated using Weblate (Interlingua) Currently translated at 11.4% (60 of 525 strings) --- app/src/main/res/values-ia/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/res/values-ia/strings.xml b/app/src/main/res/values-ia/strings.xml index f077e3e24..6bbcac7b3 100644 --- a/app/src/main/res/values-ia/strings.xml +++ b/app/src/main/res/values-ia/strings.xml @@ -33,4 +33,5 @@ Pausar le discargas Seliger un instantia Non poteva connecter con le servitor + %1$s vistas \ No newline at end of file From 36e38e50e950d1988db5c8c6fedb227d7aa215ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=ADs=20B?= Date: Mon, 13 Jan 2020 13:23:43 +0000 Subject: [PATCH 0145/1194] Translated using Weblate (Occitan) Currently translated at 10.1% (53 of 525 strings) --- app/src/main/res/values-oc/strings.xml | 32 ++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-oc/strings.xml b/app/src/main/res/values-oc/strings.xml index 0e5b7ccd6..190c2c890 100644 --- a/app/src/main/res/values-oc/strings.xml +++ b/app/src/main/res/values-oc/strings.xml @@ -1,2 +1,30 @@ - - + + + %1$s vistas + Publicat lo %1$s + Cap de lector de flus trobat. Volètz installar VLC\? + Cap de lector de flus trobat (podètz installar VLC per lo legir). + Installar + Anullar + Dobrir dins lo navegador + Dobrir en mòde fenestron + Partejar + Telecargar + Telecargar lo fichièr de flus + Recercar + Paramètres + Voliatz dire: %1$s\? + Partejar amb + Causir un navegador + rotacion + Utilizar un lector de vidèo extèrne + Mòde fenestron de NewPipe + S\'abonar + Abonat + Anullar abonament + Impossible de cambiar l\'abonament + Impossible d\'actualizar l\'abonament + Afichar las informacions + Principal + Abonaments + \ No newline at end of file From 3d93ecd6ec35467191178e35dc64ca8a7716e41d Mon Sep 17 00:00:00 2001 From: TobiGr Date: Mon, 13 Jan 2020 20:25:32 +0100 Subject: [PATCH 0146/1194] Use Integer value directly for formatted string a --- .../main/java/us/shandian/giga/ui/adapter/MissionAdapter.java | 2 +- app/src/main/res/values/strings.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java index fac196e0b..aaf7826ef 100644 --- a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java +++ b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java @@ -580,7 +580,7 @@ public class MissionAdapter extends Adapter implements Handler.Callb } applyChanges(); - String msg = String.format(mContext.getString(R.string.deleted_downloads), String.valueOf(mHidden.size())); + String msg = String.format(mContext.getString(R.string.deleted_downloads), mHidden.size()); mSnackbar = Snackbar.make(mView, msg, Snackbar.LENGTH_INDEFINITE); mSnackbar.setAction(R.string.undo, s -> { Iterator i = mHidden.iterator(); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 431f05d5a..e1b2cc0a4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -572,7 +572,7 @@ Clear download history Do you want to clear your download history or delete all downloaded files? Delete downloaded files - Deleted %s downloads + Deleted %1$s downloads Stop Maximum retries Maximum number of attempts before canceling the download From 9d773d6e8aa892e929439ba62d2a0985f4e8deb4 Mon Sep 17 00:00:00 2001 From: Karol Kaminski Date: Mon, 13 Jan 2020 20:28:32 +0100 Subject: [PATCH 0147/1194] removed dot menu where its no longer needed --- app/src/main/java/org/schabi/newpipe/MainActivity.java | 10 ---------- .../java/org/schabi/newpipe/about/AboutActivity.java | 5 ----- .../org/schabi/newpipe/download/DownloadActivity.java | 6 +----- .../schabi/newpipe/player/ServicePlayerActivity.java | 4 ---- app/src/main/res/menu/download_menu.xml | 4 ---- app/src/main/res/menu/menu_about.xml | 10 ---------- app/src/main/res/menu/menu_play_queue.xml | 5 ----- 7 files changed, 1 insertion(+), 43 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 90d299c7f..2dfbb9c69 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -551,8 +551,6 @@ public class MainActivity extends AppCompatActivity { if (!(fragment instanceof SearchFragment)) { findViewById(R.id.toolbar).findViewById(R.id.toolbar_search_container).setVisibility(View.GONE); - MenuInflater inflater = getMenuInflater(); - inflater.inflate(R.menu.main_menu, menu); } ActionBar actionBar = getSupportActionBar(); @@ -574,14 +572,6 @@ public class MainActivity extends AppCompatActivity { case android.R.id.home: onHomeButtonPressed(); return true; - case R.id.action_show_downloads: - return NavigationHelper.openDownloads(this); - case R.id.action_history: - NavigationHelper.openStatisticFragment(getSupportFragmentManager()); - return true; - case R.id.action_settings: - NavigationHelper.openSettings(this); - return true; default: return super.onOptionsItemSelected(item); } diff --git a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java index 2326e795e..e028c0322 100644 --- a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java +++ b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java @@ -99,11 +99,6 @@ public class AboutActivity extends AppCompatActivity { case android.R.id.home: finish(); return true; - case R.id.action_settings: - NavigationHelper.openSettings(this); - return true; - case R.id.action_show_downloads: - return NavigationHelper.openDownloads(this); } return super.onOptionsItemSelected(item); diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java index 449a790e8..26e5d94be 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java @@ -78,11 +78,7 @@ public class DownloadActivity extends AppCompatActivity { onBackPressed(); return true; } - case R.id.action_settings: { - Intent intent = new Intent(this, SettingsActivity.class); - startActivity(intent); - return true; - } + default: return super.onOptionsItemSelected(item); } 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 2207808ac..7b9120783 100644 --- a/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java +++ b/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java @@ -157,10 +157,6 @@ public abstract class ServicePlayerActivity extends AppCompatActivity case R.id.action_append_playlist: appendAllToPlaylist(); return true; - case R.id.action_settings: - NavigationHelper.openSettings(this); - redraw = true; - return true; case R.id.action_system_audio: startActivity(new Intent(Settings.ACTION_SOUND_SETTINGS)); return true; diff --git a/app/src/main/res/menu/download_menu.xml b/app/src/main/res/menu/download_menu.xml index f91f8ad7b..0ffb3a580 100644 --- a/app/src/main/res/menu/download_menu.xml +++ b/app/src/main/res/menu/download_menu.xml @@ -27,8 +27,4 @@ android:title="@string/clear_finished_download" app:showAsAction="ifRoom" /> - - diff --git a/app/src/main/res/menu/menu_about.xml b/app/src/main/res/menu/menu_about.xml index 673cef94b..dbe91a04f 100644 --- a/app/src/main/res/menu/menu_about.xml +++ b/app/src/main/res/menu/menu_about.xml @@ -3,14 +3,4 @@ xmlns:tools="http://schemas.android.com/tools" tools:context="org.schabi.newpipe.about.AboutActivity"> - - - - diff --git a/app/src/main/res/menu/menu_play_queue.xml b/app/src/main/res/menu/menu_play_queue.xml index 6261b8c18..5413794be 100644 --- a/app/src/main/res/menu/menu_play_queue.xml +++ b/app/src/main/res/menu/menu_play_queue.xml @@ -10,11 +10,6 @@ android:visible="true" app:showAsAction="ifRoom"/> - - Date: Mon, 13 Jan 2020 20:40:11 +0100 Subject: [PATCH 0148/1194] Update extractor version TeamNewPipe/NewPipeExtractor@bdbfa268355fea58d3a11ac2fae61a066f7fb693 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index f7017a6df..219d2b202 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -62,7 +62,7 @@ dependencies { exclude module: 'support-annotations' }) - implementation 'com.github.TeamNewPipe:NewPipeExtractor:8e53fda' + implementation 'com.github.TeamNewPipe:NewPipeExtractor:bdbfa26' testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:2.23.0' From 42ec6f0810332904fbb22d1d3dd87a8ce442c655 Mon Sep 17 00:00:00 2001 From: kapodamy Date: Tue, 14 Jan 2020 00:00:45 -0300 Subject: [PATCH 0149/1194] ttml to srt conversion rewrite SubtitleConverter (use JSoup library instead, remove unused methods) --- .../newpipe/download/DownloadDialog.java | 1 - .../newpipe/streams/SrtFromTtmlWriter.java | 95 +++++ .../newpipe/streams/SubtitleConverter.java | 369 ------------------ .../giga/postprocessing/TtmlConverter.java | 32 +- 4 files changed, 100 insertions(+), 397 deletions(-) create mode 100644 app/src/main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java delete mode 100644 app/src/main/java/org/schabi/newpipe/streams/SubtitleConverter.java diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java index 853bb6d68..44966744b 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java @@ -832,7 +832,6 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck psArgs = new String[]{ selectedStream.getFormat().getSuffix(), "false",// ignore empty frames - "false",// detect youtube duplicate lines }; } break; diff --git a/app/src/main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java b/app/src/main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java new file mode 100644 index 000000000..75e16edad --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java @@ -0,0 +1,95 @@ +package org.schabi.newpipe.streams; + +import org.jsoup.Jsoup; +import org.jsoup.nodes.Document; +import org.jsoup.nodes.Element; +import org.jsoup.nodes.Node; +import org.jsoup.nodes.TextNode; +import org.jsoup.parser.Parser; +import org.jsoup.select.Elements; +import org.schabi.newpipe.streams.io.SharpStream; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.nio.charset.Charset; +import java.text.ParseException; + +/** + * @author kapodamy + */ +public class SrtFromTtmlWriter { + private static final String NEW_LINE = "\r\n"; + + private SharpStream out; + private boolean ignoreEmptyFrames; + private final Charset charset = Charset.forName("utf-8"); + + private int frameIndex = 0; + + public SrtFromTtmlWriter(SharpStream out, boolean ignoreEmptyFrames) { + this.out = out; + this.ignoreEmptyFrames = true; + } + + private static String getTimestamp(Element frame, String attr) { + return frame + .attr(attr) + .replace('.', ',');// Str uses comma as decimal separator + } + + private void writeFrame(String begin, String end, StringBuilder text) throws IOException { + writeString(String.valueOf(frameIndex++)); + writeString(NEW_LINE); + writeString(begin); + writeString(" --> "); + writeString(end); + writeString(NEW_LINE); + writeString(text.toString()); + writeString(NEW_LINE); + writeString(NEW_LINE); + } + + private void writeString(String text) throws IOException { + out.write(text.getBytes(charset)); + } + + public void build(SharpStream ttml) throws IOException { + /* + * TTML parser with BASIC support + * multiple CUE is not supported + * styling is not supported + * tag timestamps (in auto-generated subtitles) are not supported, maybe in the future + * also TimestampTagOption enum is not applicable + * Language parsing is not supported + */ + + // parse XML + byte[] buffer = new byte[(int) ttml.available()]; + ttml.read(buffer); + Document doc = Jsoup.parse(new ByteArrayInputStream(buffer), "UTF-8", "", Parser.xmlParser()); + + StringBuilder text = new StringBuilder(128); + Elements paragraph_list = doc.select("body>div>p"); + + // check if has frames + if (paragraph_list.size() < 1) return; + + for (Element paragraph : paragraph_list) { + text.setLength(0); + + for (Node children : paragraph.childNodes()) { + if (children instanceof TextNode) + text.append(((TextNode) children).text()); + else if (children instanceof Element && ((Element) children).tagName().equalsIgnoreCase("br")) + text.append(NEW_LINE); + } + + if (ignoreEmptyFrames && text.length() < 1) continue; + + String begin = getTimestamp(paragraph, "begin"); + String end = getTimestamp(paragraph, "end"); + + writeFrame(begin, end, text); + } + } +} diff --git a/app/src/main/java/org/schabi/newpipe/streams/SubtitleConverter.java b/app/src/main/java/org/schabi/newpipe/streams/SubtitleConverter.java deleted file mode 100644 index c41db4373..000000000 --- a/app/src/main/java/org/schabi/newpipe/streams/SubtitleConverter.java +++ /dev/null @@ -1,369 +0,0 @@ -package org.schabi.newpipe.streams; - -import org.schabi.newpipe.streams.io.SharpStream; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.nio.charset.Charset; -import java.text.ParseException; -import java.util.Locale; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.xpath.XPathExpressionException; - -/** - * @author kapodamy - */ -public class SubtitleConverter { - private static final String NEW_LINE = "\r\n"; - - public void dumpTTML(SharpStream in, final SharpStream out, final boolean ignoreEmptyFrames, final boolean detectYoutubeDuplicateLines - ) throws IOException, ParseException, SAXException, ParserConfigurationException, XPathExpressionException { - - final FrameWriter callback = new FrameWriter() { - int frameIndex = 0; - final Charset charset = Charset.forName("utf-8"); - - @Override - public void yield(SubtitleFrame frame) throws IOException { - if (ignoreEmptyFrames && frame.isEmptyText()) { - return; - } - out.write(String.valueOf(frameIndex++).getBytes(charset)); - out.write(NEW_LINE.getBytes(charset)); - out.write(getTime(frame.start, true).getBytes(charset)); - out.write(" --> ".getBytes(charset)); - out.write(getTime(frame.end, true).getBytes(charset)); - out.write(NEW_LINE.getBytes(charset)); - out.write(frame.text.getBytes(charset)); - out.write(NEW_LINE.getBytes(charset)); - out.write(NEW_LINE.getBytes(charset)); - } - }; - - read_xml_based(in, callback, detectYoutubeDuplicateLines, - "tt", "xmlns", "http://www.w3.org/ns/ttml", - new String[]{"timedtext", "head", "wp"}, - new String[]{"body", "div", "p"}, - "begin", "end", true - ); - } - - private void read_xml_based(SharpStream source, FrameWriter callback, boolean detectYoutubeDuplicateLines, - String root, String formatAttr, String formatVersion, String[] cuePath, String[] framePath, - String timeAttr, String durationAttr, boolean hasTimestamp - ) throws IOException, ParseException, SAXException, ParserConfigurationException, XPathExpressionException { - /* - * XML based subtitles parser with BASIC support - * multiple CUE is not supported - * styling is not supported - * tag timestamps (in auto-generated subtitles) are not supported, maybe in the future - * also TimestampTagOption enum is not applicable - * Language parsing is not supported - */ - - byte[] buffer = new byte[(int) source.available()]; - source.read(buffer); - - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(true); - DocumentBuilder builder = factory.newDocumentBuilder(); - Document xml = builder.parse(new ByteArrayInputStream(buffer)); - - String attr; - - // get the format version or namespace - Element node = xml.getDocumentElement(); - - if (node == null) { - throw new ParseException("Can't get the format version. ¿wrong namespace?", -1); - } else if (!node.getNodeName().equals(root)) { - throw new ParseException("Invalid root", -1); - } - - if (formatAttr.equals("xmlns")) { - if (!node.getNamespaceURI().equals(formatVersion)) { - throw new UnsupportedOperationException("Expected xml namespace: " + formatVersion); - } - } else { - attr = node.getAttributeNS(formatVersion, formatAttr); - if (attr == null) { - throw new ParseException("Can't get the format attribute", -1); - } - if (!attr.equals(formatVersion)) { - throw new ParseException("Invalid format version : " + attr, -1); - } - } - - NodeList node_list; - - int line_break = 0;// Maximum characters per line if present (valid for TranScript v3) - - if (!hasTimestamp) { - node_list = selectNodes(xml, cuePath, formatVersion); - - if (node_list != null) { - // if the subtitle has multiple CUEs, use the highest value - for (int i = 0; i < node_list.getLength(); i++) { - try { - int tmp = Integer.parseInt(((Element) node_list.item(i)).getAttributeNS(formatVersion, "ah")); - if (tmp > line_break) { - line_break = tmp; - } - } catch (Exception err) { - } - } - } - } - - // parse every frame - node_list = selectNodes(xml, framePath, formatVersion); - - if (node_list == null) { - return;// no frames detected - } - - int fs_ff = -1;// first timestamp of first frame - boolean limit_lines = false; - - for (int i = 0; i < node_list.getLength(); i++) { - Element elem = (Element) node_list.item(i); - SubtitleFrame obj = new SubtitleFrame(); - obj.text = elem.getTextContent(); - - attr = elem.getAttribute(timeAttr);// ¡this cant be null! - obj.start = hasTimestamp ? parseTimestamp(attr) : Integer.parseInt(attr); - - attr = elem.getAttribute(durationAttr); - if (obj.text == null || attr == null) { - continue;// normally is a blank line (on auto-generated subtitles) ignore - } - - if (hasTimestamp) { - obj.end = parseTimestamp(attr); - - if (detectYoutubeDuplicateLines) { - if (limit_lines) { - int swap = obj.end; - obj.end = fs_ff; - fs_ff = swap; - } else { - if (fs_ff < 0) { - fs_ff = obj.end; - } else { - if (fs_ff < obj.start) { - limit_lines = true;// the subtitles has duplicated lines - } else { - detectYoutubeDuplicateLines = false; - } - } - } - } - } else { - obj.end = obj.start + Integer.parseInt(attr); - } - - if (/*node.getAttribute("w").equals("1") &&*/line_break > 1 && obj.text.length() > line_break) { - - // implement auto line breaking (once) - StringBuilder text = new StringBuilder(obj.text); - obj.text = null; - - switch (text.charAt(line_break)) { - case ' ': - case '\t': - putBreakAt(line_break, text); - break; - default:// find the word start position - for (int j = line_break - 1; j > 0; j--) { - switch (text.charAt(j)) { - case ' ': - case '\t': - putBreakAt(j, text); - j = -1; - break; - case '\r': - case '\n': - j = -1;// long word, just ignore - break; - } - } - break; - } - - obj.text = text.toString();// set the processed text - } - - callback.yield(obj); - } - } - - private static NodeList selectNodes(Document xml, String[] path, String namespaceUri) { - Element ref = xml.getDocumentElement(); - - for (int i = 0; i < path.length - 1; i++) { - NodeList nodes = ref.getChildNodes(); - if (nodes.getLength() < 1) { - return null; - } - - Element elem; - for (int j = 0; j < nodes.getLength(); j++) { - if (nodes.item(j).getNodeType() == Node.ELEMENT_NODE) { - elem = (Element) nodes.item(j); - if (elem.getNodeName().equals(path[i]) && elem.getNamespaceURI().equals(namespaceUri)) { - ref = elem; - break; - } - } - } - } - - return ref.getElementsByTagNameNS(namespaceUri, path[path.length - 1]); - } - - private static int parseTimestamp(String multiImpl) throws NumberFormatException, ParseException { - if (multiImpl.length() < 1) { - return 0; - } else if (multiImpl.length() == 1) { - return Integer.parseInt(multiImpl) * 1000;// ¡this must be a number in seconds! - } - - // detect wallclock-time - if (multiImpl.startsWith("wallclock(")) { - throw new UnsupportedOperationException("Parsing wallclock timestamp is not implemented"); - } - - // detect offset-time - if (multiImpl.indexOf(':') < 0) { - int multiplier = 1000; - char metric = multiImpl.charAt(multiImpl.length() - 1); - switch (metric) { - case 'h': - multiplier *= 3600000; - break; - case 'm': - multiplier *= 60000; - break; - case 's': - if (multiImpl.charAt(multiImpl.length() - 2) == 'm') { - multiplier = 1;// ms - } - break; - default: - if (!Character.isDigit(metric)) { - throw new NumberFormatException("Invalid metric suffix found on : " + multiImpl); - } - metric = '\0'; - break; - } - try { - String offset_time = multiImpl; - - if (multiplier == 1) { - offset_time = offset_time.substring(0, offset_time.length() - 2); - } else if (metric != '\0') { - offset_time = offset_time.substring(0, offset_time.length() - 1); - } - - double time_metric_based = Double.parseDouble(offset_time); - if (Math.abs(time_metric_based) <= Double.MAX_VALUE) { - return (int) (time_metric_based * multiplier); - } - } catch (Exception err) { - throw new UnsupportedOperationException("Invalid or not implemented timestamp on: " + multiImpl); - } - } - - // detect clock-time - int time = 0; - String[] units = multiImpl.split(":"); - - if (units.length < 3) { - throw new ParseException("Invalid clock-time timestamp", -1); - } - - time += Integer.parseInt(units[0]) * 3600000;// hours - time += Integer.parseInt(units[1]) * 60000;//minutes - time += Float.parseFloat(units[2]) * 1000f;// seconds and milliseconds (if present) - - // frames and sub-frames are ignored (not implemented) - // time += units[3] * fps; - return time; - } - - private static void putBreakAt(int idx, StringBuilder str) { - // this should be optimized at compile time - - if (NEW_LINE.length() > 1) { - str.delete(idx, idx + 1);// remove after replace - str.insert(idx, NEW_LINE); - } else { - str.setCharAt(idx, NEW_LINE.charAt(0)); - } - } - - private static String getTime(int time, boolean comma) { - // cast every value to integer to avoid auto-round in ToString("00"). - StringBuilder str = new StringBuilder(12); - str.append(numberToString(time / 1000 / 3600, 2));// hours - str.append(':'); - str.append(numberToString(time / 1000 / 60 % 60, 2));// minutes - str.append(':'); - str.append(numberToString(time / 1000 % 60, 2));// seconds - str.append(comma ? ',' : '.'); - str.append(numberToString(time % 1000, 3));// miliseconds - - return str.toString(); - } - - private static String numberToString(int nro, int pad) { - return String.format(Locale.ENGLISH, "%0".concat(String.valueOf(pad)).concat("d"), nro); - } - - - /****************** - * helper classes * - ******************/ - - private interface FrameWriter { - - void yield(SubtitleFrame frame) throws IOException; - } - - private static class SubtitleFrame { - //Java no support unsigned int - - public int end; - public int start; - public String text = ""; - - private boolean isEmptyText() { - if (text == null) { - return true; - } - - for (int i = 0; i < text.length(); i++) { - switch (text.charAt(i)) { - case ' ': - case '\t': - case '\r': - case '\n': - break; - default: - return false; - } - } - - return true; - } - } - -} diff --git a/app/src/main/java/us/shandian/giga/postprocessing/TtmlConverter.java b/app/src/main/java/us/shandian/giga/postprocessing/TtmlConverter.java index 5a5b687f7..8ed0dfae5 100644 --- a/app/src/main/java/us/shandian/giga/postprocessing/TtmlConverter.java +++ b/app/src/main/java/us/shandian/giga/postprocessing/TtmlConverter.java @@ -2,15 +2,10 @@ package us.shandian.giga.postprocessing; import android.util.Log; -import org.schabi.newpipe.streams.SubtitleConverter; +import org.schabi.newpipe.streams.SrtFromTtmlWriter; import org.schabi.newpipe.streams.io.SharpStream; -import org.xml.sax.SAXException; import java.io.IOException; -import java.text.ParseException; - -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.xpath.XPathExpressionException; /** * @author kapodamy @@ -27,33 +22,16 @@ class TtmlConverter extends Postprocessing { int process(SharpStream out, SharpStream... sources) throws IOException { // check if the subtitle is already in srt and copy, this should never happen String format = getArgumentAt(0, null); + boolean ignoreEmptyFrames = getArgumentAt(1, "true").equals("true"); if (format == null || format.equals("ttml")) { - SubtitleConverter ttmlDumper = new SubtitleConverter(); + SrtFromTtmlWriter writer = new SrtFromTtmlWriter(out, ignoreEmptyFrames); try { - ttmlDumper.dumpTTML( - sources[0], - out, - getArgumentAt(1, "true").equals("true"), - getArgumentAt(2, "true").equals("true") - ); + writer.build(sources[0]); } catch (Exception err) { Log.e(TAG, "subtitle parse failed", err); - - if (err instanceof IOException) { - return 1; - } else if (err instanceof ParseException) { - return 2; - } else if (err instanceof SAXException) { - return 3; - } else if (err instanceof ParserConfigurationException) { - return 4; - } else if (err instanceof XPathExpressionException) { - return 7; - } - - return 8; + return err instanceof IOException ? 1 : 8; } return OK_RESULT; From 49cc643dccefc66585b883d6ce8b1db858f88ef0 Mon Sep 17 00:00:00 2001 From: kapodamy Date: Mon, 13 Jan 2020 21:25:26 -0300 Subject: [PATCH 0150/1194] decrease the size of samples per chunk --- .../newpipe/streams/Mp4FromDashWriter.java | 179 +++++++++++++----- 1 file changed, 129 insertions(+), 50 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java b/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java index 818f6148e..f94ebefb0 100644 --- a/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java +++ b/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java @@ -11,6 +11,7 @@ import org.schabi.newpipe.streams.io.SharpStream; import java.io.IOException; import java.nio.ByteBuffer; +import java.util.ArrayList; /** * @author kapodamy @@ -23,7 +24,6 @@ public class Mp4FromDashWriter { private final static byte SAMPLES_PER_CHUNK = 6;// ffmpeg uses 2, basic uses 1 (with 60fps uses 21 or 22). NewPipe will use 6 private final static long THRESHOLD_FOR_CO64 = 0xFFFEFFFFL;// near 3.999 GiB private final static int THRESHOLD_MOOV_LENGTH = (256 * 1024) + (2048 * 1024); // 2.2 MiB enough for: 1080p 60fps 00h35m00s - private final static short SINGLE_CHUNK_SAMPLE_BUFFER = 256; private final long time; @@ -46,6 +46,8 @@ public class Mp4FromDashWriter { private int overrideMainBrand = 0x00; + private ArrayList compatibleBrands = new ArrayList<>(5); + public Mp4FromDashWriter(SharpStream... sources) throws IOException { for (SharpStream src : sources) { if (!src.canRewind() && !src.canRead()) { @@ -57,6 +59,10 @@ public class Mp4FromDashWriter { readers = new Mp4DashReader[sourceTracks.length]; readersChunks = new Mp4DashChunk[readers.length]; time = (System.currentTimeMillis() / 1000L) + EPOCH_OFFSET; + + compatibleBrands.add(0x6D703431);// mp41 + compatibleBrands.add(0x69736F6D);// isom + compatibleBrands.add(0x69736F32);// iso2 } public Mp4Track[] getTracksFromSource(int sourceIndex) throws IllegalStateException { @@ -104,8 +110,8 @@ public class Mp4FromDashWriter { } } - public void setMainBrand(int brandId) { - overrideMainBrand = brandId; + public void setMainBrand(int brand) { + overrideMainBrand = brand; } public boolean isDone() { @@ -159,7 +165,13 @@ public class Mp4FromDashWriter { tablesInfo[i] = new TablesInfo(); } - boolean singleChunk = tracks.length == 1 && tracks[0].kind == TrackKind.Audio; + int single_sample_buffer; + if (tracks.length == 1 && tracks[0].kind == TrackKind.Audio) { + // near 1 second of audio data per chunk, avoid split the audio stream in large chunks + single_sample_buffer = tracks[0].trak.mdia.mdhd_timeScale / 1000; + } else { + single_sample_buffer = -1; + } for (int i = 0; i < readers.length; i++) { @@ -210,31 +222,10 @@ public class Mp4FromDashWriter { readers[i].rewind(); - int tmp = tablesInfo[i].stsz - SAMPLES_PER_CHUNK_INIT; - tablesInfo[i].stco = (tmp / SAMPLES_PER_CHUNK) + 1;// +1 for samples in first chunk - - tmp = tmp % SAMPLES_PER_CHUNK; - if (singleChunk) { - // avoid split audio streams in chunks - tablesInfo[i].stsc = 1; - tablesInfo[i].stsc_bEntries = new int[]{ - 1, tablesInfo[i].stsz, 1 - }; - tablesInfo[i].stco = 1; - } else if (tmp == 0) { - tablesInfo[i].stsc = 2;// first chunk (init) and succesive chunks - tablesInfo[i].stsc_bEntries = new int[]{ - 1, SAMPLES_PER_CHUNK_INIT, 1, - 2, SAMPLES_PER_CHUNK, 1 - }; + if (single_sample_buffer > 0) { + initChunkTables(tablesInfo[i], single_sample_buffer, single_sample_buffer); } else { - tablesInfo[i].stsc = 3;// first chunk (init) and successive chunks and remain chunk - tablesInfo[i].stsc_bEntries = new int[]{ - 1, SAMPLES_PER_CHUNK_INIT, 1, - 2, SAMPLES_PER_CHUNK, 1, - tablesInfo[i].stco + 1, tmp, 1 - }; - tablesInfo[i].stco++; + initChunkTables(tablesInfo[i], SAMPLES_PER_CHUNK_INIT, SAMPLES_PER_CHUNK); } sampleCount[i] = tablesInfo[i].stsz; @@ -274,6 +265,7 @@ public class Mp4FromDashWriter { // reserve moov space in the output stream /*if (outStream.canSetLength()) { long length = writeOffset + auxSize; + // warning: setLength() does not fill the unused space with zeros outStream.setLength(length); outSeek(length); } else {*/ @@ -292,10 +284,10 @@ public class Mp4FromDashWriter { } // tablesInfo contains row counts - // and after returning from make_moov() will contain table offsets + // and after returning from make_moov() will contain those table offsets make_moov(defaultMediaTime, tablesInfo, is64); - // write tables: stts stsc + // write tables: stts stsc sbgp // reset for ctts table: sampleCount sampleExtra for (int i = 0; i < readers.length; i++) { writeEntryArray(tablesInfo[i].stts, 2, sampleCount[i], defaultSampleDuration[i]); @@ -305,6 +297,7 @@ public class Mp4FromDashWriter { sampleCount[i] = 1;// the index is not base zero sampleExtra[i] = -1; } + writeEntryArray(tablesInfo[i].sbgp, 1, sampleCount[i]); } if (auxBuffer == null) { @@ -314,8 +307,8 @@ public class Mp4FromDashWriter { outWrite(make_mdat(totalSampleSize, is64)); int[] sampleIndex = new int[readers.length]; - int[] sizes = new int[singleChunk ? SINGLE_CHUNK_SAMPLE_BUFFER : SAMPLES_PER_CHUNK]; - int[] sync = new int[singleChunk ? SINGLE_CHUNK_SAMPLE_BUFFER : SAMPLES_PER_CHUNK]; + int[] sizes = new int[single_sample_buffer > 0 ? single_sample_buffer : SAMPLES_PER_CHUNK]; + int[] sync = new int[single_sample_buffer > 0 ? single_sample_buffer : SAMPLES_PER_CHUNK]; int written = readers.length; while (written > 0) { @@ -329,8 +322,8 @@ public class Mp4FromDashWriter { long chunkOffset = writeOffset; int syncCount = 0; int limit; - if (singleChunk) { - limit = SINGLE_CHUNK_SAMPLE_BUFFER; + if (single_sample_buffer > 0) { + limit = single_sample_buffer; } else { limit = sampleIndex[i] == 0 ? SAMPLES_PER_CHUNK_INIT : SAMPLES_PER_CHUNK; } @@ -390,10 +383,6 @@ public class Mp4FromDashWriter { } else { tablesInfo[i].stco = writeEntryArray(tablesInfo[i].stco, 1, (int) chunkOffset); } - - if (singleChunk) { - tablesInfo[i].stco = -1; - } } outRestore(); @@ -470,7 +459,42 @@ public class Mp4FromDashWriter { } } + private void initChunkTables(TablesInfo tables, int firstCount, int succesiveCount) { + // tables.stsz holds amount of samples of the track (total) + int totalSamples = (tables.stsz - firstCount); + float chunkAmount = totalSamples / (float) succesiveCount; + int remainChunkOffset = (int) Math.ceil(chunkAmount); + boolean remain = remainChunkOffset != (int) chunkAmount; + int index = 0; + tables.stsc = 1; + if (firstCount != succesiveCount) { + tables.stsc++; + } + if (remain) { + tables.stsc++; + } + + // stsc_table_entry = [first_chunk, samples_per_chunk, sample_description_index] + tables.stsc_bEntries = new int[tables.stsc * 3]; + tables.stco = remainChunkOffset + 1;// total entrys in chunk offset box + + tables.stsc_bEntries[index++] = 1; + tables.stsc_bEntries[index++] = firstCount; + tables.stsc_bEntries[index++] = 1; + + if (firstCount != succesiveCount) { + tables.stsc_bEntries[index++] = 2; + tables.stsc_bEntries[index++] = succesiveCount; + tables.stsc_bEntries[index++] = 1; + } + + if (remain) { + tables.stsc_bEntries[index++] = remainChunkOffset + 1; + tables.stsc_bEntries[index++] = totalSamples % succesiveCount; + tables.stsc_bEntries[index] = 1; + } + } private void outWrite(byte[] buffer) throws IOException { outWrite(buffer, buffer.length); @@ -585,19 +609,29 @@ public class Mp4FromDashWriter { private int make_ftyp() throws IOException { - byte[] buffer = new byte[]{ - 0x00, 0x00, 0x00, 0x1C, 0x66, 0x74, 0x79, 0x70,// ftyp - 0x6D, 0x70, 0x34, 0x32,// mayor brand (mp42) - 0x00, 0x00, 0x02, 0x00,// default minor version (512) - 0x6D, 0x70, 0x34, 0x31, 0x69, 0x73, 0x6F, 0x6D, 0x69, 0x73, 0x6F, 0x32// compatible brands: mp41 isom iso2 - }; + int size = 16 + (compatibleBrands.size() * 4); + if (overrideMainBrand != 0) size += 4; - if (overrideMainBrand != 0) - ByteBuffer.wrap(buffer).putInt(8, overrideMainBrand); + ByteBuffer buffer = ByteBuffer.allocate(size); + buffer.putInt(size); + buffer.putInt(0x66747970);// "ftyp" - outWrite(buffer); + if (overrideMainBrand == 0) { + buffer.putInt(0x6D703432);// mayor brand "mp42" + buffer.putInt(512);// default minor version + } else { + buffer.putInt(overrideMainBrand); + buffer.putInt(0); + buffer.putInt(0x6D703432);// "mp42" compatible brand + } - return buffer.length; + for (Integer brand : compatibleBrands) { + buffer.putInt(brand);// compatible brand + } + + outWrite(buffer.array()); + + return size; } private byte[] make_mdat(long refSize, boolean is64) { @@ -746,7 +780,6 @@ public class Mp4FromDashWriter { } private void make_mdia(Mdia mdia, TablesInfo tablesInfo, boolean is64) throws IOException { - int start_mdia = auxOffset(); auxWrite(new byte[]{0x00, 0x00, 0x00, 0x00, 0x6D, 0x64, 0x69, 0x61});// mdia auxWrite(mdia.mdhd); @@ -766,7 +799,7 @@ public class Mp4FromDashWriter { // And stsz can be empty if has a default sample size // if (moovSimulation) { - make(0x73747473, -1, 2, 1); + make(0x73747473, -1, 2, 1);// stts if (tablesInfo.stss > 0) { make(0x73747373, -1, 1, tablesInfo.stss); } @@ -789,6 +822,9 @@ public class Mp4FromDashWriter { tablesInfo.stco = make(is64 ? 0x636F3634 : 0x7374636F, -1, is64 ? 2 : 1, tablesInfo.stco); } + auxWrite(make_sgpd()); + tablesInfo.sbgp = make_sbgp();// during simulation the returned offset is ignored + lengthFor(start_stbl); lengthFor(start_minf); lengthFor(start_mdia); @@ -816,6 +852,48 @@ public class Mp4FromDashWriter { return buffer.array(); } + private int make_sbgp() throws IOException { + int offset = auxOffset(); + + auxWrite(new byte[] { + 0x00, 0x00, 0x00, 0x1C,// box size + 0x73, 0x62, 0x67, 0x70,// "sbpg" + 0x00, 0x00, 0x00, 0x00,// default box flags + 0x72, 0x6F, 0x6C, 0x6C,// group type "roll" + 0x00, 0x00, 0x00, 0x01,// group table size + 0x00, 0x00, 0x00, 0x00,// group[0] total samples (to be set later) + 0x00, 0x00, 0x00, 0x01// group[0] description index + }); + + return offset + 0x14; + } + + private byte[] make_sgpd() { + /* + * Sample Group Description Box + * + * ¿whats does? + * the table inside of this box gives information about the + * characteristics of sample groups. The descriptive information is any other + * information needed to define or characterize the sample group. + * + * ¿is replicabled this box? + * NO due lacks of documentation about this box but... + * most of m4a encoders and ffmpeg uses this box with dummy values (same values) + */ + + ByteBuffer buffer = ByteBuffer.wrap(new byte[] { + 0x00, 0x00, 0x00, 0x1A,// box size + 0x73, 0x67, 0x70, 0x64,// "sgpd" + 0x01, 0x00, 0x00, 0x00,// box flags (unknown flag sets) + 0x72, 0x6F, 0x6C, 0x6C, // ¿¿group type?? + 0x00, 0x00, 0x00, 0x02,// ¿¿?? + 0x00, 0x00, 0x00, 0x01,// ¿¿?? + (byte)0xFF, (byte)0xFF// ¿¿?? + }); + + return buffer.array(); + } class TablesInfo { @@ -827,5 +905,6 @@ public class Mp4FromDashWriter { int stsz_default; int stss; int stco; + int sbgp; } } From 00eddcb2378c6788e1ef00d375ce9ef49747e4b5 Mon Sep 17 00:00:00 2001 From: kapodamy Date: Wed, 8 Jan 2020 14:36:31 -0300 Subject: [PATCH 0151/1194] android 5 (lollipop) fixup this commit attempts to fix the pickAvailableTemporalDir() method in ROMS that not are CTS compliant. --- .../giga/postprocessing/Postprocessing.java | 10 +++++--- .../giga/service/DownloadManager.java | 23 ++++++++++++++----- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/us/shandian/giga/postprocessing/Postprocessing.java b/app/src/main/java/us/shandian/giga/postprocessing/Postprocessing.java index 773ff92d1..e93e83a87 100644 --- a/app/src/main/java/us/shandian/giga/postprocessing/Postprocessing.java +++ b/app/src/main/java/us/shandian/giga/postprocessing/Postprocessing.java @@ -80,7 +80,7 @@ public abstract class Postprocessing implements Serializable { private transient DownloadMission mission; - private File tempFile; + private transient File tempFile; Postprocessing(boolean reserveSpace, boolean worksOnSameFile, String algorithmName) { this.reserveSpace = reserveSpace; @@ -95,8 +95,12 @@ public abstract class Postprocessing implements Serializable { public void cleanupTemporalDir() { if (tempFile != null && tempFile.exists()) { - //noinspection ResultOfMethodCallIgnored - tempFile.delete(); + try { + //noinspection ResultOfMethodCallIgnored + tempFile.delete(); + } catch (Exception e) { + // nothing to do + } } } diff --git a/app/src/main/java/us/shandian/giga/service/DownloadManager.java b/app/src/main/java/us/shandian/giga/service/DownloadManager.java index e8bc468e9..994c6ee63 100644 --- a/app/src/main/java/us/shandian/giga/service/DownloadManager.java +++ b/app/src/main/java/us/shandian/giga/service/DownloadManager.java @@ -139,6 +139,9 @@ public class DownloadManager { Log.d(TAG, "Loading pending downloads from directory: " + mPendingMissionsDir.getAbsolutePath()); } + File tempDir = pickAvailableTemporalDir(ctx); + Log.i(TAG, "using '" + tempDir + "' as temporal directory"); + for (File sub : subs) { if (!sub.isFile()) continue; if (sub.getName().equals(".tmp")) continue; @@ -184,7 +187,7 @@ public class DownloadManager { if (mis.psAlgorithm != null) { mis.psAlgorithm.cleanupTemporalDir(); - mis.psAlgorithm.setTemporalDir(pickAvailableTemporalDir(ctx)); + mis.psAlgorithm.setTemporalDir(tempDir); } mis.metadata = sub; @@ -513,13 +516,21 @@ public class DownloadManager { } static File pickAvailableTemporalDir(@NonNull Context ctx) { - if (isDirectoryAvailable(ctx.getExternalFilesDir(null))) - return ctx.getExternalFilesDir(null); - else if (isDirectoryAvailable(ctx.getFilesDir())) - return ctx.getFilesDir(); + File dir = ctx.getExternalFilesDir(null); + if (isDirectoryAvailable(dir)) return dir; + + dir = ctx.getFilesDir(); + if (isDirectoryAvailable(dir)) return dir; // this never should happen - return ctx.getDir("tmp", Context.MODE_PRIVATE); + dir = ctx.getDir("muxing_tmp", Context.MODE_PRIVATE); + if (isDirectoryAvailable(dir)) return dir; + + // fallback to cache dir + dir = ctx.getCacheDir(); + if (isDirectoryAvailable(dir)) return dir; + + throw new RuntimeException("Not temporal directories are available"); } @Nullable From 9b71828b97a46227f214b76cf99e53bb1884a7ee Mon Sep 17 00:00:00 2001 From: kapodamy Date: Tue, 14 Jan 2020 01:08:46 -0300 Subject: [PATCH 0152/1194] implement sgpd and sbgp boxes in audio tracks --- .../org/schabi/newpipe/streams/Mp4FromDashWriter.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java b/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java index f94ebefb0..963d84b40 100644 --- a/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java +++ b/app/src/main/java/org/schabi/newpipe/streams/Mp4FromDashWriter.java @@ -774,12 +774,12 @@ public class Mp4FromDashWriter { .array() ); - make_mdia(tracks[index].trak.mdia, tables, is64); + make_mdia(tracks[index].trak.mdia, tables, is64, tracks[index].kind == TrackKind.Audio); lengthFor(start); } - private void make_mdia(Mdia mdia, TablesInfo tablesInfo, boolean is64) throws IOException { + private void make_mdia(Mdia mdia, TablesInfo tablesInfo, boolean is64, boolean isAudio) throws IOException { int start_mdia = auxOffset(); auxWrite(new byte[]{0x00, 0x00, 0x00, 0x00, 0x6D, 0x64, 0x69, 0x61});// mdia auxWrite(mdia.mdhd); @@ -822,8 +822,10 @@ public class Mp4FromDashWriter { tablesInfo.stco = make(is64 ? 0x636F3634 : 0x7374636F, -1, is64 ? 2 : 1, tablesInfo.stco); } - auxWrite(make_sgpd()); - tablesInfo.sbgp = make_sbgp();// during simulation the returned offset is ignored + if (isAudio) { + auxWrite(make_sgpd()); + tablesInfo.sbgp = make_sbgp();// during simulation the returned offset is ignored + } lengthFor(start_stbl); lengthFor(start_minf); From f8a7aac40d0e7e1a6558753e012dabd6f97d7df7 Mon Sep 17 00:00:00 2001 From: bopol Date: Tue, 14 Jan 2020 14:15:42 +0100 Subject: [PATCH 0153/1194] fixed indonesian, see https://stackoverflow.com/questions/13291578/how-to-localize-an-android-app-in-indonesian-language --- app/src/main/res/{values-id => values-in}/strings.xml | 0 app/src/main/res/values/settings_keys.xml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename app/src/main/res/{values-id => values-in}/strings.xml (100%) diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-in/strings.xml similarity index 100% rename from app/src/main/res/values-id/strings.xml rename to app/src/main/res/values-in/strings.xml diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 18f42fe46..88da3afe5 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -956,7 +956,7 @@ hu hy ia - ind + in it ja ko From 055365a44931b65e9fffd0d5d57595fe3be40abb Mon Sep 17 00:00:00 2001 From: bopol Date: Tue, 14 Jan 2020 14:26:53 +0100 Subject: [PATCH 0154/1194] added Occitan to the selector --- app/src/main/res/values/settings_keys.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 88da3afe5..08b18f49b 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -968,6 +968,7 @@ ne nl nl-be + oc pa pl pr @@ -1032,6 +1033,7 @@ Nनेपाली Nederlands (NL) Nederlands (BE) + Occitan ਪੰਜਾਬੀ Polski Pirate Language From 105981b2eb426b598f81694442621e8b695a642e Mon Sep 17 00:00:00 2001 From: bopol Date: Tue, 14 Jan 2020 19:11:46 +0100 Subject: [PATCH 0155/1194] made system translatable + renamed it to system's language --- app/src/main/res/values/settings_keys.xml | 3 +-- app/src/main/res/values/strings.xml | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 08b18f49b..ed3c454b8 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -993,7 +993,7 @@ zh-tw - @string/system + @string/systems_language العربية Azərbaycan dili Asturianu @@ -1076,7 +1076,6 @@ list_view_mode auto - System auto diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8a44fdc64..c5a59abe7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -590,4 +590,5 @@ The Storage Access Framework allows downloads to an external SD card.\nNote: some devices are not compatible Choose an instance NewPipe\'s language + System\'s language From a228e702daee7024ac88f3cbfadba031ce5b6951 Mon Sep 17 00:00:00 2001 From: Karol Kaminski Date: Tue, 14 Jan 2020 19:30:36 +0100 Subject: [PATCH 0156/1194] menu-item History visibility accordingly to settings --- app/src/main/java/org/schabi/newpipe/MainActivity.java | 10 ++++++++++ .../main/java/org/schabi/newpipe/util/Constants.java | 2 ++ 2 files changed, 12 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 2dfbb9c69..cce02f526 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -449,6 +449,16 @@ public class MainActivity extends AppCompatActivity { sharedPreferences.edit().putBoolean(Constants.KEY_MAIN_PAGE_CHANGE, false).apply(); NavigationHelper.openMainActivity(this); } + + if (sharedPreferences.getBoolean(Constants.KEY_ENABLE_WATCH_HISTORY, true)) { + if (DEBUG) Log.d(TAG, "do not show History-menu as its disabled in settings"); + drawerItems.getMenu().findItem(ITEM_ID_HISTORY).setVisible(true); + } + + if (!sharedPreferences.getBoolean(Constants.KEY_ENABLE_WATCH_HISTORY, true)) { + if (DEBUG) Log.d(TAG, "show History-menu as its enabled in settings"); + drawerItems.getMenu().findItem(ITEM_ID_HISTORY).setVisible(false); + } } @Override 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 b01b6df6a..50350651d 100644 --- a/app/src/main/java/org/schabi/newpipe/util/Constants.java +++ b/app/src/main/java/org/schabi/newpipe/util/Constants.java @@ -11,5 +11,7 @@ public class Constants { public static final String KEY_THEME_CHANGE = "key_theme_change"; public static final String KEY_MAIN_PAGE_CHANGE = "key_main_page_change"; + public static final String KEY_ENABLE_WATCH_HISTORY = "enable_watch_history"; + public static final int NO_SERVICE_ID = -1; } From b965f88eb206f9f6348018df2a1628985679b95d Mon Sep 17 00:00:00 2001 From: Karol Kaminski Date: Tue, 14 Jan 2020 22:08:07 +0100 Subject: [PATCH 0157/1194] removed main_menu.xml --- app/src/main/res/menu/main_menu.xml | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 app/src/main/res/menu/main_menu.xml diff --git a/app/src/main/res/menu/main_menu.xml b/app/src/main/res/menu/main_menu.xml deleted file mode 100644 index 05920099a..000000000 --- a/app/src/main/res/menu/main_menu.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - \ No newline at end of file From 590722d929893308b1acbbec71322576510cf416 Mon Sep 17 00:00:00 2001 From: chr56 Date: Wed, 15 Jan 2020 12:30:17 +0800 Subject: [PATCH 0158/1194] manually update the Simplified Chinese lang file. /values-b+zh+HANS+CN was updated. Action: copy file in /values-b+zh+HANS+CN to /values-zh-rCN --- app/src/main/res/values-zh-rCN/strings.xml | 30 +++++++++++++++++----- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 8714c6aca..cfa443afc 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -39,7 +39,7 @@ 网络错误 视频 - + 禁用 背景 @@ -160,7 +160,7 @@ 使用第三方视频播放器 使用第三方视频播放器 音频下载文件夹 - 从其他应用打开 NewPipe 时就播放视频 + 从其他应用调用 NewPipe 时播放视频 默认分辨率 找不到Kore。是否安装? 显示“用Kodi播放”选项 @@ -180,7 +180,7 @@ 错误报告 错误 无法加载所有缩略图 - 无法解密视频 URL 的签名 + 无法解密视频的 URL 签名 无法解析网址 无法完全解析网址 内容不可用 @@ -483,7 +483,7 @@ 命名冲突,已存在具有此名称文件 无法覆盖文件 有此名称的已暂停下载 - 处理文件时,NewPipe 已关闭 + NewPipe 在处理文件时被关闭 设备上没有剩余储存空间 进度丢失,文件已被删除 连接超时 @@ -507,12 +507,30 @@ 无人在线观看 %s 人在观看 - + 没人在听 - %s个听众 + %s 人在听 重新启动应用后,语言将更改。 + PeerTube 服务器 + 设置自己喜欢的peertube服务器 + 查找最适合你的服务器https://joinpeertube.org/instances#instances-list + 添加服务器 + 输入服务器网址 + 无法验证服务器 + 仅支持 https URL + 该服务器已存在 + 本地 + 最近添加 + 最喜欢的 + 自动生成的(未找到上传者) + 正在恢复 + 无法恢复此下载 + 选择一个服务器 + 快进 / 快退的单位时间 + 在锁屏界面显示视频缩略图 + 在后台播放时,锁屏界面将会显示视频的缩略图 \ No newline at end of file From 9d8fcbbffe7ade9e662ab94e1a5a539a7e4e7d04 Mon Sep 17 00:00:00 2001 From: B0pol Date: Wed, 15 Jan 2020 08:33:57 +0100 Subject: [PATCH 0159/1194] fix: wrong language shown when rotating screen in popup player --- .../main/java/org/schabi/newpipe/player/PopupVideoPlayer.java | 1 + 1 file changed, 1 insertion(+) 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 b173448d0..c0ac95445 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -172,6 +172,7 @@ public final class PopupVideoPlayer extends Service { @Override public void onConfigurationChanged(Configuration newConfig) { + changeAppLanguage(getAppLocale(getApplicationContext()), getResources()); if (DEBUG) Log.d(TAG, "onConfigurationChanged() called with: newConfig = [" + newConfig + "]"); updateScreenSize(); updatePopupSize(popupLayoutParams.width, -1); From ab089a5f932e18d5212337ced1ac2f3e4a747c3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=2E=20R=C3=BCdinger?= Date: Mon, 13 Jan 2020 17:25:53 +0000 Subject: [PATCH 0160/1194] Translated using Weblate (German) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 586da69ee..3387a3c4f 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -79,7 +79,7 @@ Dein Kommentar (auf englisch): Konnte keinen Stream abrufen Automatische Wiedergabe - Wiedergabe eines Videos, wenn NewPipe von einer anderen App aufgerufen wurde + Video abspielen, wenn NewPipe von einer anderen App aufgerufen wird Einen Fehler melden Anwenderbericht LIVE From 5adc27ea2b375804c1f6f2843647acb9473d3ae3 Mon Sep 17 00:00:00 2001 From: Nehemias Feliz Date: Mon, 13 Jan 2020 15:16:17 +0000 Subject: [PATCH 0161/1194] Translated using Weblate (Spanish) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-es/strings.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index eacda9f4a..9f25208bb 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -520,16 +520,18 @@ El idioma cambiará luego de que la app sea reiniciada. Duración de búsqueda al avanzar y/o retroceder Instancias de PeerTube - Elige tus instancias favoritas de PeerTube - Encuentra las mejores instancias para ti en https://joinpeertube.org/instances#instances-list + Selecciona tus instancias favoritas de PeerTube + Encuentra las mejores instancias para ti en %s Agregar instancia - Dirección URL de la instancia - Error al validar la instancia - Sólo URLs con HTTPS + Ingresar URL de la instancia + No se pudo validar la instancia + Sólo URLs con HTTPS son soportados La instancia ya existe Local Agregados recientemente Más gustados Generado automáticamente (no se encontró creador) Elige una instancia + Habilitar miniatura de video de la pantalla de bloqueo + Al usar el reproductor de fondo, se mostrará una miniatura de video en la pantalla de bloqueo \ No newline at end of file From 515ec4d66d913d2b5e698953acd5c4b7e9195ace Mon Sep 17 00:00:00 2001 From: DodoLeDev Date: Mon, 13 Jan 2020 21:08:10 +0000 Subject: [PATCH 0162/1194] Translated using Weblate (French) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-fr/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 463057480..72b99982b 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -122,7 +122,7 @@ M Cette autorisation est nécessaire pour \nutiliser le mode flottant - Arrière-plan + Lire l\'audio Flottant Définition de la fenêtre flottante par défaut Afficher des définitions plus élevées @@ -185,7 +185,7 @@ Notification NewPipe Annuler Garde un suivi des vidéos vues - Reprendre à l’obtention de la cible de saisie + Reprendre lors du retour dans l\'application Lecteur Comportement Historique et cache @@ -310,7 +310,7 @@ Utiliser la recherche rapide approximative Permet au lecteur d’accéder plus rapidement à une position au détriment de la précision Charger les miniatures - Désactiver pour empêcher le chargement des miniatures afin d\'économiser vos données. Modifier cette option vide le cache en mémoire vive et sur le disque. + Désactivez pour empêcher le chargement des miniatures afin de réduire l’utilisation de la bande passante et de la mémoire. La modification de cette option, vide le cache en mémoire vive et sur le disque. Images en cache effacées Effacer les métadonnées en cache Efface toutes les données de pages Web en cache From ac3938d5296486ac705c91906da9fd3e838e2504 Mon Sep 17 00:00:00 2001 From: B0pol Date: Tue, 14 Jan 2020 09:03:07 +0000 Subject: [PATCH 0163/1194] Translated using Weblate (French) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-fr/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 72b99982b..444310aef 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -534,5 +534,5 @@ Choisissez une instance Généré automatiquement (pas de téléverseur trouvé) Activer la vidéo miniaturisée sur l\'écran de verrouillage - En utilisant le lecteur en arrière-plan, une vidéo miniaturisé sera affichée sur l\'écran de verrouillage + En utilisant le lecteur audio, la miniature de la vidéo sera affichée sur l\'écran de verrouillage \ No newline at end of file From 41e2e5f951ad38d998547ddd71c839e0ee043622 Mon Sep 17 00:00:00 2001 From: B0pol Date: Tue, 14 Jan 2020 09:09:23 +0000 Subject: [PATCH 0164/1194] Translated using Weblate (Esperanto) Currently translated at 100.0% (525 of 525 strings) --- app/src/main/res/values-eo/strings.xml | 46 +++++++++++++------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 6d19f8213..224e8837e 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -15,9 +15,9 @@ turno Uzi eksteran filmetoludilon Uzi eksteran sonludilon - Defaŭlta distingivo - Legi per Kodi - Montri \"Legi per Kodi\"-opcion + Defaŭlta rezolucio + Ludi per Kodi + Montri \"Ludi per Kodi\"-opcion Sono Defaŭlta sondosierformo Etoso @@ -30,8 +30,8 @@ Filmeto kaj sono Apero Alia - Ludado fone - Legi + Ludanta fone + Ludi Eraro Reteraro Enhavo malhavebla @@ -45,7 +45,7 @@ La subskribo de la ligilo de la filmeto ne malĉifreblas La retejo ne analizeblas Bildeto de la antaŭrigardo de la filmeto - Legi filmeton, daŭro: + Ludi filmeton, daŭro: Bildeto de la alŝutinto La elŝutujo \'%1$s\' ne kreeblas Elŝutujo \'%1$s\' kreita @@ -69,7 +69,7 @@ Premu serĉo por komenci Neniu elsendlflua ludilo trovita (instalu VLC por ludi ĝin). Malfermi en ŝprucfenestron modon - Forigas aŭdion ĉe KELKAJ distingivoj + Forigas aŭdon ĉe KELKAJ rezolucioj NewPipe ŝprucfenestron modon Aboni Abonita @@ -86,10 +86,10 @@ Ŝprucfenestro Aldonu al Aŭtomata play - Legas filmeton kiam NewPipe vokas de alia programo - Defaŭlta distingivo de la ŝprucfenestro - Montri pli altajn distingivojn - Nur kelkaj aparatoj subtenas legante 2K / 4K filmetojn + Ludas filmeton kiam NewPipe vokas el alia programo + Defaŭlta rezolucio de la ŝprucfenestro + Montri pli altajn rezoluciojn + Nur kelkaj aparatoj subtenas ludi 2K / 4K filmetojn Defaŭlta fomato de filmeto Nigra Memoru ŝprucfenestron kaj pozicion @@ -122,7 +122,7 @@ Poste Tiu permeso estas necesa por \nmalfermi en ŝprucfenestro modo - Leganta en ŝprucfenestro modo + Ludanta en ŝprucfenestro modo Malaktiva Filtri Aktualigi @@ -133,13 +133,13 @@ Uzu gestojn por kontroli la brilon kaj volumenon de la ludilo Serĉi sugestojn Montri sugestojn kiam serĉanto - Plej bona distingivo + Plej bona rezolucio Libera malpeza torentado ĉe Android. Elŝuti Leteroj kaj ciferoj Plej specialaj karakteroj Rekomencu en fokusa gajno - Daŭrigi la legon post la interrompaĵoj (ekzemple telefonadoj) + Daŭrigi la ludon post la interrompaĵoj (ekzemple telefonadoj) Serĉa historio Konservi la historio de serĉo lokale Rigardu historion @@ -205,7 +205,7 @@ Ne povis forigi ludlisto. Malcimigi Auto-vico sekva fluo - Aŭto-aldoni rilatan enhavon kiam leganta la lasta enhavo en malrepetita atendovico + Aŭto-aldoni rilatan enhavon kiam ludanta la lasta enhavo en malrepetita atendovico Dosiero Tia dosierujo ne ekzistas Tia dosiero/enhavo ne ekzistas @@ -236,7 +236,7 @@ Forviŝi la serĉajn ŝlosilvortojn Ĉu vi volas forviŝi la totalon de la historio de serĉo \? Historio de serĉo forviŝita. - Limigi distingivo kiam uzanta moveblan datumon + Limigi rezolucio kiam uzanta moveblan datumon Minimumigi al ŝprucfenestro ludilo Kanaloj Ludlistoj @@ -265,7 +265,7 @@ Konferencoj Montri komentojn Malebligu por malvidigi komentojn - Aŭtolego + Aŭtoludo Komentoj @@ -342,7 +342,7 @@ Rigardu ĉe GitHub Permesilo de NewPipe Ĉu vi havas ideojn pri; traduko, desegnaĵoj ŝanĝoj, purigado de kodo, aŭ realaj masivaj ŝanĝoj—helpo estas ĉiam bonvena. Ju pli oni faras, des pli bonas! - Legu permesilon + Legi permesilon Kontribui Permesitaj karakteroj en dosiernomoj Nevalidaj karakteroj estas anstataŭigita kun ĉi tiu valoro @@ -375,7 +375,7 @@ Neniuj kanalaj abonoj ankoraŭ Elekti kioskon Komenci ludi ĉi tie - Komenci ludi en la fono + Komenci ludi fone Donaci NewPipe estas programada par volontuoj, elspezante tempo por alporti vin la plej bona sperto. Redonu por helpi programistojn plibonigi NewPipe dum ĝuante tason da kafo. Redoni @@ -413,7 +413,7 @@ La monitorado de la memorlikadoj povas frostigi la apon dum la hejta dumpingo Signali ekster-vivciklajn erarojn Perforti signalante neenretigaj Rx esceptoj eksere la fragmento aŭ aktiveco vivciklo post dispono - La dosiero ne ekzistas aŭ la legopermeso mankas + La dosiero ne ekzistas aŭ la ludopermeso mankas Importi/eksporti Importi Importi el @@ -440,10 +440,10 @@ NewPipe estas programaro sub rajtoceda permesilo: Vi povas uzi, studi, komuniki kaj plibonigi ĝin kiel vi volas. Precize, vi povas redistribui kaj/aŭ modifi ĝin sub la kondiĉoj de la Ĝenerala Publika Permesilo de GNU, kiel publikigita per la Free Software Foundation, ĉu en la versio 3, ĉu (se vi volas) ajna posta versio. Ĉu vi volas ankaŭ importi agordojn\? Privateca politiko de NewPipe - La NewPipe projekto respektas vian privatecon serioze. Konsekvence, la apo ne kolektas ajnan datumo sen via konsento. + La NewPipe projekto serioze respektas vian privatecon. Konsekvence, la apo ne kolektas ajnan datumo sen via konsento. \nLa privateco politiko de Newpipe detale eksplikas kion datumon estas sendita kaj stokita kiam vi sendas falegosignalon. Legi la privatecan politikon - Por konformiĝi al la Ĝenerala Datum-Protekta Regularon (GDPR), ni allogas vian atento al la privateca politiko de NewPipe. Bonvolu legi ĝin atentive. + Por konformiĝi al la Ĝenerala Datum-Protekta Regularon (GDPR), ni allogas vian atenton al la privateca politiko de NewPipe. Bonvolu atentive legi ĝin. \nVi devas akcepti ĝin por sendi nin la cimsignalo. Akcepti Rifuzi @@ -455,7 +455,7 @@ Plirapidigi dum silentoj Paŝo Restarigi - Uzante defaŭltajn ongletojn, eraro dum leganta savajn ongletojn + Uzante defaŭltajn ongletojn, eraro ludante savajn ongletojn Restaŭri la defaŭltojn Ĉu vi volas restaŭri la defaŭltojn \? Kalkulo de abonantoj malhavebla From 40eaa166ae89cd8db3942edf7980eb6c281fcd73 Mon Sep 17 00:00:00 2001 From: Matsuri Date: Tue, 14 Jan 2020 03:32:55 +0000 Subject: [PATCH 0165/1194] Translated using Weblate (Chinese (Simplified)) Currently translated at 97.3% (511 of 525 strings) --- .../main/res/values-b+zh+HANS+CN/strings.xml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/src/main/res/values-b+zh+HANS+CN/strings.xml b/app/src/main/res/values-b+zh+HANS+CN/strings.xml index cfa443afc..5a019881b 100644 --- a/app/src/main/res/values-b+zh+HANS+CN/strings.xml +++ b/app/src/main/res/values-b+zh+HANS+CN/strings.xml @@ -6,7 +6,7 @@ 在浏览器中打开 在悬浮窗模式下打开 您是不是要找:%1$s? - 找不到串流播放器 (您可以安裝并使用VLC播放)。 + 找不到串流播放器 (您可以安装 VLC 进行播放)。 下载串流文件 安装 取消 @@ -16,7 +16,7 @@ 设置 分享给... 选择浏览器 - 视频下载文件夹 + 视频下载路径 已下载的视频存储在这里 请选择下载视频的保存位置 已下载的音频存储在这里 @@ -42,7 +42,7 @@ 禁用 - 背景 + 后台播放 过滤器 刷新 搜索建议 @@ -157,8 +157,8 @@ 切换服务,当前选择: 找不到串流播放器。您想安装 VLC 吗? 旋转 - 使用第三方视频播放器 - 使用第三方视频播放器 + 使用外部视频播放器 + 使用外部音频播放器 音频下载文件夹 从其他应用调用 NewPipe 时播放视频 默认分辨率 @@ -209,7 +209,7 @@ \n需要此权限 reCAPTCHA验证 请求的新的CAPTCHA验证 - NewPipe悬浮窗模式 + NewPipe 悬浮窗模式 在悬浮窗中播放 默认悬浮窗分辨率 使用更高的分辨率 @@ -219,7 +219,7 @@ 记住最后一次使用悬浮窗的大小和位置 悬浮窗 调整大小 - 删除“某些”分辨率的音频 + 部分分辨率的视频将没有声音 播放器手势控制 使用手势控制播放器的亮度和音量 显示搜索建议 @@ -234,9 +234,9 @@ 取消订阅频道 无法修改订阅 无法更新订阅 - 主页面 + 主页 订阅 - 新增功能 + 最新 恢复前台焦点 中断后继续播放(例如突然来电后) 搜索历史记录 @@ -321,7 +321,7 @@ 警告:无法导入所有文件。 这将覆盖当前设置。 显示信息 - 已收藏 + 书签 确定要从观看历史记录中删除该项吗? 是否确实要从历史记录中删除所有项目? 最后播放 From 2e6089088b3da360c6593f97d332e69c321c3331 Mon Sep 17 00:00:00 2001 From: B0pol Date: Wed, 15 Jan 2020 07:03:45 +0000 Subject: [PATCH 0166/1194] Translated using Weblate (Urdu) Currently translated at 95.0% (499 of 525 strings) --- app/src/main/res/values-ur/strings.xml | 44 +++++++++++++------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/app/src/main/res/values-ur/strings.xml b/app/src/main/res/values-ur/strings.xml index 089b793c8..724c9c3ed 100644 --- a/app/src/main/res/values-ur/strings.xml +++ b/app/src/main/res/values-ur/strings.xml @@ -8,7 +8,7 @@ بانٹیں ڈاؤن لوڈکریں تلاش کریں - کیا آپ کا مطلب تھا: %1$s \? + کیا آپ کا مطلب تھا: s$1%\? انٹرنیٹ میں کھولیں ترتیبات کوئیstream پلیئر نہیں ملا.کیا آپ VLC انسٹال کرنا چاہتے ہیں؟ @@ -159,7 +159,7 @@ ایسی کوئی فائل / مواد کا ذریعہ نہیں فائل موجود نہیں ہے اور نہ ہی اسے پڑھنے یا لکھنے کی اجازت ہے فائل کا نام ضروری ہے - ایک خامی پیش آگئی:٪ 1 $ s + ایک خامی پیش آگئی: s$1% کوئی اسٹریمز ڈاؤن لوڈ کرنے کے لئے دستیاب نہیں معذرت ، ایسا نہیں ہونا چاہئے تھا۔ ای میل کے ذریعے غلطی کی اطلاع دیں @@ -182,8 +182,8 @@ کوئی نتیجہ نہیں یہاں کچھ نہیں مگر اداسی کے دوبارہ ترتیب دینے کیلئے کھینچں - ڈاؤن لوڈ ڈائریکٹری \'٪ 1 $ s\' تشکیل نہیں دے سکتے - ڈاؤن لوڈ ڈائریکٹری \'٪ 1 $ s\' بن گئی + ڈاؤن لوڈ ڈائریکٹری \'s$1%\' تشکیل نہیں دے سکتے + ڈاؤن لوڈ ڈائریکٹری \'s$1%\' بن گئی ویڈیو آڈیو دوبارہ کوشش کریں @@ -193,18 +193,18 @@ بی کوئی صارفین نہیں - % s صارف - % s صارفین + s% صارف + s% صارفین کوئی مناظر نہیں - % s منظر - % s مناظر + s% منظر + s% مناظر ویڈیوز دستیاب نہیں ویڈیوز - + شروع کریں توقف @@ -306,7 +306,7 @@ دراز بند کریں یہاں جلد ہی کچھ نظر آئے گا D D ترجیح \' کھلی \' عمل - مواد کھولنے پر ڈیفالٹ کارروائی -٪ s + مواد کھولنے پر ڈیفالٹ کارروائی — s% ویڈیو پلیئر پس منظر پلیئر پوپ اپ پلیئر @@ -345,16 +345,16 @@ پچھلی برآمد سبسکرپشنز کو درآمد نہیں کیا جاسکا رکنیت برآمد نہیں کر سکا - برآمد فائل کو ڈاؤن لوڈ کرکے YouTube کی رکنیت کو درآمد کریں: -\n -\n1. اس یو آر ایل پر جائیں:٪ 1 $ s -\n2. جب پوچھا جائے تو لاگ ان کریں + برآمد فائل کو ڈاؤن لوڈ کرکے YouTube کی رکنیت کو درآمد کریں: +\n +\n1. اس یو آر ایل پر جائیں:s$1% +\n2. جب پوچھا جائے تو لاگ ان کریں \nA. ڈاؤن لوڈ شروع ہونا چاہئے (یہ برآمد فائل ہے) - URL یا آپ کی ID ٹائپ کرکے ایک SoundCloud پروفائل درآمد کریں: -\n -\n1. ویب براؤزر میں \"ڈیسک ٹاپ موڈ\" کو فعال کریں (سائٹ موبائل آلات کے لئے دستیاب نہیں ہے) -\n2. اس URL پر جائیں: %1 $ s -\n3. پوچھا گیا میں لاگ ان کریں + URL یا آپ کی ID ٹائپ کرکے ایک SoundCloud پروفائل درآمد کریں: +\n +\n1. ویب براؤزر میں \"ڈیسک ٹاپ موڈ\" کو فعال کریں (سائٹ موبائل آلات کے لئے دستیاب نہیں ہے) +\n2. اس URL پر جائیں: s$1% +\n3. پوچھا گیا میں لاگ ان کریں \n4. پروفائل یو آر ایل کاپی کریں جو آپ کو ہدایت کی گئی تھی. yourID، soundcloud.com/yourid یاد رکھیں کہ یہ آپریشن نیٹ ورک مہنگا ہوسکتا ہے۔ @@ -388,7 +388,7 @@ کوئی حد نہیں موبائل ڈیٹا کا استعمال کرتے وقت ریذولوشن کو محدود کریں ایپ سوئچ کو کم سے کم کریں - اہم ویڈیو پلیئر سے دوسرے ایپ میں سوئچنگ کرتے وقت کارروائی-% s + اہم ویڈیو پلیئر سے دوسرے ایپ میں سوئچنگ کرتے وقت کارروائی — %s کوئی نہیں پس منظری پلیر میں کم کریں پاپ اپ پلیر میں کم کریں @@ -437,7 +437,7 @@ سسٹم نےکارروائی سے انکار کیا گیا ڈاؤن لوڈ ناکام ڈاؤن لوڈ تکمیل - ٪ s ڈاؤن لوڈ مکمل ہوگئے + s% ڈاؤن لوڈ مکمل ہوگئے منفرد نام بنائیں برتحریر اس نام کے ساتھ ایک ڈاؤن لوڈ جاری ہے @@ -466,7 +466,7 @@ آٹوپلے تبصرے - + کوئی تبصرہ نہیں تبصرے لوڈ نہیں ہوسکے From 8caf9f87a178bf934c5c106162f5f1e154014a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=ADs=20B?= Date: Mon, 13 Jan 2020 14:49:26 +0000 Subject: [PATCH 0167/1194] Translated using Weblate (Occitan) Currently translated at 17.9% (94 of 525 strings) --- app/src/main/res/values-oc/strings.xml | 47 ++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-oc/strings.xml b/app/src/main/res/values-oc/strings.xml index 190c2c890..1abaaccb1 100644 --- a/app/src/main/res/values-oc/strings.xml +++ b/app/src/main/res/values-oc/strings.xml @@ -2,8 +2,8 @@ %1$s vistas Publicat lo %1$s - Cap de lector de flus trobat. Volètz installar VLC\? - Cap de lector de flus trobat (podètz installar VLC per lo legir). + Cap de legidor de flus trobat. Volètz installar VLC\? + Cap de legidor de flus trobat (podètz installar VLC per lo legir). Installar Anullar Dobrir dins lo navegador @@ -17,7 +17,7 @@ Partejar amb Causir un navegador rotacion - Utilizar un lector de vidèo extèrne + Utilizar un legidor de vidèo extèrne Mòde fenestron de NewPipe S\'abonar Abonat @@ -27,4 +27,45 @@ Afichar las informacions Principal Abonaments + Clicatz sul boton de recèrca per començar + Lèva l\'àudio per CÈRTAS resolucions + Utilizar lo legidor àudio extèrne + Abonament a la cadena anullat + Listas de lectura enregistradas + Onglet novèl + Causir un onglet + Çò novèl + Rèireplan + Fenestron + Apondre a + Dorsièr de telecargament de vidèos + Los fichièrs vidèo telecargats son aquí + Causissètz lo dorsièr de telecargament de las vidèos + Dorsièr de telecargament dels àudios + Los fichièrs àudio telecargats son estremats aicí + Causissètz lo dorsièr de telecargament pels àudios + Cambiatz los dorsièrs de telecargament per venga efectiu + Lectura automatica + Legís una vidèo quand NewPIpe es apelat dempuèi una autra aplicacion + Resolucion per defaut + Resolucion per defaut dels fenestrons + Afichar de resolucions mai nautas + Totes los dispositius pòdon pas legir de vidèos 2K/4K + Jogar amb Kodi + Trobam pas l\'aplicacion Kore. La volètz installar\? + Afichar l\'opcion \"Legir amb Kodi\" + Activar la vidèo miniatura sus l\'ecran de blocatge + Afichar una opcion per legir una vidèo dempuèi Kodi + En utilizant lo legidor de rèireplan, una vidèo miniatura s\'aficharà sus l\'ecran de blocatge + Àudio + Format àudio per defaut + Format vidèo per defaut + Tèma + Clar + Escur + Negre + Se remembrar la talha e la posicion del fenestron + Se remembrar las darrièras talha e posicion del fenestron + Utilzar la recèrca rapida inexacta + La recèrca inexacta permet a l\'utilizaire de recercar mai rapidament una posicion amb mens de precision \ No newline at end of file From ba53f6611cee52709d1a650713e515e91a06cfbf Mon Sep 17 00:00:00 2001 From: chr56 Date: Wed, 15 Jan 2020 09:05:10 +0000 Subject: [PATCH 0168/1194] Translated using Weblate (Chinese (Simplified)) Currently translated at 97.3% (513 of 527 strings) --- app/src/main/res/values-b+zh+HANS+CN/strings.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-b+zh+HANS+CN/strings.xml b/app/src/main/res/values-b+zh+HANS+CN/strings.xml index 5a019881b..078379683 100644 --- a/app/src/main/res/values-b+zh+HANS+CN/strings.xml +++ b/app/src/main/res/values-b+zh+HANS+CN/strings.xml @@ -516,8 +516,8 @@ 重新启动应用后,语言将更改。 PeerTube 服务器 - 设置自己喜欢的peertube服务器 - 查找最适合你的服务器https://joinpeertube.org/instances#instances-list + 设置自己喜欢的PeerTube服务器 + 查找最适合你的服务器%s 添加服务器 输入服务器网址 无法验证服务器 @@ -533,4 +533,7 @@ 快进 / 快退的单位时间 在锁屏界面显示视频缩略图 在后台播放时,锁屏界面将会显示视频的缩略图 + 清除下载历史记录 + 删除下载了的文件 + 已删除 %1$s 下载 \ No newline at end of file From 29b12c2f845b485155b275fda92c061710df8412 Mon Sep 17 00:00:00 2001 From: Igor Nedoboy Date: Wed, 15 Jan 2020 19:30:46 +0000 Subject: [PATCH 0169/1194] Translated using Weblate (Russian) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-ru/strings.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index f3fdbbc18..a55b70e29 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -492,7 +492,7 @@ NewPipe была закрыта во время работы над файлом Закончилось свободное место на устройстве Прогресс потерян, так как файл был удалён - Вы уверены\? + Действительно удалить историю загрузок и загруженные файлы\? Ограничить очередь загрузки Только одна одновременная загрузка Начать загрузку @@ -540,4 +540,7 @@ Выберите сервер Миниатюра на экране блокировки Показать миниатюру видео на экране блокировки при воспроизведении в фоне + Очистить историю загрузок + Удаление загруженных файлов + Удалено загрузок: %1$s \ No newline at end of file From b731c79339ee356ff86d1ec8a293765351102843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Wed, 15 Jan 2020 10:09:59 +0000 Subject: [PATCH 0170/1194] Translated using Weblate (Turkish) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-tr/strings.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 1ea8ad817..c6603382d 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -5,7 +5,7 @@ Yayınlanma: %1$s Akış oynatıcısı bulunamadı. VLC\'yi yüklemek ister misiniz\? Yükle - İptal et + Vazgeç Tarayıcıda aç Paylaş İndir @@ -484,7 +484,7 @@ Aygıt üzerinde yer yok İlerleme kaybedildi, çünkü dosya silinmiş Bağlantı zaman aşımı - Emin misiniz\? + İndirme geçmişinizi temizlemek veya indirilen tüm dosyaları silmek istiyor musunuz\? İndirme kuyruğunu sınırla Aynı anda yalnızca bir indirme yürütülecek İndirmeleri başlat @@ -535,4 +535,7 @@ Bir örnek seçin Kilit ekranı video küçük resmini etkinleştir Arka plan oynatıcıyı kullanırken kilit ekranında bir video küçük resmi görüntülenecektir + İndirme geçmişini temizle + İndirilen dosyaları sil + %1$s indirme silindi \ No newline at end of file From 3341742f660808bd33351f3cb088f198203a3b74 Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Wed, 15 Jan 2020 10:31:57 +0000 Subject: [PATCH 0171/1194] Translated using Weblate (Hebrew) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-he/strings.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml index d1a72739d..7a1338f60 100644 --- a/app/src/main/res/values-he/strings.xml +++ b/app/src/main/res/values-he/strings.xml @@ -496,7 +496,7 @@ לא נשאר מקום במכשיר התהליך אבד כיוון שהקובץ נמחק החיבור המתין זמן רב מדי - בוודאות\? + למחוק את היסטוריית ההורדות שלך או למחוק את כל הקבצים שהורדת\? הגבלת תור ההורדה רק הורדה אחת תרוץ בו־זמנית התחלת הורדות @@ -547,4 +547,7 @@ נא לבחור מופע הפעלת תמונה מוקטנת של הסרטון במסך הנעילה בעת השימוש בנגן הרקע תופיע תמונה מוקטנת של הסרטון על מסך הנעילה + מחיקת היסטוריית ההורדות + למחוק את הקבצים שהורדתי + נמחקו %1$s הורדות \ No newline at end of file From 1b708d261dab962237e7cdf3413af0e1a91d1c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=ADs=20B?= Date: Wed, 15 Jan 2020 10:17:23 +0000 Subject: [PATCH 0172/1194] Translated using Weblate (Occitan) Currently translated at 18.8% (99 of 527 strings) --- app/src/main/res/values-oc/strings.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/res/values-oc/strings.xml b/app/src/main/res/values-oc/strings.xml index 1abaaccb1..e69e43b44 100644 --- a/app/src/main/res/values-oc/strings.xml +++ b/app/src/main/res/values-oc/strings.xml @@ -68,4 +68,9 @@ Se remembrar las darrièras talha e posicion del fenestron Utilzar la recèrca rapida inexacta La recèrca inexacta permet a l\'utilizaire de recercar mai rapidament una posicion amb mens de precision + Durada d\'avançada/reculada rapida + Cargar las miniaturas + Afichar los comentaris + Desactivar per afichar pas mai los comentaris + Apondre la vidèo seguenta dins la coa de lectura \ No newline at end of file From 5f232a059d5ce434ee91573ff0686bff61e2931f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Thu, 16 Jan 2020 00:37:23 +0000 Subject: [PATCH 0173/1194] =?UTF-8?q?Translated=20using=20Weblate=20(Norwe?= =?UTF-8?q?gian=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 96.4% (508 of 527 strings) --- app/src/main/res/values-nb-rNO/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 1038d15c4..75ffe45e9 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -521,4 +521,7 @@ Nylig lagt til Mest likt Velg en instans + Tøm nedlastingshistorikk + Slett nedlastede filer + Slettet %1$s nedlastninger \ No newline at end of file From e3dfab5078b30d4f00a0c66f14913a0e54b242c8 Mon Sep 17 00:00:00 2001 From: Deleted User Date: Thu, 16 Jan 2020 02:12:54 +0000 Subject: [PATCH 0174/1194] =?UTF-8?q?Translated=20using=20Weblate=20(Norwe?= =?UTF-8?q?gian=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 96.4% (508 of 527 strings) --- app/src/main/res/values-nb-rNO/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 75ffe45e9..d01647f5d 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -524,4 +524,6 @@ Tøm nedlastingshistorikk Slett nedlastede filer Slettet %1$s nedlastninger + Aktiver videominiatyrbilde med låseskjerm + Når du bruker bakgrunnsspilleren, vises en videominiaturbilde på låseskjermen \ No newline at end of file From 3ee678875361681861327bba9f718b73619b6a67 Mon Sep 17 00:00:00 2001 From: nautilusx Date: Thu, 16 Jan 2020 07:23:22 +0000 Subject: [PATCH 0175/1194] Translated using Weblate (German) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-de/strings.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 3387a3c4f..53b9a52eb 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -489,7 +489,7 @@ NewPipe wurde während der Verarbeitung der Datei geschlossen Kein Speicherplatz mehr auf dem Gerät Vorgang abgebrochen, da die Datei gelöscht wurde - Bist Du sicher\? + Möchtest du deinen Downloadverlauf oder alle heruntergeladenen Dateien löschen\? Downloadwarteschlange begrenzen Ein Download wird zur gleichen Zeit ausgeführt Downloads starten @@ -536,4 +536,7 @@ Dieser Download kann nicht wiederhergestellt werden Video-Vorschaubild für Sperrbildschirm aktivieren Bei Verwendung des Hintergrundplayers wird ein Video-Miniaturbild auf dem Sperrbildschirm angezeigt + Downloadverlauf löschen + Heruntergeladene Dateien löschen + %1$s Downloads gelöscht \ No newline at end of file From 235ead9222d3b29c225d9ea5192cf0ba5c455c14 Mon Sep 17 00:00:00 2001 From: Igor Nedoboy Date: Thu, 16 Jan 2020 19:52:52 +0000 Subject: [PATCH 0176/1194] Translated using Weblate (Russian) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-ru/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index a55b70e29..1da98cc74 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -522,10 +522,10 @@ %s слушателей Язык будет изменён после перезапуска - Перемотка двойным нажатием + Шаг перемотки Серверы PeerTube - Выберите предпочтительные серверы PeerTube - Выберите подходящие серверы на %s + Выберите предпочтительные серверы + Каталог серверов: %s Новый сервер URL сервера Не удалось проверить сервер From 570dded8d601ea86ec92038283a65774fed8fb92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Jakse?= Date: Thu, 16 Jan 2020 20:44:08 +0100 Subject: [PATCH 0177/1194] Add field START_PAUSED to the Player Intent This allows fixing spurious playback resume when minimizing to the background player. --- .../org/schabi/newpipe/player/BackgroundPlayerActivity.java | 5 ++++- app/src/main/java/org/schabi/newpipe/player/BasePlayer.java | 4 +++- .../java/org/schabi/newpipe/player/MainVideoPlayer.java | 6 ++++-- .../java/org/schabi/newpipe/player/PopupVideoPlayer.java | 5 +++-- .../org/schabi/newpipe/player/PopupVideoPlayerActivity.java | 5 ++++- .../org/schabi/newpipe/player/ServicePlayerActivity.java | 6 +++++- .../main/java/org/schabi/newpipe/util/NavigationHelper.java | 6 ++++-- 7 files changed, 27 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayerActivity.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayerActivity.java index 761b50d85..59f6e1e6d 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayerActivity.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayerActivity.java @@ -57,7 +57,10 @@ public final class BackgroundPlayerActivity extends ServicePlayerActivity { this.player.setRecovery(); getApplicationContext().sendBroadcast(getPlayerShutdownIntent()); - getApplicationContext().startService(getSwitchIntent(PopupVideoPlayer.class)); + getApplicationContext().startService( + getSwitchIntent(PopupVideoPlayer.class) + .putExtra(BasePlayer.START_PAUSED, !this.player.isPlaying()) + ); return true; } return 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 6452a9850..cd1ec07f9 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -150,6 +150,8 @@ public abstract class BasePlayer implements @NonNull public static final String RESUME_PLAYBACK = "resume_playback"; @NonNull + public static final String START_PAUSED = "start_paused"; + @NonNull public static final String SELECT_ON_APPEND = "select_on_append"; /*////////////////////////////////////////////////////////////////////////// @@ -304,7 +306,7 @@ public abstract class BasePlayer implements } // Good to go... initPlayback(queue, repeatMode, playbackSpeed, playbackPitch, playbackSkipSilence, - /*playOnInit=*/true); + /*playOnInit=*/!intent.getBooleanExtra(START_PAUSED, false)); } protected void initPlayback(@NonNull final PlayQueue queue, 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 7a3e60c66..9ccf5b9d3 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -614,7 +614,8 @@ public final class MainVideoPlayer extends AppCompatActivity this.getPlaybackPitch(), this.getPlaybackSkipSilence(), this.getPlaybackQuality(), - false + false, + !isPlaying() ); context.startService(intent); @@ -637,7 +638,8 @@ public final class MainVideoPlayer extends AppCompatActivity this.getPlaybackPitch(), this.getPlaybackSkipSilence(), this.getPlaybackQuality(), - false + false, + !isPlaying() ); context.startService(intent); 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 969c47990..70fb77060 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -567,7 +567,8 @@ public final class PopupVideoPlayer extends Service { this.getPlaybackPitch(), this.getPlaybackSkipSilence(), this.getPlaybackQuality(), - false + false, + !isPlaying() ); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); @@ -1123,4 +1124,4 @@ public final class PopupVideoPlayer extends Service { return distanceFromCloseButton(popupMotionEvent) <= getClosingRadius(); } } -} \ No newline at end of file +} diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayerActivity.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayerActivity.java index 44fcdb8dd..5000d07e2 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayerActivity.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayerActivity.java @@ -50,7 +50,10 @@ public final class PopupVideoPlayerActivity extends ServicePlayerActivity { if (item.getItemId() == R.id.action_switch_background) { this.player.setRecovery(); getApplicationContext().sendBroadcast(getPlayerShutdownIntent()); - getApplicationContext().startService(getSwitchIntent(BackgroundPlayer.class)); + getApplicationContext().startService( + getSwitchIntent(BackgroundPlayer.class) + .putExtra(BasePlayer.START_PAUSED, !this.player.isPlaying()) + ); return true; } return false; 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 2207808ac..a7b3006a1 100644 --- a/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java +++ b/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java @@ -167,7 +167,10 @@ public abstract class ServicePlayerActivity extends AppCompatActivity case R.id.action_switch_main: this.player.setRecovery(); getApplicationContext().sendBroadcast(getPlayerShutdownIntent()); - getApplicationContext().startActivity(getSwitchIntent(MainVideoPlayer.class)); + getApplicationContext().startActivity( + getSwitchIntent(MainVideoPlayer.class) + .putExtra(BasePlayer.START_PAUSED, !this.player.isPlaying()) + ); return true; } return onPlayerOptionSelected(item) || super.onOptionsItemSelected(item); @@ -189,6 +192,7 @@ public abstract class ServicePlayerActivity extends AppCompatActivity this.player.getPlaybackPitch(), this.player.getPlaybackSkipSilence(), null, + false, false ).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); } 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 e2b03c8e8..a19aa92ae 100644 --- a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java @@ -109,12 +109,14 @@ public class NavigationHelper { final float playbackPitch, final boolean playbackSkipSilence, @Nullable final String playbackQuality, - final boolean resumePlayback) { + final boolean resumePlayback, + final boolean startPaused) { return getPlayerIntent(context, targetClazz, playQueue, playbackQuality, resumePlayback) .putExtra(BasePlayer.REPEAT_MODE, repeatMode) .putExtra(BasePlayer.PLAYBACK_SPEED, playbackSpeed) .putExtra(BasePlayer.PLAYBACK_PITCH, playbackPitch) - .putExtra(BasePlayer.PLAYBACK_SKIP_SILENCE, playbackSkipSilence); + .putExtra(BasePlayer.PLAYBACK_SKIP_SILENCE, playbackSkipSilence) + .putExtra(BasePlayer.START_PAUSED, startPaused); } public static void playOnMainPlayer(final Context context, final PlayQueue queue, final boolean resumePlayback) { From d9498945112b5b6a96a087d6aa6c701e275f87f8 Mon Sep 17 00:00:00 2001 From: WaldiS Date: Thu, 16 Jan 2020 08:12:18 +0000 Subject: [PATCH 0178/1194] Translated using Weblate (Polish) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-pl/strings.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index e2a2ae80b..0da89ad48 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -491,7 +491,7 @@ NewPipe został zamknięty podczas pracy nad plikiem Brak miejsca na urządzeniu Postęp został utracony ze wzgledu na usunięcie pliku - Czy jesteś pewien\? + Czy chcesz wyczyścić historię pobierania lub usunąć wszystkie pobrane pliki\? Ogranicz kolejkę pobierania Tylko jedno pobieranie będzie realizowane jednocześnie Rozpocznij pobieranie @@ -541,4 +541,7 @@ Wybierz instancję Włącz miniaturę wideo na ekranie blokady Podczas korzystania z odtwarzacza w tle na ekranie blokady zostanie wyświetlona miniatura filmu + Wyczyść historię pobierania + Usuń pobrane pliki + Usunięte% 1$s pobrania \ No newline at end of file From ef90493c27af898d8e79adbb5e8d449ef5d0ae35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Jakse?= Date: Thu, 16 Jan 2020 20:46:11 +0100 Subject: [PATCH 0179/1194] Deduplicate code switching to another player into a function --- .../player/BackgroundPlayerActivity.java | 8 +------- .../player/PopupVideoPlayerActivity.java | 8 +------- .../newpipe/player/ServicePlayerActivity.java | 18 ++++++++++-------- 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayerActivity.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayerActivity.java index 59f6e1e6d..1b5b5d07c 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayerActivity.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayerActivity.java @@ -55,13 +55,7 @@ public final class BackgroundPlayerActivity extends ServicePlayerActivity { return true; } - this.player.setRecovery(); - getApplicationContext().sendBroadcast(getPlayerShutdownIntent()); - getApplicationContext().startService( - getSwitchIntent(PopupVideoPlayer.class) - .putExtra(BasePlayer.START_PAUSED, !this.player.isPlaying()) - ); - return true; + return switchTo(PopupVideoPlayer.class); } return false; } diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayerActivity.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayerActivity.java index 5000d07e2..b2af6d9d8 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayerActivity.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayerActivity.java @@ -48,13 +48,7 @@ public final class PopupVideoPlayerActivity extends ServicePlayerActivity { @Override public boolean onPlayerOptionSelected(MenuItem item) { if (item.getItemId() == R.id.action_switch_background) { - this.player.setRecovery(); - getApplicationContext().sendBroadcast(getPlayerShutdownIntent()); - getApplicationContext().startService( - getSwitchIntent(BackgroundPlayer.class) - .putExtra(BasePlayer.START_PAUSED, !this.player.isPlaying()) - ); - return true; + return switchTo(BackgroundPlayer.class); } return false; } 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 a7b3006a1..b5a697d05 100644 --- a/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java +++ b/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java @@ -165,13 +165,7 @@ public abstract class ServicePlayerActivity extends AppCompatActivity startActivity(new Intent(Settings.ACTION_SOUND_SETTINGS)); return true; case R.id.action_switch_main: - this.player.setRecovery(); - getApplicationContext().sendBroadcast(getPlayerShutdownIntent()); - getApplicationContext().startActivity( - getSwitchIntent(MainVideoPlayer.class) - .putExtra(BasePlayer.START_PAUSED, !this.player.isPlaying()) - ); - return true; + return switchTo(MainVideoPlayer.class); } return onPlayerOptionSelected(item) || super.onOptionsItemSelected(item); } @@ -194,7 +188,15 @@ public abstract class ServicePlayerActivity extends AppCompatActivity null, false, false - ).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + ).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + .putExtra(BasePlayer.START_PAUSED, !this.player.isPlaying()); + } + + protected boolean switchTo(final Class clazz) { + this.player.setRecovery(); + getApplicationContext().sendBroadcast(getPlayerShutdownIntent()); + getApplicationContext().startActivity(getSwitchIntent(clazz)); + return true; } //////////////////////////////////////////////////////////////////////////// From 7dbb2b206c438078676f668a9a779537730143fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Jakse?= Date: Thu, 16 Jan 2020 20:46:52 +0100 Subject: [PATCH 0180/1194] Simplify an if expression --- app/src/main/java/org/schabi/newpipe/player/BasePlayer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 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 cd1ec07f9..46ca3921d 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -946,10 +946,10 @@ public abstract class BasePlayer implements public void onPlayPause() { if (DEBUG) Log.d(TAG, "onPlayPause() called"); - if (!isPlaying()) { - onPlay(); - } else { + if (isPlaying()) { onPause(); + } else { + onPlay(); } } From 181658e5a401dfd54cf1b243ddc7a564b1448d26 Mon Sep 17 00:00:00 2001 From: bopol Date: Fri, 17 Jan 2020 22:59:51 +0100 Subject: [PATCH 0181/1194] support for opening /c/ channel links --- app/build.gradle | 2 +- app/src/main/AndroidManifest.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 219d2b202..07914b0ad 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -62,7 +62,7 @@ dependencies { exclude module: 'support-annotations' }) - implementation 'com.github.TeamNewPipe:NewPipeExtractor:bdbfa26' + implementation 'com.github.TeamNewPipe:NewPipeExtractor:2ee558f' testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:2.23.0' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 9052dabab..21a846494 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -153,6 +153,7 @@ + From 2f2b8784f97335e03c432988c3a3b89a46c032fc Mon Sep 17 00:00:00 2001 From: B0pol Date: Fri, 17 Jan 2020 23:07:45 +0100 Subject: [PATCH 0182/1194] update extractor version --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 07914b0ad..0aff5ac8b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -62,7 +62,7 @@ dependencies { exclude module: 'support-annotations' }) - implementation 'com.github.TeamNewPipe:NewPipeExtractor:2ee558f' + implementation 'com.github.TeamNewPipe:NewPipeExtractor:2ee558fb' testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:2.23.0' From 134850aa049ed9d5fe12431897d83e1bc3af51df Mon Sep 17 00:00:00 2001 From: TobiGr Date: Sat, 18 Jan 2020 00:09:27 +0100 Subject: [PATCH 0183/1194] Add changelog for 0.18.1 --- .../metadata/android/en-US/changelogs/810.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 fastlane/metadata/android/en-US/changelogs/810.txt diff --git a/fastlane/metadata/android/en-US/changelogs/810.txt b/fastlane/metadata/android/en-US/changelogs/810.txt new file mode 100644 index 000000000..43fcc5287 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/810.txt @@ -0,0 +1,19 @@ +New +• Show video thumbnail on the lock screen when playing in the background + +Improved +• Add local playlist to queue when long pressing on background / popup button +• Make main page tabs scrollable and hide when there is only a single tab +• Limit amount of notification thumbnail updates in background player +• Add dummy thumbnail for empty local playlists +• Use *.opus file extension instead of *.webm and show "opus" in format label instead of "WebM Opus" in the download dropdown +• Add button to delete downloaded files or download history in "Downloads" +• [YouTube] Add support to /c/shortened_url channel links + +Fixed +• Fixed multiple issues when sharing a video to NewPipe and downloading its streams directly +• Fixed player access out of its creation thread +• Fixed search result paging +• [YouTube] Fixed switching on null causing NPE +• [YouTube] Fixed viewing comments when opening an invidio.us url +• [SoundCloud] Updated client_id \ No newline at end of file From fd62411b359be3d3d51feea1a1da9a5864ffd344 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Sat, 18 Jan 2020 00:09:40 +0100 Subject: [PATCH 0184/1194] Bump version to 0.18.1 and version code to 810 --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0aff5ac8b..f54598964 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ android { applicationId "org.schabi.newpipe" minSdkVersion 19 targetSdkVersion 28 - versionCode 800 - versionName "0.18.0" + versionCode 810 + versionName "0.18.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true From 845767e2f8f62dc34452e54723a2dd3670c93ff7 Mon Sep 17 00:00:00 2001 From: kapodamy Date: Sat, 18 Jan 2020 00:43:38 -0300 Subject: [PATCH 0185/1194] StandardCharsets.UTF_8 instead of Charset.forName("utf-8") --- .../main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java b/app/src/main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java index 75e16edad..696f24d05 100644 --- a/app/src/main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java +++ b/app/src/main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java @@ -22,7 +22,7 @@ public class SrtFromTtmlWriter { private SharpStream out; private boolean ignoreEmptyFrames; - private final Charset charset = Charset.forName("utf-8"); + private final Charset charset = StandardCharsets.UTF_8; private int frameIndex = 0; From a2d3e2c7e0799fbc9fba717d7cc586dbf63ac241 Mon Sep 17 00:00:00 2001 From: kapodamy Date: Sat, 18 Jan 2020 01:10:25 -0300 Subject: [PATCH 0186/1194] 2 typo fixup * add missing namespace of StandardCharsets * use an unused constructor argument --- .../java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java b/app/src/main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java index 696f24d05..e20b06352 100644 --- a/app/src/main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java +++ b/app/src/main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java @@ -12,7 +12,7 @@ import org.schabi.newpipe.streams.io.SharpStream; import java.io.ByteArrayInputStream; import java.io.IOException; import java.nio.charset.Charset; -import java.text.ParseException; +import java.nio.charset.StandardCharsets; /** * @author kapodamy @@ -28,7 +28,7 @@ public class SrtFromTtmlWriter { public SrtFromTtmlWriter(SharpStream out, boolean ignoreEmptyFrames) { this.out = out; - this.ignoreEmptyFrames = true; + this.ignoreEmptyFrames = ignoreEmptyFrames; } private static String getTimestamp(Element frame, String attr) { From b155f23d276ebc48ffe5fe86759320b6751ac512 Mon Sep 17 00:00:00 2001 From: bopol Date: Sat, 18 Jan 2020 09:46:38 +0100 Subject: [PATCH 0187/1194] fix: wrong language shown in playback parameters dialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a hardly reproduceable bug that I hopefully fixed. After a long time of watching videos, you could have your system language shown in playback parameters dialog. Calling changeAppLanguage(getAppLocale(…),…) onCreate will most certainly fix this bug --- .../schabi/newpipe/player/helper/PlaybackParameterDialog.java | 4 ++++ 1 file changed, 4 insertions(+) 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 4feed74fe..2aefa675e 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 @@ -17,6 +17,8 @@ import org.schabi.newpipe.R; import org.schabi.newpipe.util.SliderStrategy; import static org.schabi.newpipe.player.BasePlayer.DEBUG; +import static org.schabi.newpipe.util.Localization.changeAppLanguage; +import static org.schabi.newpipe.util.Localization.getAppLocale; public class PlaybackParameterDialog extends DialogFragment { @NonNull private static final String TAG = "PlaybackParameterDialog"; @@ -108,6 +110,7 @@ public class PlaybackParameterDialog extends DialogFragment { @Override public void onCreate(@Nullable Bundle savedInstanceState) { + changeAppLanguage(getAppLocale(getContext()), getResources()); super.onCreate(savedInstanceState); if (savedInstanceState != null) { initialTempo = savedInstanceState.getDouble(INITIAL_TEMPO_KEY, DEFAULT_TEMPO); @@ -137,6 +140,7 @@ public class PlaybackParameterDialog extends DialogFragment { @NonNull @Override public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { + changeAppLanguage(getAppLocale(getContext()), getResources()); final View view = View.inflate(getContext(), R.layout.dialog_playback_parameter, null); setupControlViews(view); From e08e7245738ca8ee5dab4dc5801dc6d35399873a Mon Sep 17 00:00:00 2001 From: bopol Date: Sat, 18 Jan 2020 10:46:53 +0100 Subject: [PATCH 0188/1194] upload date in description now matches newpipe's language --- .../main/java/org/schabi/newpipe/util/Localization.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/util/Localization.java b/app/src/main/java/org/schabi/newpipe/util/Localization.java index 3f555fcfd..d2fbd3a65 100644 --- a/app/src/main/java/org/schabi/newpipe/util/Localization.java +++ b/app/src/main/java/org/schabi/newpipe/util/Localization.java @@ -1,5 +1,6 @@ package org.schabi.newpipe.util; +import android.annotation.SuppressLint; import android.content.Context; import android.content.SharedPreferences; import android.content.res.Configuration; @@ -118,12 +119,13 @@ public class Localization { return nf.format(number); } - public static String formatDate(Date date) { - return DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.getDefault()).format(date); + public static String formatDate(Date date, Context context) { + return DateFormat.getDateInstance(DateFormat.MEDIUM, getAppLocale(context)).format(date); } + @SuppressLint("StringFormatInvalid") public static String localizeUploadDate(Context context, Date date) { - return context.getString(R.string.upload_date_text, formatDate(date)); + return context.getString(R.string.upload_date_text, formatDate(date, context)); } public static String localizeViewCount(Context context, long viewCount) { From 77aa12dd8195dae7a2f782f97d3439e4e39fd1a1 Mon Sep 17 00:00:00 2001 From: Xiang Rong Lin <41164160+XiangRongLin@users.noreply.github.com> Date: Mon, 13 Jan 2020 20:24:24 +0100 Subject: [PATCH 0189/1194] Rename local playlist by long-clicking in BookmarkFragment. After long clicking on a local playlist, show a dialog with 2 options for "rename" and "delete" Rename shows another dialog to let the user rename the playlist. Delete lets the user delete a playlist like before. --- .../local/bookmark/BookmarkFragment.java | 67 ++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) 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 8f67367aa..6a7f16025 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 @@ -1,8 +1,13 @@ package org.schabi.newpipe.local.bookmark; import android.app.AlertDialog; +import android.content.DialogInterface; +import android.content.res.Resources; import android.os.Bundle; import android.os.Parcelable; +import android.util.Log; +import android.widget.EditText; +import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.FragmentManager; @@ -10,6 +15,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import io.reactivex.disposables.Disposable; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; import org.schabi.newpipe.NewPipeDatabase; @@ -118,7 +124,33 @@ public final class BookmarkFragment @Override public void held(LocalItem selectedItem) { if (selectedItem instanceof PlaylistMetadataEntry) { - showLocalDeleteDialog((PlaylistMetadataEntry) selectedItem); + final Resources resources = getContext().getResources(); + String[] commands = new String[]{ + resources.getString(R.string.rename_playlist), + resources.getString(R.string.delete_playlist) + }; + + final DialogInterface.OnClickListener actions = (dialogInterface, i) -> { + switch (i) { + case 0: + showLocalRenameDialog((PlaylistMetadataEntry) selectedItem); + break; + case 1: + showLocalDeleteDialog((PlaylistMetadataEntry) selectedItem); + break; + } + }; + + final View bannerView = View.inflate(activity, R.layout.dialog_title, null); + bannerView.setSelected(true); + TextView titleView = bannerView.findViewById(R.id.itemTitleView); + titleView.setText(((PlaylistMetadataEntry) selectedItem).name); + + new AlertDialog.Builder(getActivity()) + .setCustomTitle(bannerView) + .setItems(commands, actions) + .create() + .show(); } else if (selectedItem instanceof PlaylistRemoteEntity) { showRemoteDeleteDialog((PlaylistRemoteEntity) selectedItem); @@ -271,6 +303,39 @@ public final class BookmarkFragment .show(); } + private void showLocalRenameDialog(PlaylistMetadataEntry selectedItem) { + final View dialogView = View.inflate(getContext(), R.layout.dialog_playlist_name, null); + EditText nameEdit = dialogView.findViewById(R.id.playlist_name); + nameEdit.setText(selectedItem.name); + nameEdit.setSelection(nameEdit.getText().length()); + + final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder( + getContext()) + .setTitle(R.string.rename_playlist) + .setView(dialogView) + .setCancelable(true) + .setNegativeButton(R.string.cancel, null) + .setPositiveButton(R.string.rename, (dialogInterface, i) -> { + changeLocalPlaylistName(selectedItem.uid, nameEdit.getText().toString()); + }); + dialogBuilder.show(); + } + + private void changeLocalPlaylistName(long id, String name) { + if (localPlaylistManager == null) { + return; + } + + Log.d(TAG, "Updating playlist id=[" + id + + "] with new name=[" + name + "] items"); + + localPlaylistManager.renamePlaylist(id, name); + final Disposable disposable = localPlaylistManager.renamePlaylist(id, name) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(longs -> {/*Do nothing on success*/}, this::onError); + disposables.add(disposable); + } + private static List merge(final List localPlaylists, final List remotePlaylists) { List items = new ArrayList<>( From 9d5612d1046b08ae9c03d75e561868ce73c66604 Mon Sep 17 00:00:00 2001 From: B0pol Date: Sat, 18 Jan 2020 19:34:22 +0000 Subject: [PATCH 0190/1194] Translated using Weblate (German) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-de/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 53b9a52eb..9a2482814 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -155,7 +155,7 @@ Über Freies und schlankes Streaming für Android. NewPipes Lizenz - Ob Ideen, Übersetzungen, Design-Änderungen, Code-Aufräumung oder richtig große Code-Änderungen – Hilfe ist immer willkommen. Je mehr geholfen wird, desto besser wird NewPipe! + Ob Ideen, Übersetzungen, Design-Änderungen, Code-Aufräumung oder richtig große Code-Änderungen — Hilfe ist immer willkommen. Je mehr geholfen wird, desto besser wird NewPipe! Drittanbieter-Lizenzen Auf GitHub ansehen Beitragen @@ -366,7 +366,7 @@ yourID, soundcloud.com/yourid Keine Streams zum Download verfügbar Bevorzugte \"Öffnen\" Aktion - Standardaktion beim Öffnen von Inhalten - %s + Standardaktion beim Öffnen von Inhalten — %s Untertitel Textgröße und Hintergrund der Untertitel im Player anpassen. Wird erst nach Neustart der App wirksam. Keine App zum Abspielen dieser Datei installiert @@ -392,7 +392,7 @@ Unbegrenzt Auflösung bei Verwendung mobiler Daten begrenzen Minimieren beim Appwechsel - Aktion beim Umschalten auf eine andere App vom Haupt-Videoplayer - %s + Aktion beim Umschalten auf eine andere App vom Haupt-Videoplayer — %s Keine Zum Hintergrund-Player minimieren Zum Popup-Player minimieren From 6b7043fb9d7aa50ecf47b691f908ee70e8c56572 Mon Sep 17 00:00:00 2001 From: B0pol Date: Fri, 17 Jan 2020 08:52:56 +0000 Subject: [PATCH 0191/1194] Translated using Weblate (French) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-fr/strings.xml | 31 ++++++++++++++------------ 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 444310aef..7695fe31c 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -19,14 +19,14 @@ Partager Partager avec Affiche une option pour lire une vidéo via Kodi - Afficher l’option « Lire avec Kodi » + Afficher l’option « Lire avec Kodi » Publiée le %1$s %1$s vues Audio Format audio par défaut Télécharger Suivant - Afficher les vidéos « Suivantes » et « Similaires » + Afficher les vidéos « Suivantes » et « Similaires » URL non pris en charge Vidéo et audio Autre @@ -50,8 +50,8 @@ Dossier de téléchargement audio Les fichiers audio téléchargés sont stockés ici Choisissez le dossier de téléchargement des fichiers audio - Impossible de créer le répertoire de téléchargement « %1$s » - Répertoire de téléchargement « %1$s » créé + Impossible de créer le répertoire de téléchargement « %1$s » + Répertoire de téléchargement « %1$s » créé Erreur Impossible d’analyser le site web Contenu indisponible @@ -231,8 +231,8 @@ Retirer Détails Paramètres audios - Afficher l’astuce « Maintenir pour ajouter » - Affiche l’astuce lors de l’appui du bouton « Arrière-plan » ou « Mode flottant » sur la page de détails d’une vidéo + Afficher l’astuce « Maintenir pour ajouter » + Affiche l’astuce lors de l’appui du bouton « Arrière-plan » ou « Mode flottant » sur la page de détails d’une vidéo [Inconnu] Récupération depuis l’erreur du lecteur Kiosque @@ -348,11 +348,11 @@ \n1. Suivez ce lien : %1$s. \n2. Connectez-vous à votre compte. \n3. Un téléchargement va démarrer (celui du fichier d’exportation). - Veuillez importer un profil SoundCloud en saisissant l’URL de votre profil ou votre identifiant. -\n -\n1. Activez le « mode bureau » dans votre navigateur web (le site n’est pas disponible pour les appareils mobiles). -\n2. Suivez cette URL : %1$s. -\n3. Connectez-vous à votre compte. + Veuillez importer un profil SoundCloud en saisissant l’URL de votre profil ou votre identifiant. +\n +\n1. Activez le « mode bureau » dans votre navigateur web (le site n’est pas disponible pour les appareils mobiles). +\n2. Suivez cette URL : %1$s. +\n3. Connectez-vous à votre compte. \n4. Copiez l’URL du profil vers lequel vous venez d’être redirigé. votre identifiant, soundcloud.com/votreidentifiant Cette opération peut charger énormément la connexion réseau. @@ -484,7 +484,7 @@ NewPipe a été fermé alors qu’il travaillait sur le fichier Aucun espace disponible sur le périphérique Progression perdue, car le fichier a été effacé - Êtes-vous sûr \? + Voulez-vous effacer l\'historique de téléchargement ou supprimer tous les fichiers téléchargés \? Limiter la file d’attente de téléchargement Un téléchargement s’exécutera en même temps Démarrer les téléchargements @@ -508,8 +508,8 @@ Kiosque par défaut Personne ne regarde - %s regarde - %s regardent + %s spectateur + %s spectateurs Personne n\'écoute @@ -535,4 +535,7 @@ Généré automatiquement (pas de téléverseur trouvé) Activer la vidéo miniaturisée sur l\'écran de verrouillage En utilisant le lecteur audio, la miniature de la vidéo sera affichée sur l\'écran de verrouillage + Effacer l\'historique de téléchargement + Supprimer les fichiers téléchargés + %1$s téléchargements supprimés \ No newline at end of file From 2873f723e88c4c9b41928082e1969df101b19e04 Mon Sep 17 00:00:00 2001 From: Igor Nedoboy Date: Thu, 16 Jan 2020 20:12:21 +0000 Subject: [PATCH 0192/1194] Translated using Weblate (Russian) Currently translated at 100.0% (527 of 527 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 1da98cc74..975a9479b 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -330,7 +330,7 @@ Подогнать Заполнить Приблизить - Созданы автоматически + Создано автоматически Включить LeakCanary Мониторинг утечки памяти может привести к зависанию приложения Сообщать об ошибках жизненного цикла From 5dbab85505a1f20255dcc8cd566057f2fb12221d Mon Sep 17 00:00:00 2001 From: pjammo Date: Thu, 16 Jan 2020 16:07:08 +0000 Subject: [PATCH 0193/1194] Translated using Weblate (Italian) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-it/strings.xml | 87 ++++++++++++++------------ 1 file changed, 46 insertions(+), 41 deletions(-) diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 4942f4720..9d9241045 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -30,9 +30,9 @@ URL non supportato Lingua Predefinita per Contenuti Video e Audio - Miniatura anteprima video + Copertina di anteprima video Riproduci video, durata: - Miniatura dell\'immagine di profilo dell\'utente + Immagine di profilo dell\'utente Non mi piace Mi piace Impossibile creare la cartella di download \'%1$s\' @@ -51,7 +51,7 @@ Riproduci Errore Errore di connessione - Impossibile caricare tutte le miniature + Impossibile caricare tutte le copertine Impossibile decriptare la firma dell\'URL del video Contenuto non disponibile Usa Tor @@ -117,19 +117,19 @@ È richiesta la risoluzione del reCAPTCHA Più tardi - Apri in modalità popup - Modalità popup di NewPipe - Riproduzione in Modalità Popup + Apri in modalità Popup + Modalità Popup di NewPipe + Riproduzione in modalità Popup Disattivato L\'audio potrebbe non essere disponibile per ALCUNE risoluzioni - In sottofondo + In Sottofondo Popup Risoluzione Predefinita Popup Mostra Altre Risoluzioni Solo alcuni dispositivi supportano la riproduzione video in 2K e 4K Formato Video Predefinito Ricorda Dimensione e Posizione Popup - Ricorda l\'ultima dimensione e posizione della finestra popup + Ricorda dimensione e posizione della finestra Popup Controllo Movimenti Lettore Multimediale Usa i movimenti per controllare luminosità e volume del lettore multimediale Suggerimenti Ricerca @@ -140,8 +140,8 @@ Cancella Ridimensionamento Risoluzione migliore - Questo permesso è necessario -\nper riprodurre in modalità popup + Questo permesso è necessario +\nper utilizzare il lettore Popup Impostazioni Informazioni Licenze di Terze Parti @@ -191,7 +191,7 @@ Playlist Annulla Notifiche NewPipe - Notifiche per NewPipe in background e per il lettore a comparsa + Notifiche per lettore in Sottofondo e Popup Nessun risultato Nessun iscritto @@ -225,25 +225,25 @@ Top 50 New & hot Mostra Suggerimento \"Tieni Premuto per Accocodare\" - Mostra suggerimento quando il pulsante per la riproduzione \"popup\" o \"in sottofondo\" viene premuto nella pagina dei dettagli del video - In Coda in Sottofondo - In Coda in Modalità Popup + Nella pagina dei dettagli del video, mostra un suggerimento alla pressione dei pulsanti per la riproduzione Popup o in Sottofondo + Accoda in Sottofondo + Accodato in Popup Riproduci tutto Impossibile riprodurre questo flusso Si è verificato un errore irreversibile Ripristino dell\'errore del lettore multimediale - Riproduzione in sottofondo - Riproduzione in modalità a comparsa + Riproduzione in Sottofondo + Lettore Popup Rimuovi Dettagli - Impostazioni audio - Tenere premuto per aggiungere alla coda + Impostazioni Audio + Tenere premuto per accodare [Sconosciuto] - In coda in sottofondo - In coda nel riproduttore a comparsa + Accoda in Sottofondo + Accoda in Popup Inizia la riproduzione qui Avvia riproduzione in sottofondo - Avvia riproduzione a comparsa + Avvia subito in Popup Dona Sito Visita il sito di NewPipe per informazioni e novità. @@ -251,9 +251,9 @@ Restituisci Paese Predefinito per Contenuti Cambia orientamento - Passa alla riproduzione in background + Passa in Sottofondo Passa a Popup - Passa alla produzione predefinita + Passa a Principale Servizio Apri il menu Chiudi il menu @@ -265,8 +265,8 @@ Nessun flusso video trovato Nessun flusso audio trovato Lettore video - Riproduzione in sottofondo - Riproduzione in modalità popup + Riproduzione in Sottofondo + Lettore Popup Raccogliendo informazioni… Caricamento del contenuto richiesto Importa database @@ -298,13 +298,13 @@ Rinomina Nome Aggiunti alla playlist - Imposta come miniatura della playlist + Imposta come Copertina della Playlist Segnalibri playlist Rimuovi segnalibro Eliminare la playlist\? Playlist creata Aggiunto alla Playlist - Miniatura della Playlist cambiata. + Copertina playlist cambiata. Impossibile eliminare la Playlist. Nessun Sottotitolo Rientrato @@ -352,7 +352,7 @@ Tieni presente che questa operazione può consumare una grande quantità di traffico dati. \n \nVuoi continuare? - Carica Anteprime + Carica Copertine Disabilita per prevenire il caricamento delle anteprime, risparmiando dati e memoria. La modifica di questa opzione cancellerà la cache delle immagini in memoria e sul disco. Cache immagini svuotata Pulisci Cache Metadati @@ -393,11 +393,11 @@ Avanzamento veloce durante il silenzio Step Reset - Minimizza al cambio dell\'applicazione - Azione quando si passa ad un\'altra app dal lettore video principale — %s - Nessuna - Minimizza al lettore in sottofondo - Minimizza al lettore popup + Riduci Cambiando App + Azione da eseguire cambiando app dal lettore video principale — %s + Niente + Riduci in Sottofondo + Riduci a Popup Canali Playlist Tracce @@ -423,7 +423,7 @@ Selezione Aggiornamenti Mostra una notifica per suggerire l\'aggiornamento dell\'app se una nuova versione è disponibile - Visualizzazione a lista + Modalità Visualizzazione Lista Lista Griglia Automatica @@ -433,14 +433,14 @@ Finito In attesa in pausa - in coda + accodato post-processo Accoda Azione negata dal sistema Download fallito Download terminato %s download terminati - Genera un nome unico + Genera Nome Univoco Sovrascrivi Esiste già un file scaricato con lo stesso nome C\'è un download in corso con questo nome @@ -484,11 +484,11 @@ File spostato o cancellato Esiste già un file con questo nome impossibile sovrascrivere il file - C\'è un download in corso con questo nome + C\'è un download in attesa con questo nome NewPipe è stato chiuso mentre lavorava sul file Spazio insufficiente sul dispositivo Progresso perso poiché il file è stato eliminato - Sei sicuro\? + Pulire la cronologia dei download o eliminare tutti i file scaricati\? Sarà avviato un solo dowload per volta Avvia downloads Metti in pausa i downloads @@ -519,10 +519,10 @@ Contenuti in Evidenza Predefiniti Durata Avanzamento e Riavvolgimento Rapidi Istanze PeerTube - Imposta le tue istanze PeerTube preferite - Trova le istanze più adatte a te su https://joinpeertube.org/instances#instances-list + Seleziona le istanze PeerTube preferite + Trova le istanze più adatte a te su %s Aggiungi Istanza - Inserisci URL Istanza + Inserisci URL istanza Impossibile convalidare l\'istanza Sono supportati solo gli URL HTTPS L\'istanza esiste già @@ -533,4 +533,9 @@ recupero Impossibile recuperare questo download Scegli un\'Istanza + Abilita Copertine sulla Schermata di Blocco + Durante la riproduzione in sottofondo, verrà mostrata la copertina del video sulla schermata di blocco + Svuota Cronologia Download + Elimina File Scaricati + %1$s download eliminati \ No newline at end of file From 1c53b22239b1ef4595a68a7f19390b86b206947a Mon Sep 17 00:00:00 2001 From: ssantos Date: Wed, 15 Jan 2020 20:13:19 +0000 Subject: [PATCH 0194/1194] Translated using Weblate (Portuguese) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-pt/strings.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 98b85bcab..7d3fb68e3 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -487,7 +487,7 @@ Não há espaço disponível no dispositivo Progresso perdido, porque o ficheiro foi eliminado Tempo limite de conexão - Tem a certeza\? + Quer limpar o seu histórico de descarregamentos ou apagar todos os ficheiros descarregados\? Limitar a fila de transferências Uma transferências será executada ao mesmo tempo Iniciar transferências @@ -534,4 +534,7 @@ Escolha uma instância Ativar miniatura do vídeo no ecrã de bloqueio Ao usar o reprodutor de fundo, uma miniatura de vídeo será exibida no ecrã de bloqueio + Limpar histórico de descarregamentos + Apagar ficheiros descarregados + %1$s descarregamentos apagados \ No newline at end of file From 9c9a432ea0240d33d43a9733ec08251c1c824b91 Mon Sep 17 00:00:00 2001 From: Osoitz Date: Sat, 18 Jan 2020 11:53:19 +0000 Subject: [PATCH 0195/1194] Translated using Weblate (Basque) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-eu/strings.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index b376f1f6d..7563e1be5 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -488,7 +488,7 @@ NewPipe itxi egin da fitxategian lanean zegoela Ez dago lekurik gailuan Progresioa galdu da, fitxategia ezabatu delako - Ziur al zaude\? + Zure deskargen historiala garbitu nahi duzu ala deskargatutako fitxategi guztiak ezabatu\? Mugatu deskargen ilara Deskarga bakarra aldi berean Hasi deskargak @@ -533,4 +533,9 @@ berreskuratzen Ezin da deskarga hau berreskuratu Aukeratu instantzia + Gaitu bideoaren iruditxoa blokeo pantailan + Bigarren planoko erreproduzigailua erabiltzean bideoaren iruditxo bat bistaratuko da blokeo pantailan + Garbitu deskargen historiala + Ezabatu deskargatutako fitxategiak + %1$s deskarga ezabatuta \ No newline at end of file From 36c4063db681c8769ed31d75a9d42f796badec88 Mon Sep 17 00:00:00 2001 From: B0pol Date: Fri, 17 Jan 2020 08:55:28 +0000 Subject: [PATCH 0196/1194] Translated using Weblate (Esperanto) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-eo/strings.xml | 63 ++++++++++++++------------ 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 224e8837e..c6ce250e6 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -4,14 +4,14 @@ Eldonita je %1$s Instali Nuligi - Malfermi per krozilo + Malfermi en retumilo Konigi Elŝuti Serĉi Agordoj Ĉu vi signifis: %1$s\? Konigi kun - Elekti krozilon + Elekti retumilon turno Uzi eksteran filmetoludilon Uzi eksteran sonludilon @@ -66,7 +66,7 @@ Signali eraron Filmeto Reprovi - Premu serĉo por komenci + Premi serĉon por komenci Neniu elsendlflua ludilo trovita (instalu VLC por ludi ĝin). Malfermi en ŝprucfenestron modon Forigas aŭdon ĉe KELKAJ rezolucioj @@ -144,7 +144,7 @@ Konservi la historio de serĉo lokale Rigardu historion Spuri la viditajn filmetojn - Newpipe Sciifo + NewPipe Sciigo Sciigoj por NewPipe fono kaj ŝprucfenestroj ludiloj Ludilo Konduto @@ -159,7 +159,7 @@ Montri indikon kiam la fono aŭ ŝprucfenestro butono estas premita en la retpaĝo de dalatadoj de la filmeto Viciĝita en la ludilo en fono Viciĝita en ŝprucfenestro ludilo - Ludi ĉiuj + Ludi ĉiujn Ne povis ludi tion torenton Neatendebla eraro de ludilo okazis Reakiri el eraro de la ludilo @@ -180,7 +180,7 @@ Ŝangi al Ĉefa Servo Ĉiam - Nur unfoje + Nur unufoje Nevalida ligilo Neniuj filmeta torentoj trovitaj Neniuj sonaj torentoj trovis @@ -191,18 +191,18 @@ Eksporti historion, abonojn kaj ludlistoj Ĉiam peti Nova ludlisto - Forigi + Forviŝi Alinomi Nomo Aldoni al la ludlisto Meti kiel bildeto de ludlisto Legosigno Ludlisto - Forigi Legosignon - Ĉu forigi ĉi tiun ludliston \? + Forviŝi Legosignon + Ĉu forviŝi ĉi tiun ludliston \? Ludlisto kreita Ludlistita Bildeto de ludlisto ŝanĝiĝita. - Ne povis forigi ludlisto. + Ne povis forviŝi ludliston. Malcimigi Auto-vico sekva fluo Aŭto-aldoni rilatan enhavon kiam ludanta la lasta enhavo en malrepetita atendovico @@ -218,7 +218,7 @@ \n3. Elŝuto devus komenci (ĝi estas la dosiero de eksporto) Importu Soundcloud-n profilon tajpante ĉu la ligilon, ĉu vian ID : \n -\n1. Ebligu komputilon modon en krozilo (la retejo malhaveblas por poŝtelefonoj) +\n1. Ebligu komputilon modon en retumilon (la retejo malhaveblas por poŝtelefonoj) \n2. Iru tien: %1$s \n3. Ensalutu kiam oni petas vin \n4. Kopiu la ligilon de profilo ke oni kondikis vin. @@ -252,7 +252,7 @@ Ĝisdatigoj Dosiero forviŝita Sciigo por ĝisdatigi apon - Sciigo por nova versio de Newpipe + Sciigo por nova versio de NewPipe Ekstera konservejo malhavebla Elŝuti al ekstera SD-karto ne eblas. Ĉu vi volas restarigi la elŝutan dosierujon \? viciĝita @@ -281,7 +281,7 @@ Ludaj pozicioj forviŝitaj. Dosiero movita aŭ forviŝita ne povas dispremi la dosieron - Ĉu vi certas\? + Ĉu vi volas forviŝi vian historion de elŝutoj aŭ forviŝi la tutajn elŝutitajn dosierojn\? Limigi la elŝutan atendovicon Unu elŝuto ruliĝos en la sama tempo Komenci elŝutojn @@ -307,7 +307,7 @@ Komenci Paŭzigi Ludi - Forigi + Forviŝi Kontrolsumo Nova misio Bone @@ -341,7 +341,7 @@ Permesiloj Rigardu ĉe GitHub Permesilo de NewPipe - Ĉu vi havas ideojn pri; traduko, desegnaĵoj ŝanĝoj, purigado de kodo, aŭ realaj masivaj ŝanĝoj—helpo estas ĉiam bonvena. Ju pli oni faras, des pli bonas! + Ĉu vi havas ideojn pri; traduko, desegnaĵoj ŝanĝoj, purigado de kodo, aŭ realaj masivaj ŝanĝoj—helpo ĉiam estas bonvena. Ju pli oni faras, des pli bonas! Legi permesilon Kontribui Permesitaj karakteroj en dosiernomoj @@ -353,7 +353,7 @@ La historio estas malŝatita Historio La historio estas malplena - Historio vakigita + Historio forviŝita Neniuj rezultoj Neniu enhavo Neniuj abonantoj @@ -377,10 +377,10 @@ Komenci ludi ĉi tie Komenci ludi fone Donaci - NewPipe estas programada par volontuoj, elspezante tempo por alporti vin la plej bona sperto. Redonu por helpi programistojn plibonigi NewPipe dum ĝuante tason da kafo. + NewPipe estas programadita par volontuoj, elspezante tempo por alporti vin la plej bona sperto. Redoni por helpi programistojn plibonigi NewPipe dum ĝuante tason da kafo. Redoni Retejo - Vizitu la retejon de NewPipe por pli da informoj kaj novaĵoj. + Viziti la retejon de NewPipe por pli da informoj kaj novaĵoj. Malfermi la tirkeston Fermi la tirtekston Ekstaraj ludantoj ne suportas tiajn ligilojn @@ -395,8 +395,8 @@ Ĉi tio nuligos vian nunan aranĝon. Trenu por reorgidi Krei - Forigi Unu - Forigi ĉiujn + Forviŝi Unu + Forviŝi ĉiujn Rezigni Alinomi Ĉu vi volas forviŝi tion eron el la spekta historio \? @@ -440,11 +440,11 @@ NewPipe estas programaro sub rajtoceda permesilo: Vi povas uzi, studi, komuniki kaj plibonigi ĝin kiel vi volas. Precize, vi povas redistribui kaj/aŭ modifi ĝin sub la kondiĉoj de la Ĝenerala Publika Permesilo de GNU, kiel publikigita per la Free Software Foundation, ĉu en la versio 3, ĉu (se vi volas) ajna posta versio. Ĉu vi volas ankaŭ importi agordojn\? Privateca politiko de NewPipe - La NewPipe projekto serioze respektas vian privatecon. Konsekvence, la apo ne kolektas ajnan datumo sen via konsento. -\nLa privateco politiko de Newpipe detale eksplikas kion datumon estas sendita kaj stokita kiam vi sendas falegosignalon. + La NewPipe projekto serioze respektas vian privatecon. Konsekvence, la apo ne kolektas ajnan datumon sen via konsento. +\nLa privateco politiko de NewPipe detale eksplikas kion datumon estas sendita kaj stokita kiam vi sendas falegosignalon. Legi la privatecan politikon Por konformiĝi al la Ĝenerala Datum-Protekta Regularon (GDPR), ni allogas vian atenton al la privateca politiko de NewPipe. Bonvolu atentive legi ĝin. -\nVi devas akcepti ĝin por sendi nin la cimsignalo. +\nVi devas akcepti ĝin por sendi la cimsignalon al ni. Akcepti Rifuzi Neniu limo @@ -468,8 +468,8 @@ Krado Aŭto Ŝanĝi vidon - Ĝisdatigo de NewPipe havebla ! - Premu por elŝuti + Ĝisdatigo de NewPipe havebla! + Premi por elŝuti Finita Pritraktata Paŭzigita @@ -507,8 +507,8 @@ Defaŭlta Kiosko Neniu spektas - %s spektanta - %s spektanta + %s spektanto + %s spektantoj Neniu aŭskultas @@ -525,13 +525,16 @@ Ne povis validigi instanco Nur HTTPS ligiloj estas subtenitaj La instanco jam ekzistas - Loka - Freŝdate ĝisdatigita - La plej ŝatitatj + Lokaj + Freŝe aldonitaj + La plej ŝatitaj Aŭtomate generita (neniu alŝutilo trovita) Reakiranta Ne povas reakiri tion elŝuton Elektu instancon Enablu bildeta filmeton ĉe ŝlosita ekrano Uzante la fona ludilo, bildeta filmeto vidiĝos ĉe ŝlosita ekrano + Forviŝi la historion de elŝutoj + Forviŝi elŝutitajn dosierojn + %1$s elŝutoj forviŝitaj \ No newline at end of file From 84dd1a688eb5d7329289384b00bc2460e84c6aea Mon Sep 17 00:00:00 2001 From: zeritti Date: Fri, 17 Jan 2020 21:40:15 +0000 Subject: [PATCH 0197/1194] Translated using Weblate (Czech) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-cs/strings.xml | 35 ++++++++++++++++++++------ 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 66c952a26..548358473 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -143,7 +143,7 @@ otevření ve vyskakovacím okně Zobrazovat návrhy při vyhledávání Historie vyhledávání Hledané výrazy lokálně uchovávat - Historie zhlédnutí + Historie sledování Evidovat zhlédnutá videa Přehrávat po přechodu do popředí Pokračovat v přehrávání po přerušení (např. hovor) @@ -319,7 +319,7 @@ otevření ve vyskakovacím okně Povolit službu LeakCanary Monitoring úniku paměti může způsobit nereagování aplikace při heap dumpingu Nahlásit mimo-cyklické chyby - Vynutit vykazování výjimek Rx mimo fragment nebo životnost cyklu po odstranění + Vynutit hlášení nedoručitelných výjimek Rx mimo fragment nebo trvání činnosti po odstranění Použít rychlé nepřesné hledání Nepřesné hledání umožní přehrávači posouvat se rychleji, ale se sníženou přesností Načítat náhledy @@ -365,7 +365,7 @@ otevření ve vyskakovacím okně \n \nChcete pokračovat? Ovládání rychlosti přehrávání - Rychlost + Tempo Výška tónu Rozpojit (může způsobit zkreslení) Výchozí nastavení @@ -483,8 +483,8 @@ otevření ve vyskakovacím okně Zavřít Stahování na externí SD kartu není možné. Resetovat umístění složky pro stahování\? Pokračovat v přehrávání - Obnovit poslední přehrávanou pozici - Pořadí v seznamech + Obnovit poslední pozici přehrávání + Pozice v seznamech Vymazat data Soubor přemístěn nebo smazán soubor nelze přepsat @@ -492,7 +492,7 @@ otevření ve vyskakovacím okně NewPipe byl ukončen v průběhu zpracovávání souboru V zařízení nezbývá žádné místo Postup ztracen, protože soubor byl smazán - Jste si jisti\? + Jste si jisti smazáním své historie stahování nebo smazáním všech stažených souborů\? Omezit frontu stahování Najednou se bude stahovat pouze jeden soubor Začít stahování @@ -504,7 +504,7 @@ otevření ve vyskakovacím okně Použít SAF Storage Access Framework umožňuje stahovat na externí SD kartu. \nUpozornění: některá zařízení jsou nekompatibilní - Ukázat poziční indikátory playbacku v seznamech + Zobrazit pozici přehrávání v seznamech Pozice playbacku smazány. Timeout spojení Smazat pozice playbacku @@ -526,4 +526,25 @@ otevření ve vyskakovacím okně Ke změně jazyka dojde po restartu aplikace. Výchozí kiosek + Délka přetočení vpřed/zpět + Instance PeerTube + Vybrat oblíbené instance PeerTube + Vyhledat nejvhodnější instance na %s + Přidat instanci + Zadat URL instance + Instanci nebylo možno potvrdit + Podporujeme pouze URL s HTTPS + Instance již existuje + Místní + Přidány nedávno + Nejoblíbenější + Autogenerovány (uploader nenalezen) + obnovuji + Toto stahování nelze obnovit + Vyberte instanci + Zapnout náhled videa na zamknuté obrazovce + Hraje-li video na pozadí, náhled videa se ukáže na zamknuté obrazovce + Smazat historii stahování + Smazat stažené soubory + Smazat %1$s stahování \ No newline at end of file From de1a92539a658e77bbbc59716c40be4a38c48d22 Mon Sep 17 00:00:00 2001 From: thami simo Date: Thu, 16 Jan 2020 04:11:00 +0000 Subject: [PATCH 0198/1194] Translated using Weblate (Arabic) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-ar/strings.xml | 62 ++++++++++++++------------ 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index b1dad5672..02f79c8ab 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -20,7 +20,7 @@ يتم تخزين ملفات الفيديو التي تم تنزيلها هنا مجلد تحميل الفيديو "لا يمكن إنشاء مجلد للتنزيلات في '%1$s'" - دليل التنزيل الذي تم إنشاؤه \'%1$s\' + إنشاء دليل التحميل \'%1$s\' تثبيت تطبيق Kore غير موجود. هل تريد تثبيته ؟ مضيء @@ -42,7 +42,7 @@ مشاركة مشاركة بواسطة عرض مقاطع الفيديو \"التالية\" و \"المشابهة\" - عرض خيارات تشغيل الفيديو من خلال مركز كودي ميديا + اعرض خيار لتشغيل الفيديو عبر مركز وسائط Kodi عرض خيار التشغيل بواسطة كودي السمة تم النشر يوم %1$s @@ -57,7 +57,7 @@ خطأ تعذرت عملية تحليل الموقع تعذر فك تشفير توقيع رابط الفيديو - اضغط بحث للبدء + انقر فوق بحث لتبدأ اشتراك مشترك الرئيسية @@ -69,8 +69,8 @@ مراقبة السجل التاريخ و ذاكرة التخزين المؤقت محتوى - الملفات المحملة - الملفات المحملة + التحميلات + التحميلات الجميع القناة الفيديو @@ -80,7 +80,7 @@ التاريخ التاريخ فتح في وضع منبثق - إزالة الصوت في بعض مستوى الدقة + يزيل الصوت في بعض القرارات وضع النوافذ المنبثقة NewPipe تم إلغاء الاشتراك في القناة تعذر تغيير حالة الاشتراك @@ -113,7 +113,7 @@ محتوى مقيد بحسب العمر "إظهار الفيديو المقيد بحسب العمر. يمكن السماح باستخدام هذه المواد من \"الإعدادات\"." بث مباشر - تقرير عن مشكلة + تقرير خطأ قائمة التشغيل نعم لاحقاً @@ -155,15 +155,15 @@ تم رفض إذن الوصول إلى التخزين ألف مليون - G + B ليس هناك مشترِكون - %s لا يوجد مشاركين + %s لا يوجد مشترك %s مشترك - %s مشاريكان - %s اشتراكات - %s مشاركون - %s اشتراك + %s المشتركين + %s المشتركين + %s المشتركين + %s المشتركين دون مشاهدات لاتوجد فيديوهات @@ -200,7 +200,7 @@ فتح الموقع المساهمون التراخيص - تطبيق مجاني خفيف الوزن وبث حي على نظام أندرويد. + تطبيق مجاني خفيف البث على أندرويد. ساهم إذا كانت لديك أفكار؛ أو ترجمة، أو تغييرات تخص التصميم، أو تنظيف و تحسين الشفرة البرمجية ، أو تعديلات عميقة عليها، فتذكر أنّ مساعدتك دائما موضع ترحيب. وكلما أتممنا شيئا كلما كان ذلك أفضل ! عرض على GitHub @@ -238,12 +238,12 @@ تحدي الكابتشا ضغط مطول للإدراج الى قائمة الانتظار - %s بدون مشهد - %s شاهد - %s مشاهدتان - %s مشاهدات - %s مشاهدون - %s شاهدو + %s بدون مشهادة + %s مشاهدة + %s مشاهدة + %s مشاهدة + %s مشاهدة + %s مشاهدة فيديوهات @@ -425,7 +425,7 @@ تتبيه تحديث التطبيق إيماءة التحكم بالصوت الأحداث - إخطارات لنسخة NewPipe الجديدة + الإخطارات لإصدار NewPipe الجديد وحدة التخزين الخارجية غير متوفرة "التنزيل على بطاقة SD الخارجية غير ممكن. إعادة تعيين موقع مجلد التحميل؟" باستخدام علامات التبويب الافتراضية ، خطأ أثناء قراءة علامات التبويب المحفوظة @@ -449,7 +449,7 @@ متوقف في قائمة الانتظار قيد المعالجة - قائمه انتظار + طابور تم رفضها من قبل النظام فشل التنزيل تم الانتهاء من التحميل @@ -504,7 +504,7 @@ لم يتبقى مساحة في الجهاز تم فقد التقدم بسبب حذف الملف انتهى وقت الاتصال - هل أنت واثق؟ + هل تريد محو سجل التنزيل أو حذف جميع الملفات التي تم تنزيلها؟ حد قائمة انتظار التنزيل سيتم تشغيل تنزيل واحد في نفس الوقت بدء التنزيلات @@ -542,11 +542,11 @@ تسريع إلى الأمام/-ترجيع وقت البحث مثيلات خوادم پيرتيوب - عيّن مثيلات خوادم پيرتيوب التي تُفضّلها + حدد مثيلات PeerTube المفضلة لديك إضافة نموذج - أدخل رابط مثيل الخادم - فشل في التحقق من مثيل الخادم - فقط عناوين https المدعومة + أدخل عنوان URL للمثيل + لا يمكن التحقق من صحة المثال + يتم دعم عناوين URL HTTPS فقط مثيل الخادم موجود بالفعل محلي أضيف مؤخرا @@ -554,5 +554,11 @@ تم إنشاؤه-تلقائيًا (لم يتم العثور على برنامج تحميل) استرد لا يمكن استرداد هذا التنزيل - اختيار مثيل خادم + اختيار مثيل + ابحث عن الحالات التي تناسبك على %s + تمكين صور مصغرة قفل شاشة فيديو + عند استخدام مشغل الخلفية ، سيتم عرض صورة مصغرة للفيديو على شاشة القفل + تنظيف تاريخ التحميل + حذف الملفات التي تم تنزيلها + التنزيلات %1$s المحذوفة \ No newline at end of file From 7e9345680578174a24043e89fb47eebb03600fd2 Mon Sep 17 00:00:00 2001 From: zmni Date: Fri, 17 Jan 2020 16:25:26 +0000 Subject: [PATCH 0199/1194] Translated using Weblate (Indonesian) Currently translated at 99.8% (526 of 527 strings) --- app/src/main/res/values-id/strings.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index 8677df678..dd8413be8 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -480,7 +480,7 @@ NewPipe telah ditutup saat sedang memproses berkas Tidak ada ruang kosong tersisa pada perangkat Kehilangan laju, karena berkas telah dihapus - Apakah anda yakin\? + Apakah anda yakin ingin menghapus semua riwayat unduhan dan berkas yang telah diunduh\? Batasi antrean unduhan Satu unduhan akan berjalan pada waktu yang bersamaan Mulai unduh @@ -527,4 +527,8 @@ Pilih situs Aktifkan kunci layar thumbnail video Ketika menggunakan pemutar latar belakang, thumbnail video akan ditampilkan di tampilan kunci layar + Kiosk Default + Hapus riwayat unduhan + Hapus berkas yang diunduh + %1$s unduhan dihapus \ No newline at end of file From 366c55c8f49b9578b5ef6fcfe9ff1d2aa01bfc6a Mon Sep 17 00:00:00 2001 From: B0pol Date: Fri, 17 Jan 2020 09:02:16 +0000 Subject: [PATCH 0200/1194] Translated using Weblate (Polish) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-pl/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 0da89ad48..4d2b38b5f 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -543,5 +543,5 @@ Podczas korzystania z odtwarzacza w tle na ekranie blokady zostanie wyświetlona miniatura filmu Wyczyść historię pobierania Usuń pobrane pliki - Usunięte% 1$s pobrania + Usunięte %1$s pobrania \ No newline at end of file From 4797cd91840a51e26728a97d111af002282da97c Mon Sep 17 00:00:00 2001 From: Matsuri Date: Sat, 18 Jan 2020 03:50:06 +0000 Subject: [PATCH 0201/1194] Translated using Weblate (Chinese (Simplified)) Currently translated at 98.5% (519 of 527 strings) --- .../main/res/values-b+zh+HANS+CN/strings.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/main/res/values-b+zh+HANS+CN/strings.xml b/app/src/main/res/values-b+zh+HANS+CN/strings.xml index 078379683..4538fc184 100644 --- a/app/src/main/res/values-b+zh+HANS+CN/strings.xml +++ b/app/src/main/res/values-b+zh+HANS+CN/strings.xml @@ -130,8 +130,8 @@ 没有结果 没有订阅者 - %s个订阅者 - + %s 位订阅者 + 没有视频 拖动以重新排序 @@ -410,8 +410,8 @@ NewPipe 项目非常重视您的隐私。因此,未经您的同意,应用程序不会收集任何数据。 \nNewPipe 的隐私政策详细解释了在发送崩溃报告时发送和存储的数据。 阅读隐私政策 - 为了遵守欧洲一般数据保护条例 (GDPR),我们提请您注意 NewPipe 的隐私政策。请仔细阅读。 -\n您必须接受它才能向我们发送错误报告。 + 为了遵守欧盟的《通用数据保护条例》(GDPR),我们特此提醒您注意 NewPipe 的隐私政策。请您仔细阅读。 +\n您必须在同意以后才能向我们发送错误报告。 接受 拒绝 无限制 @@ -504,15 +504,15 @@ 删除所有播放位置记录? 更改下载目录让内容生效 『时下流行』页-默认 - 无人在线观看 + 没有人在观看 %s 人在观看 - 没人在听 + 没有人在听 %s 人在听 - + 重新启动应用后,语言将更改。 PeerTube 服务器 @@ -531,8 +531,8 @@ 无法恢复此下载 选择一个服务器 快进 / 快退的单位时间 - 在锁屏界面显示视频缩略图 - 在后台播放时,锁屏界面将会显示视频的缩略图 + 在锁屏上显示视频缩略图 + 在后台播放时,锁屏上将会显示视频的缩略图 清除下载历史记录 删除下载了的文件 已删除 %1$s 下载 From 62906fb84a294fd847274b0f7e9ed10136915bfe Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Fri, 17 Jan 2020 03:52:10 +0000 Subject: [PATCH 0202/1194] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-zh-rTW/strings.xml | 5 ++++- 1 file changed, 4 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 6cb16623f..b82736f90 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -480,7 +480,7 @@ NewPipe 在處理檔案時被關閉 裝置上沒有剩餘的空間 進度遺失,因為檔案已被刪除 - 您確定? + 您想要清除您的下載歷史紀錄或刪除所有已下載的檔案嗎? 限制下載佇列 一次執行一個下載 開始下載 @@ -531,4 +531,7 @@ 選擇一個站臺 啟用鎖定畫面影片縮圖 使用背景播放器時,鎖定畫面上將會顯示影片縮圖 + 清除下載歷史紀錄 + 刪除已下載的檔案 + 已刪除 %1$s 個下載 \ No newline at end of file From b6028cef5bf2df810774396cd1e19ef316a18785 Mon Sep 17 00:00:00 2001 From: MohammedSR Vevo Date: Fri, 17 Jan 2020 16:14:04 +0000 Subject: [PATCH 0203/1194] Translated using Weblate (Kurdish) Currently translated at 100.0% (527 of 527 strings) --- app/src/main/res/values-ku/strings.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-ku/strings.xml b/app/src/main/res/values-ku/strings.xml index 50350e1b3..b6d8bb877 100644 --- a/app/src/main/res/values-ku/strings.xml +++ b/app/src/main/res/values-ku/strings.xml @@ -517,7 +517,7 @@ بیرگەی ناوەکیت پڕبووە کردارەکە شکستی هێنا, چونکە ئەو فایلە سڕاوەتەوە هێڵی ئینتەرنێت نەما - ئایا دڵنیای؟ + ئایا دەتەوێ مێژووی داگرتنەکانت بسڕدرێنەوە یان هەموو فایلە داگیراوەکان بسڕدرێنەوە؟ سنوری ڕیزبوونی داگرتنەکان تەنها یەک داگرتن کاردەکات لەیەک کاتدا دەستپێکردنەوەی داگرتنەکان @@ -538,4 +538,7 @@ دۆخێک هەڵبژێرە چالاککردنی وێنۆچکەی ڤیدیۆی داخستنی ڕوونما کاتێ کارپێکەری پاشبنەما کاردەکات ئەوا وێنۆچکەی ڤیدیۆکە لە ڕوونما داخراوەکەدا نیشاندەدرێت + سڕینەوەی مێژووی داگرتن + سڕینەوەی فایلە داگیراوەکان + %1$ لە داگرتنەکان سڕانەوە \ No newline at end of file From 0e39071b5e19df627b416cdf1aae143f125bb99c Mon Sep 17 00:00:00 2001 From: B0pol Date: Fri, 17 Jan 2020 23:18:47 +0000 Subject: [PATCH 0204/1194] Translated using Weblate (Urdu) Currently translated at 94.3% (497 of 527 strings) --- app/src/main/res/values-ur/strings.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/res/values-ur/strings.xml b/app/src/main/res/values-ur/strings.xml index 724c9c3ed..d885cb915 100644 --- a/app/src/main/res/values-ur/strings.xml +++ b/app/src/main/res/values-ur/strings.xml @@ -1,7 +1,7 @@ شروع کرنے کے لیے تلاش پر ٹیپ کریں - ملاحظات + ملاحظات s$1% کوشائع ہوا انسٹال منسوخ کریں @@ -193,13 +193,13 @@ بی کوئی صارفین نہیں - s% صارف - s% صارفین + %s صارف + %s صارفین کوئی مناظر نہیں - s% منظر - s% مناظر + %s منظر + %s مناظر ویڈیوز دستیاب نہیں @@ -306,7 +306,7 @@ دراز بند کریں یہاں جلد ہی کچھ نظر آئے گا D D ترجیح \' کھلی \' عمل - مواد کھولنے پر ڈیفالٹ کارروائی — s% + مواد کھولنے پر ڈیفالٹ کارروائی — %s ویڈیو پلیئر پس منظر پلیئر پوپ اپ پلیئر @@ -437,7 +437,7 @@ سسٹم نےکارروائی سے انکار کیا گیا ڈاؤن لوڈ ناکام ڈاؤن لوڈ تکمیل - s% ڈاؤن لوڈ مکمل ہوگئے + %s ڈاؤن لوڈ مکمل ہوگئے منفرد نام بنائیں برتحریر اس نام کے ساتھ ایک ڈاؤن لوڈ جاری ہے From cf60033424888963c07a3327913d8371a0dafe95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Thu, 16 Jan 2020 05:28:38 +0000 Subject: [PATCH 0205/1194] =?UTF-8?q?Translated=20using=20Weblate=20(Norwe?= =?UTF-8?q?gian=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 96.4% (508 of 527 strings) --- app/src/main/res/values-nb-rNO/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index d01647f5d..0c4ee8dde 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -524,6 +524,6 @@ Tøm nedlastingshistorikk Slett nedlastede filer Slettet %1$s nedlastninger - Aktiver videominiatyrbilde med låseskjerm - Når du bruker bakgrunnsspilleren, vises en videominiaturbilde på låseskjermen + Aktiver videominiatyrbilde på låseskjerm + Når du bruker bakgrunnsspilleren, vises ent videominiatyrbilde på låseskjermen \ No newline at end of file From afc362d2b613773df1896dbb1a3f6179f2d7beb6 Mon Sep 17 00:00:00 2001 From: kapodamy Date: Mon, 20 Jan 2020 23:33:30 -0300 Subject: [PATCH 0206/1194] readability changes --- .../java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java b/app/src/main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java index e20b06352..6f1cceeed 100644 --- a/app/src/main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java +++ b/app/src/main/java/org/schabi/newpipe/streams/SrtFromTtmlWriter.java @@ -34,7 +34,7 @@ public class SrtFromTtmlWriter { private static String getTimestamp(Element frame, String attr) { return frame .attr(attr) - .replace('.', ',');// Str uses comma as decimal separator + .replace('.', ',');// SRT subtitles uses comma as decimal separator } private void writeFrame(String begin, String end, StringBuilder text) throws IOException { @@ -69,7 +69,7 @@ public class SrtFromTtmlWriter { Document doc = Jsoup.parse(new ByteArrayInputStream(buffer), "UTF-8", "", Parser.xmlParser()); StringBuilder text = new StringBuilder(128); - Elements paragraph_list = doc.select("body>div>p"); + Elements paragraph_list = doc.select("body > div > p"); // check if has frames if (paragraph_list.size() < 1) return; From 0ed3354cee6e4e3021263ecdd1b2253dfe144838 Mon Sep 17 00:00:00 2001 From: Xiang Rong Lin <41164160+XiangRongLin@users.noreply.github.com> Date: Tue, 21 Jan 2020 20:56:06 +0100 Subject: [PATCH 0207/1194] Use custom dialog to edit and delete local playlists at once --- .../local/bookmark/BookmarkFragment.java | 73 +++++-------------- .../newpipe/local/dialog/BookmarkDialog.kt | 47 ++++++++++++ app/src/main/res/layout/dialog_bookmark.xml | 51 +++++++++++++ app/src/main/res/values/strings.xml | 1 + 4 files changed, 118 insertions(+), 54 deletions(-) create mode 100644 app/src/main/java/org/schabi/newpipe/local/dialog/BookmarkDialog.kt create mode 100644 app/src/main/res/layout/dialog_bookmark.xml 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 6a7f16025..bfd90acda 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 @@ -1,13 +1,9 @@ package org.schabi.newpipe.local.bookmark; import android.app.AlertDialog; -import android.content.DialogInterface; -import android.content.res.Resources; import android.os.Bundle; import android.os.Parcelable; import android.util.Log; -import android.widget.EditText; -import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.FragmentManager; @@ -26,6 +22,7 @@ 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.local.BaseLocalListFragment; +import org.schabi.newpipe.local.dialog.BookmarkDialog; import org.schabi.newpipe.local.playlist.LocalPlaylistManager; import org.schabi.newpipe.local.playlist.RemotePlaylistManager; import org.schabi.newpipe.report.UserAction; @@ -124,34 +121,7 @@ public final class BookmarkFragment @Override public void held(LocalItem selectedItem) { if (selectedItem instanceof PlaylistMetadataEntry) { - final Resources resources = getContext().getResources(); - String[] commands = new String[]{ - resources.getString(R.string.rename_playlist), - resources.getString(R.string.delete_playlist) - }; - - final DialogInterface.OnClickListener actions = (dialogInterface, i) -> { - switch (i) { - case 0: - showLocalRenameDialog((PlaylistMetadataEntry) selectedItem); - break; - case 1: - showLocalDeleteDialog((PlaylistMetadataEntry) selectedItem); - break; - } - }; - - final View bannerView = View.inflate(activity, R.layout.dialog_title, null); - bannerView.setSelected(true); - TextView titleView = bannerView.findViewById(R.id.itemTitleView); - titleView.setText(((PlaylistMetadataEntry) selectedItem).name); - - new AlertDialog.Builder(getActivity()) - .setCustomTitle(bannerView) - .setItems(commands, actions) - .create() - .show(); - + showLocalDialog((PlaylistMetadataEntry) selectedItem); } else if (selectedItem instanceof PlaylistRemoteEntity) { showRemoteDeleteDialog((PlaylistRemoteEntity) selectedItem); } @@ -279,14 +249,27 @@ public final class BookmarkFragment // Utils /////////////////////////////////////////////////////////////////////////// - private void showLocalDeleteDialog(final PlaylistMetadataEntry item) { - showDeleteDialog(item.name, localPlaylistManager.deletePlaylist(item.uid)); - } - private void showRemoteDeleteDialog(final PlaylistRemoteEntity item) { showDeleteDialog(item.getName(), remotePlaylistManager.deletePlaylist(item.getUid())); } + private void showLocalDialog(PlaylistMetadataEntry selectedItem) { + BookmarkDialog dialog = new BookmarkDialog(getContext(), + selectedItem.name, new BookmarkDialog.OnClickListener() { + @Override + public void onDeleteClicked() { + showDeleteDialog(selectedItem.name, + localPlaylistManager.deletePlaylist(selectedItem.uid)); + } + + @Override + public void onSaveClicked(@NonNull String name) { + changeLocalPlaylistName(selectedItem.uid, name); + } + }); + dialog.show(); + } + private void showDeleteDialog(final String name, final Single deleteReactor) { if (activity == null || disposables == null) return; @@ -303,24 +286,6 @@ public final class BookmarkFragment .show(); } - private void showLocalRenameDialog(PlaylistMetadataEntry selectedItem) { - final View dialogView = View.inflate(getContext(), R.layout.dialog_playlist_name, null); - EditText nameEdit = dialogView.findViewById(R.id.playlist_name); - nameEdit.setText(selectedItem.name); - nameEdit.setSelection(nameEdit.getText().length()); - - final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder( - getContext()) - .setTitle(R.string.rename_playlist) - .setView(dialogView) - .setCancelable(true) - .setNegativeButton(R.string.cancel, null) - .setPositiveButton(R.string.rename, (dialogInterface, i) -> { - changeLocalPlaylistName(selectedItem.uid, nameEdit.getText().toString()); - }); - dialogBuilder.show(); - } - private void changeLocalPlaylistName(long id, String name) { if (localPlaylistManager == null) { return; diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/BookmarkDialog.kt b/app/src/main/java/org/schabi/newpipe/local/dialog/BookmarkDialog.kt new file mode 100644 index 000000000..dd20e88a0 --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/BookmarkDialog.kt @@ -0,0 +1,47 @@ +package org.schabi.newpipe.local.dialog + +import android.app.Dialog +import android.content.Context +import android.os.Bundle +import android.view.Window +import android.widget.Button +import android.widget.EditText +import org.schabi.newpipe.R + +class BookmarkDialog( + context: Context, + private val playlistName: String, + val listener: OnClickListener) + : Dialog(context) { + + private lateinit var editText: EditText + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + requestWindowFeature(Window.FEATURE_NO_TITLE) + setContentView(R.layout.dialog_bookmark) + initListeners() + } + + private fun initListeners() { + editText = findViewById(R.id.playlist_name_edit_text); + editText.setText(playlistName) + + findViewById