Skip to content

Commit d298a12

Browse files
authored
Merge pull request #11712 from TeamNewPipe/release-0.27.3
Release v0.27.3 (1000)
2 parents d442b45 + a79bc3d commit d298a12

File tree

402 files changed

+5123
-1550
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

402 files changed

+5123
-1550
lines changed

.github/CONTRIBUTING.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ You'll see *exactly* what is sent, be able to add **your comments**, and then se
4242
* Create PRs that cover only **one specific issue/solution/bug**. Do not create PRs that are huge monoliths and could have been split into multiple independent contributions.
4343
* NewPipe uses [NewPipeExtractor](https://github.com/TeamNewPipe/NewPipeExtractor) to fetch data from services. If you need to change something there, you must test your changes in NewPipe. Telling NewPipe to use your extractor version can be accomplished by editing the `app/build.gradle` file: the comments under the "NewPipe libraries" section of `dependencies` will help you out.
4444

45-
### Kotlin in NewPipe
46-
* NewPipe will remain mostly Java for time being
47-
* Contributions containing a simple conversion from Java to Kotlin should be avoided. Conversions to Kotlin should only be done if Kotlin actually brings improvements like bug fixes or better performance which are not, or only with much more effort, implementable in Java. The core team sees Java as an easier to learn and generally well adopted programming language.
48-
4945
### Creating a Pull Request (PR)
5046

5147
* Make changes on a **separate branch** with a meaningful name, not on the _master_ branch or the _dev_ branch. This is commonly known as *feature branch workflow*. You may then send your changes as a pull request (PR) on GitHub.
@@ -83,6 +79,6 @@ The [ktlint](https://github.com/pinterest/ktlint) plugin does the same job as ch
8379

8480
## Communication
8581

86-
* The #newpipe channel on Libera Chat (`ircs://irc.libera.chat:6697/newpipe`) has the core team and other developers in it. [Click here for webchat](https://web.libera.chat/#newpipe)!
87-
* You can also use a Matrix account to join the NewPipe channel at [#newpipe:libera.chat](https://matrix.to/#/#newpipe:libera.chat). Some convenient clients, available both for phone and desktop, are listed at that link.
88-
* You can post your suggestions, changes, ideas etc. on either GitHub or IRC.
82+
* You can use a Matrix account to join the NewPipe channel at [#newpipe:matrix.newpipe-ev.de](https://matrix.to/#/#newpipe:matrix.newpipe-ev.de). Some convenient clients, available both for phone and desktop, are listed at that link.
83+
* Alternatively, the #newpipe channel on Libera Chat (`ircs://irc.libera.chat:6697/newpipe`) can also be joined, as it is bridged to the Matrix room. [Click here for webchat](https://web.libera.chat/#newpipe)!
84+
* You can post your suggestions, changes, ideas etc. on either GitHub or Matrix (including via IRC).

.github/ISSUE_TEMPLATE/config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ contact_links:
33
- name: ❓ Question
44
url: https://github.com/TeamNewPipe/NewPipe/discussions/new?category=questions
55
about: Ask about anything NewPipe-related
6+
- name: 💬 Matrix
7+
url: https://matrix.to/#/#newpipe:matrix.newpipe-ev.de
8+
about: Chat with us via Matrix for quick Q/A
69
- name: 💬 IRC
710
url: https://web.libera.chat/#newpipe
811
about: Chat with us via IRC for quick Q/A
9-
- name: 💬 Matrix
10-
url: https://matrix.to/#/#newpipe:libera.chat
11-
about: Chat with us via Matrix for quick Q/A

.github/workflows/ci.yml

+14-8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
branches:
77
- dev
88
- master
9+
- refactor
910
- release**
1011
paths-ignore:
1112
- 'README.md'
@@ -46,10 +47,10 @@ jobs:
4647
BRANCH: ${{ github.head_ref }}
4748
run: git checkout -B "$BRANCH"
4849

49-
- name: set up JDK 17
50+
- name: set up JDK
5051
uses: actions/setup-java@v4
5152
with:
52-
java-version: 17
53+
java-version: 21
5354
distribution: "temurin"
5455
cache: 'gradle'
5556

@@ -63,8 +64,7 @@ jobs:
6364
path: app/build/outputs/apk/debug/*.apk
6465

6566
test-android:
66-
# macos has hardware acceleration. See android-emulator-runner action
67-
runs-on: macos-latest
67+
runs-on: ubuntu-latest
6868
timeout-minutes: 20
6969
strategy:
7070
matrix:
@@ -82,10 +82,16 @@ jobs:
8282
steps:
8383
- uses: actions/checkout@v4
8484

85-
- name: set up JDK 17
85+
- name: Enable KVM
86+
run: |
87+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
88+
sudo udevadm control --reload-rules
89+
sudo udevadm trigger --name-match=kvm
90+
91+
- name: set up JDK
8692
uses: actions/setup-java@v4
8793
with:
88-
java-version: 17
94+
java-version: 21
8995
distribution: "temurin"
9096
cache: 'gradle'
9197

@@ -115,10 +121,10 @@ jobs:
115121
with:
116122
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
117123

118-
- name: Set up JDK 17
124+
- name: Set up JDK
119125
uses: actions/setup-java@v4
120126
with:
121-
java-version: 17
127+
java-version: 21
122128
distribution: "temurin"
123129
cache: 'gradle'
124130

.idea/icon.svg

+21
Loading

README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,28 @@ Also, since they are free and open source software, neither the app nor the Extr
9696
## Installation and updates
9797
You can install NewPipe using one of the following methods:
9898
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/
99-
2. Download the APK from [GitHub Releases](https://github.com/TeamNewPipe/NewPipe/releases) and install it.
99+
2. Download the APK from [GitHub Releases](https://github.com/TeamNewPipe/NewPipe/releases), [compare the signing key](#apk-info) and install it.
100100
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.
101101
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.
102102
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.
103103

104104
We recommend method 1 for most users. APKs installed using method 1 or 2 are compatible with each other (meaning that if you installed NewPipe using either method 1 or 2, you can also update NewPipe using the other), but not with those installed using method 3. This is due to the same signing key (ours) being used for 1 and 2, but a different signing key (F-Droid's) being used for 3. Building a debug APK using method 4 excludes a key entirely. Signing keys help ensure that a user isn't tricked into installing a malicious update to an app. When using method 5, each APK is signed with a different random key supplied by GitHub Actions, so you cannot even update it. You will have to backup and restore the app data each time you wish to use a new APK.
105105

106106
In the meanwhile, if you want to switch sources for some reason (e.g. NewPipe's core functionality breaks and F-Droid doesn't have the latest update yet), we recommend following this procedure:
107-
1. Back up your data via Settings > Content > Export Database so you keep your history, subscriptions, and playlists
107+
1. Back up your data via Settings > Backup and Restore > Export Database so you keep your history, subscriptions, and playlists
108108
2. Uninstall NewPipe
109109
3. Download the APK from the new source and install it
110-
4. Import the data from step 1 via Settings > Content > Import Database
110+
4. Import the data from step 1 via Settings > Backup and Restore > Import Database
111111

112-
<b>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.</b>
112+
> [!Note]
113+
> 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.
114+
115+
### APK Info
116+
117+
This is the SHA fingerprint of NewPipe's signing key to verify downloaded APKs which are signed by us. The fingerprint is also available on [NewPipe's website](https://newpipe.net#download). This is relevant for method 2.
118+
```
119+
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
120+
```
113121

114122
## Contribution
115123
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).

app/build.gradle

+18-7
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,15 @@ android {
2020
resValue "string", "app_name", "NewPipe"
2121
minSdk 21
2222
targetSdk 33
23-
versionCode 999
24-
versionName "0.27.2"
23+
if (System.properties.containsKey('versionCodeOverride')) {
24+
versionCode System.getProperty('versionCodeOverride') as Integer
25+
} else {
26+
versionCode 1000
27+
}
28+
versionName "0.27.3"
29+
if (System.properties.containsKey('versionNameSuffix')) {
30+
versionNameSuffix System.getProperty('versionNameSuffix')
31+
}
2532

2633
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2734

@@ -92,6 +99,7 @@ android {
9299

93100
buildFeatures {
94101
viewBinding true
102+
buildConfig true
95103
}
96104

97105
packagingOptions {
@@ -112,7 +120,7 @@ ext {
112120
androidxRoomVersion = '2.6.1'
113121
androidxWorkVersion = '2.8.1'
114122

115-
icepickVersion = '3.2.0'
123+
stateSaverVersion = '1.4.1'
116124
exoPlayerVersion = '2.18.7'
117125
googleAutoServiceVersion = '1.1.1'
118126
groupieVersion = '2.10.1'
@@ -198,7 +206,9 @@ dependencies {
198206
// name and the commit hash with the commit hash of the (pushed) commit you want to test
199207
// This works thanks to JitPack: https://jitpack.io/
200208
implementation 'com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751'
201-
implementation 'com.github.TeamNewPipe:NewPipeExtractor:v0.24.2'
209+
// WORKAROUND: if you get errors with the NewPipeExtractor dependency, replace `v0.24.3` with
210+
// the corresponding commit hash, since JitPack is sometimes buggy
211+
implementation 'com.github.TeamNewPipe:NewPipeExtractor:v0.24.3'
202212
implementation 'com.github.TeamNewPipe:NoNonsense-FilePicker:5.0.0'
203213

204214
/** Checkstyle **/
@@ -234,8 +244,9 @@ dependencies {
234244

235245
/** Third-party libraries **/
236246
// Instance state boilerplate elimination
237-
implementation "frankiesardo:icepick:${icepickVersion}"
238-
kapt "frankiesardo:icepick-processor:${icepickVersion}"
247+
implementation 'com.github.livefront:bridge:v2.0.2'
248+
implementation "com.evernote:android-state:$stateSaverVersion"
249+
kapt "com.evernote:android-state-processor:$stateSaverVersion"
239250

240251
// HTML parser
241252
implementation "org.jsoup:jsoup:1.17.2"
@@ -282,7 +293,7 @@ dependencies {
282293
implementation "com.jakewharton.rxbinding4:rxbinding:4.0.0"
283294

284295
// Date and time formatting
285-
implementation "org.ocpsoft.prettytime:prettytime:5.0.7.Final"
296+
implementation "org.ocpsoft.prettytime:prettytime:5.0.8.Final"
286297

287298
/** Debugging **/
288299
// Memory leak detection

app/proguard-rules.pro

-9
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@
1313
## Rules for ExoPlayer
1414
-keep class com.google.android.exoplayer2.** { *; }
1515

16-
## Rules for Icepick. Copy pasted from https://github.com/frankiesardo/icepick
17-
-dontwarn icepick.**
18-
-keep class icepick.** { *; }
19-
-keep class **$$Icepick { *; }
20-
-keepclasseswithmembernames class * {
21-
@icepick.* <fields>;
22-
}
23-
-keepnames class * { @icepick.State *;}
24-
2516
## Rules for OkHttp. Copy pasted from https://github.com/square/okhttp
2617
-dontwarn okhttp3.**
2718
-dontwarn okio.**

app/src/main/AndroidManifest.xml

+1
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@
367367
<data android:host="tilvids.com" />
368368
<data android:host="video.lqdn.fr" />
369369
<data android:host="video.ploud.fr" />
370+
<data android:host="subscribeto.me" />
370371

371372
<data android:pathPrefix="/videos/" /> <!-- it contains playlists -->
372373
<data android:pathPrefix="/w/" /> <!-- short video URLs -->

app/src/main/java/org/schabi/newpipe/App.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@
1919
import org.schabi.newpipe.extractor.downloader.Downloader;
2020
import org.schabi.newpipe.ktx.ExceptionUtils;
2121
import org.schabi.newpipe.settings.NewPipeSettings;
22+
import org.schabi.newpipe.util.BridgeStateSaverInitializer;
2223
import org.schabi.newpipe.util.Localization;
23-
import org.schabi.newpipe.util.image.ImageStrategy;
24-
import org.schabi.newpipe.util.image.PicassoHelper;
2524
import org.schabi.newpipe.util.ServiceHelper;
2625
import org.schabi.newpipe.util.StateSaver;
26+
import org.schabi.newpipe.util.image.ImageStrategy;
27+
import org.schabi.newpipe.util.image.PicassoHelper;
2728
import org.schabi.newpipe.util.image.PreferredImageQuality;
2829

2930
import java.io.IOException;
@@ -101,6 +102,7 @@ public void onCreate() {
101102
Localization.getPreferredContentCountry(this));
102103
Localization.initPrettyTime(Localization.resolvePrettyTime(getApplicationContext()));
103104

105+
BridgeStateSaverInitializer.init(this);
104106
StateSaver.init(this);
105107
initNotificationChannels();
106108

app/src/main/java/org/schabi/newpipe/BaseFragment.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
import androidx.fragment.app.Fragment;
1111
import androidx.fragment.app.FragmentManager;
1212

13-
import icepick.Icepick;
14-
import icepick.State;
13+
import com.evernote.android.state.State;
14+
import com.livefront.bridge.Bridge;
15+
1516

1617
public abstract class BaseFragment extends Fragment {
1718
protected final String TAG = getClass().getSimpleName() + "@" + Integer.toHexString(hashCode());
@@ -48,7 +49,7 @@ public void onCreate(final Bundle savedInstanceState) {
4849
+ "savedInstanceState = [" + savedInstanceState + "]");
4950
}
5051
super.onCreate(savedInstanceState);
51-
Icepick.restoreInstanceState(this, savedInstanceState);
52+
Bridge.restoreInstanceState(this, savedInstanceState);
5253
if (savedInstanceState != null) {
5354
onRestoreInstanceState(savedInstanceState);
5455
}
@@ -70,7 +71,7 @@ public void onViewCreated(@NonNull final View rootView, final Bundle savedInstan
7071
@Override
7172
public void onSaveInstanceState(@NonNull final Bundle outState) {
7273
super.onSaveInstanceState(outState);
73-
Icepick.saveInstanceState(this, outState);
74+
Bridge.saveInstanceState(this, outState);
7475
}
7576

7677
protected void onRestoreInstanceState(@NonNull final Bundle savedInstanceState) {

app/src/main/java/org/schabi/newpipe/DownloaderImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
public final class DownloaderImpl extends Downloader {
3131
public static final String USER_AGENT =
32-
"Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0";
32+
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0";
3333
public static final String YOUTUBE_RESTRICTED_MODE_COOKIE_KEY =
3434
"youtube_restricted_mode_key";
3535
public static final String YOUTUBE_RESTRICTED_MODE_COOKIE = "PREF=f2=8000000";

app/src/main/java/org/schabi/newpipe/RouterActivity.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
import androidx.lifecycle.LifecycleOwner;
4242
import androidx.preference.PreferenceManager;
4343

44+
import com.evernote.android.state.State;
45+
import com.livefront.bridge.Bridge;
46+
4447
import org.schabi.newpipe.database.stream.model.StreamEntity;
4548
import org.schabi.newpipe.databinding.ListRadioIconItemBinding;
4649
import org.schabi.newpipe.databinding.SingleChoiceDialogViewBinding;
@@ -98,8 +101,6 @@
98101
import java.util.Optional;
99102
import java.util.function.Consumer;
100103

101-
import icepick.Icepick;
102-
import icepick.State;
103104
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
104105
import io.reactivex.rxjava3.core.Observable;
105106
import io.reactivex.rxjava3.core.Single;
@@ -152,7 +153,7 @@ protected void onCreate(final Bundle savedInstanceState) {
152153
getWindow().setAttributes(params);
153154

154155
super.onCreate(savedInstanceState);
155-
Icepick.restoreInstanceState(this, savedInstanceState);
156+
Bridge.restoreInstanceState(this, savedInstanceState);
156157

157158
// FragmentManager will take care to recreate (Playlist|Download)Dialog when screen rotates
158159
// We used to .setOnDismissListener(dialog -> finish()); when creating these DialogFragments
@@ -197,7 +198,7 @@ protected void onStop() {
197198
@Override
198199
protected void onSaveInstanceState(@NonNull final Bundle outState) {
199200
super.onSaveInstanceState(outState);
200-
Icepick.saveInstanceState(this, outState);
201+
Bridge.saveInstanceState(this, outState);
201202
}
202203

203204
@Override

app/src/main/java/org/schabi/newpipe/about/AboutActivity.kt

+6-2
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,12 @@ class AboutActivity : AppCompatActivity() {
138138
"https://github.com/lisawray/groupie", StandardLicenses.MIT
139139
),
140140
SoftwareComponent(
141-
"Icepick", "2015", "Frankie Sardo",
142-
"https://github.com/frankiesardo/icepick", StandardLicenses.EPL1
141+
"Android-State", "2018", "Evernote",
142+
"https://github.com/Evernote/android-state", StandardLicenses.EPL1
143+
),
144+
SoftwareComponent(
145+
"Bridge", "2021", "Livefront",
146+
"https://github.com/livefront/bridge", StandardLicenses.APACHE2
143147
),
144148
SoftwareComponent(
145149
"Jsoup", "2009 - 2020", "Jonathan Hedley",

app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistStreamDAO.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,6 @@ default Flowable<List<PlaylistStreamEntity>> listByService(final int serviceId)
154154
+ " AND :streamUrl = :streamUrl"
155155

156156
+ " GROUP BY " + JOIN_PLAYLIST_ID
157-
+ " ORDER BY " + PLAYLIST_DISPLAY_INDEX)
157+
+ " ORDER BY " + PLAYLIST_DISPLAY_INDEX + ", " + PLAYLIST_NAME)
158158
Flowable<List<PlaylistDuplicatesEntry>> getPlaylistDuplicatesMetadata(String streamUrl);
159159
}

0 commit comments

Comments
 (0)