From 8267d325edaf9766ab3cf2e4938ff656cde53344 Mon Sep 17 00:00:00 2001
From: "Abd El-Twab M. Fakhry"
Date: Tue, 30 Apr 2024 23:41:02 +0300
Subject: [PATCH 01/52] Fix compilation error when parsing unsupported file
format
---
.../res/layout-land/list_stream_card_item.xml | 95 ++++++++++++++++++-
1 file changed, 94 insertions(+), 1 deletion(-)
diff --git a/app/src/main/res/layout-land/list_stream_card_item.xml b/app/src/main/res/layout-land/list_stream_card_item.xml
index 70228ee1d..2b7c414be 120000
--- a/app/src/main/res/layout-land/list_stream_card_item.xml
+++ b/app/src/main/res/layout-land/list_stream_card_item.xml
@@ -1 +1,94 @@
-../layout/list_stream_item.xml
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From b74cab664232f2a7bc3dcd71b9b67952f555c2a4 Mon Sep 17 00:00:00 2001
From: "Abd El-Twab M. Fakhry"
Date: Wed, 1 May 2024 01:38:46 +0300
Subject: [PATCH 02/52] Adjust the playlist bookmark item layout for RTL
languages
---
app/src/main/res/layout/list_playlist_bookmark_item.xml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/src/main/res/layout/list_playlist_bookmark_item.xml b/app/src/main/res/layout/list_playlist_bookmark_item.xml
index 6aabd4d07..fe71b4062 100644
--- a/app/src/main/res/layout/list_playlist_bookmark_item.xml
+++ b/app/src/main/res/layout/list_playlist_bookmark_item.xml
@@ -13,7 +13,7 @@
Date: Wed, 1 May 2024 17:21:24 +0300
Subject: [PATCH 03/52] Revert "Fix compilation error when parsing unsupported
file format"
This reverts commit 8267d325edaf9766ab3cf2e4938ff656cde53344.
---
.../res/layout-land/list_stream_card_item.xml | 95 +------------------
1 file changed, 1 insertion(+), 94 deletions(-)
diff --git a/app/src/main/res/layout-land/list_stream_card_item.xml b/app/src/main/res/layout-land/list_stream_card_item.xml
index 2b7c414be..70228ee1d 120000
--- a/app/src/main/res/layout-land/list_stream_card_item.xml
+++ b/app/src/main/res/layout-land/list_stream_card_item.xml
@@ -1,94 +1 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+../layout/list_stream_item.xml
\ No newline at end of file
From c02ceda22f3f035633ff340b8089a5c670d7a427 Mon Sep 17 00:00:00 2001
From: "Abd El-Twab M. Fakhry"
Date: Sat, 18 May 2024 16:47:41 +0300
Subject: [PATCH 04/52] Use layout constraints instead of static height
---
app/src/main/res/layout/list_playlist_bookmark_item.xml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/app/src/main/res/layout/list_playlist_bookmark_item.xml b/app/src/main/res/layout/list_playlist_bookmark_item.xml
index fe71b4062..e36bc22bb 100644
--- a/app/src/main/res/layout/list_playlist_bookmark_item.xml
+++ b/app/src/main/res/layout/list_playlist_bookmark_item.xml
@@ -13,11 +13,12 @@
@@ -45,9 +46,10 @@
Date: Fri, 7 Jun 2024 14:20:06 +0000
Subject: [PATCH 05/52] Update README.md
---
README.md | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 001f0eeab..5721d4af9 100644
--- a/README.md
+++ b/README.md
@@ -96,7 +96,7 @@ Also, since they are free and open source software, neither the app nor the Extr
## Installation and updates
You can install NewPipe using one of the following methods:
1. Add our custom repo to F-Droid and install it from there. The instructions are here: https://newpipe.net/FAQ/tutorials/install-add-fdroid-repo/
- 2. Download the APK from [GitHub Releases](https://github.com/TeamNewPipe/NewPipe/releases) and install it.
+ 2. Download the APK from [GitHub Releases](https://github.com/TeamNewPipe/NewPipe/releases) and install it. (See APK Info below.)
3. Update via F-Droid. This is the slowest method of getting updates, as F-Droid must recognize changes, build the APK itself, sign it, and then push the update to users.
4. Build a debug APK yourself. This is the fastest way to get new features on your device, but is much more complicated, so we recommend using one of the other methods.
5. If you're interested in a specific feature or bugfix provided in a Pull Request in this repo, you can also download its APK from within the PR. Read the PR description for instructions. The great thing about PR-specific APKs is that they're installed side-by-side the official app, so you don't have to worry about losing your data or messing anything up.
@@ -111,6 +111,11 @@ In the meanwhile, if you want to switch sources for some reason (e.g. NewPipe's
Note: when you're importing a database into the official app, always make sure that it is the one you exported _from_ the official app. If you import a database exported from an APK other than the official app, it may break things. Such an action is unsupported, and you should only do so when you're absolutely certain you know what you're doing.
+## APK Info
+
+Signing key to verify the APK download for installation method 2 above (SHA256 fingerprint, compare with the signing key shown on the website):
+```CB:84:06:9B:D6:81:16:BA:FA:E5:EE:4E:E5:B0:8A:56:7A:A6:D8:98:40:4E:7C:B1:2F:9E:75:6D:F5:CF:5C:AB```
+
## Contribution
Whether you have ideas, translations, design changes, code cleaning, or even major code changes, help is always welcome. The app gets better and better with each contribution, no matter how big or small! If you'd like to get involved, check our [contribution notes](.github/CONTRIBUTING.md).
From 71822a47a51faf3fc6b5906d6582efbae2f6841a Mon Sep 17 00:00:00 2001
From: shrimprugbysnowowl
<59341190+shrimprugbysnowowl@users.noreply.github.com>
Date: Fri, 7 Jun 2024 14:24:59 +0000
Subject: [PATCH 06/52] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 5721d4af9..be3c0b829 100644
--- a/README.md
+++ b/README.md
@@ -96,7 +96,7 @@ Also, since they are free and open source software, neither the app nor the Extr
## Installation and updates
You can install NewPipe using one of the following methods:
1. Add our custom repo to F-Droid and install it from there. The instructions are here: https://newpipe.net/FAQ/tutorials/install-add-fdroid-repo/
- 2. Download the APK from [GitHub Releases](https://github.com/TeamNewPipe/NewPipe/releases) and install it. (See APK Info below.)
+ 2. Download the APK from [GitHub Releases](https://github.com/TeamNewPipe/NewPipe/releases) and install it. (See APK Info below.)
3. Update via F-Droid. This is the slowest method of getting updates, as F-Droid must recognize changes, build the APK itself, sign it, and then push the update to users.
4. Build a debug APK yourself. This is the fastest way to get new features on your device, but is much more complicated, so we recommend using one of the other methods.
5. If you're interested in a specific feature or bugfix provided in a Pull Request in this repo, you can also download its APK from within the PR. Read the PR description for instructions. The great thing about PR-specific APKs is that they're installed side-by-side the official app, so you don't have to worry about losing your data or messing anything up.
From 26dd86e967ce2b2439cfaf653f5380c2871e3724 Mon Sep 17 00:00:00 2001
From: Isira Seneviratne
Date: Sun, 7 Jul 2024 10:46:17 +0530
Subject: [PATCH 07/52] Use Android's elapsed time formatting
---
.../org/schabi/newpipe/util/Localization.java | 29 +++++--------------
1 file changed, 7 insertions(+), 22 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 bc113e8f8..380c79da0 100644
--- a/app/src/main/java/org/schabi/newpipe/util/Localization.java
+++ b/app/src/main/java/org/schabi/newpipe/util/Localization.java
@@ -10,6 +10,7 @@ import android.content.res.Resources;
import android.icu.text.CompactDecimalFormat;
import android.os.Build;
import android.text.TextUtils;
+import android.text.format.DateUtils;
import android.util.DisplayMetrics;
import androidx.annotation.NonNull;
@@ -239,43 +240,27 @@ public final class Localization {
}
/**
- * Get a readable text for a duration in the format {@code days:hours:minutes:seconds}.
+ * Get a readable text for a duration in the format {@code hours:minutes:seconds}.
* Prepended zeros are removed.
* @param duration the duration in seconds
- * @return a formatted duration String or {@code 0:00} if the duration is zero.
+ * @return a formatted duration String or {@code 00:00} if the duration is zero.
*/
public static String getDurationString(final long duration) {
- return getDurationString(duration, true, false);
+ return DateUtils.formatElapsedTime(Math.max(duration, 0));
}
/**
- * Get a readable text for a duration in the format {@code days:hours:minutes:seconds+}.
+ * Get a readable text for a duration in the format {@code hours:minutes:seconds+}.
* Prepended zeros are removed. If the given duration is incomplete, a plus is appended to the
* duration string.
* @param duration the duration in seconds
* @param isDurationComplete whether the given duration is complete or whether info is missing
* @param showDurationPrefix whether the duration-prefix shall be shown
- * @return a formatted duration String or {@code 0:00} if the duration is zero.
+ * @return a formatted duration String or {@code 00:00} if the duration is zero.
*/
public static String getDurationString(final long duration, final boolean isDurationComplete,
final boolean showDurationPrefix) {
- final String output;
-
- final long days = duration / (24 * 60 * 60L); /* greater than a day */
- final long hours = duration % (24 * 60 * 60L) / (60 * 60L); /* greater than an hour */
- final long minutes = duration % (24 * 60 * 60L) % (60 * 60L) / 60L;
- final long seconds = duration % 60L;
-
- if (duration < 0) {
- output = "0:00";
- } else if (days > 0) {
- //handle days
- output = String.format(Locale.US, "%d:%02d:%02d:%02d", days, hours, minutes, seconds);
- } else if (hours > 0) {
- output = String.format(Locale.US, "%d:%02d:%02d", hours, minutes, seconds);
- } else {
- output = String.format(Locale.US, "%d:%02d", minutes, seconds);
- }
+ final String output = getDurationString(duration);
final String durationPrefix = showDurationPrefix ? "⏱ " : "";
final String durationPostfix = isDurationComplete ? "" : "+";
return durationPrefix + output + durationPostfix;
From 07c63f794eecba3db818dba974db5a70265ccebc Mon Sep 17 00:00:00 2001
From: Isira Seneviratne
Date: Sun, 7 Jul 2024 14:25:02 +0530
Subject: [PATCH 08/52] Update documentation
---
.../main/java/org/schabi/newpipe/util/Localization.java | 8 ++++----
1 file changed, 4 insertions(+), 4 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 380c79da0..17abaeb96 100644
--- a/app/src/main/java/org/schabi/newpipe/util/Localization.java
+++ b/app/src/main/java/org/schabi/newpipe/util/Localization.java
@@ -241,7 +241,7 @@ public final class Localization {
/**
* Get a readable text for a duration in the format {@code hours:minutes:seconds}.
- * Prepended zeros are removed.
+ *
* @param duration the duration in seconds
* @return a formatted duration String or {@code 00:00} if the duration is zero.
*/
@@ -250,9 +250,9 @@ public final class Localization {
}
/**
- * Get a readable text for a duration in the format {@code hours:minutes:seconds+}.
- * Prepended zeros are removed. If the given duration is incomplete, a plus is appended to the
- * duration string.
+ * Get a readable text for a duration in the format {@code hours:minutes:seconds+}. If the given
+ * duration is incomplete, a plus is appended to the duration string.
+ *
* @param duration the duration in seconds
* @param isDurationComplete whether the given duration is complete or whether info is missing
* @param showDurationPrefix whether the duration-prefix shall be shown
From 38c823a042ee3ca880b15d79095087a89d66f627 Mon Sep 17 00:00:00 2001
From: TwoAi
Date: Sat, 10 Aug 2024 15:42:35 -0400
Subject: [PATCH 09/52] Remove outdated returnActivity test code
returnActivity was removed in 463dd8e
---
.../schabi/newpipe/error/ErrorActivity.java | 22 ------------
.../newpipe/error/ErrorActivityTest.java | 35 -------------------
2 files changed, 57 deletions(-)
delete mode 100644 app/src/test/java/org/schabi/newpipe/error/ErrorActivityTest.java
diff --git a/app/src/main/java/org/schabi/newpipe/error/ErrorActivity.java b/app/src/main/java/org/schabi/newpipe/error/ErrorActivity.java
index 831a8cc4b..2f607b487 100644
--- a/app/src/main/java/org/schabi/newpipe/error/ErrorActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/error/ErrorActivity.java
@@ -2,7 +2,6 @@ package org.schabi.newpipe.error;
import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;
-import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
@@ -13,7 +12,6 @@ import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
-import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
@@ -22,7 +20,6 @@ import androidx.core.content.IntentCompat;
import com.grack.nanojson.JsonWriter;
import org.schabi.newpipe.BuildConfig;
-import org.schabi.newpipe.MainActivity;
import org.schabi.newpipe.R;
import org.schabi.newpipe.databinding.ActivityErrorBinding;
import org.schabi.newpipe.util.Localization;
@@ -187,25 +184,6 @@ public class ErrorActivity extends AppCompatActivity {
.collect(Collectors.joining(separator + "\n", separator + "\n", separator));
}
- /**
- * Get the checked activity.
- *
- * @param returnActivity the activity to return to
- * @return the casted return activity or null
- */
- @Nullable
- static Class extends Activity> getReturnActivity(final Class> returnActivity) {
- Class extends Activity> checkedReturnActivity = null;
- if (returnActivity != null) {
- if (Activity.class.isAssignableFrom(returnActivity)) {
- checkedReturnActivity = returnActivity.asSubclass(Activity.class);
- } else {
- checkedReturnActivity = MainActivity.class;
- }
- }
- return checkedReturnActivity;
- }
-
private void buildInfo(final ErrorInfo info) {
String text = "";
diff --git a/app/src/test/java/org/schabi/newpipe/error/ErrorActivityTest.java b/app/src/test/java/org/schabi/newpipe/error/ErrorActivityTest.java
deleted file mode 100644
index f77c7b268..000000000
--- a/app/src/test/java/org/schabi/newpipe/error/ErrorActivityTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.schabi.newpipe.error;
-
-import android.app.Activity;
-
-import org.junit.Test;
-import org.schabi.newpipe.MainActivity;
-import org.schabi.newpipe.RouterActivity;
-import org.schabi.newpipe.fragments.detail.VideoDetailFragment;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
-/**
- * Unit tests for {@link ErrorActivity}.
- */
-public class ErrorActivityTest {
- @Test
- public void getReturnActivity() {
- Class extends Activity> returnActivity;
- returnActivity = ErrorActivity.getReturnActivity(MainActivity.class);
- assertEquals(MainActivity.class, returnActivity);
-
- returnActivity = ErrorActivity.getReturnActivity(RouterActivity.class);
- assertEquals(RouterActivity.class, returnActivity);
-
- returnActivity = ErrorActivity.getReturnActivity(null);
- assertNull(returnActivity);
-
- returnActivity = ErrorActivity.getReturnActivity(Integer.class);
- assertEquals(MainActivity.class, returnActivity);
-
- returnActivity = ErrorActivity.getReturnActivity(VideoDetailFragment.class);
- assertEquals(MainActivity.class, returnActivity);
- }
-}
From 035c394cf6704c0af9077c01ebfa55b810d02140 Mon Sep 17 00:00:00 2001
From: Mihael_River <154642338+Stackoverflow-addict@users.noreply.github.com>
Date: Fri, 30 Aug 2024 16:32:42 +0200
Subject: [PATCH 10/52] Fixing the 404 page not found, when clicking on
"contribution notes" in multiple README.md's translated into different
languages (#11487)
Link to contribution notes wasn't working
* Update README.de.md, fix grammar in README.de.md
* Update README.asm.md
* Update README.fr.md
* Update README.hi.md
* Update README.it.md
* Update README.pa.md
* Update README.pt_BR.md
* Update README.ru.md
* Update README.sr.md
---------
Co-authored-by: Tobi
---
doc/README.asm.md | 2 +-
doc/README.de.md | 2 +-
doc/README.fr.md | 2 +-
doc/README.hi.md | 2 +-
doc/README.it.md | 2 +-
doc/README.pa.md | 2 +-
doc/README.pt_BR.md | 2 +-
doc/README.ru.md | 2 +-
doc/README.sr.md | 2 +-
9 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/doc/README.asm.md b/doc/README.asm.md
index 2a7c10f51..370319c15 100644
--- a/doc/README.asm.md
+++ b/doc/README.asm.md
@@ -106,7 +106,7 @@ NewPipe এ আপুনি ব্যৱহাৰ কৰা সেৱাৰ অ
## অৱদান
-আপোনাৰ ধাৰণা, অনুবাদ, ডিজাইন পৰিবৰ্তন, ক'ড পৰিষ্কাৰ কৰা, বা আনকি ডাঙৰ ক'ড পৰিৱৰ্তন হওক, সহায় সদায় আদৰণীয়। প্ৰতিটো অৱদানৰ লগে লগে এপটো ভাল হৈ পৰে, যিমানেই ডাঙৰ বা সৰু নহওক কিয়! যদি আপুনি জড়িত হ'ব বিচাৰে তেন্তে চাওক আমাৰ [অবদানৰ টোকা সমূহ](.github/CONTRIBUTING.md).
+আপোনাৰ ধাৰণা, অনুবাদ, ডিজাইন পৰিবৰ্তন, ক'ড পৰিষ্কাৰ কৰা, বা আনকি ডাঙৰ ক'ড পৰিৱৰ্তন হওক, সহায় সদায় আদৰণীয়। প্ৰতিটো অৱদানৰ লগে লগে এপটো ভাল হৈ পৰে, যিমানেই ডাঙৰ বা সৰু নহওক কিয়! যদি আপুনি জড়িত হ'ব বিচাৰে তেন্তে চাওক আমাৰ [অবদানৰ টোকা সমূহ](/.github/CONTRIBUTING.md).
## অনুদান
diff --git a/doc/README.de.md b/doc/README.de.md
index e269da05c..be7744332 100644
--- a/doc/README.de.md
+++ b/doc/README.de.md
@@ -126,7 +126,7 @@ So eine Aktion wird nicht unterstützt und du solltest sie nur in Erwägung zieh
## Beitrag
Egal ob du neue Ideen, Übersetzungen, Designvorschläge, kleine Code-Bereinigungen, oder sogar große Code-Verbesserungen hast, jegliche Unterstützung ist immer gern gesehen.
Die App wird mit _jedem_ Beitrag besser und besser - egal wie viel Arbeit in ihn gesteckt wird!
-Wenn du dich einbringen willst, sehe dir die [Beitragshinweise](.github/CONTRIBUTING.md) an.
+Wenn du dich einbringen willst, sieh dir die [Beitragshinweise](/.github/CONTRIBUTING.md) an.
diff --git a/doc/README.fr.md b/doc/README.fr.md
index 7d4673b69..864cc927a 100644
--- a/doc/README.fr.md
+++ b/doc/README.fr.md
@@ -109,7 +109,7 @@ Entre temps, si vous voulez changer de source pour une raison quelconque (par ex
## Contribuer
-Que vous ayez des idées, des traductions, des changements de design, du nettoyage de code, ou encore un changement de code majeur, toute aide est la bienvenue. L'app s'améliore un peu plus à chaque contribution, peu importe qu'elle soit grosse ou petite ! Si vous aimeriez être impliqué, jetez un coup d'oeil à nos [notes pour contribuer](.github/CONTRIBUTING.md).
+Que vous ayez des idées, des traductions, des changements de design, du nettoyage de code, ou encore un changement de code majeur, toute aide est la bienvenue. L'app s'améliore un peu plus à chaque contribution, peu importe qu'elle soit grosse ou petite ! Si vous aimeriez être impliqué, jetez un coup d'oeil à nos [notes pour contribuer](/.github/CONTRIBUTING.md).
diff --git a/doc/README.hi.md b/doc/README.hi.md
index 282e75420..d503f43a5 100644
--- a/doc/README.hi.md
+++ b/doc/README.hi.md
@@ -105,7 +105,7 @@ NewPipe पर कई सेवाएँ उपलब्ध हैं। हम
चाहे आप अपने विचार जोड़ना चाहे, या अनुवाद, डिज़ाइन में बदलाव, कोड में सफ़ाई, या कोड में भारी बदलाव, सहायता ज़रूर करें।
जितने योगदान हो, ऐप उतनी ही बेहतर होती जाती है!
-अगर आप योगदान करना चाहते हैं, हमारे [योगदान के दिशानिर्देश](.github/CONTRIBUTING.md) देखें।
+अगर आप योगदान करना चाहते हैं, हमारे [योगदान के दिशानिर्देश](/.github/CONTRIBUTING.md) देखें।
diff --git a/doc/README.it.md b/doc/README.it.md
index 55ae12380..8bf1eb380 100644
--- a/doc/README.it.md
+++ b/doc/README.it.md
@@ -107,7 +107,7 @@ Nel frattempo, se vuoi cambiare fonte per la stessa ragione (ad es. la funzional
## Contribuire
-Se hai idee, traduzioni, cambiamenti di *design*, pulizia di codice, o addirittura grossi cambiamenti di codice, l'aiuto è sempre apprezzato. L'app diventa sempre meglio con ogni contribuzione, non importa quanto grande o piccola essa sia! Se ti piacerebbe essere parte del progetto, vedi le nostre [note di contribuzione](.github/CONTRIBUTING.md).
+Se hai idee, traduzioni, cambiamenti di *design*, pulizia di codice, o addirittura grossi cambiamenti di codice, l'aiuto è sempre apprezzato. L'app diventa sempre meglio con ogni contribuzione, non importa quanto grande o piccola essa sia! Se ti piacerebbe essere parte del progetto, vedi le nostre [note di contribuzione](/.github/CONTRIBUTING.md).
diff --git a/doc/README.pa.md b/doc/README.pa.md
index 321e6b7d0..0ad5e0625 100644
--- a/doc/README.pa.md
+++ b/doc/README.pa.md
@@ -105,7 +105,7 @@ NewPipe ਤੁਹਾਡੇ ਦੁਆਰਾ ਵਰਤੀ ਜਾ ਰਹੀ ਸੇ
ਨੋਟ: ਜਦੋਂ ਤੁਸੀਂ ਅਧਿਕਾਰਤ ਐਪ ਵਿੱਚ ਇੱਕ ਡੇਟਾਬੇਸ ਨੂੰ ਆਯਾਤ ਕਰ ਰਹੇ ਹੋ, ਤਾਂ ਹਮੇਸ਼ਾਂ ਯਕੀਨੀ ਬਣਾਓ ਕਿ ਇਹ ਉਹੀ ਹੈ ਜੋ ਤੁਸੀਂ ਅਧਿਕਾਰਤ ਐਪ ਤੋਂ ਨਿਰਯਾਤ ਕੀਤਾ ਹੈ। ਜੇਕਰ ਤੁਸੀਂ ਅਧਿਕਾਰਤ ਐਪ ਤੋਂ ਇਲਾਵਾ ਕਿਸੇ ਏਪੀਕੇ ਤੋਂ ਨਿਰਯਾਤ ਕੀਤੇ ਡੇਟਾਬੇਸ ਨੂੰ ਆਯਾਤ ਕਰਦੇ ਹੋ, ਤਾਂ ਇਹ ਚੀਜ਼ਾਂ ਨੂੰ ਤੋੜ ਸਕਦਾ ਹੈ। ਅਜਿਹੀ ਕਾਰਵਾਈ ਅਸਮਰਥਿਤ ਹੈ, ਅਤੇ ਤੁਹਾਨੂੰ ਅਜਿਹਾ ਉਦੋਂ ਹੀ ਕਰਨਾ ਚਾਹੀਦਾ ਹੈ ਜਦੋਂ ਤੁਹਾਨੂੰ ਪੂਰੀ ਤਰ੍ਹਾਂ ਯਕੀਨ ਹੋਵੇ ਕਿ ਤੁਸੀਂ ਜਾਣਦੇ ਹੋ ਕਿ ਤੁਸੀਂ ਕੀ ਕਰ ਰਹੇ ਹੋ।
## ਯੋਗਦਾਨ
-ਭਾਵੇਂ ਤੁਹਾਡੇ ਕੋਲ ਵਿਚਾਰ, ਅਨੁਵਾਦ, ਡਿਜ਼ਾਈਨ ਤਬਦੀਲੀਆਂ, ਕੋਡ ਦੀ ਸਫਾਈ, ਜਾਂ ਇੱਥੋਂ ਤੱਕ ਕਿ ਵੱਡੀਆਂ ਕੋਡ ਤਬਦੀਲੀਆਂ ਹੋਣ, ਮਦਦ ਦਾ ਹਮੇਸ਼ਾ ਸਵਾਗਤ ਹੈ। ਐਪ ਹਰੇਕ ਯੋਗਦਾਨ ਦੇ ਨਾਲ ਬਿਹਤਰ ਅਤੇ ਬਿਹਤਰ ਹੋ ਜਾਂਦੀ ਹੈ, ਚਾਹੇ ਉਹ ਕਿੰਨਾ ਵੱਡਾ ਜਾਂ ਛੋਟਾ ਹੋਵੇ! ਜੇਕਰ ਤੁਸੀਂ ਸ਼ਾਮਲ ਹੋਣਾ ਚਾਹੁੰਦੇ ਹੋ, ਤਾਂ ਸਾਡੀ ਜਾਂਚ ਕਰੋ [contribution notes](.github/CONTRIBUTING.md).
+ਭਾਵੇਂ ਤੁਹਾਡੇ ਕੋਲ ਵਿਚਾਰ, ਅਨੁਵਾਦ, ਡਿਜ਼ਾਈਨ ਤਬਦੀਲੀਆਂ, ਕੋਡ ਦੀ ਸਫਾਈ, ਜਾਂ ਇੱਥੋਂ ਤੱਕ ਕਿ ਵੱਡੀਆਂ ਕੋਡ ਤਬਦੀਲੀਆਂ ਹੋਣ, ਮਦਦ ਦਾ ਹਮੇਸ਼ਾ ਸਵਾਗਤ ਹੈ। ਐਪ ਹਰੇਕ ਯੋਗਦਾਨ ਦੇ ਨਾਲ ਬਿਹਤਰ ਅਤੇ ਬਿਹਤਰ ਹੋ ਜਾਂਦੀ ਹੈ, ਚਾਹੇ ਉਹ ਕਿੰਨਾ ਵੱਡਾ ਜਾਂ ਛੋਟਾ ਹੋਵੇ! ਜੇਕਰ ਤੁਸੀਂ ਸ਼ਾਮਲ ਹੋਣਾ ਚਾਹੁੰਦੇ ਹੋ, ਤਾਂ ਸਾਡੀ ਜਾਂਚ ਕਰੋ [contribution notes](/.github/CONTRIBUTING.md).
diff --git a/doc/README.pt_BR.md b/doc/README.pt_BR.md
index 59ff65db3..73489bb41 100644
--- a/doc/README.pt_BR.md
+++ b/doc/README.pt_BR.md
@@ -106,7 +106,7 @@ Enquanto isso, se você quiser trocar de fontes por algum motivo (por exemplo, a
4. Importe os dados da etapa 1 via Configurações > Backup e Restauração > Importar Base de Dados
## Contribuições
-Se você tem ideias, traduções, alterações de design, limpeza de códigos ou mudanças reais de código, a ajuda é sempre bem-vinda. O aplicativo fica cada vez melhor a cada contribuição, não importa quão grande ou pequena! Se você quiser se envolver, verifique nossas [notas de contribuição](.github/CONTRIBUTING.md).
+Se você tem ideias, traduções, alterações de design, limpeza de códigos ou mudanças reais de código, a ajuda é sempre bem-vinda. O aplicativo fica cada vez melhor a cada contribuição, não importa quão grande ou pequena! Se você quiser se envolver, verifique nossas [notas de contribuição](/.github/CONTRIBUTING.md).
diff --git a/doc/README.ru.md b/doc/README.ru.md
index 35058c981..35867b8bf 100644
--- a/doc/README.ru.md
+++ b/doc/README.ru.md
@@ -106,7 +106,7 @@ NewPipe работает, извлекая необходимые данные
Примечание: когда вы импортируете базу данных в официальное приложение, убедитесь, что это именно та база данных, которую вы экспортировали _из_ официального приложения. Если вы импортируете базу данных, экспортированную из APK, отличного от официального приложения, это может привести к ошибке. Такое действие не поддерживается, и вы должны делать его только тогда, когда абсолютно уверены, что знаете, что делаете.
## Участие
-Если у вас есть идеи, переводы, изменения дизайна, очистка кода или даже серьезные изменения кода, помощь всегда приветствуется. Приложение становится всё лучше и лучше с каждым вкладом, независимо от того, большой он или маленький! Если вы хотите принять участие, ознакомьтесь с нашими [заметками об участии](.github/CONTRIBUTING.md).
+Если у вас есть идеи, переводы, изменения дизайна, очистка кода или даже серьезные изменения кода, помощь всегда приветствуется. Приложение становится всё лучше и лучше с каждым вкладом, независимо от того, большой он или маленький! Если вы хотите принять участие, ознакомьтесь с нашими [заметками об участии](/.github/CONTRIBUTING.md).
diff --git a/doc/README.sr.md b/doc/README.sr.md
index 7f0ee65b7..60a21ce69 100644
--- a/doc/README.sr.md
+++ b/doc/README.sr.md
@@ -104,7 +104,7 @@ NewPipe ради тако што преузима потребне податк
Напомена: када увозите базу података у званичну апликацију, увек се уверите да је то она коју сте извезли _из_ званичне апликације. Ако увезете базу података извезену из APK-а, који није званична апликација, то може покварити ствари. Таква радња није подржана и требало би да то урадите само када сте потпуно сигурни да знате шта радите.
## Допринос
-Без обзира да ли имате идеје, преводе, промене дизајна, чишћење кода или чак велике промене кода, помоћ је увек добродошла. Апликација постаје све боља и боља са сваким доприносом, без обзира колико је он велики или мали! Ако желите да се укључите, погледајте наше [напомене о доприносима](.github/CONTRIBUTING.md).
+Без обзира да ли имате идеје, преводе, промене дизајна, чишћење кода или чак велике промене кода, помоћ је увек добродошла. Апликација постаје све боља и боља са сваким доприносом, без обзира колико је он велики или мали! Ако желите да се укључите, погледајте наше [напомене о доприносима](/.github/CONTRIBUTING.md).
From 063568b620ff5f97ec9e7aef073c4f22303b62af Mon Sep 17 00:00:00 2001
From: Nicholas Sala
Date: Thu, 26 Sep 2024 13:24:26 +0000
Subject: [PATCH 11/52] Fixed playlist order between "Bookmarked Playlists"
list and "add to playlist" dialog list. Now both lists are sorted using case
insensitive order if the user has not yet adjusted manually the order.
---
.../schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java
index 85b891770..6b77166ea 100644
--- a/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java
+++ b/app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java
@@ -154,6 +154,6 @@ public interface PlaylistStreamDAO extends BasicDAO {
+ " AND :streamUrl = :streamUrl"
+ " GROUP BY " + JOIN_PLAYLIST_ID
- + " ORDER BY " + PLAYLIST_DISPLAY_INDEX)
+ + " ORDER BY " + PLAYLIST_DISPLAY_INDEX + ", " + PLAYLIST_NAME)
Flowable> getPlaylistDuplicatesMetadata(String streamUrl);
}
From eb9f300e601394d952b643b1fe6e80358d4d2e49 Mon Sep 17 00:00:00 2001
From: Thompson3142 <115718208+Thompson3142@users.noreply.github.com>
Date: Thu, 10 Oct 2024 10:32:06 +0200
Subject: [PATCH 12/52] Fix seekbar preview crashes (#11584)
Fixed crashes from recycled bitmaps by creating real copies of bitmaps if necessary + some minor refactoring
---
.../SeekbarPreviewThumbnailHolder.java | 40 ++++++++++++++-----
1 file changed, 29 insertions(+), 11 deletions(-)
diff --git a/app/src/main/java/org/schabi/newpipe/player/seekbarpreview/SeekbarPreviewThumbnailHolder.java b/app/src/main/java/org/schabi/newpipe/player/seekbarpreview/SeekbarPreviewThumbnailHolder.java
index 26065de15..2db6d39b2 100644
--- a/app/src/main/java/org/schabi/newpipe/player/seekbarpreview/SeekbarPreviewThumbnailHolder.java
+++ b/app/src/main/java/org/schabi/newpipe/player/seekbarpreview/SeekbarPreviewThumbnailHolder.java
@@ -132,17 +132,8 @@ public class SeekbarPreviewThumbnailHolder {
// Get the bounds where the frame is found
final int[] bounds = frameset.getFrameBoundsAt(currentPosMs);
- generatedDataForUrl.put(currentPosMs, () -> {
- // It can happen, that the original bitmap could not be downloaded
- // In such a case - we don't want a NullPointer - simply return null
- if (srcBitMap == null) {
- return null;
- }
-
- // Cut out the corresponding bitmap form the "srcBitMap"
- return Bitmap.createBitmap(srcBitMap, bounds[1], bounds[2],
- frameset.getFrameWidth(), frameset.getFrameHeight());
- });
+ generatedDataForUrl.put(currentPosMs,
+ createBitmapSupplier(srcBitMap, bounds, frameset));
currentPosMs += frameset.getDurationPerFrame();
pos++;
@@ -165,6 +156,33 @@ public class SeekbarPreviewThumbnailHolder {
}
}
+ private Supplier createBitmapSupplier(final Bitmap srcBitMap,
+ final int[] bounds,
+ final Frameset frameset) {
+ return () -> {
+ // It can happen, that the original bitmap could not be downloaded
+ // (or it was recycled though that should not happen)
+ // In such a case - we don't want a NullPointer/
+ // "cannot use a recycled source in createBitmap" Exception -> simply return null
+ if (srcBitMap == null || srcBitMap.isRecycled()) {
+ return null;
+ }
+
+ // Cut out the corresponding bitmap form the "srcBitMap"
+ final Bitmap cutOutBitmap = Bitmap.createBitmap(srcBitMap, bounds[1], bounds[2],
+ frameset.getFrameWidth(), frameset.getFrameHeight());
+
+ // If the cut out bitmap is identical to its source,
+ // we need to copy the bitmap to create a new instance.
+ // createBitmap allows itself to return the original object that is was created with
+ // this leads to recycled bitmaps being returned (if they are identical)
+ // Reference: https://stackoverflow.com/a/23683075 + first comment
+ // Fixes: https://github.com/TeamNewPipe/NewPipe/issues/11461
+ return cutOutBitmap == srcBitMap
+ ? cutOutBitmap.copy(cutOutBitmap.getConfig(), true) : cutOutBitmap;
+ };
+ }
+
@Nullable
private Bitmap getBitMapFrom(final String url) {
if (url == null) {
From 781a69d60d3a64fb67f319a4900e161714557a6d Mon Sep 17 00:00:00 2001
From: u7310752
Date: Wed, 16 Oct 2024 20:52:43 +1100
Subject: [PATCH 13/52] Chanegd related videos enqueue modal to attach to
parent fragment instead
---
.../list/videos/RelatedItemsFragment.java | 29 +++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/videos/RelatedItemsFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/videos/RelatedItemsFragment.java
index e46937ede..a7ca549fb 100644
--- a/app/src/main/java/org/schabi/newpipe/fragments/list/videos/RelatedItemsFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/fragments/list/videos/RelatedItemsFragment.java
@@ -10,6 +10,7 @@ import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
import androidx.preference.PreferenceManager;
import org.schabi.newpipe.R;
@@ -18,8 +19,10 @@ import org.schabi.newpipe.error.UserAction;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.ListExtractor;
import org.schabi.newpipe.extractor.stream.StreamInfo;
+import org.schabi.newpipe.extractor.stream.StreamInfoItem;
import org.schabi.newpipe.fragments.list.BaseListInfoFragment;
import org.schabi.newpipe.info_list.ItemViewMode;
+import org.schabi.newpipe.info_list.dialog.InfoItemDialog;
import org.schabi.newpipe.ktx.ViewUtils;
import java.io.Serializable;
@@ -173,4 +176,30 @@ public class RelatedItemsFragment extends BaseListInfoFragment
Date: Wed, 16 Oct 2024 23:58:32 +1100
Subject: [PATCH 14/52] Added comments to explain changes
---
.../newpipe/fragments/list/videos/RelatedItemsFragment.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/videos/RelatedItemsFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/videos/RelatedItemsFragment.java
index a7ca549fb..6dc9a0cb4 100644
--- a/app/src/main/java/org/schabi/newpipe/fragments/list/videos/RelatedItemsFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/fragments/list/videos/RelatedItemsFragment.java
@@ -181,6 +181,9 @@ public class RelatedItemsFragment extends BaseListInfoFragment
Date: Thu, 17 Oct 2024 15:14:15 +1100
Subject: [PATCH 15/52] Project now runs
---
README.md | 3 ++-
app/src/main/res/layout-land/list_stream_card_item.xml | 10 +++++++++-
settings.gradle | 10 +++++-----
3 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 001f0eeab..b1079c22a 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,8 @@
Screenshots • Supported Services • Description • Features • Installation and updates • Contribution • Donate • License
-Website • Blog • FAQ • Press
+Website • Blog • FAQ • Press
*Read this document in other languages: [Deutsch](doc/README.de.md), [English](README.md), [Español](doc/README.es.md), [Français](doc/README.fr.md), [हिन्दी](doc/README.hi.md), [Italiano](doc/README.it.md), [한국어](doc/README.ko.md), [Português Brasil](doc/README.pt_BR.md), [Polski](doc/README.pl.md), [ਪੰਜਾਬੀ ](doc/README.pa.md), [日本語](doc/README.ja.md), [Română](doc/README.ro.md), [Soomaali](doc/README.so.md), [Türkçe](doc/README.tr.md), [正體中文](doc/README.zh_TW.md), [অসমীয়া](doc/README.asm.md), [Српски](doc/README.sr.md)*
diff --git a/app/src/main/res/layout-land/list_stream_card_item.xml b/app/src/main/res/layout-land/list_stream_card_item.xml
index 70228ee1d..ad12c2290 120000
--- a/app/src/main/res/layout-land/list_stream_card_item.xml
+++ b/app/src/main/res/layout-land/list_stream_card_item.xml
@@ -1 +1,9 @@
-../layout/list_stream_item.xml
\ No newline at end of file
+
+
+
+
+
+
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index 0338fde6c..a0aed9527 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -4,8 +4,8 @@ include ':app'
// We assume, that NewPipe and NewPipe Extractor have the same parent directory.
// If this is not the case, please change the path in includeBuild().
-//includeBuild('../NewPipeExtractor') {
-// dependencySubstitution {
-// substitute module('com.github.TeamNewPipe:NewPipeExtractor') using project(':extractor')
-// }
-//}
+includeBuild('../NewPipeExtractor') {
+ dependencySubstitution {
+ substitute module('com.github.TeamNewPipe:NewPipeExtractor') using project(':extractor')
+ }
+}
From 0cf4732d8a8b99d81cd6c9d29303cd731c7393a5 Mon Sep 17 00:00:00 2001
From: Elva Kang
Date: Sat, 19 Oct 2024 19:43:34 +1100
Subject: [PATCH 16/52] Fix UI crash when user navigates away before the
download dialog appears
---
.../newpipe/info_list/dialog/StreamDialogDefaultEntry.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java b/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java
index 948a8274c..6b9e38b98 100644
--- a/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java
+++ b/app/src/main/java/org/schabi/newpipe/info_list/dialog/StreamDialogDefaultEntry.java
@@ -113,7 +113,7 @@ public enum StreamDialogDefaultEntry {
DOWNLOAD(R.string.download, (fragment, item) ->
fetchStreamInfoAndSaveToDatabase(fragment.requireContext(), item.getServiceId(),
item.getUrl(), info -> {
- if (fragment.getContext() != null) {
+ if (fragment.isAdded() && !fragment.isStateSaved()) {
final DownloadDialog downloadDialog =
new DownloadDialog(fragment.requireContext(), info);
downloadDialog.show(fragment.getChildFragmentManager(),
From 2eb256799d886970aab45f031d6efbc8e042bb10 Mon Sep 17 00:00:00 2001
From: Elva Kang
Date: Sun, 20 Oct 2024 10:29:48 +1100
Subject: [PATCH 17/52] Revert "Project now runs"
This reverts commit 53edd054aae97b1928b2d4f638312e12f4b4c4ce.
---
README.md | 3 +--
app/src/main/res/layout-land/list_stream_card_item.xml | 10 +---------
settings.gradle | 10 +++++-----
3 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/README.md b/README.md
index b1079c22a..001f0eeab 100644
--- a/README.md
+++ b/README.md
@@ -17,8 +17,7 @@
Screenshots • Supported Services • Description • Features • Installation and updates • Contribution • Donate • License
-Website • Blog • FAQ • Press
+Website • Blog • FAQ • Press
*Read this document in other languages: [Deutsch](doc/README.de.md), [English](README.md), [Español](doc/README.es.md), [Français](doc/README.fr.md), [हिन्दी](doc/README.hi.md), [Italiano](doc/README.it.md), [한국어](doc/README.ko.md), [Português Brasil](doc/README.pt_BR.md), [Polski](doc/README.pl.md), [ਪੰਜਾਬੀ ](doc/README.pa.md), [日本語](doc/README.ja.md), [Română](doc/README.ro.md), [Soomaali](doc/README.so.md), [Türkçe](doc/README.tr.md), [正體中文](doc/README.zh_TW.md), [অসমীয়া](doc/README.asm.md), [Српски](doc/README.sr.md)*
diff --git a/app/src/main/res/layout-land/list_stream_card_item.xml b/app/src/main/res/layout-land/list_stream_card_item.xml
index ad12c2290..70228ee1d 120000
--- a/app/src/main/res/layout-land/list_stream_card_item.xml
+++ b/app/src/main/res/layout-land/list_stream_card_item.xml
@@ -1,9 +1 @@
-
-
-
-
-
-
\ No newline at end of file
+../layout/list_stream_item.xml
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index a0aed9527..0338fde6c 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -4,8 +4,8 @@ include ':app'
// We assume, that NewPipe and NewPipe Extractor have the same parent directory.
// If this is not the case, please change the path in includeBuild().
-includeBuild('../NewPipeExtractor') {
- dependencySubstitution {
- substitute module('com.github.TeamNewPipe:NewPipeExtractor') using project(':extractor')
- }
-}
+//includeBuild('../NewPipeExtractor') {
+// dependencySubstitution {
+// substitute module('com.github.TeamNewPipe:NewPipeExtractor') using project(':extractor')
+// }
+//}
From ee15a72e4fd6fc8669c97ed1db4561eb191033d3 Mon Sep 17 00:00:00 2001
From: litetex <40789489+litetex@users.noreply.github.com>
Date: Tue, 22 Oct 2024 21:03:08 +0200
Subject: [PATCH 18/52] Fix build failing locally due to outdated kotlin
version
---
build.gradle | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.gradle b/build.gradle
index 6d19a6f8a..4b0863f89 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
- ext.kotlin_version = '1.9.10'
+ ext.kotlin_version = '1.9.25'
repositories {
google()
mavenCentral()
From 8106ba68b5cde95f67eb91736f54d2de19f9e5f1 Mon Sep 17 00:00:00 2001
From: litetex <40789489+litetex@users.noreply.github.com>
Date: Tue, 22 Oct 2024 20:57:21 +0200
Subject: [PATCH 19/52] CI: Use Java 21
---
.github/workflows/ci.yml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9ae3a77c2..54415858e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -47,10 +47,10 @@ jobs:
BRANCH: ${{ github.head_ref }}
run: git checkout -B "$BRANCH"
- - name: set up JDK 17
+ - name: set up JDK
uses: actions/setup-java@v4
with:
- java-version: 17
+ java-version: 21
distribution: "temurin"
cache: 'gradle'
@@ -88,10 +88,10 @@ jobs:
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- - name: set up JDK 17
+ - name: set up JDK
uses: actions/setup-java@v4
with:
- java-version: 17
+ java-version: 21
distribution: "temurin"
cache: 'gradle'
@@ -121,10 +121,10 @@ jobs:
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- - name: Set up JDK 17
+ - name: Set up JDK
uses: actions/setup-java@v4
with:
- java-version: 17
+ java-version: 21
distribution: "temurin"
cache: 'gradle'
From d80b6a759c249983f472861e606821817b0c150f Mon Sep 17 00:00:00 2001
From: litetex <40789489+litetex@users.noreply.github.com>
Date: Tue, 22 Oct 2024 21:03:33 +0200
Subject: [PATCH 20/52] Use working Extractor version The tag can't be resolved
by Jitpack so use the commit-hash instead
---
app/build.gradle | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/build.gradle b/app/build.gradle
index 081bc2766..ba7ad3a4f 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -198,7 +198,8 @@ dependencies {
// name and the commit hash with the commit hash of the (pushed) commit you want to test
// This works thanks to JitPack: https://jitpack.io/
implementation 'com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751'
- implementation 'com.github.TeamNewPipe:NewPipeExtractor:v0.24.2'
+ // WORKAROUND: v0.24.2 can't be resolved by jitpack -> use git commit hash instead
+ implementation 'com.github.TeamNewPipe:NewPipeExtractor:176da72cb4c3ec4679211339b0e59f6b01bf2f52'
implementation 'com.github.TeamNewPipe:NoNonsense-FilePicker:5.0.0'
/** Checkstyle **/
From ea0da5fdbd26527a17f5d53a9a80cb12710b4472 Mon Sep 17 00:00:00 2001
From: litetex <40789489+litetex@users.noreply.github.com>
Date: Tue, 22 Oct 2024 21:18:06 +0200
Subject: [PATCH 21/52] Delete symlink
---
app/src/main/res/layout-land/list_stream_card_item.xml | 1 -
1 file changed, 1 deletion(-)
delete mode 120000 app/src/main/res/layout-land/list_stream_card_item.xml
diff --git a/app/src/main/res/layout-land/list_stream_card_item.xml b/app/src/main/res/layout-land/list_stream_card_item.xml
deleted file mode 120000
index 70228ee1d..000000000
--- a/app/src/main/res/layout-land/list_stream_card_item.xml
+++ /dev/null
@@ -1 +0,0 @@
-../layout/list_stream_item.xml
\ No newline at end of file
From b1d4b66aa6c21cc9899b1b9ccbb293e297f49a43 Mon Sep 17 00:00:00 2001
From: litetex <40789489+litetex@users.noreply.github.com>
Date: Tue, 22 Oct 2024 21:18:34 +0200
Subject: [PATCH 22/52] Replace symlink with original
Co-Authored-By: Thompson3142 <115718208+thompson3142@users.noreply.github.com>
---
.../res/layout-land/list_stream_card_item.xml | 94 +++++++++++++++++++
1 file changed, 94 insertions(+)
create mode 100644 app/src/main/res/layout-land/list_stream_card_item.xml
diff --git a/app/src/main/res/layout-land/list_stream_card_item.xml b/app/src/main/res/layout-land/list_stream_card_item.xml
new file mode 100644
index 000000000..793942568
--- /dev/null
+++ b/app/src/main/res/layout-land/list_stream_card_item.xml
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 93843650612d1f54fdc7c757d96b5f88423459f0 Mon Sep 17 00:00:00 2001
From: litetex <40789489+litetex@users.noreply.github.com>
Date: Tue, 22 Oct 2024 21:39:44 +0200
Subject: [PATCH 23/52] Update Gradle to latest version
---
build.gradle | 2 +-
gradle/wrapper/gradle-wrapper.properties | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/build.gradle b/build.gradle
index 4b0863f89..d93abc4c0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,7 +7,7 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:8.2.0'
+ classpath 'com.android.tools.build:gradle:8.7.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index d022615ff..4ea536e77 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionSha256Sum=38f66cd6eef217b4c35855bb11ea4e9fbc53594ccccb5fb82dfd317ef8c2c5a3
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
+distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
From 2482615460a23bfaeefe28f7d9c7fc9e4788e0b2 Mon Sep 17 00:00:00 2001
From: litetex <40789489+litetex@users.noreply.github.com>
Date: Tue, 22 Oct 2024 21:40:16 +0200
Subject: [PATCH 24/52] Fix Android Gradle plugin warning
---
app/build.gradle | 1 +
gradle.properties | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/build.gradle b/app/build.gradle
index ba7ad3a4f..b92df2d4c 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -92,6 +92,7 @@ android {
buildFeatures {
viewBinding true
+ buildConfig true
}
packagingOptions {
diff --git a/gradle.properties b/gradle.properties
index 0ca913222..ed32303da 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,3 @@
-android.defaults.buildfeatures.buildconfig=true
android.enableJetifier=false
android.nonFinalResIds=false
android.nonTransitiveRClass=true
From 2e96b65fda3ea6d3681617c16246683abee96155 Mon Sep 17 00:00:00 2001
From: litetex <40789489+litetex@users.noreply.github.com>
Date: Wed, 23 Oct 2024 21:28:07 +0200
Subject: [PATCH 25/52] Replaced ``Icepick`` with ``Bridge`` and
``Android-State``
* IcePick fails on Java 21 (default in Android Studio 2024.2)
* Bridge is the most modern alternative that is currently available. It is backed by ``Android-State`` and can be configured with various frameworks
* In the long term this should be replaced with something better
---
app/build.gradle | 7 ++-
app/proguard-rules.pro | 9 ---
app/src/main/java/org/schabi/newpipe/App.java | 6 +-
.../java/org/schabi/newpipe/BaseFragment.java | 9 +--
.../org/schabi/newpipe/RouterActivity.java | 9 +--
.../org/schabi/newpipe/about/AboutActivity.kt | 8 ++-
.../newpipe/download/DownloadDialog.java | 12 ++--
.../newpipe/fragments/BaseStateFragment.java | 5 +-
.../fragments/detail/DescriptionFragment.java | 6 +-
.../fragments/detail/VideoDetailFragment.java | 2 +-
.../fragments/list/BaseListInfoFragment.java | 5 +-
.../list/channel/ChannelAboutFragment.java | 6 +-
.../list/channel/ChannelFragment.java | 16 ++---
.../list/channel/ChannelTabFragment.java | 6 +-
.../list/comments/CommentRepliesFragment.java | 3 +-
.../fragments/list/kiosk/KioskFragment.java | 3 +-
.../fragments/list/search/SearchFragment.java | 7 ++-
.../local/bookmark/BookmarkFragment.java | 7 ++-
.../schabi/newpipe/local/feed/FeedFragment.kt | 2 +-
.../history/StatisticsPlaylistFragment.java | 3 +-
.../local/playlist/LocalPlaylistFragment.java | 8 ++-
.../ImportConfirmationDialog.java | 14 ++---
.../subscription/SubscriptionFragment.kt | 2 +-
.../SubscriptionsImportFragment.java | 4 +-
.../subscription/dialog/FeedGroupDialog.kt | 8 +--
.../dialog/FeedGroupReorderDialog.kt | 12 ++--
.../helper/PlaybackParameterDialog.java | 10 +--
.../newpipe/settings/SettingsActivity.java | 9 ++-
.../util/BridgeStateSaverInitializer.java | 61 +++++++++++++++++++
.../schabi/newpipe/views/CollapsibleView.java | 16 ++---
30 files changed, 171 insertions(+), 104 deletions(-)
create mode 100644 app/src/main/java/org/schabi/newpipe/util/BridgeStateSaverInitializer.java
diff --git a/app/build.gradle b/app/build.gradle
index b92df2d4c..d0426d5a2 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -113,7 +113,7 @@ ext {
androidxRoomVersion = '2.6.1'
androidxWorkVersion = '2.8.1'
- icepickVersion = '3.2.0'
+ stateSaverVersion = '1.4.1'
exoPlayerVersion = '2.18.7'
googleAutoServiceVersion = '1.1.1'
groupieVersion = '2.10.1'
@@ -236,8 +236,9 @@ dependencies {
/** Third-party libraries **/
// Instance state boilerplate elimination
- implementation "frankiesardo:icepick:${icepickVersion}"
- kapt "frankiesardo:icepick-processor:${icepickVersion}"
+ implementation 'com.github.livefront:bridge:v2.0.2'
+ implementation "com.evernote:android-state:$stateSaverVersion"
+ kapt "com.evernote:android-state-processor:$stateSaverVersion"
// HTML parser
implementation "org.jsoup:jsoup:1.17.2"
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
index 435c4e29b..215df0da5 100644
--- a/app/proguard-rules.pro
+++ b/app/proguard-rules.pro
@@ -13,15 +13,6 @@
## Rules for ExoPlayer
-keep class com.google.android.exoplayer2.** { *; }
-## Rules for Icepick. Copy pasted from https://github.com/frankiesardo/icepick
--dontwarn icepick.**
--keep class icepick.** { *; }
--keep class **$$Icepick { *; }
--keepclasseswithmembernames class * {
- @icepick.* ;
-}
--keepnames class * { @icepick.State *;}
-
## Rules for OkHttp. Copy pasted from https://github.com/square/okhttp
-dontwarn okhttp3.**
-dontwarn okio.**
diff --git a/app/src/main/java/org/schabi/newpipe/App.java b/app/src/main/java/org/schabi/newpipe/App.java
index d92425d20..9bc25d55d 100644
--- a/app/src/main/java/org/schabi/newpipe/App.java
+++ b/app/src/main/java/org/schabi/newpipe/App.java
@@ -19,11 +19,12 @@ import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.downloader.Downloader;
import org.schabi.newpipe.ktx.ExceptionUtils;
import org.schabi.newpipe.settings.NewPipeSettings;
+import org.schabi.newpipe.util.BridgeStateSaverInitializer;
import org.schabi.newpipe.util.Localization;
-import org.schabi.newpipe.util.image.ImageStrategy;
-import org.schabi.newpipe.util.image.PicassoHelper;
import org.schabi.newpipe.util.ServiceHelper;
import org.schabi.newpipe.util.StateSaver;
+import org.schabi.newpipe.util.image.ImageStrategy;
+import org.schabi.newpipe.util.image.PicassoHelper;
import org.schabi.newpipe.util.image.PreferredImageQuality;
import java.io.IOException;
@@ -101,6 +102,7 @@ public class App extends Application {
Localization.getPreferredContentCountry(this));
Localization.initPrettyTime(Localization.resolvePrettyTime(getApplicationContext()));
+ BridgeStateSaverInitializer.init(this);
StateSaver.init(this);
initNotificationChannels();
diff --git a/app/src/main/java/org/schabi/newpipe/BaseFragment.java b/app/src/main/java/org/schabi/newpipe/BaseFragment.java
index 7a06771dd..a55a341e6 100644
--- a/app/src/main/java/org/schabi/newpipe/BaseFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/BaseFragment.java
@@ -10,8 +10,9 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
-import icepick.Icepick;
-import icepick.State;
+import com.evernote.android.state.State;
+import com.livefront.bridge.Bridge;
+
public abstract class BaseFragment extends Fragment {
protected final String TAG = getClass().getSimpleName() + "@" + Integer.toHexString(hashCode());
@@ -48,7 +49,7 @@ public abstract class BaseFragment extends Fragment {
+ "savedInstanceState = [" + savedInstanceState + "]");
}
super.onCreate(savedInstanceState);
- Icepick.restoreInstanceState(this, savedInstanceState);
+ Bridge.restoreInstanceState(this, savedInstanceState);
if (savedInstanceState != null) {
onRestoreInstanceState(savedInstanceState);
}
@@ -70,7 +71,7 @@ public abstract class BaseFragment extends Fragment {
@Override
public void onSaveInstanceState(@NonNull final Bundle outState) {
super.onSaveInstanceState(outState);
- Icepick.saveInstanceState(this, outState);
+ Bridge.saveInstanceState(this, outState);
}
protected void onRestoreInstanceState(@NonNull final Bundle savedInstanceState) {
diff --git a/app/src/main/java/org/schabi/newpipe/RouterActivity.java b/app/src/main/java/org/schabi/newpipe/RouterActivity.java
index c59dc7532..197c965ba 100644
--- a/app/src/main/java/org/schabi/newpipe/RouterActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/RouterActivity.java
@@ -41,6 +41,9 @@ import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleOwner;
import androidx.preference.PreferenceManager;
+import com.evernote.android.state.State;
+import com.livefront.bridge.Bridge;
+
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.databinding.ListRadioIconItemBinding;
import org.schabi.newpipe.databinding.SingleChoiceDialogViewBinding;
@@ -98,8 +101,6 @@ import java.util.List;
import java.util.Optional;
import java.util.function.Consumer;
-import icepick.Icepick;
-import icepick.State;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.core.Single;
@@ -152,7 +153,7 @@ public class RouterActivity extends AppCompatActivity {
getWindow().setAttributes(params);
super.onCreate(savedInstanceState);
- Icepick.restoreInstanceState(this, savedInstanceState);
+ Bridge.restoreInstanceState(this, savedInstanceState);
// FragmentManager will take care to recreate (Playlist|Download)Dialog when screen rotates
// We used to .setOnDismissListener(dialog -> finish()); when creating these DialogFragments
@@ -197,7 +198,7 @@ public class RouterActivity extends AppCompatActivity {
@Override
protected void onSaveInstanceState(@NonNull final Bundle outState) {
super.onSaveInstanceState(outState);
- Icepick.saveInstanceState(this, outState);
+ Bridge.saveInstanceState(this, outState);
}
@Override
diff --git a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.kt b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.kt
index 7f148e9b5..045278da7 100644
--- a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.kt
+++ b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.kt
@@ -138,8 +138,12 @@ class AboutActivity : AppCompatActivity() {
"https://github.com/lisawray/groupie", StandardLicenses.MIT
),
SoftwareComponent(
- "Icepick", "2015", "Frankie Sardo",
- "https://github.com/frankiesardo/icepick", StandardLicenses.EPL1
+ "Android-State", "2018", "Evernote",
+ "https://github.com/Evernote/android-state", StandardLicenses.EPL1
+ ),
+ SoftwareComponent(
+ "Bridge", "2021", "Livefront",
+ "https://github.com/livefront/bridge", StandardLicenses.APACHE2
),
SoftwareComponent(
"Jsoup", "2009 - 2020", "Jonathan Hedley",
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 db2066b27..34a4ba022 100644
--- a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java
+++ b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java
@@ -39,6 +39,8 @@ import androidx.documentfile.provider.DocumentFile;
import androidx.fragment.app.DialogFragment;
import androidx.preference.PreferenceManager;
+import com.evernote.android.state.State;
+import com.livefront.bridge.Bridge;
import com.nononsenseapps.filepicker.Utils;
import org.schabi.newpipe.MainActivity;
@@ -59,6 +61,8 @@ import org.schabi.newpipe.settings.NewPipeSettings;
import org.schabi.newpipe.streams.io.NoFileManagerSafeGuard;
import org.schabi.newpipe.streams.io.StoredDirectoryHelper;
import org.schabi.newpipe.streams.io.StoredFileHelper;
+import org.schabi.newpipe.util.AudioTrackAdapter;
+import org.schabi.newpipe.util.AudioTrackAdapter.AudioTracksWrapper;
import org.schabi.newpipe.util.FilePickerActivityHelper;
import org.schabi.newpipe.util.FilenameUtils;
import org.schabi.newpipe.util.ListHelper;
@@ -67,8 +71,6 @@ import org.schabi.newpipe.util.SecondaryStreamHelper;
import org.schabi.newpipe.util.SimpleOnSeekBarChangeListener;
import org.schabi.newpipe.util.StreamItemAdapter;
import org.schabi.newpipe.util.StreamItemAdapter.StreamInfoWrapper;
-import org.schabi.newpipe.util.AudioTrackAdapter;
-import org.schabi.newpipe.util.AudioTrackAdapter.AudioTracksWrapper;
import org.schabi.newpipe.util.ThemeHelper;
import java.io.File;
@@ -79,8 +81,6 @@ import java.util.Locale;
import java.util.Objects;
import java.util.Optional;
-import icepick.Icepick;
-import icepick.State;
import io.reactivex.rxjava3.disposables.CompositeDisposable;
import us.shandian.giga.get.MissionRecoveryInfo;
import us.shandian.giga.postprocessing.Postprocessing;
@@ -214,7 +214,7 @@ public class DownloadDialog extends DialogFragment
context = getContext();
setStyle(STYLE_NO_TITLE, ThemeHelper.getDialogTheme(context));
- Icepick.restoreInstanceState(this, savedInstanceState);
+ Bridge.restoreInstanceState(this, savedInstanceState);
this.audioTrackAdapter = new AudioTrackAdapter(wrappedAudioTracks);
this.subtitleStreamsAdapter = new StreamItemAdapter<>(wrappedSubtitleStreams);
@@ -372,7 +372,7 @@ public class DownloadDialog extends DialogFragment
@Override
public void onSaveInstanceState(@NonNull final Bundle outState) {
super.onSaveInstanceState(outState);
- Icepick.saveInstanceState(this, outState);
+ Bridge.saveInstanceState(this, outState);
}
diff --git a/app/src/main/java/org/schabi/newpipe/fragments/BaseStateFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/BaseStateFragment.java
index a3d3d8b60..8361953b9 100644
--- a/app/src/main/java/org/schabi/newpipe/fragments/BaseStateFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/fragments/BaseStateFragment.java
@@ -13,6 +13,8 @@ import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.fragment.app.Fragment;
+import com.evernote.android.state.State;
+
import org.schabi.newpipe.BaseFragment;
import org.schabi.newpipe.R;
import org.schabi.newpipe.error.ErrorInfo;
@@ -22,8 +24,6 @@ import org.schabi.newpipe.util.InfoCache;
import java.util.concurrent.atomic.AtomicBoolean;
-import icepick.State;
-
public abstract class BaseStateFragment extends BaseFragment implements ViewContract {
@State
protected AtomicBoolean wasLoading = new AtomicBoolean();
@@ -134,6 +134,7 @@ public abstract class BaseStateFragment extends BaseFragment implements ViewC
hideErrorPanel();
}
+ @Override
public void showEmptyState() {
isLoading.set(false);
if (emptyStateView != null) {
diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java
index 581e54156..52fb3f29e 100644
--- a/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java
@@ -11,6 +11,8 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
+import com.evernote.android.state.State;
+
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.stream.Description;
@@ -19,8 +21,6 @@ import org.schabi.newpipe.util.Localization;
import java.util.List;
-import icepick.State;
-
public class DescriptionFragment extends BaseDescriptionFragment {
@State
@@ -31,7 +31,7 @@ public class DescriptionFragment extends BaseDescriptionFragment {
}
public DescriptionFragment() {
- // keep empty constructor for IcePick when resuming fragment from memory
+ // keep empty constructor for State when resuming fragment from memory
}
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 95b54f65a..1d1e166e7 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
@@ -56,6 +56,7 @@ import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.preference.PreferenceManager;
+import com.evernote.android.state.State;
import com.google.android.exoplayer2.PlaybackException;
import com.google.android.exoplayer2.PlaybackParameters;
import com.google.android.material.appbar.AppBarLayout;
@@ -127,7 +128,6 @@ import java.util.Optional;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
-import icepick.State;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.disposables.CompositeDisposable;
import io.reactivex.rxjava3.disposables.Disposable;
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 dd5eb6c8a..61a361f23 100644
--- a/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/fragments/list/BaseListInfoFragment.java
@@ -9,6 +9,8 @@ import android.view.View;
import androidx.annotation.NonNull;
+import com.evernote.android.state.State;
+
import org.schabi.newpipe.R;
import org.schabi.newpipe.error.ErrorInfo;
import org.schabi.newpipe.error.UserAction;
@@ -24,7 +26,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Queue;
-import icepick.State;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.core.Single;
import io.reactivex.rxjava3.disposables.Disposable;
@@ -143,7 +144,7 @@ public abstract class BaseListInfoFragment {
+ .subscribe((@NonNull final L result) -> {
isLoading.set(false);
currentInfo = result;
currentNextPage = result.getNextPage();
diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelAboutFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelAboutFragment.java
index 0dc2fb65a..b7f4a9d3d 100644
--- a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelAboutFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelAboutFragment.java
@@ -10,6 +10,8 @@ import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import com.evernote.android.state.State;
+
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.channel.ChannelInfo;
@@ -20,8 +22,6 @@ import org.schabi.newpipe.util.Localization;
import java.util.List;
-import icepick.State;
-
public class ChannelAboutFragment extends BaseDescriptionFragment {
@State
protected ChannelInfo channelInfo;
@@ -31,7 +31,7 @@ public class ChannelAboutFragment extends BaseDescriptionFragment {
}
public ChannelAboutFragment() {
- // keep empty constructor for IcePick when resuming fragment from memory
+ // keep empty constructor for State when resuming fragment from memory
}
@Override
diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java
index fd382adbf..d67cd11f1 100644
--- a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java
+++ b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java
@@ -25,6 +25,7 @@ import androidx.core.graphics.ColorUtils;
import androidx.core.view.MenuProvider;
import androidx.preference.PreferenceManager;
+import com.evernote.android.state.State;
import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.tabs.TabLayout;
import com.jakewharton.rxbinding4.view.RxView;
@@ -50,16 +51,15 @@ import org.schabi.newpipe.util.ExtractorHelper;
import org.schabi.newpipe.util.Localization;
import org.schabi.newpipe.util.NavigationHelper;
import org.schabi.newpipe.util.StateSaver;
-import org.schabi.newpipe.util.image.ImageStrategy;
-import org.schabi.newpipe.util.image.PicassoHelper;
import org.schabi.newpipe.util.ThemeHelper;
import org.schabi.newpipe.util.external_communication.ShareUtils;
+import org.schabi.newpipe.util.image.ImageStrategy;
+import org.schabi.newpipe.util.image.PicassoHelper;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.TimeUnit;
-import icepick.State;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.disposables.CompositeDisposable;
@@ -249,7 +249,7 @@ public class ChannelFragment extends BaseStateFragment
//////////////////////////////////////////////////////////////////////////*/
private void monitorSubscription(final ChannelInfo info) {
- final Consumer onError = (Throwable throwable) -> {
+ final Consumer onError = (final Throwable throwable) -> {
animate(binding.channelSubscribeButton, false, 100);
showSnackBarError(new ErrorInfo(throwable, UserAction.SUBSCRIPTION_GET,
"Get subscription status", currentInfo));
@@ -284,14 +284,14 @@ public class ChannelFragment extends BaseStateFragment
}
private Function