From a953aab9b44a2ae3857a094fae5890fb83289c56 Mon Sep 17 00:00:00 2001 From: TacoTheDank Date: Thu, 30 Sep 2021 15:33:20 -0400 Subject: [PATCH 01/14] Update AndroidX Media to 1.4.x --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 1c193ff34..67354fe94 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -208,7 +208,7 @@ dependencies { implementation "androidx.lifecycle:lifecycle-livedata:${androidxLifecycleVersion}" implementation "androidx.lifecycle:lifecycle-viewmodel:${androidxLifecycleVersion}" implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0' - implementation 'androidx.media:media:1.3.1' + implementation 'androidx.media:media:1.4.2' implementation 'androidx.multidex:multidex:2.0.1' implementation 'androidx.preference:preference:1.1.1' implementation 'androidx.recyclerview:recyclerview:1.1.0' From d844e0aba6550e60c417cd663a450ff14c5fcc89 Mon Sep 17 00:00:00 2001 From: Kalle Struik Date: Sat, 2 Oct 2021 19:21:25 +0200 Subject: [PATCH 02/14] Add a add to playlist option in the share menu. --- .../org/schabi/newpipe/RouterActivity.java | 59 +++++++++++++++++-- .../local/dialog/PlaylistAppendDialog.java | 28 ++++++++- .../local/dialog/PlaylistCreationDialog.java | 18 ++++++ app/src/main/res/values/settings_keys.xml | 3 + app/src/main/res/values/strings.xml | 1 + 5 files changed, 103 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/RouterActivity.java b/app/src/main/java/org/schabi/newpipe/RouterActivity.java index feb9e029d..eba080e62 100644 --- a/app/src/main/java/org/schabi/newpipe/RouterActivity.java +++ b/app/src/main/java/org/schabi/newpipe/RouterActivity.java @@ -1,5 +1,8 @@ package org.schabi.newpipe; +import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.AUDIO; +import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.VIDEO; + import android.annotation.SuppressLint; import android.app.IntentService; import android.content.Context; @@ -56,6 +59,8 @@ import org.schabi.newpipe.extractor.playlist.PlaylistInfo; import org.schabi.newpipe.extractor.stream.StreamInfo; import org.schabi.newpipe.extractor.stream.VideoStream; import org.schabi.newpipe.ktx.ExceptionUtils; +import org.schabi.newpipe.local.dialog.PlaylistAppendDialog; +import org.schabi.newpipe.local.dialog.PlaylistCreationDialog; import org.schabi.newpipe.player.MainPlayer; import org.schabi.newpipe.player.helper.PlayerHelper; import org.schabi.newpipe.player.helper.PlayerHolder; @@ -69,8 +74,8 @@ import org.schabi.newpipe.util.ExtractorHelper; import org.schabi.newpipe.util.ListHelper; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.PermissionHelper; -import org.schabi.newpipe.util.external_communication.ShareUtils; import org.schabi.newpipe.util.ThemeHelper; +import org.schabi.newpipe.util.external_communication.ShareUtils; import org.schabi.newpipe.util.urlfinder.UrlFinder; import org.schabi.newpipe.views.FocusOverlayView; @@ -89,9 +94,6 @@ import io.reactivex.rxjava3.disposables.Disposable; import io.reactivex.rxjava3.functions.Consumer; import io.reactivex.rxjava3.schedulers.Schedulers; -import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.AUDIO; -import static org.schabi.newpipe.extractor.StreamingService.ServiceInfo.MediaCapability.VIDEO; - /** * Get the url from the intent and open it in the chosen preferred player. */ @@ -107,6 +109,7 @@ public class RouterActivity extends AppCompatActivity { protected String currentUrl; private StreamingService currentService; private boolean selectionIsDownload = false; + private boolean selectionIsAddToPlaylist = false; private AlertDialog alertDialogChoice = null; @Override @@ -350,7 +353,7 @@ public class RouterActivity extends AppCompatActivity { .setNegativeButton(R.string.just_once, dialogButtonsClickListener) .setPositiveButton(R.string.always, dialogButtonsClickListener) .setOnDismissListener((dialog) -> { - if (!selectionIsDownload) { + if (!selectionIsDownload && !selectionIsAddToPlaylist) { finish(); } }) @@ -446,6 +449,10 @@ public class RouterActivity extends AppCompatActivity { final AdapterChoiceItem backgroundPlayer = new AdapterChoiceItem( getString(R.string.background_player_key), getString(R.string.background_player), R.drawable.ic_headset); + final AdapterChoiceItem addToPlaylist = new AdapterChoiceItem( + getString(R.string.add_to_playlist_key), getString(R.string.add_to_playlist), + R.drawable.ic_add); + if (linkType == LinkType.STREAM) { if (isExtVideoEnabled) { @@ -482,6 +489,10 @@ public class RouterActivity extends AppCompatActivity { getString(R.string.download), R.drawable.ic_file_download)); + // Add to playlist is not necessary for CHANNEL and PLAYLIST linkType since those can + // not be added to a playlist + returnList.add(addToPlaylist); + } else { returnList.add(showInfo); if (capabilities.contains(VIDEO) && !isExtVideoEnabled) { @@ -547,6 +558,12 @@ public class RouterActivity extends AppCompatActivity { return; } + if (selectedChoiceKey.equals(getString(R.string.add_to_playlist_key))) { + selectionIsAddToPlaylist = true; + openAddToPlaylistDialog(); + return; + } + // stop and bypass FetcherService if InfoScreen was selected since // StreamDetailFragment can fetch data itself if (selectedChoiceKey.equals(getString(R.string.show_info_key))) { @@ -572,6 +589,38 @@ public class RouterActivity extends AppCompatActivity { finish(); } + private void openAddToPlaylistDialog() { + disposables.add(ExtractorHelper.getStreamInfo(currentServiceId, currentUrl, false) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(info -> { + final FragmentManager fm = getSupportFragmentManager(); + final PlaylistAppendDialog playlistAppendDialog = PlaylistAppendDialog + .fromStreamInfo(info); + + playlistAppendDialog.setOnDismissListener(dialog -> finish()); + + PlaylistAppendDialog.onPlaylistFound(getThemeWrapperContext(), + () -> { + playlistAppendDialog.show(fm, "addToPlaylistDialog"); + fm.executePendingTransactions(); + }, + () -> { + final PlaylistCreationDialog playlistCreationDialog = + PlaylistCreationDialog.newInstance(playlistAppendDialog); + playlistCreationDialog.show(fm, "addToPlaylistDialog"); + + fm.executePendingTransactions(); + + }); + + }, throwable -> handleError(this, + new ErrorInfo(throwable, UserAction.REQUESTED_STREAM, + "Tried to add " + currentUrl + " to a playlist", + currentService.getServiceId()))) + ); + } + @SuppressLint("CheckResult") private void openDownloadDialog() { disposables.add(ExtractorHelper.getStreamInfo(currentServiceId, currentUrl, true) 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 93e1141c7..268848818 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,6 +1,8 @@ package org.schabi.newpipe.local.dialog; import android.content.Context; +import android.content.DialogInterface; +import android.content.DialogInterface.OnDismissListener; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; @@ -40,6 +42,9 @@ public final class PlaylistAppendDialog extends PlaylistDialog { private final CompositeDisposable playlistDisposables = new CompositeDisposable(); + @Nullable + private OnDismissListener onDismissListener = null; + public static Disposable onPlaylistFound( final Context context, final Runnable onSuccess, final Runnable onFailed ) { @@ -83,6 +88,14 @@ public final class PlaylistAppendDialog extends PlaylistDialog { return dialog; } + public void setOnDismissListener(@Nullable final OnDismissListener onDismissListener) { + this.onDismissListener = onDismissListener; + } + + public OnDismissListener getOnDismissListener() { + return onDismissListener; + } + /*////////////////////////////////////////////////////////////////////////// // LifeCycle - Creation //////////////////////////////////////////////////////////////////////////*/ @@ -141,6 +154,14 @@ public final class PlaylistAppendDialog extends PlaylistDialog { playlistAdapter = null; } + @Override + public void onDismiss(@NonNull final DialogInterface dialog) { + super.onDismiss(dialog); + if (onDismissListener != null) { + onDismissListener.onDismiss(dialog); + } + } + /*////////////////////////////////////////////////////////////////////////// // Helper //////////////////////////////////////////////////////////////////////////*/ @@ -150,7 +171,12 @@ public final class PlaylistAppendDialog extends PlaylistDialog { return; } - PlaylistCreationDialog.newInstance(getStreams()).show(getParentFragmentManager(), TAG); + final PlaylistCreationDialog dialog = PlaylistCreationDialog.newInstance(getStreams()); + // Move the dismissListener to the new dialog. + dialog.setOnDismissListener(this.onDismissListener); + this.onDismissListener = null; + + dialog.show(getParentFragmentManager(), TAG); requireDialog().dismiss(); } diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java index f48c72d04..55d6cec89 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java @@ -1,6 +1,8 @@ package org.schabi.newpipe.local.dialog; import android.app.Dialog; +import android.content.DialogInterface; +import android.content.DialogInterface.OnDismissListener; import android.os.Bundle; import android.text.InputType; import android.widget.Toast; @@ -20,6 +22,9 @@ import java.util.List; import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers; public final class PlaylistCreationDialog extends PlaylistDialog { + @Nullable + private OnDismissListener onDismissListener = null; + public static PlaylistCreationDialog newInstance(final List streams) { final PlaylistCreationDialog dialog = new PlaylistCreationDialog(); dialog.setInfo(streams); @@ -29,9 +34,22 @@ public final class PlaylistCreationDialog extends PlaylistDialog { public static PlaylistCreationDialog newInstance(final PlaylistAppendDialog appendDialog) { final PlaylistCreationDialog dialog = new PlaylistCreationDialog(); dialog.setInfo(appendDialog.getStreams()); + dialog.setOnDismissListener(appendDialog.getOnDismissListener()); return dialog; } + public void setOnDismissListener(@Nullable final OnDismissListener onDismissListener) { + this.onDismissListener = onDismissListener; + } + + @Override + public void onDismiss(@NonNull final DialogInterface dialog) { + super.onDismiss(dialog); + if (onDismissListener != null) { + onDismissListener.onDismiss(dialog); + } + } + /*////////////////////////////////////////////////////////////////////////// // Dialog //////////////////////////////////////////////////////////////////////////*/ diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 9261dfae1..4d9927b0d 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -360,6 +360,7 @@ popup_player download always_ask_player + add_to_playlist @string/show_info @@ -368,6 +369,7 @@ @string/popup_player @string/download @string/always_ask_open_action + @string/add_to_playlist @string/show_info_key @@ -376,6 +378,7 @@ @string/popup_player_key @string/download_key @string/always_ask_open_action_key + @string/add_to_playlist_key diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 225ccd126..0497d2660 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -433,6 +433,7 @@ Background player Popup player Always ask + Add to playlist Getting info… "Loading requested content" From 87c958b2e711d70ce516ecbc4785d96d7ebc6e2b Mon Sep 17 00:00:00 2001 From: Kalle Struik Date: Sun, 3 Oct 2021 13:27:24 +0200 Subject: [PATCH 03/14] Rename the "append_playlist" string to "add_to_playlist" --- .../main/java/org/schabi/newpipe/util/StreamDialogEntry.java | 2 +- app/src/main/res/layout-large-land/fragment_video_detail.xml | 2 +- app/src/main/res/layout/fragment_video_detail.xml | 2 +- app/src/main/res/menu/menu_play_queue.xml | 2 +- app/src/main/res/menu/menu_play_queue_item.xml | 2 +- app/src/main/res/values-ar/strings.xml | 2 +- app/src/main/res/values-b+ast/strings.xml | 2 +- app/src/main/res/values-b+uz+Latn/strings.xml | 2 +- app/src/main/res/values-b+zh+HANS+CN/strings.xml | 2 +- app/src/main/res/values-be/strings.xml | 2 +- app/src/main/res/values-bg/strings.xml | 2 +- app/src/main/res/values-bn-rBD/strings.xml | 2 +- app/src/main/res/values-bn-rIN/strings.xml | 2 +- app/src/main/res/values-bn/strings.xml | 2 +- app/src/main/res/values-ca/strings.xml | 2 +- app/src/main/res/values-ckb/strings.xml | 2 +- app/src/main/res/values-cs/strings.xml | 2 +- app/src/main/res/values-da/strings.xml | 2 +- app/src/main/res/values-de/strings.xml | 2 +- app/src/main/res/values-el/strings.xml | 2 +- app/src/main/res/values-eo/strings.xml | 2 +- app/src/main/res/values-es/strings.xml | 2 +- app/src/main/res/values-et/strings.xml | 2 +- app/src/main/res/values-eu/strings.xml | 2 +- app/src/main/res/values-fa/strings.xml | 2 +- app/src/main/res/values-fi/strings.xml | 2 +- app/src/main/res/values-fr/strings.xml | 2 +- app/src/main/res/values-gl/strings.xml | 2 +- app/src/main/res/values-he/strings.xml | 2 +- app/src/main/res/values-hi/strings.xml | 2 +- app/src/main/res/values-hr/strings.xml | 2 +- app/src/main/res/values-hu/strings.xml | 2 +- app/src/main/res/values-in/strings.xml | 2 +- app/src/main/res/values-it/strings.xml | 2 +- app/src/main/res/values-ja/strings.xml | 2 +- app/src/main/res/values-kmr/strings.xml | 2 +- app/src/main/res/values-ko/strings.xml | 2 +- app/src/main/res/values-ku/strings.xml | 2 +- app/src/main/res/values-lt/strings.xml | 2 +- app/src/main/res/values-lv/strings.xml | 2 +- app/src/main/res/values-mk/strings.xml | 2 +- app/src/main/res/values-ml/strings.xml | 2 +- app/src/main/res/values-ms/strings.xml | 2 +- app/src/main/res/values-nb-rNO/strings.xml | 2 +- app/src/main/res/values-ne/strings.xml | 2 +- app/src/main/res/values-nl-rBE/strings.xml | 2 +- app/src/main/res/values-nl/strings.xml | 2 +- app/src/main/res/values-pa/strings.xml | 2 +- app/src/main/res/values-pl/strings.xml | 2 +- app/src/main/res/values-pt-rBR/strings.xml | 2 +- app/src/main/res/values-pt-rPT/strings.xml | 2 +- app/src/main/res/values-pt/strings.xml | 2 +- app/src/main/res/values-ro/strings.xml | 2 +- app/src/main/res/values-ru/strings.xml | 2 +- app/src/main/res/values-sc/strings.xml | 2 +- app/src/main/res/values-sk/strings.xml | 2 +- app/src/main/res/values-sl/strings.xml | 2 +- app/src/main/res/values-so/strings.xml | 2 +- app/src/main/res/values-sq/strings.xml | 2 +- app/src/main/res/values-sr/strings.xml | 2 +- app/src/main/res/values-sv/strings.xml | 2 +- app/src/main/res/values-th/strings.xml | 2 +- app/src/main/res/values-tr/strings.xml | 2 +- app/src/main/res/values-uk/strings.xml | 2 +- app/src/main/res/values-ur/strings.xml | 2 +- app/src/main/res/values-vi/strings.xml | 2 +- app/src/main/res/values-zh-rCN/strings.xml | 2 +- app/src/main/res/values-zh-rTW/strings.xml | 2 +- app/src/main/res/values/settings_keys.xml | 4 ++-- app/src/main/res/values/strings.xml | 3 +-- 70 files changed, 71 insertions(+), 72 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java b/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java index ec51cc370..11cc4daba 100644 --- a/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java +++ b/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java @@ -81,7 +81,7 @@ public enum StreamDialogEntry { delete(R.string.delete, (fragment, item) -> { }), // has to be set manually - append_playlist(R.string.append_playlist, (fragment, item) -> { + append_playlist(R.string.add_to_playlist, (fragment, item) -> { final PlaylistAppendDialog d = PlaylistAppendDialog .fromStreamInfoItems(Collections.singletonList(item)); 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 3bee4bf9a..d2637110f 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 @@ -444,7 +444,7 @@ android:layout_weight="1" android:background="?attr/selectableItemBackgroundBorderless" android:clickable="true" - android:contentDescription="@string/append_playlist" + android:contentDescription="@string/add_to_playlist" android:focusable="true" android:gravity="center" android:paddingVertical="@dimen/detail_control_padding" diff --git a/app/src/main/res/layout/fragment_video_detail.xml b/app/src/main/res/layout/fragment_video_detail.xml index 165c690dd..6853ca7de 100644 --- a/app/src/main/res/layout/fragment_video_detail.xml +++ b/app/src/main/res/layout/fragment_video_detail.xml @@ -430,7 +430,7 @@ android:layout_weight="1" android:background="?attr/selectableItemBackgroundBorderless" android:clickable="true" - android:contentDescription="@string/append_playlist" + android:contentDescription="@string/add_to_playlist" android:focusable="true" android:gravity="center" android:paddingVertical="@dimen/detail_control_padding" diff --git a/app/src/main/res/menu/menu_play_queue.xml b/app/src/main/res/menu/menu_play_queue.xml index 0efadcb66..e8c9ab0ec 100644 --- a/app/src/main/res/menu/menu_play_queue.xml +++ b/app/src/main/res/menu/menu_play_queue.xml @@ -6,7 +6,7 @@ diff --git a/app/src/main/res/menu/menu_play_queue_item.xml b/app/src/main/res/menu/menu_play_queue_item.xml index ebb361be9..be5513708 100644 --- a/app/src/main/res/menu/menu_play_queue_item.xml +++ b/app/src/main/res/menu/menu_play_queue_item.xml @@ -9,7 +9,7 @@ android:title="@string/play_queue_stream_detail" /> + android:title="@string/add_to_playlist" /> diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index f90a82c44..55f41563c 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -235,7 +235,7 @@ إنشاء قائمة تشغيل جديدة إعادة تسمية التسمية - إضافة إلى قائمة التشغيل + إضافة إلى قائمة التشغيل هل تريد حذف قائمة التشغيل هذه؟ تم إنشاء قائمة التشغيل تمت إضافتها إلى قائمة التشغيل diff --git a/app/src/main/res/values-b+ast/strings.xml b/app/src/main/res/values-b+ast/strings.xml index 213ef6f48..19ed896f0 100644 --- a/app/src/main/res/values-b+ast/strings.xml +++ b/app/src/main/res/values-b+ast/strings.xml @@ -132,7 +132,7 @@ Escartar Llista de reproducción nueva Nome - Amestar a una llista de reproducción + Amestar a una llista de reproducción ¿Desanicair esta llista de reproducción\? Ensin sotítulos Axustar diff --git a/app/src/main/res/values-b+uz+Latn/strings.xml b/app/src/main/res/values-b+uz+Latn/strings.xml index 16f28dc09..4d4602daa 100644 --- a/app/src/main/res/values-b+uz+Latn/strings.xml +++ b/app/src/main/res/values-b+uz+Latn/strings.xml @@ -534,7 +534,7 @@ Pleylist eskizi sifatida o\'rnating Unmute rejimi Mute rejimi - Playlist qo\'shish + Playlist qo\'shish Nomi Nomni o\'zgartirish Yangi Playlist 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 9670c318d..20b01f605 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 @@ -259,7 +259,7 @@ 新建播放列表 重命名 名称 - 添加至播放列表 + 添加至播放列表 设为播放列表封面 收藏播放列表 删除收藏 diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index 46eedac34..4b185b301 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -274,7 +274,7 @@ Стварыць плэйліст Перайменаваць Імя - Дадаць у плэйліст + Дадаць у плэйліст На мініяцюру плэйліста Дадаць плэйліст у закладкі Выдаліць закладку diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index f1edfa124..1c16e225b 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -267,7 +267,7 @@ Нов Плейлист Преименувай Име - Добави Към Плейлист + Добави Към Плейлист Задай като миниатюра на плейлиста Миниатюрата на плейлиста е сменена Премахни отметката diff --git a/app/src/main/res/values-bn-rBD/strings.xml b/app/src/main/res/values-bn-rBD/strings.xml index 6198b926e..d561d52e8 100644 --- a/app/src/main/res/values-bn-rBD/strings.xml +++ b/app/src/main/res/values-bn-rBD/strings.xml @@ -188,7 +188,7 @@ বুকমার্ক মুছুন আন মিউট মিউট - প্লে লিস্ট এ যুক্ত করুন + প্লে লিস্ট এ যুক্ত করুন নাম নতুন প্লে লিস্ট সবসময় জিজ্ঞেস করুন diff --git a/app/src/main/res/values-bn-rIN/strings.xml b/app/src/main/res/values-bn-rIN/strings.xml index 79ce1caaa..831364013 100644 --- a/app/src/main/res/values-bn-rIN/strings.xml +++ b/app/src/main/res/values-bn-rIN/strings.xml @@ -167,7 +167,7 @@ প্লে লিস্ট ডিলিট করতে চান\? আন মিউট মিউট - প্লে লিস্ট এ যুক্ত করুন + প্লে লিস্ট এ যুক্ত করুন সবসময় জিজ্ঞেস করুন ভিডিও প্লেয়ার ড্রয়ার বন্ধ করুন diff --git a/app/src/main/res/values-bn/strings.xml b/app/src/main/res/values-bn/strings.xml index a2f9dec31..11225e706 100644 --- a/app/src/main/res/values-bn/strings.xml +++ b/app/src/main/res/values-bn/strings.xml @@ -37,7 +37,7 @@ বুকমার্ক মুছুন আন মিউট মিউট - প্লে লিস্ট এ যুক্ত করুন + প্লে লিস্ট এ যুক্ত করুন নাম নাম পাল্টাও নতুন প্লে লিস্ট diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index cbd725c77..5e1d1b201 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -86,7 +86,7 @@ Crea una llista de reproducció Canvia el nom Nom - Afegeix a una llista de reproducció + Afegeix a una llista de reproducció Importa Importa des de Exporta a diff --git a/app/src/main/res/values-ckb/strings.xml b/app/src/main/res/values-ckb/strings.xml index b04048c5f..65af5ffff 100644 --- a/app/src/main/res/values-ckb/strings.xml +++ b/app/src/main/res/values-ckb/strings.xml @@ -403,7 +403,7 @@ ناوفایل دانان لەسەر وێنۆچکەی خشتەلێدان دەربارەی نیوپایپ - زیادکردن بۆ خشتەلێدان + زیادکردن بۆ خشتەلێدان (نەزانراو) زمانی به‌رنامه‌ پەڕەی کیۆسک diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 1791c1794..5a4091db5 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -234,7 +234,7 @@ Nový playlist Přejmenovat Jméno - Přidat do playlistu + Přidat do playlistu Nastavit jako miniaturu playlistu Přidat playlist do záložek Smazat záložku diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 158ec44ec..d59c35edb 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -270,7 +270,7 @@ Ny spilleliste Omdøb Navn - Føj til spilleliste + Føj til spilleliste Slet denne spilleliste\? Spilleliste oprettet Ingen undertekster diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index ca4d3e4d9..105646a16 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -228,7 +228,7 @@ Immer fragen Neue Wiedergabeliste Umbenennen - Zur Wiedergabeliste hinzufügen + Zur Wiedergabeliste hinzufügen Als Vorschaubild der Wiedergabeliste festlegen Lesezeichen entfernen Diese Wiedergabeliste löschen? diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 3d4343195..1775e1ca8 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -270,7 +270,7 @@ Νέα λίστα αναπαραγωγής Μετονομασία Όνομα - Προσθήκη σε λίστα αναπαραγωγής + Προσθήκη σε λίστα αναπαραγωγής Ορισμός ως μικρογραφία λίστας αναπαραγωγής Προσθήκη σελιδοδείκτη στη λίστα Διαγραφή σελιδοδείκτη diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 50cdf09b3..769272345 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -153,7 +153,7 @@ Nova ludlisto Alinomi Nomo - Aldoni al la ludlisto + Aldoni al la ludlisto Meti kiel bildeto de ludlisto Legosigno Ludlisto Forviŝi Legosignon diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index bb5819ff9..1937ca144 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -231,7 +231,7 @@ Lista de reproducción nueva Cambiar nombre Nombre - Añadir a la lista de reproducción + Añadir a la lista de reproducción Definir como miniatura de lista de reproducción Marcar lista de reproducción Quitar marcador diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 1321806f5..107c0f624 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -256,7 +256,7 @@ Uus esitusloend Nimeta ümber Nimi - Lisa esitusloendisse + Lisa esitusloendisse Määra esitusloendi pisipildiks Lisa esitusloend järjehoidjaks Eemalda järjehoidja diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index 9ca4bfae6..5b8161bf2 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -259,7 +259,7 @@ Erreprodukzio-zerrenda berria Aldatu izena Izena - Gehitu erreprodukzio-zerrendara + Gehitu erreprodukzio-zerrendara Ezarri erreprodukzio-zerrendaren iruditxo gisa Gogoko erreprodukzio-zerrenda Kendu gogokoa diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml index e66825b96..58f6cef81 100644 --- a/app/src/main/res/values-fa/strings.xml +++ b/app/src/main/res/values-fa/strings.xml @@ -217,7 +217,7 @@ فهرست پخش جدید تغییر نام نام - افزودن به سیاههٔ پخش + افزودن به سیاههٔ پخش تنظیم برای تصویر سیاههٔ پخش این فهرست پخش پاک شود؟ فهرست پخش ایجاد شد diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 25ae94dd5..cd6777b5e 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -271,7 +271,7 @@ Uusi soittolista Uudelleennimeä Nimi - Lisää soittolistaan + Lisää soittolistaan Aseta soittolistan kuvakkeeksi Tallenna soittolista kirjanmerkkeihin Poista kirjanmerkki diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index f4226497a..8d27ddff9 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -230,7 +230,7 @@ Nouvelle liste de lecture Renommer Nom - Ajouter à la liste de lecture + Ajouter à la liste de lecture Définir comme miniature de la liste de lecture Enregister la liste de lecture Supprimer le signet diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 185fdda9a..f22ecff86 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -270,7 +270,7 @@ Nova lista de reprodución Renomear Nome - Engadir á lista de reprodución + Engadir á lista de reprodución Estabelecer como miniatura da lista de reprodución Gardar a lista de reprodución nos marcadores Eliminar o marcador diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml index 6bc06eb3e..1d054155a 100644 --- a/app/src/main/res/values-he/strings.xml +++ b/app/src/main/res/values-he/strings.xml @@ -240,7 +240,7 @@ רשימת נגינה חדשה שינוי שם שם - הוספה לרשימת נגינה + הוספה לרשימת נגינה הוספת רשימת נגינה לסימניות הסרת סימנייה למחוק רשימת נגינה זו\? diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index 6402fc638..5f295bda8 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -230,7 +230,7 @@ नई प्लेलिस्ट नाम बदलें नाम - प्लेलिस्ट में जोड़ें + प्लेलिस्ट में जोड़ें प्लेलिस्ट थंबनेल के रूप में सेट करें प्लेलिस्ट बुकमार्क करें बुकमार्क हटायें diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 88e79451e..1f8ef42a0 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -202,7 +202,7 @@ Nova playlista Preimenuj Ime - Dodaj u playlistu + Dodaj u playlistu Postavi kao minijaturu playliste Zabilježi playlistu Ukloni zabilješku diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index ca1913403..e19fade83 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -254,7 +254,7 @@ Új lejátszási lista Átnevezés Név - Lejátszási listához adás + Lejátszási listához adás Beállítás lejátszási lista indexképeként Könyvjelző törlése Törlődjön ez a lejátszási lista\? diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index b6cd2a7e2..c9fa4cebe 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -229,7 +229,7 @@ Daftar Putar Baru Ubah Nama Nama - Tambah ke daftar putar + Tambah ke daftar putar Atur sebagai thumbnail daftar putar Markah Daftar Putar Hapus Markah diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index af9d529d3..2ee99d452 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -231,7 +231,7 @@ Nuova playlist Rinomina Nome - Aggiungi alla playlist + Aggiungi alla playlist Imposta come copertina della playlist Salva playlist Rimuovi playlist diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 769a31b52..f2540f205 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -221,7 +221,7 @@ 新規プレイリスト 変更 プレイリスト名 - プレイリストに追加 + プレイリストに追加 プレイリストのサムネイルに設定 プレイリストをブックマーク ブックマークを削除 diff --git a/app/src/main/res/values-kmr/strings.xml b/app/src/main/res/values-kmr/strings.xml index 3fa5f2f45..d7ac85dd1 100644 --- a/app/src/main/res/values-kmr/strings.xml +++ b/app/src/main/res/values-kmr/strings.xml @@ -498,7 +498,7 @@ Wekî Thumbnailê Lîsteya Lîsteyê saz bikin Bê deng kirin Bêdeng - Li lîsteyê zêde bike + Li lîsteyê zêde bike Nav Navlêkirin Lîstinê ya nû diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index aaf02a5dd..880c45aee 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -230,7 +230,7 @@ 새로운 재생목록 이름 바꾸기 이름 - 재생목록에 추가 + 재생목록에 추가 재생목록 썸네일로 설정 재생목록 북마크하기 북마크 제거하기 diff --git a/app/src/main/res/values-ku/strings.xml b/app/src/main/res/values-ku/strings.xml index 2cdd31d3b..be2a8086f 100644 --- a/app/src/main/res/values-ku/strings.xml +++ b/app/src/main/res/values-ku/strings.xml @@ -212,7 +212,7 @@ لیستەلێدانی نوێ ناولێنانەوە ناو - زیادکردن بۆ لیستەلێدان + زیادکردن بۆ لیستەلێدان دانان لەسەر وێنۆچکەی لیستەلێدان لیستەلێدانی نیشانەکراو لادانی نیشانەکراو diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index dae17e3ff..d0249568e 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -235,7 +235,7 @@ Naujas grojaraštį Pervadinti Pavadinimas - Pridėti į grojaraštį + Pridėti į grojaraštį Nustatyti kaip grojaraščio miniatiūrą Pridėti grojaraštį į žymes Pašalinti žymes diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml index 01167c426..58d40b61d 100644 --- a/app/src/main/res/values-lv/strings.xml +++ b/app/src/main/res/values-lv/strings.xml @@ -5,7 +5,7 @@ Atskaņošanas saraksts radīts Dzēst atskaņošanas sarakstu\? Iestatīt, kā atskaņošanas saraksta attēlu - Pievienot atskaņošanas sarakstam + Pievienot atskaņošanas sarakstam Vārds Pārsaukt Jauns Atskaņošanas Saraksts diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml index c0e16def2..d925e2970 100644 --- a/app/src/main/res/values-mk/strings.xml +++ b/app/src/main/res/values-mk/strings.xml @@ -248,7 +248,7 @@ Создај нова плејлиста Прекрсти плејлиста Име - Додај во плејлиста + Додај во плејлиста Постави како икона на плејлистата Обележи ја плејлистата Избриши ја белешката diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index 20372cbb9..eb78ca44c 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -54,7 +54,7 @@ പ്ലേലിസ്റ്റ് ലഘുചിത്രമായി സജ്ജമാക്കുക അൺമ്യൂട്ട് മ്യൂട്ട് - പ്ലേലിസ്റ്റിലേക്ക് ചേർക്കുക + പ്ലേലിസ്റ്റിലേക്ക് ചേർക്കുക പേര് പേര് മാറ്റുക പുതിയ പ്ലേലിസ്റ്റ് diff --git a/app/src/main/res/values-ms/strings.xml b/app/src/main/res/values-ms/strings.xml index ddf04c1e2..76aef646f 100644 --- a/app/src/main/res/values-ms/strings.xml +++ b/app/src/main/res/values-ms/strings.xml @@ -284,7 +284,7 @@ Senarai Main Baru Namakan semula Nama - Tambah ke Senarai Main + Tambah ke Senarai Main Tetapkan sebagai Thumbnail Senarai Main Menanda senarai main Hapuskan Penanda Halaman diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index b7c370900..9cce73360 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -231,7 +231,7 @@ Ny spilleliste Gi nytt navn Navn - Legg til i spilleliste + Legg til i spilleliste Sett som miniatyrbilde for spilleliste Bokmerk spilleliste Fjern bokmerke diff --git a/app/src/main/res/values-ne/strings.xml b/app/src/main/res/values-ne/strings.xml index f26e8a051..71c9e107f 100644 --- a/app/src/main/res/values-ne/strings.xml +++ b/app/src/main/res/values-ne/strings.xml @@ -292,7 +292,7 @@ नया प्लेलिस्ट पुनः नामकरण नाम - प्लेसूचीमा थप्नुहोस + प्लेसूचीमा थप्नुहोस प्लेलिस्ट थम्बनेल रूपमा सेट बुकमार्क प्लेलिस्ट बुकमार्क हटाउ diff --git a/app/src/main/res/values-nl-rBE/strings.xml b/app/src/main/res/values-nl-rBE/strings.xml index 5190e814e..be7627079 100644 --- a/app/src/main/res/values-nl-rBE/strings.xml +++ b/app/src/main/res/values-nl-rBE/strings.xml @@ -252,7 +252,7 @@ Nieuwe afspeellijst Hernoemen Naam - Toevoegen aan afspeellijst + Toevoegen aan afspeellijst Instellen als miniatuur voor afspeellijst Afspeellijst toevoegen aan bladwijzers Bladwijzer verwijderen diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index f33e5d9cd..b835c68dc 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -231,7 +231,7 @@ Nieuwe afspeellijst Naam wijzigen Naam - Toevoegen aan afspeellijst + Toevoegen aan afspeellijst Instellen als miniatuur voor afspeellijst Afspeellijst toevoegen aan bladwijzers Bladwijzer verwijderen diff --git a/app/src/main/res/values-pa/strings.xml b/app/src/main/res/values-pa/strings.xml index 75f40b725..8fad329f3 100644 --- a/app/src/main/res/values-pa/strings.xml +++ b/app/src/main/res/values-pa/strings.xml @@ -259,7 +259,7 @@ ਨਵੀਂ ਪਲੇ-ਲਿਸਟ ਨਾਮ ਬਦਲੋ ਨਾਮ - ਪਲੇ-ਸੂਚੀ ਵਿੱਚ ਸ਼ਾਮਲ ਕਰੋ + ਪਲੇ-ਸੂਚੀ ਵਿੱਚ ਸ਼ਾਮਲ ਕਰੋ ਬਤੌਰ ਪਲੇ-ਸੂਚੀ ਥਮਨੇਲ ਸੈੱਟ ਕਰੋ ਬੁੱਕਮਾਰਕ ਪਲੇ-ਲਿਸਟ ਬੁੱਕਮਾਰਕ ਹਟਾਓ diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 0de5abcf0..b4de246eb 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -238,7 +238,7 @@ Nowa playlista Zmień nazwę Nazwa - Dodaj do playlisty + Dodaj do playlisty Ustaw jako miniaturę playlisty Dodaj do ulubionych Usuń z ulubionych diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 1f53db3ce..7c85328d0 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -229,7 +229,7 @@ Nova playlist Renomear Nome - Adicionar à Playlist + Adicionar à Playlist Definir Como Capa da Playlist Favoritar playlist Desfavoritar diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index ad4bb5061..4fa8e4e18 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -504,7 +504,7 @@ Utilizar pesquisa rápida Está prestes a substituir a configuração atual. Mudar para popup - Adicionar à lista de reprodução + Adicionar à lista de reprodução Reproduzir no modo poppup Acha que a fonte demora muito tempo a carregar\? Se sim, tente ativar o carregamento rápido (pode alterar a opção nas definições ou no botão abaixo). \n diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 7b8cd4cdc..c1d95a797 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -242,7 +242,7 @@ A carregar o conteúdo solicitado Nova lista de reprodução Mudar nome - Adicionar à lista de reprodução + Adicionar à lista de reprodução Guardar lista de reprodução como favorita Remover marcador Eliminar esta lista de reprodução\? diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 81c116cc4..fb367eaf0 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -266,7 +266,7 @@ Ștergeți întregul istoric al vizionărilor\? 1 element șters. Playlist nou - Adăugați la playlist + Adăugați la playlist Importare Importați din Exportați în diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 5c019d68e..4cd08d860 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -251,7 +251,7 @@ Новый плейлист Переименовать Имя - В плейлист + В плейлист На миниатюру плейлиста Сохранить плейлист Удалить плейлист diff --git a/app/src/main/res/values-sc/strings.xml b/app/src/main/res/values-sc/strings.xml index 95ba064a5..1afb7990f 100644 --- a/app/src/main/res/values-sc/strings.xml +++ b/app/src/main/res/values-sc/strings.xml @@ -39,7 +39,7 @@ Imposta che a miniadura de s\'iscalita Allughe su sonu Pone a sa muda - Annanghe a s\'iscalita + Annanghe a s\'iscalita Nùmene Càmbia de nùmene Iscalita noa diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 82655d4ad..3df4ff0af 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -234,7 +234,7 @@ Nový zoznam skladieb Premenovať Názov - Pridať do zoznamu skladieb + Pridať do zoznamu skladieb Nastaviť ako miniatúru zoznamu skladieb Záložka zoznamu skladieb Odstrániť Záložku diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index c6be5581b..dbfef543d 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -247,7 +247,7 @@ Napolni Seznam predvajanja je bil ustvarjen Izbrišem seznam predvajanja\? - Dodaj v seznam predvajanja + Dodaj v seznam predvajanja Preimenuj Nov seznam predvajanja Nalaganje zahtevano vsebino diff --git a/app/src/main/res/values-so/strings.xml b/app/src/main/res/values-so/strings.xml index 5455d728b..bf9e7a768 100644 --- a/app/src/main/res/values-so/strings.xml +++ b/app/src/main/res/values-so/strings.xml @@ -115,7 +115,7 @@ Calaamadso Xulka Ku fadhiisi galka xulka Ka hadalsii - Ku dar xul + Ku dar xul Magaca ka baddal Xul Cusub Soo kicinaya shayga la codsaday diff --git a/app/src/main/res/values-sq/strings.xml b/app/src/main/res/values-sq/strings.xml index f9d2e8cfd..10ab40e69 100644 --- a/app/src/main/res/values-sq/strings.xml +++ b/app/src/main/res/values-sq/strings.xml @@ -183,7 +183,7 @@ Vendose si pamjen statike të listës së luajtjes Me zë Pa zë - Shto në listën e luajtjes + Shto në listën e luajtjes Emri Riemërto Listë Luajtje e Re diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 628f2a100..e27d9e8a8 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -350,7 +350,7 @@ Постави као сличицу листе Упали звук Утишај - Додај на листу + Додај на листу Назив Преименуј Нова листа diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 8eb761329..4fc9778be 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -271,7 +271,7 @@ Ny spellista Byt namn Namn - Lägg till i spellista + Lägg till i spellista Använd som spellistans miniatyrbild Bokmärk spellistan Ta bort bokmärke diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index 22123e517..01946c321 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -270,7 +270,7 @@ เพลย์ลิสต์ใหม่ เปลี่ยนชื่อ ชื่อ - เพิ่มในเพลย์ลิสต์ + เพิ่มในเพลย์ลิสต์ ตั้งเป็นรูปขนาดย่อของเพลย์ลิสต์ เก็บเพลย์ลิสต์ เอาที่คั่นหน้าออก diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index f802302ab..f318de744 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -227,7 +227,7 @@ Yeni Oynatma Listesi Yeniden adlandır Ad - Oynatma listesine ekle + Oynatma listesine ekle Oynatma listesi küçük resmi olarak ayarla Oynatma listesini yer imlerine ekle Yer imini kaldır diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index eae9079c0..c6b1f5bfd 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -240,7 +240,7 @@ Нова добірка Перейменувати Назва - Додати в добірку + Додати в добірку Призначити ескізом добірки Додати добірку до закладок Видалити закладку diff --git a/app/src/main/res/values-ur/strings.xml b/app/src/main/res/values-ur/strings.xml index 0454fc293..1f427504b 100644 --- a/app/src/main/res/values-ur/strings.xml +++ b/app/src/main/res/values-ur/strings.xml @@ -248,7 +248,7 @@ نئی پلے لسٹ نام تبدیل کریں نام - پلے لسٹ میں شامل + پلے لسٹ میں شامل بطور پلے لسٹ انگشتی طے کریں پلے لسٹ کو نشان زد کریں نشان زد حدف کریں diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 83aea33c0..3635aa4b4 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -267,7 +267,7 @@ Tạo playlist mới Đổi tên playlist Tên - Thêm vào danh sách phát + Thêm vào danh sách phát Đặt làm hình thu nhỏ của danh sách phát Đánh dấu playlist này Xóa dấu trang diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index e5180c51e..f6318df0b 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -259,7 +259,7 @@ 新建播放列表 重 命名 名称 - 添加到播放列表 + 添加到播放列表 设为播放列表缩略图 收藏播放列表 删除收藏 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 576f9d480..e5c499119 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -225,7 +225,7 @@ 新的播放清單 重新命名 名稱 - 新增至播放清單 + 新增至播放清單 設為播放清單縮圖 將播放清單加入書籤 移除書籤 diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 4d9927b0d..7518b2ce8 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -368,8 +368,8 @@ @string/background_player @string/popup_player @string/download - @string/always_ask_open_action @string/add_to_playlist + @string/always_ask_open_action @string/show_info_key @@ -377,8 +377,8 @@ @string/background_player_key @string/popup_player_key @string/download_key - @string/always_ask_open_action_key @string/add_to_playlist_key + @string/always_ask_open_action_key diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0497d2660..c1fc08bc7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -433,14 +433,13 @@ Background player Popup player Always ask - Add to playlist Getting info… "Loading requested content" New Playlist Rename Name - Add to playlist + Add to playlist Mute Unmute Set as playlist thumbnail From ceb55d0ede4b7d6c6a9bda7023687adb2242054b Mon Sep 17 00:00:00 2001 From: Kalle Struik Date: Sun, 3 Oct 2021 14:25:50 +0200 Subject: [PATCH 04/14] Set the theme for PlaylistCreationDialog explicitly. --- .../newpipe/local/dialog/PlaylistCreationDialog.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java index 55d6cec89..b27b7c454 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java @@ -9,13 +9,14 @@ import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AlertDialog.Builder; import org.schabi.newpipe.NewPipeDatabase; import org.schabi.newpipe.R; import org.schabi.newpipe.database.stream.model.StreamEntity; import org.schabi.newpipe.databinding.DialogEditTextBinding; import org.schabi.newpipe.local.playlist.LocalPlaylistManager; +import org.schabi.newpipe.util.ThemeHelper; import java.util.List; @@ -66,7 +67,8 @@ public final class PlaylistCreationDialog extends PlaylistDialog { dialogBinding.dialogEditText.setHint(R.string.name); dialogBinding.dialogEditText.setInputType(InputType.TYPE_CLASS_TEXT); - final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(requireContext()) + final Builder dialogBuilder = new Builder(requireContext(), + ThemeHelper.getDialogTheme(requireContext())) .setTitle(R.string.create_playlist) .setView(dialogBinding.getRoot()) .setCancelable(true) @@ -83,7 +85,6 @@ public final class PlaylistCreationDialog extends PlaylistDialog { .observeOn(AndroidSchedulers.mainThread()) .subscribe(longs -> successToast.show()); }); - return dialogBuilder.create(); } } From 4fde62ff89407dc6169d59071f573e501897df2d Mon Sep 17 00:00:00 2001 From: Kalle Struik Date: Mon, 4 Oct 2021 21:23:56 +0200 Subject: [PATCH 05/14] Reorder preferred open action menu --- app/src/main/res/values/settings_keys.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 7518b2ce8..9489ef543 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -359,8 +359,8 @@ background_player popup_player download - always_ask_player add_to_playlist + always_ask_player @string/show_info From 1c9f68bcae833fd2e3c6964fe29d30f19c800101 Mon Sep 17 00:00:00 2001 From: vhouriet Date: Tue, 5 Oct 2021 18:15:36 +0200 Subject: [PATCH 06/14] Fix clicking timestamp shows Toast "Playing in popup mode" Fixes #6662 --- .../main/java/org/schabi/newpipe/util/NavigationHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 afa826677..6939e652d 100644 --- a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java @@ -146,7 +146,9 @@ public final class NavigationHelper { return; } - Toast.makeText(context, R.string.popup_playing_toast, Toast.LENGTH_SHORT).show(); + if (PlayerHolder.getInstance().getType() != PlayerType.POPUP) { + Toast.makeText(context, R.string.popup_playing_toast, Toast.LENGTH_SHORT).show(); + } final Intent intent = getPlayerIntent(context, MainPlayer.class, queue, resumePlayback); intent.putExtra(Player.PLAYER_TYPE, MainPlayer.PlayerType.POPUP.ordinal()); ContextCompat.startForegroundService(context, intent); From 64d743285258e48033b3d806c68546ad8e368040 Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Sat, 9 Oct 2021 16:37:34 +0200 Subject: [PATCH 07/14] Deduplicated drawer code in MainActivity --- .../java/org/schabi/newpipe/MainActivity.java | 117 +++++++----------- 1 file changed, 43 insertions(+), 74 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 5b1cf48e5..3b6fdcc86 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -20,6 +20,8 @@ package org.schabi.newpipe; +import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage; + import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; @@ -91,8 +93,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; -import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage; - public class MainActivity extends AppCompatActivity { private static final String TAG = "MainActivity"; @SuppressWarnings("ConstantConditions") @@ -165,7 +165,42 @@ public class MainActivity extends AppCompatActivity { openMiniPlayerUponPlayerStarted(); } - private void setupDrawer() throws Exception { + private void setupDrawer() throws ExtractionException { + addDrawerMenuForCurrentService(); + + toggle = new ActionBarDrawerToggle(this, mainBinding.getRoot(), + toolbarLayoutBinding.toolbar, R.string.drawer_open, R.string.drawer_close); + toggle.syncState(); + mainBinding.getRoot().addDrawerListener(toggle); + mainBinding.getRoot().addDrawerListener(new DrawerLayout.SimpleDrawerListener() { + private int lastService; + + @Override + public void onDrawerOpened(final View drawerView) { + lastService = ServiceHelper.getSelectedServiceId(MainActivity.this); + } + + @Override + public void onDrawerClosed(final View drawerView) { + if (servicesShown) { + toggleServices(); + } + if (lastService != ServiceHelper.getSelectedServiceId(MainActivity.this)) { + ActivityCompat.recreate(MainActivity.this); + } + } + }); + + drawerLayoutBinding.navigation.setNavigationItemSelectedListener(this::drawerItemSelected); + setupDrawerHeader(); + } + + /** + * Builds the drawer menu for the current service. + * + * @throws ExtractionException + */ + private void addDrawerMenuForCurrentService() throws ExtractionException { //Tabs final int currentServiceId = ServiceHelper.getSelectedServiceId(this); final StreamingService service = NewPipe.getService(currentServiceId); @@ -204,32 +239,6 @@ public class MainActivity extends AppCompatActivity { drawerLayoutBinding.navigation.getMenu() .add(R.id.menu_options_about_group, ITEM_ID_ABOUT, ORDER, R.string.tab_about) .setIcon(R.drawable.ic_info_outline); - - toggle = new ActionBarDrawerToggle(this, mainBinding.getRoot(), - toolbarLayoutBinding.toolbar, R.string.drawer_open, R.string.drawer_close); - toggle.syncState(); - mainBinding.getRoot().addDrawerListener(toggle); - mainBinding.getRoot().addDrawerListener(new DrawerLayout.SimpleDrawerListener() { - private int lastService; - - @Override - public void onDrawerOpened(final View drawerView) { - lastService = ServiceHelper.getSelectedServiceId(MainActivity.this); - } - - @Override - public void onDrawerClosed(final View drawerView) { - if (servicesShown) { - toggleServices(); - } - if (lastService != ServiceHelper.getSelectedServiceId(MainActivity.this)) { - ActivityCompat.recreate(MainActivity.this); - } - } - }); - - drawerLayoutBinding.navigation.setNavigationItemSelectedListener(this::drawerItemSelected); - setupDrawerHeader(); } private boolean drawerItemSelected(final MenuItem item) { @@ -337,11 +346,15 @@ public class MainActivity extends AppCompatActivity { drawerLayoutBinding.navigation.getMenu().removeGroup(R.id.menu_tabs_group); drawerLayoutBinding.navigation.getMenu().removeGroup(R.id.menu_options_about_group); + // Show up or down arrow + drawerHeaderBinding.drawerArrow.setImageResource( + servicesShown ? R.drawable.ic_arrow_drop_up : R.drawable.ic_arrow_drop_down); + if (servicesShown) { showServices(); } else { try { - showTabs(); + addDrawerMenuForCurrentService(); } catch (final Exception e) { ErrorActivity.reportUiErrorInSnackbar(this, "Showing main page tabs", e); } @@ -349,8 +362,6 @@ public class MainActivity extends AppCompatActivity { } private void showServices() { - drawerHeaderBinding.drawerArrow.setImageResource(R.drawable.ic_arrow_drop_up); - for (final StreamingService s : NewPipe.getServices()) { final String title = s.getServiceInfo().getName() + (ServiceHelper.isBeta(s) ? " (beta)" : ""); @@ -414,48 +425,6 @@ public class MainActivity extends AppCompatActivity { menuItem.setActionView(spinner); } - private void showTabs() throws ExtractionException { - drawerHeaderBinding.drawerArrow.setImageResource(R.drawable.ic_arrow_drop_down); - - //Tabs - final int currentServiceId = ServiceHelper.getSelectedServiceId(this); - final StreamingService service = NewPipe.getService(currentServiceId); - - int kioskId = 0; - - for (final String ks : service.getKioskList().getAvailableKiosks()) { - drawerLayoutBinding.navigation.getMenu() - .add(R.id.menu_tabs_group, kioskId, ORDER, - KioskTranslator.getTranslatedKioskName(ks, this)) - .setIcon(KioskTranslator.getKioskIcon(ks, this)); - kioskId++; - } - - drawerLayoutBinding.navigation.getMenu() - .add(R.id.menu_tabs_group, ITEM_ID_SUBSCRIPTIONS, ORDER, R.string.tab_subscriptions) - .setIcon(R.drawable.ic_tv); - drawerLayoutBinding.navigation.getMenu() - .add(R.id.menu_tabs_group, ITEM_ID_FEED, ORDER, R.string.fragment_feed_title) - .setIcon(R.drawable.ic_rss_feed); - drawerLayoutBinding.navigation.getMenu() - .add(R.id.menu_tabs_group, ITEM_ID_BOOKMARKS, ORDER, R.string.tab_bookmarks) - .setIcon(R.drawable.ic_bookmark); - drawerLayoutBinding.navigation.getMenu() - .add(R.id.menu_tabs_group, ITEM_ID_DOWNLOADS, ORDER, R.string.downloads) - .setIcon(R.drawable.ic_file_download); - drawerLayoutBinding.navigation.getMenu() - .add(R.id.menu_tabs_group, ITEM_ID_HISTORY, ORDER, R.string.action_history) - .setIcon(R.drawable.ic_history); - - //Settings and About - drawerLayoutBinding.navigation.getMenu() - .add(R.id.menu_options_about_group, ITEM_ID_SETTINGS, ORDER, R.string.settings) - .setIcon(R.drawable.ic_settings); - drawerLayoutBinding.navigation.getMenu() - .add(R.id.menu_options_about_group, ITEM_ID_ABOUT, ORDER, R.string.tab_about) - .setIcon(R.drawable.ic_info_outline); - } - @Override protected void onDestroy() { super.onDestroy(); From 731640997e74af702a0df44a93ec6f3043b83292 Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Sat, 9 Oct 2021 18:46:20 +0200 Subject: [PATCH 08/14] Cleaned up PlaylistDialog-related code --- .../org/schabi/newpipe/QueueItemMenuUtil.java | 18 ++-- .../org/schabi/newpipe/RouterActivity.java | 46 +++++---- .../fragments/detail/VideoDetailFragment.java | 14 +-- .../local/dialog/PlaylistAppendDialog.java | 94 ++++--------------- .../local/dialog/PlaylistCreationDialog.java | 34 +------ .../newpipe/local/dialog/PlaylistDialog.java | 75 +++++++++++++-- .../newpipe/player/PlayQueueActivity.java | 17 ++-- .../newpipe/util/StreamDialogEntry.java | 19 ++-- 8 files changed, 147 insertions(+), 170 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/QueueItemMenuUtil.java b/app/src/main/java/org/schabi/newpipe/QueueItemMenuUtil.java index 9105ff992..ef24937fe 100644 --- a/app/src/main/java/org/schabi/newpipe/QueueItemMenuUtil.java +++ b/app/src/main/java/org/schabi/newpipe/QueueItemMenuUtil.java @@ -9,8 +9,8 @@ import android.widget.PopupMenu; import androidx.fragment.app.FragmentManager; -import org.schabi.newpipe.local.dialog.PlaylistAppendDialog; -import org.schabi.newpipe.local.dialog.PlaylistCreationDialog; +import org.schabi.newpipe.database.stream.model.StreamEntity; +import org.schabi.newpipe.local.dialog.PlaylistDialog; import org.schabi.newpipe.player.playqueue.PlayQueue; import org.schabi.newpipe.player.playqueue.PlayQueueItem; import org.schabi.newpipe.util.NavigationHelper; @@ -47,13 +47,15 @@ public final class QueueItemMenuUtil { false); return true; case R.id.menu_item_append_playlist: - final PlaylistAppendDialog d = PlaylistAppendDialog.fromPlayQueueItems( - Collections.singletonList(item) + PlaylistDialog.createCorrespondingDialog( + context, + Collections.singletonList(new StreamEntity(item)), + dialog -> dialog.show( + fragmentManager, + "QueueItemMenuUtil@append_playlist" + ) ); - PlaylistAppendDialog.onPlaylistFound(context, - () -> d.show(fragmentManager, "QueueItemMenuUtil@append_playlist"), - () -> PlaylistCreationDialog.newInstance(d) - .show(fragmentManager, "QueueItemMenuUtil@append_playlist")); + return true; case R.id.menu_item_share: shareText(context, item.getTitle(), item.getUrl(), diff --git a/app/src/main/java/org/schabi/newpipe/RouterActivity.java b/app/src/main/java/org/schabi/newpipe/RouterActivity.java index eba080e62..e3e97d570 100644 --- a/app/src/main/java/org/schabi/newpipe/RouterActivity.java +++ b/app/src/main/java/org/schabi/newpipe/RouterActivity.java @@ -33,6 +33,7 @@ import androidx.core.widget.TextViewCompat; import androidx.fragment.app.FragmentManager; import androidx.preference.PreferenceManager; +import org.schabi.newpipe.database.stream.model.StreamEntity; import org.schabi.newpipe.databinding.ListRadioIconItemBinding; import org.schabi.newpipe.databinding.SingleChoiceDialogViewBinding; import org.schabi.newpipe.download.DownloadDialog; @@ -59,8 +60,7 @@ import org.schabi.newpipe.extractor.playlist.PlaylistInfo; import org.schabi.newpipe.extractor.stream.StreamInfo; import org.schabi.newpipe.extractor.stream.VideoStream; import org.schabi.newpipe.ktx.ExceptionUtils; -import org.schabi.newpipe.local.dialog.PlaylistAppendDialog; -import org.schabi.newpipe.local.dialog.PlaylistCreationDialog; +import org.schabi.newpipe.local.dialog.PlaylistDialog; import org.schabi.newpipe.player.MainPlayer; import org.schabi.newpipe.player.helper.PlayerHelper; import org.schabi.newpipe.player.helper.PlayerHolder; @@ -82,6 +82,7 @@ import org.schabi.newpipe.views.FocusOverlayView; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; import icepick.Icepick; @@ -593,31 +594,26 @@ public class RouterActivity extends AppCompatActivity { disposables.add(ExtractorHelper.getStreamInfo(currentServiceId, currentUrl, false) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(info -> { - final FragmentManager fm = getSupportFragmentManager(); - final PlaylistAppendDialog playlistAppendDialog = PlaylistAppendDialog - .fromStreamInfo(info); + .subscribe( + info -> PlaylistDialog.createCorrespondingDialog( + getThemeWrapperContext(), + Collections.singletonList(new StreamEntity(info)), + playlistDialog -> { + playlistDialog.setOnDismissListener(dialog -> finish()); - playlistAppendDialog.setOnDismissListener(dialog -> finish()); - - PlaylistAppendDialog.onPlaylistFound(getThemeWrapperContext(), - () -> { - playlistAppendDialog.show(fm, "addToPlaylistDialog"); - fm.executePendingTransactions(); - }, - () -> { - final PlaylistCreationDialog playlistCreationDialog = - PlaylistCreationDialog.newInstance(playlistAppendDialog); - playlistCreationDialog.show(fm, "addToPlaylistDialog"); - - fm.executePendingTransactions(); - - }); - - }, throwable -> handleError(this, - new ErrorInfo(throwable, UserAction.REQUESTED_STREAM, + playlistDialog.show( + this.getSupportFragmentManager(), + "addToPlaylistDialog" + ); + } + ), + throwable -> handleError(this, new ErrorInfo( + throwable, + UserAction.REQUESTED_STREAM, "Tried to add " + currentUrl + " to a playlist", - currentService.getServiceId()))) + currentService.getServiceId()) + ) + ) ); } 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 5a30ea0f3..bda16849a 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 @@ -52,6 +52,7 @@ import com.squareup.picasso.Callback; import org.schabi.newpipe.App; import org.schabi.newpipe.R; +import org.schabi.newpipe.database.stream.model.StreamEntity; import org.schabi.newpipe.databinding.FragmentVideoDetailBinding; import org.schabi.newpipe.download.DownloadDialog; import org.schabi.newpipe.error.ErrorActivity; @@ -73,8 +74,7 @@ import org.schabi.newpipe.fragments.EmptyFragment; import org.schabi.newpipe.fragments.list.comments.CommentsFragment; import org.schabi.newpipe.fragments.list.videos.RelatedItemsFragment; import org.schabi.newpipe.ktx.AnimationType; -import org.schabi.newpipe.local.dialog.PlaylistAppendDialog; -import org.schabi.newpipe.local.dialog.PlaylistCreationDialog; +import org.schabi.newpipe.local.dialog.PlaylistDialog; import org.schabi.newpipe.local.history.HistoryRecordManager; import org.schabi.newpipe.player.MainPlayer; import org.schabi.newpipe.player.MainPlayer.PlayerType; @@ -99,6 +99,7 @@ import org.schabi.newpipe.util.external_communication.KoreUtils; import org.schabi.newpipe.util.external_communication.ShareUtils; import java.util.ArrayList; +import java.util.Collections; import java.util.Iterator; import java.util.LinkedList; import java.util.List; @@ -444,12 +445,11 @@ public final class VideoDetailFragment break; case R.id.detail_controls_playlist_append: if (getFM() != null && currentInfo != null) { - - final PlaylistAppendDialog d = PlaylistAppendDialog.fromStreamInfo(currentInfo); disposables.add( - PlaylistAppendDialog.onPlaylistFound(getContext(), - () -> d.show(getFM(), TAG), - () -> PlaylistCreationDialog.newInstance(d).show(getFM(), TAG) + PlaylistDialog.createCorrespondingDialog( + getContext(), + Collections.singletonList(new StreamEntity(currentInfo)), + dialog -> dialog.show(getFM(), TAG) ) ); } 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 268848818..2db7e0153 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,8 +1,5 @@ package org.schabi.newpipe.local.dialog; -import android.content.Context; -import android.content.DialogInterface; -import android.content.DialogInterface.OnDismissListener; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; @@ -19,20 +16,14 @@ import org.schabi.newpipe.R; import org.schabi.newpipe.database.LocalItem; import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry; import org.schabi.newpipe.database.stream.model.StreamEntity; -import org.schabi.newpipe.extractor.stream.StreamInfo; -import org.schabi.newpipe.extractor.stream.StreamInfoItem; import org.schabi.newpipe.local.LocalItemListAdapter; import org.schabi.newpipe.local.playlist.LocalPlaylistManager; -import org.schabi.newpipe.player.playqueue.PlayQueueItem; import org.schabi.newpipe.util.OnClickGesture; -import java.util.ArrayList; -import java.util.Collections; import java.util.List; import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers; import io.reactivex.rxjava3.disposables.CompositeDisposable; -import io.reactivex.rxjava3.disposables.Disposable; public final class PlaylistAppendDialog extends PlaylistDialog { private static final String TAG = PlaylistAppendDialog.class.getCanonicalName(); @@ -42,58 +33,8 @@ public final class PlaylistAppendDialog extends PlaylistDialog { private final CompositeDisposable playlistDisposables = new CompositeDisposable(); - @Nullable - private OnDismissListener onDismissListener = null; - - public static Disposable onPlaylistFound( - final Context context, final Runnable onSuccess, final Runnable onFailed - ) { - final LocalPlaylistManager playlistManager = - new LocalPlaylistManager(NewPipeDatabase.getInstance(context)); - - return playlistManager.hasPlaylists() - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(hasPlaylists -> { - if (hasPlaylists) { - onSuccess.run(); - } else { - onFailed.run(); - } - }); - } - - public static PlaylistAppendDialog fromStreamInfo(final StreamInfo info) { - final PlaylistAppendDialog dialog = new PlaylistAppendDialog(); - dialog.setInfo(Collections.singletonList(new StreamEntity(info))); - return dialog; - } - - public static PlaylistAppendDialog fromStreamInfoItems(final List items) { - final PlaylistAppendDialog dialog = new PlaylistAppendDialog(); - final List entities = new ArrayList<>(items.size()); - for (final StreamInfoItem item : items) { - entities.add(new StreamEntity(item)); - } - dialog.setInfo(entities); - return dialog; - } - - public static PlaylistAppendDialog fromPlayQueueItems(final List items) { - final PlaylistAppendDialog dialog = new PlaylistAppendDialog(); - final List entities = new ArrayList<>(items.size()); - for (final PlayQueueItem item : items) { - entities.add(new StreamEntity(item)); - } - dialog.setInfo(entities); - return dialog; - } - - public void setOnDismissListener(@Nullable final OnDismissListener onDismissListener) { - this.onDismissListener = onDismissListener; - } - - public OnDismissListener getOnDismissListener() { - return onDismissListener; + public PlaylistAppendDialog(final List streamEntities) { + super(streamEntities); } /*////////////////////////////////////////////////////////////////////////// @@ -117,11 +58,15 @@ public final class PlaylistAppendDialog extends PlaylistDialog { playlistAdapter.setSelectedListener(new OnClickGesture() { @Override public void selected(final LocalItem selectedItem) { - if (!(selectedItem instanceof PlaylistMetadataEntry) || getStreams() == null) { + if (!(selectedItem instanceof PlaylistMetadataEntry) + || getStreamEntities() == null) { return; } - onPlaylistSelected(playlistManager, (PlaylistMetadataEntry) selectedItem, - getStreams()); + onPlaylistSelected( + playlistManager, + (PlaylistMetadataEntry) selectedItem, + getStreamEntities() + ); } }); @@ -154,29 +99,22 @@ public final class PlaylistAppendDialog extends PlaylistDialog { playlistAdapter = null; } - @Override - public void onDismiss(@NonNull final DialogInterface dialog) { - super.onDismiss(dialog); - if (onDismissListener != null) { - onDismissListener.onDismiss(dialog); - } - } - /*////////////////////////////////////////////////////////////////////////// // Helper //////////////////////////////////////////////////////////////////////////*/ public void openCreatePlaylistDialog() { - if (getStreams() == null || !isAdded()) { + if (getStreamEntities() == null || !isAdded()) { return; } - final PlaylistCreationDialog dialog = PlaylistCreationDialog.newInstance(getStreams()); + final PlaylistCreationDialog playlistCreationDialog = + new PlaylistCreationDialog(getStreamEntities()); // Move the dismissListener to the new dialog. - dialog.setOnDismissListener(this.onDismissListener); - this.onDismissListener = null; + playlistCreationDialog.setOnDismissListener(this.getOnDismissListener()); + this.setOnDismissListener(null); - dialog.show(getParentFragmentManager(), TAG); + playlistCreationDialog.show(getParentFragmentManager(), TAG); requireDialog().dismiss(); } @@ -191,7 +129,7 @@ public final class PlaylistAppendDialog extends PlaylistDialog { private void onPlaylistSelected(@NonNull final LocalPlaylistManager manager, @NonNull final PlaylistMetadataEntry playlist, @NonNull final List streams) { - if (getStreams() == null) { + if (getStreamEntities() == null) { return; } diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java index b27b7c454..0f71e54d9 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java @@ -1,8 +1,6 @@ package org.schabi.newpipe.local.dialog; import android.app.Dialog; -import android.content.DialogInterface; -import android.content.DialogInterface.OnDismissListener; import android.os.Bundle; import android.text.InputType; import android.widget.Toast; @@ -23,32 +21,8 @@ import java.util.List; import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers; public final class PlaylistCreationDialog extends PlaylistDialog { - @Nullable - private OnDismissListener onDismissListener = null; - - public static PlaylistCreationDialog newInstance(final List streams) { - final PlaylistCreationDialog dialog = new PlaylistCreationDialog(); - dialog.setInfo(streams); - return dialog; - } - - public static PlaylistCreationDialog newInstance(final PlaylistAppendDialog appendDialog) { - final PlaylistCreationDialog dialog = new PlaylistCreationDialog(); - dialog.setInfo(appendDialog.getStreams()); - dialog.setOnDismissListener(appendDialog.getOnDismissListener()); - return dialog; - } - - public void setOnDismissListener(@Nullable final OnDismissListener onDismissListener) { - this.onDismissListener = onDismissListener; - } - - @Override - public void onDismiss(@NonNull final DialogInterface dialog) { - super.onDismiss(dialog); - if (onDismissListener != null) { - onDismissListener.onDismiss(dialog); - } + public PlaylistCreationDialog(final List streamEntities) { + super(streamEntities); } /*////////////////////////////////////////////////////////////////////////// @@ -58,7 +32,7 @@ public final class PlaylistCreationDialog extends PlaylistDialog { @NonNull @Override public Dialog onCreateDialog(@Nullable final Bundle savedInstanceState) { - if (getStreams() == null) { + if (getStreamEntities() == null) { return super.onCreateDialog(savedInstanceState); } @@ -81,7 +55,7 @@ public final class PlaylistCreationDialog extends PlaylistDialog { R.string.playlist_creation_success, Toast.LENGTH_SHORT); - playlistManager.createPlaylist(name, getStreams()) + playlistManager.createPlaylist(name, getStreamEntities()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(longs -> successToast.show()); }); diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java index 2c2987e95..c2d4474f8 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistDialog.java @@ -1,6 +1,8 @@ package org.schabi.newpipe.local.dialog; import android.app.Dialog; +import android.content.Context; +import android.content.DialogInterface; import android.os.Bundle; import android.view.Window; @@ -8,23 +10,29 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.DialogFragment; +import org.schabi.newpipe.NewPipeDatabase; import org.schabi.newpipe.database.stream.model.StreamEntity; +import org.schabi.newpipe.local.playlist.LocalPlaylistManager; import org.schabi.newpipe.util.StateSaver; import java.util.List; import java.util.Queue; +import java.util.function.Consumer; + +import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers; +import io.reactivex.rxjava3.disposables.Disposable; public abstract class PlaylistDialog extends DialogFragment implements StateSaver.WriteRead { + + @Nullable + private DialogInterface.OnDismissListener onDismissListener = null; + private List streamEntities; private org.schabi.newpipe.util.SavedState savedState; - protected void setInfo(final List entities) { - this.streamEntities = entities; - } - - protected List getStreams() { - return streamEntities; + public PlaylistDialog(final List streamEntities) { + this.streamEntities = streamEntities; } /*////////////////////////////////////////////////////////////////////////// @@ -43,6 +51,10 @@ public abstract class PlaylistDialog extends DialogFragment implements StateSave StateSaver.onDestroy(savedState); } + public List getStreamEntities() { + return streamEntities; + } + @NonNull @Override public Dialog onCreateDialog(final Bundle savedInstanceState) { @@ -55,6 +67,14 @@ public abstract class PlaylistDialog extends DialogFragment implements StateSave return dialog; } + @Override + public void onDismiss(@NonNull final DialogInterface dialog) { + super.onDismiss(dialog); + if (onDismissListener != null) { + onDismissListener.onDismiss(dialog); + } + } + /*////////////////////////////////////////////////////////////////////////// // State Saving //////////////////////////////////////////////////////////////////////////*/ @@ -84,4 +104,47 @@ public abstract class PlaylistDialog extends DialogFragment implements StateSave savedState, outState, this); } } + + /*////////////////////////////////////////////////////////////////////////// + // Getter + Setter + //////////////////////////////////////////////////////////////////////////*/ + + @Nullable + public DialogInterface.OnDismissListener getOnDismissListener() { + return onDismissListener; + } + + public void setOnDismissListener( + @Nullable final DialogInterface.OnDismissListener onDismissListener + ) { + this.onDismissListener = onDismissListener; + } + + /*////////////////////////////////////////////////////////////////////////// + // Dialog creation + //////////////////////////////////////////////////////////////////////////*/ + + /** + * Creates a {@link PlaylistAppendDialog} when playlists exists, + * otherwise a {@link PlaylistCreationDialog}. + * + * @param context context used for accessing the database + * @param streamEntities used for crating the dialog + * @param onExec execution that should occur after a dialog got created, e.g. showing it + * @return Disposable + */ + public static Disposable createCorrespondingDialog( + final Context context, + final List streamEntities, + final Consumer onExec + ) { + return new LocalPlaylistManager(NewPipeDatabase.getInstance(context)) + .hasPlaylists() + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(hasPlaylists -> + onExec.accept(hasPlaylists + ? new PlaylistAppendDialog(streamEntities) + : new PlaylistCreationDialog(streamEntities)) + ); + } } diff --git a/app/src/main/java/org/schabi/newpipe/player/PlayQueueActivity.java b/app/src/main/java/org/schabi/newpipe/player/PlayQueueActivity.java index 0976aa4fb..e0c5ab083 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PlayQueueActivity.java +++ b/app/src/main/java/org/schabi/newpipe/player/PlayQueueActivity.java @@ -23,11 +23,11 @@ import androidx.recyclerview.widget.RecyclerView; import com.google.android.exoplayer2.PlaybackParameters; import org.schabi.newpipe.R; +import org.schabi.newpipe.database.stream.model.StreamEntity; import org.schabi.newpipe.databinding.ActivityPlayerQueueControlBinding; import org.schabi.newpipe.extractor.stream.StreamInfo; import org.schabi.newpipe.fragments.OnScrollBelowItemsListener; -import org.schabi.newpipe.local.dialog.PlaylistAppendDialog; -import org.schabi.newpipe.local.dialog.PlaylistCreationDialog; +import org.schabi.newpipe.local.dialog.PlaylistDialog; import org.schabi.newpipe.player.event.PlayerEventListener; import org.schabi.newpipe.player.helper.PlaybackParameterDialog; import org.schabi.newpipe.player.playqueue.PlayQueue; @@ -43,6 +43,7 @@ import org.schabi.newpipe.util.ServiceHelper; import org.schabi.newpipe.util.ThemeHelper; import java.util.List; +import java.util.stream.Collectors; import static org.schabi.newpipe.QueueItemMenuUtil.openPopupMenu; import static org.schabi.newpipe.player.helper.PlayerHelper.formatSpeed; @@ -452,12 +453,12 @@ public final class PlayQueueActivity extends AppCompatActivity } } - private void openPlaylistAppendDialog(final List playlist) { - final PlaylistAppendDialog d = PlaylistAppendDialog.fromPlayQueueItems(playlist); - - PlaylistAppendDialog.onPlaylistFound(getApplicationContext(), - () -> d.show(getSupportFragmentManager(), TAG), - () -> PlaylistCreationDialog.newInstance(d).show(getSupportFragmentManager(), TAG)); + private void openPlaylistAppendDialog(final List playQueueItems) { + PlaylistDialog.createCorrespondingDialog( + getApplicationContext(), + playQueueItems.stream().map(StreamEntity::new).collect(Collectors.toList()), + dialog -> dialog.show(getSupportFragmentManager(), TAG) + ); } //////////////////////////////////////////////////////////////////////////// diff --git a/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java b/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java index 11cc4daba..e33c4da87 100644 --- a/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java +++ b/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java @@ -8,9 +8,10 @@ import androidx.fragment.app.Fragment; import org.schabi.newpipe.NewPipeDatabase; import org.schabi.newpipe.R; +import org.schabi.newpipe.database.stream.model.StreamEntity; import org.schabi.newpipe.extractor.stream.StreamInfoItem; import org.schabi.newpipe.local.dialog.PlaylistAppendDialog; -import org.schabi.newpipe.local.dialog.PlaylistCreationDialog; +import org.schabi.newpipe.local.dialog.PlaylistDialog; import org.schabi.newpipe.local.history.HistoryRecordManager; import org.schabi.newpipe.player.playqueue.SinglePlayQueue; import org.schabi.newpipe.util.external_communication.KoreUtils; @@ -82,13 +83,15 @@ public enum StreamDialogEntry { }), // has to be set manually append_playlist(R.string.add_to_playlist, (fragment, item) -> { - final PlaylistAppendDialog d = PlaylistAppendDialog - .fromStreamInfoItems(Collections.singletonList(item)); - - PlaylistAppendDialog.onPlaylistFound(fragment.getContext(), - () -> d.show(fragment.getParentFragmentManager(), "StreamDialogEntry@append_playlist"), - () -> PlaylistCreationDialog.newInstance(d) - .show(fragment.getParentFragmentManager(), "StreamDialogEntry@create_playlist") + PlaylistDialog.createCorrespondingDialog( + fragment.getContext(), + Collections.singletonList(new StreamEntity(item)), + dialog -> dialog.show( + fragment.getParentFragmentManager(), + "StreamDialogEntry@" + + (dialog instanceof PlaylistAppendDialog ? "append" : "create") + + "_playlist" + ) ); }), From d7d87691cb776c13cda8ccdb8a6d04448e53146a Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Sat, 9 Oct 2021 18:47:36 +0200 Subject: [PATCH 09/14] Add to playlist - Showing toast that this may take a moment --- app/src/main/java/org/schabi/newpipe/RouterActivity.java | 8 ++++++++ app/src/main/res/values/strings.xml | 1 + 2 files changed, 9 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/RouterActivity.java b/app/src/main/java/org/schabi/newpipe/RouterActivity.java index e3e97d570..4e96f3bb6 100644 --- a/app/src/main/java/org/schabi/newpipe/RouterActivity.java +++ b/app/src/main/java/org/schabi/newpipe/RouterActivity.java @@ -591,6 +591,14 @@ public class RouterActivity extends AppCompatActivity { } private void openAddToPlaylistDialog() { + // Getting the stream info usually takes a moment + // Notifying the user here to ensure that no confusion arises + Toast.makeText( + getApplicationContext(), + getString(R.string.processing_may_take_a_moment), + Toast.LENGTH_SHORT) + .show(); + disposables.add(ExtractorHelper.getStreamInfo(currentServiceId, currentUrl, false) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c1fc08bc7..faceb5910 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -440,6 +440,7 @@ Rename Name Add to playlist + Processing... May take moment Mute Unmute Set as playlist thumbnail From 12aac09c7bed2700e7966e3b2bf157cc2f47a175 Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Sat, 9 Oct 2021 18:56:10 +0200 Subject: [PATCH 10/14] Fixed typo --- 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 faceb5910..897ec0af8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -440,7 +440,7 @@ Rename Name Add to playlist - Processing... May take moment + Processing... May take a moment Mute Unmute Set as playlist thumbnail From 9d7e9289bb88a4acb8ac9fb326f4f7b02797911c Mon Sep 17 00:00:00 2001 From: Kalle Struik Date: Sun, 10 Oct 2021 12:32:57 +0200 Subject: [PATCH 11/14] Fix cursor color in PlaylistCreationDialog --- .../org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java index 0f71e54d9..6664144cd 100644 --- a/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java +++ b/app/src/main/java/org/schabi/newpipe/local/dialog/PlaylistCreationDialog.java @@ -38,6 +38,7 @@ public final class PlaylistCreationDialog extends PlaylistDialog { final DialogEditTextBinding dialogBinding = DialogEditTextBinding.inflate(getLayoutInflater()); + dialogBinding.getRoot().getContext().setTheme(ThemeHelper.getDialogTheme(requireContext())); dialogBinding.dialogEditText.setHint(R.string.name); dialogBinding.dialogEditText.setInputType(InputType.TYPE_CLASS_TEXT); From 50634eb2b3963c70b22c16611bcfcbdb8562624a Mon Sep 17 00:00:00 2001 From: vhouriet Date: Mon, 11 Oct 2021 19:41:22 +0200 Subject: [PATCH 12/14] Check player type before displaying background player toast --- .../main/java/org/schabi/newpipe/util/NavigationHelper.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 ae1e6cede..c22af1ce0 100644 --- a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java @@ -149,8 +149,10 @@ public final class NavigationHelper { public static void playOnBackgroundPlayer(final Context context, final PlayQueue queue, final boolean resumePlayback) { - Toast.makeText(context, R.string.background_player_playing_toast, Toast.LENGTH_SHORT) - .show(); + if (PlayerHolder.getInstance().getType() != MainPlayer.PlayerType.AUDIO) { + Toast.makeText(context, R.string.background_player_playing_toast, Toast.LENGTH_SHORT) + .show(); + } final Intent intent = getPlayerIntent(context, MainPlayer.class, queue, resumePlayback); intent.putExtra(Player.PLAYER_TYPE, MainPlayer.PlayerType.AUDIO.ordinal()); ContextCompat.startForegroundService(context, intent); From 54d3bff26df81b828be14448cff40e3751ad369a Mon Sep 17 00:00:00 2001 From: TobiGr Date: Tue, 12 Oct 2021 16:44:17 +0200 Subject: [PATCH 13/14] Move checking for new version to MainAcitvity When the service is started from the Application class, the app might be still in the background. This is definetly not the case when MainActivity.onCreate() is called. Fixes #7227 --- app/src/main/java/org/schabi/newpipe/App.java | 5 ----- app/src/main/java/org/schabi/newpipe/MainActivity.java | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/App.java b/app/src/main/java/org/schabi/newpipe/App.java index 35b0b2674..b44f7517d 100644 --- a/app/src/main/java/org/schabi/newpipe/App.java +++ b/app/src/main/java/org/schabi/newpipe/App.java @@ -43,8 +43,6 @@ import io.reactivex.rxjava3.exceptions.UndeliverableException; import io.reactivex.rxjava3.functions.Consumer; import io.reactivex.rxjava3.plugins.RxJavaPlugins; -import static org.schabi.newpipe.CheckForNewAppVersion.startNewVersionCheckService; - /* * Copyright (C) Hans-Christoph Steiner 2016 * App.java is part of NewPipe. @@ -113,9 +111,6 @@ public class App extends MultiDexApplication { && prefs.getBoolean(getString(R.string.show_image_indicators_key), false)); configureRxJavaErrorHandler(); - - // Check for new version - startNewVersionCheckService(); } @Override diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 5b1cf48e5..18ab69b7b 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -20,6 +20,8 @@ package org.schabi.newpipe; +import static org.schabi.newpipe.CheckForNewAppVersion.startNewVersionCheckService; + import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; @@ -163,6 +165,9 @@ public class MainActivity extends AppCompatActivity { FocusOverlayView.setupFocusObserver(this); } openMiniPlayerUponPlayerStarted(); + + // Check for new version + startNewVersionCheckService(); } private void setupDrawer() throws Exception { From 7c9896beaf314a8b28dea4cdb4e7fc6d1d31fab8 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Tue, 12 Oct 2021 15:42:33 +0200 Subject: [PATCH 14/14] Release NewPipe 0.21.12 (978) --- app/build.gradle | 4 ++-- fastlane/metadata/android/en-US/changelogs/978.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/978.txt diff --git a/app/build.gradle b/app/build.gradle index 25493490a..e09395cff 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,8 +17,8 @@ android { resValue "string", "app_name", "NewPipe" minSdkVersion 19 targetSdkVersion 29 - versionCode 977 - versionName "0.21.11" + versionCode 978 + versionName "0.21.12" multiDexEnabled true diff --git a/fastlane/metadata/android/en-US/changelogs/978.txt b/fastlane/metadata/android/en-US/changelogs/978.txt new file mode 100644 index 000000000..34fa05f85 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/978.txt @@ -0,0 +1 @@ +Fixed executing the check for a new NewPipe version. This check was executed too early sometimes and therefore lead to an app crash. That should be fixed now.