Skip to content
This repository was archived by the owner on Jan 21, 2024. It is now read-only.

Commit 5d222fc

Browse files
Merge branch 'master' into sponsorblock
# Conflicts: # app/src/main/java/org/schabi/newpipe/NewVersionWorker.kt # app/src/main/java/org/schabi/newpipe/error/ErrorUtil.kt # app/src/main/java/org/schabi/newpipe/player/playback/MediaSourceManager.java # app/src/main/java/org/schabi/newpipe/player/ui/VideoPlayerUi.java # app/src/main/java/us/shandian/giga/service/DownloadManagerService.java # app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java # app/src/main/res/values-es/strings.xml # app/src/main/res/values-it/strings.xml # app/src/main/res/values-zh-rTW/strings.xml
2 parents 0da8d00 + 831f36e commit 5d222fc

File tree

534 files changed

+10277
-3039
lines changed

Some content is hidden

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

534 files changed

+10277
-3039
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,4 @@ jobs:
126126
env:
127127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
128128
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
129-
run: ./gradlew build sonarqube --info
129+
run: ./gradlew build sonar --info

.github/workflows/image-minimizer.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ module.exports = async ({github, context}) => {
5555
return match;
5656
}
5757

58+
let probeAspectRatio = 0;
5859
let shouldModify = false;
5960
try {
6061
console.log(`Probing ${g2}`);
@@ -76,7 +77,8 @@ module.exports = async ({github, context}) => {
7677
}
7778
console.log(`Probing resulted in ${probeResult.width}x${probeResult.height}px`);
7879

79-
shouldModify = probeResult.height > IMG_MAX_HEIGHT_PX && (probeResult.width / probeResult.height) < MIN_ASPECT_RATIO;
80+
probeAspectRatio = probeResult.width / probeResult.height;
81+
shouldModify = probeResult.height > IMG_MAX_HEIGHT_PX && probeAspectRatio < MIN_ASPECT_RATIO;
8082
} catch(e) {
8183
console.log('Probing failed:', e);
8284
// Immediately abort
@@ -86,7 +88,7 @@ module.exports = async ({github, context}) => {
8688
if (shouldModify) {
8789
wasMatchModified = true;
8890
console.log(`Modifying match '${match}'`);
89-
return `<img alt="${g1}" src="${g2}" height=${IMG_MAX_HEIGHT_PX} />`;
91+
return `<img alt="${g1}" src="${g2}" width=${Math.min(600, (IMG_MAX_HEIGHT_PX * probeAspectRatio).toFixed(0))} />`;
9092
}
9193

9294
console.log(`Match '${match}' is ok/will not be modified`);

app/build.gradle

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1+
import com.android.tools.profgen.ArtProfileKt
2+
import com.android.tools.profgen.ArtProfileSerializer
3+
import com.android.tools.profgen.DexFile
4+
15
plugins {
26
id "com.android.application"
37
id "kotlin-android"
48
id "kotlin-kapt"
59
id "kotlin-parcelize"
610
id "checkstyle"
7-
id "org.sonarqube" version "3.3"
11+
id "org.sonarqube" version "3.5.0.2730"
812
}
913

1014
android {
11-
compileSdk 32
15+
compileSdk 33
1216
namespace 'org.schabi.newpipe'
1317

1418
defaultConfig {
1519
applicationId "org.polymorphicshade.newpipe"
1620
resValue "string", "app_name", "NewPipe SponsorBlock"
1721
minSdk 21
18-
targetSdk 29
19-
versionCode 991
20-
versionName "0.24.1"
22+
targetSdk 33
23+
versionCode 992
24+
versionName "0.25.0"
2125

2226
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2327

@@ -107,7 +111,7 @@ ext {
107111
groupieVersion = '2.10.1'
108112
markwonVersion = '4.6.2'
109113

110-
leakCanaryVersion = '2.5'
114+
leakCanaryVersion = '2.9.1'
111115
stethoVersion = '1.6.0'
112116
mockitoVersion = '4.0.0'
113117
assertJVersion = '3.23.1'
@@ -169,7 +173,7 @@ afterEvaluate {
169173
preDebugBuild.dependsOn runCheckstyle, runKtlint
170174
}
171175

172-
sonarqube {
176+
sonar {
173177
properties {
174178
property "sonar.projectKey", "TeamNewPipe_NewPipe"
175179
property "sonar.organization", "teamnewpipe"
@@ -179,15 +183,15 @@ sonarqube {
179183

180184
dependencies {
181185
/** Desugaring **/
182-
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.6'
186+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.2'
183187

184188
/** NewPipe libraries **/
185189
// You can use a local version by uncommenting a few lines in settings.gradle
186190
// Or you can use a commit you pushed to GitHub by just replacing TeamNewPipe with your GitHub
187191
// name and the commit hash with the commit hash of the (pushed) commit you want to test
188192
// This works thanks to JitPack: https://jitpack.io/
189193
implementation 'com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751'
190-
implementation 'com.github.TeamNewPipe:NewPipeExtractor:eb07d70a2ce03bee3cc74fc33b2e4173e1c21436'
194+
implementation 'com.github.TeamNewPipe:NewPipeExtractor:7e793c11aec46358ccbfd8bcfcf521105f4f093a'
191195
implementation 'com.github.TeamNewPipe:NoNonsense-FilePicker:5.0.0'
192196

193197
/** Checkstyle **/
@@ -259,14 +263,14 @@ dependencies {
259263
implementation "io.noties.markwon:linkify:${markwonVersion}"
260264

261265
// Crash reporting
262-
implementation "ch.acra:acra-core:5.9.3"
266+
implementation "ch.acra:acra-core:5.9.7"
263267

264268
// Properly restarting
265269
implementation 'com.jakewharton:process-phoenix:2.1.2'
266270

267271
// Reactive extensions for Java VM
268-
implementation "io.reactivex.rxjava3:rxjava:3.0.13"
269-
implementation "io.reactivex.rxjava3:rxandroid:3.0.0"
272+
implementation "io.reactivex.rxjava3:rxjava:3.1.5"
273+
implementation "io.reactivex.rxjava3:rxandroid:3.0.2"
270274
// RxJava binding APIs for Android UI widgets
271275
implementation "com.jakewharton.rxbinding4:rxbinding:4.0.0"
272276

@@ -308,3 +312,24 @@ static String getGitWorkingBranch() {
308312
return ""
309313
}
310314
}
315+
316+
project.afterEvaluate {
317+
tasks.compileReleaseArtProfile.doLast {
318+
outputs.files.each { file ->
319+
if (file.toString().endsWith(".profm")) {
320+
println("Sorting ${file} ...")
321+
def version = ArtProfileSerializer.valueOf("METADATA_0_0_2")
322+
def profile = ArtProfileKt.ArtProfile(file)
323+
def keys = new ArrayList(profile.profileData.keySet())
324+
def sortedData = new LinkedHashMap()
325+
Collections.sort keys, new DexFile.Companion()
326+
keys.each { key -> sortedData[key] = profile.profileData[key] }
327+
new FileOutputStream(file).with {
328+
write(version.magicBytes$profgen)
329+
write(version.versionBytes$profgen)
330+
version.write$profgen(it, sortedData, "")
331+
}
332+
}
333+
}
334+
}
335+
}

0 commit comments

Comments
 (0)