Skip to content

Commit 9d04a73

Browse files
Isira-SeneviratnetheScrabiTobiGrStypoxtag27
authored
Merge dev to refactor (#11427)
* add NP icon for Android Studio's NewUI * Fix NPE in MediaSessionPlayerUi while destroying player * Update NewPipeExtractor to v0.24.1 * Add changelogs for hotfix release v0.27.1 (998) * Hotfix release v0.27.1 (998) * Update README.pt_BR.md (#11275) * Update Matrix room link, and prioritise it (#11350) * Update Matrix room link, and prioritise it * Update Matrix room link in CONTRIBUTING.md * Prioritise Matrix in contribution doc too * Update NewPipeExtractor to v0.24.2 * Hotfix release v0.27.2 (999) * Add changelogs for hotfix release v0.27.2 (999) * Don't warn about rhino class in proguard Likely related to mozilla/rhino@01a7b20 but I am not completely sure. I tested the app and it works well, so I think that org.mozilla.javascript.JavaToJSONConverters is not used really. This is the full list of errors: Missing class java.beans.BeanDescriptor (referenced from: java.lang.Object org.mozilla.javascript.JavaToJSONConverters.lambda$static$4(java.lang.Object)) Missing class java.beans.BeanInfo (referenced from: java.lang.Object org.mozilla.javascript.JavaToJSONConverters.lambda$static$4(java.lang.Object)) Missing class java.beans.IntrospectionException (referenced from: java.lang.Object org.mozilla.javascript.JavaToJSONConverters.lambda$static$4(java.lang.Object)) Missing class java.beans.Introspector (referenced from: java.lang.Object org.mozilla.javascript.JavaToJSONConverters.lambda$static$4(java.lang.Object)) Missing class java.beans.PropertyDescriptor (referenced from: java.lang.Object org.mozilla.javascript.JavaToJSONConverters.lambda$static$4(java.lang.Object)) * Remove code committed accidentally --------- Co-authored-by: Christian Schabesberger <[email protected]> Co-authored-by: Tobi <[email protected]> Co-authored-by: Stypox <[email protected]> Co-authored-by: #27 <[email protected]> Co-authored-by: opusforlife2 <[email protected]>
1 parent d336f4c commit 9d04a73

File tree

61 files changed

+187
-78
lines changed

Some content is hidden

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

61 files changed

+187
-78
lines changed

.github/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,6 @@ The [ktlint](https://github.com/pinterest/ktlint) plugin does the same job as ch
7979

8080
## Communication
8181

82-
* 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)!
83-
* 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.
84-
* 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

Lines changed: 3 additions & 3 deletions
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

.idea/icon.svg

Lines changed: 21 additions & 0 deletions
Loading

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ android {
2020
resValue "string", "app_name", "NewPipe"
2121
minSdk 21
2222
targetSdk 33
23-
versionCode 997
24-
versionName "0.27.0"
23+
versionCode 999
24+
versionName "0.27.2"
2525

2626
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2727

@@ -203,7 +203,7 @@ dependencies {
203203
// name and the commit hash with the commit hash of the (pushed) commit you want to test
204204
// This works thanks to JitPack: https://jitpack.io/
205205
implementation 'com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751'
206-
implementation 'com.github.TeamNewPipe:NewPipeExtractor:v0.24.1'
206+
implementation 'com.github.TeamNewPipe:NewPipeExtractor:v0.24.2'
207207
implementation 'com.github.TeamNewPipe:NoNonsense-FilePicker:5.0.0'
208208

209209
/** Checkstyle **/

app/proguard-rules.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
-keep class org.schabi.newpipe.extractor.timeago.patterns.** { *; }
88
-keep class org.mozilla.javascript.** { *; }
99
-keep class org.mozilla.classfile.ClassFileWriter
10+
-dontwarn org.mozilla.javascript.JavaToJSONConverters
1011
-dontwarn org.mozilla.javascript.tools.**
1112

1213
## Rules for ExoPlayer

app/src/main/java/org/schabi/newpipe/error/ReCaptchaActivity.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
import org.schabi.newpipe.extractor.utils.Utils;
2828
import org.schabi.newpipe.util.ThemeHelper;
2929

30-
import java.io.UnsupportedEncodingException;
31-
3230
/*
3331
* Created by beneth <[email protected]> on 06.12.16.
3432
*
@@ -190,11 +188,10 @@ private void handleCookiesFromUrl(@Nullable final String url) {
190188
String abuseCookie = url.substring(abuseStart + 13, abuseEnd);
191189
abuseCookie = Utils.decodeUrlUtf8(abuseCookie);
192190
handleCookies(abuseCookie);
193-
} catch (UnsupportedEncodingException | StringIndexOutOfBoundsException e) {
191+
} catch (IllegalArgumentException | StringIndexOutOfBoundsException e) {
194192
if (MainActivity.DEBUG) {
195-
e.printStackTrace();
196-
Log.d(TAG, "handleCookiesFromUrl: invalid google abuse starting at "
197-
+ abuseStart + " and ending at " + abuseEnd + " for url " + url);
193+
Log.e(TAG, "handleCookiesFromUrl: invalid google abuse starting at "
194+
+ abuseStart + " and ending at " + abuseEnd + " for url " + url, e);
198195
}
199196
}
200197
}

app/src/main/java/org/schabi/newpipe/player/mediasession/MediaSessionPlayerUi.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ public class MediaSessionPlayerUi extends PlayerUi
3838
implements SharedPreferences.OnSharedPreferenceChangeListener {
3939
private static final String TAG = "MediaSessUi";
4040

41+
@Nullable
4142
private MediaSessionCompat mediaSession;
43+
@Nullable
4244
private MediaSessionConnector sessionConnector;
4345

4446
private final String ignoreHardwareMediaButtonsKey;
@@ -198,6 +200,11 @@ private void updateMediaSessionActions() {
198200
return;
199201
}
200202

203+
if (sessionConnector == null) {
204+
// sessionConnector will be null after destroyPlayer is called
205+
return;
206+
}
207+
201208
// only use the fourth and fifth actions (the settings page also shows only the last 2 on
202209
// Android 13+)
203210
final List<NotificationActionData> newNotificationActions = IntStream.of(3, 4)

app/src/main/java/org/schabi/newpipe/settings/DownloadSettingsFragment.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
import java.io.File;
3232
import java.io.IOException;
33-
import java.io.UnsupportedEncodingException;
3433
import java.net.URI;
3534

3635
public class DownloadSettingsFragment extends BasePreferenceFragment {
@@ -125,7 +124,7 @@ private void showPathInSummary(final String prefKey, @StringRes final int defaul
125124

126125
try {
127126
rawUri = decodeUrlUtf8(rawUri);
128-
} catch (final UnsupportedEncodingException e) {
127+
} catch (final IllegalArgumentException e) {
129128
// nothing to do
130129
}
131130

0 commit comments

Comments
 (0)