Skip to content

Commit e0cb289

Browse files
committed
Merge branch 'master' into dev
2 parents 4c5c2a3 + 831f36e commit e0cb289

142 files changed

Lines changed: 1735 additions & 520 deletions

File tree

Some content is hidden

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

app/build.gradle

Lines changed: 5 additions & 5 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 991
24-
versionName "0.24.1"
23+
versionCode 992
24+
versionName "0.25.0"
2525

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

@@ -106,7 +106,7 @@ ext {
106106
androidxWorkVersion = '2.7.1'
107107

108108
icepickVersion = '3.2.0'
109-
exoPlayerVersion = '2.18.2'
109+
exoPlayerVersion = '2.18.1'
110110
googleAutoServiceVersion = '1.0.1'
111111
groupieVersion = '2.10.1'
112112
markwonVersion = '4.6.2'
@@ -183,15 +183,15 @@ sonar {
183183

184184
dependencies {
185185
/** Desugaring **/
186-
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.0'
186+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.2'
187187

188188
/** NewPipe libraries **/
189189
// You can use a local version by uncommenting a few lines in settings.gradle
190190
// Or you can use a commit you pushed to GitHub by just replacing TeamNewPipe with your GitHub
191191
// name and the commit hash with the commit hash of the (pushed) commit you want to test
192192
// This works thanks to JitPack: https://jitpack.io/
193193
implementation 'com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751'
194-
implementation 'com.github.TeamNewPipe:NewPipeExtractor:2211a24b6934a8a8cdf5547ea1b52daa4cb5de6c'
194+
implementation 'com.github.TeamNewPipe:NewPipeExtractor:7e793c11aec46358ccbfd8bcfcf521105f4f093a'
195195
implementation 'com.github.TeamNewPipe:NoNonsense-FilePicker:5.0.0'
196196

197197
/** Checkstyle **/

app/src/main/AndroidManifest.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
1212
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
1313

14+
<!-- We need to be able to open links in the browser on API 30+ -->
15+
<queries>
16+
<intent>
17+
<action android:name="android.intent.action.VIEW" />
18+
<data android:scheme="http|https|market" />
19+
</intent>
20+
</queries>
21+
1422
<uses-feature
1523
android:name="android.hardware.touchscreen"
1624
android:required="false" />
@@ -165,6 +173,7 @@
165173
<data android:pathPrefix="/watch" />
166174
<data android:pathPrefix="/attribution_link" />
167175
<data android:pathPrefix="/shorts/" />
176+
<data android:pathPrefix="/live/" />
168177
<!-- channel prefix -->
169178
<data android:pathPrefix="/channel/" />
170179
<data android:pathPrefix="/user/" />

app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import static org.schabi.newpipe.extractor.stream.StreamExtractor.NO_AGE_LIMIT;
55
import static org.schabi.newpipe.extractor.utils.Utils.isBlank;
66
import static org.schabi.newpipe.util.Localization.getAppLocale;
7+
import static org.schabi.newpipe.util.text.TextLinkifier.SET_LINK_MOVEMENT_METHOD;
78

89
import android.os.Bundle;
910
import android.view.LayoutInflater;
@@ -112,7 +113,10 @@ private void enableDescriptionSelection() {
112113

113114
private void disableDescriptionSelection() {
114115
// show description content again, otherwise some links are not clickable
115-
loadDescriptionContent();
116+
TextLinkifier.fromDescription(binding.detailDescriptionView,
117+
streamInfo.getDescription(), HtmlCompat.FROM_HTML_MODE_LEGACY,
118+
streamInfo.getService(), streamInfo.getUrl(),
119+
descriptionDisposables, SET_LINK_MOVEMENT_METHOD);
116120

117121
binding.detailDescriptionNoteView.setVisibility(View.GONE);
118122
binding.detailDescriptionView.setTextIsSelectable(false);
@@ -123,27 +127,6 @@ private void disableDescriptionSelection() {
123127
binding.detailSelectDescriptionButton.setImageResource(R.drawable.ic_select_all);
124128
}
125129

126-
private void loadDescriptionContent() {
127-
final Description description = streamInfo.getDescription();
128-
switch (description.getType()) {
129-
case Description.HTML:
130-
TextLinkifier.createLinksFromHtmlBlock(binding.detailDescriptionView,
131-
description.getContent(), HtmlCompat.FROM_HTML_MODE_LEGACY, streamInfo,
132-
descriptionDisposables);
133-
break;
134-
case Description.MARKDOWN:
135-
TextLinkifier.createLinksFromMarkdownText(binding.detailDescriptionView,
136-
description.getContent(), streamInfo, descriptionDisposables);
137-
break;
138-
case Description.PLAIN_TEXT:
139-
default:
140-
TextLinkifier.createLinksFromPlainText(binding.detailDescriptionView,
141-
description.getContent(), streamInfo, descriptionDisposables);
142-
break;
143-
}
144-
}
145-
146-
147130
private void setupMetadata(final LayoutInflater inflater,
148131
final LinearLayout layout) {
149132
addMetadataItem(inflater, layout, false, R.string.metadata_category,
@@ -193,8 +176,8 @@ private void addMetadataItem(final LayoutInflater inflater,
193176
});
194177

195178
if (linkifyContent) {
196-
TextLinkifier.createLinksFromPlainText(itemBinding.metadataContentView, content,
197-
null, descriptionDisposables);
179+
TextLinkifier.fromPlainText(itemBinding.metadataContentView, content, null, null,
180+
descriptionDisposables, SET_LINK_MOVEMENT_METHOD);
198181
} else {
199182
itemBinding.metadataContentView.setText(content);
200183
}

app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,8 @@ private void runWorker(final boolean forceLoad, final boolean addToBackStack) {
865865
if (playQueue == null) {
866866
playQueue = new SinglePlayQueue(result);
867867
}
868-
if (stack.isEmpty() || !stack.peek().getPlayQueue().equals(playQueue)) {
868+
if (stack.isEmpty() || !stack.peek().getPlayQueue()
869+
.equalStreams(playQueue)) {
869870
stack.push(new StackItem(serviceId, url, title, playQueue));
870871
}
871872
}
@@ -1779,7 +1780,7 @@ public void onQueueUpdate(final PlayQueue queue) {
17791780
// deleted/added items inside Channel/Playlist queue and makes possible to have
17801781
// a history of played items
17811782
@Nullable final StackItem stackPeek = stack.peek();
1782-
if (stackPeek != null && !stackPeek.getPlayQueue().equals(queue)) {
1783+
if (stackPeek != null && !stackPeek.getPlayQueue().equalStreams(queue)) {
17831784
@Nullable final PlayQueueItem playQueueItem = queue.getItem();
17841785
if (playQueueItem != null) {
17851786
stack.push(new StackItem(playQueueItem.getServiceId(), playQueueItem.getUrl(),
@@ -1845,7 +1846,7 @@ public void onMetadataUpdate(final StreamInfo info, final PlayQueue queue) {
18451846
// They are not equal when user watches something in popup while browsing in fragment and
18461847
// then changes screen orientation. In that case the fragment will set itself as
18471848
// a service listener and will receive initial call to onMetadataUpdate()
1848-
if (!queue.equals(playQueue)) {
1849+
if (!queue.equalStreams(playQueue)) {
18491850
return;
18501851
}
18511852

@@ -2102,7 +2103,7 @@ private StackItem findQueueInStack(final PlayQueue queue) {
21022103
final Iterator<StackItem> iterator = stack.descendingIterator();
21032104
while (iterator.hasNext()) {
21042105
final StackItem next = iterator.next();
2105-
if (next.getPlayQueue().equals(queue)) {
2106+
if (next.getPlayQueue().equalStreams(queue)) {
21062107
item = next;
21072108
break;
21082109
}
@@ -2117,7 +2118,7 @@ private void replaceQueueIfUserConfirms(final Runnable onAllow) {
21172118
if (isClearingQueueConfirmationRequired(activity)
21182119
&& playerIsNotStopped()
21192120
&& activeQueue != null
2120-
&& !activeQueue.equals(playQueue)) {
2121+
&& !activeQueue.equalStreams(playQueue)) {
21212122
showClearingQueueConfirmation(onAllow);
21222123
} else {
21232124
onAllow.run();

0 commit comments

Comments
 (0)