diff --git a/app/build.gradle b/app/build.gradle index 0eb3b5edaa4..a4c31a5eb24 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,8 +13,8 @@ android { minSdkVersion 19 //noinspection ExpiredTargetSdkVersion targetSdkVersion 29 - versionCode 980 - versionName "0.19.9.6" + versionCode 981 + versionName "0.19.9.7" multiDexEnabled true @@ -50,12 +50,17 @@ android { // debug build. This seems to be a Gradle bug, therefore // TODO: update Gradle version release { + if (System.properties.containsKey('packageSuffix')) { + applicationIdSuffix System.getProperty('packageSuffix') + resValue "string", "app_name", "NewPipe " + System.getProperty('packageSuffix') + archivesBaseName = 'NewPipe_' + System.getProperty('packageSuffix') + } + applicationIdSuffix "Zing" + resValue "string", "app_name", "NewPipe " + "Zing" + archivesBaseName = 'app' minifyEnabled true shrinkResources true // could be disabled to fix F-Droid's reproducible build proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - archivesBaseName = 'app' - applicationIdSuffix ".Zing" - resValue "string", "app_name", "NewPipe " + "Zing" } } @@ -96,10 +101,10 @@ ext { icepickVersion = '3.2.0' stethoVersion = '1.5.1' leakCanaryVersion = '2.5' - exoPlayerVersion = '2.11.8' + exoPlayerVersion = 'r2.11.8' androidxLifecycleVersion = '2.2.0' androidxRoomVersion = '2.2.5' - groupieVersion = '2.8.1' + groupieVersion = '2.9.1' markwonVersion = '4.6.0' googleAutoServiceVersion = '1.0-rc7' } @@ -167,7 +172,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.ShareASmile:NewPipeExtractor:8787d1879dc7f1f8a2145f282ef16ee1103bbe7e' + //implementation 'com.github.ShareASmile.NewPipeExtractor:NewPipeExtractor:v0.22.7.3' + implementation 'com.github.ShareASmile:NewPipeExtractor:c6ffd3764c53b34d38961ed7f9a09d274dd9c5a0' /** Third-party libraries **/ // Instance state boilerplate elimination @@ -182,16 +188,20 @@ dependencies { implementation "com.squareup.okhttp3:okhttp:3.12.13" // Media player - implementation "com.google.android.exoplayer:exoplayer:${exoPlayerVersion}" - implementation "com.google.android.exoplayer:extension-mediasession:${exoPlayerVersion}" + implementation "com.github.ShareASmile.ExoPlayer:library-core:${exoPlayerVersion}" + implementation "com.github.ShareASmile.ExoPlayer:library-dash:${exoPlayerVersion}" + implementation "com.github.ShareASmile.ExoPlayer:library-hls:${exoPlayerVersion}" + implementation "com.github.ShareASmile.ExoPlayer:library-smoothstreaming:${exoPlayerVersion}" + implementation "com.github.ShareASmile.ExoPlayer:library-ui:${exoPlayerVersion}" + implementation "com.github.ShareASmile.ExoPlayer:extension-mediasession:${exoPlayerVersion}" // Metadata generator for service descriptors compileOnly "com.google.auto.service:auto-service-annotations:${googleAutoServiceVersion}" kapt "com.google.auto.service:auto-service:${googleAutoServiceVersion}" // Manager for complex RecyclerView layouts - implementation "com.xwray:groupie:${groupieVersion}" - implementation "com.xwray:groupie-kotlin-android-extensions:${groupieVersion}" + implementation "com.github.ShareASmile.groupie:groupie:${groupieVersion}" + implementation "com.github.ShareASmile.groupie:groupie-kotlin-android-extensions:${groupieVersion}" // Circular ImageView implementation "de.hdodenhof:circleimageview:3.1.0" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f1f4365c69e..2502be13389 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -37,7 +37,6 @@ android:launchMode="singleTask"> - diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java index b63a9cd875a..8e7b5655d29 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlaybackParameterDialog.java @@ -66,7 +66,6 @@ public class PlaybackParameterDialog extends DialogFragment { private boolean initialSkipSilence = DEFAULT_SKIP_SILENCE; private double tempo = DEFAULT_TEMPO; private double pitch = DEFAULT_PITCH; - private double stepSize = DEFAULT_STEP; @Nullable private SeekBar tempoSlider; @@ -127,7 +126,6 @@ public void onCreate(@Nullable final Bundle savedInstanceState) { tempo = savedInstanceState.getDouble(TEMPO_KEY, DEFAULT_TEMPO); pitch = savedInstanceState.getDouble(PITCH_KEY, DEFAULT_PITCH); - stepSize = savedInstanceState.getDouble(STEP_SIZE_KEY, DEFAULT_STEP); } } @@ -139,7 +137,6 @@ public void onSaveInstanceState(final Bundle outState) { outState.putDouble(TEMPO_KEY, getCurrentTempo()); outState.putDouble(PITCH_KEY, getCurrentPitch()); - outState.putDouble(STEP_SIZE_KEY, getCurrentStepSize()); } /*////////////////////////////////////////////////////////////////////////// @@ -177,7 +174,6 @@ private void setupControlViews(@NonNull final View rootView) { setupTempoControl(rootView); setupPitchControl(rootView); - setStepSize(stepSize); setupStepSizeSelector(rootView); } @@ -265,6 +261,10 @@ private void setupSkipSilenceControl(@NonNull final View rootView) { } private void setupStepSizeSelector(@NonNull final View rootView) { + setStepSize(PreferenceManager + .getDefaultSharedPreferences(requireContext()) + .getFloat(getString(R.string.adjustment_step_key), (float) DEFAULT_STEP)); + TextView stepSizeOnePercentText = rootView.findViewById(R.id.stepSizeOnePercent); TextView stepSizeFivePercentText = rootView.findViewById(R.id.stepSizeFivePercent); TextView stepSizeTenPercentText = rootView.findViewById(R.id.stepSizeTenPercent); @@ -307,7 +307,10 @@ private void setupStepSizeSelector(@NonNull final View rootView) { } private void setStepSize(final double stepSize) { - this.stepSize = stepSize; + PreferenceManager.getDefaultSharedPreferences(requireContext()) + .edit() + .putFloat(getString(R.string.adjustment_step_key), (float) stepSize) + .apply(); if (tempoStepUpText != null) { tempoStepUpText.setText(getStepUpPercentString(stepSize)); @@ -466,10 +469,6 @@ private double getCurrentPitch() { return pitchSlider == null ? pitch : strategy.valueOf(pitchSlider.getProgress()); } - private double getCurrentStepSize() { - return stepSize; - } - private boolean getCurrentSkipSilence() { return skipSilenceCheckbox != null && skipSilenceCheckbox.isChecked(); } diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 0ca2ea03bf0..adfef1733f6 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -204,6 +204,7 @@ main_page_content enable_playback_resume enable_playback_state_lists + adjustment_step_key playback_unhook_key playback_speed_key playback_pitch_key diff --git a/build.gradle b/build.gradle index 9468a299894..790fd5a879f 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,6 @@ buildscript { ext.kotlin_version = '1.4.10' repositories { mavenCentral() - jcenter() google() } dependencies { @@ -18,7 +17,6 @@ buildscript { allprojects { repositories { - jcenter() google() mavenCentral() maven { url "https://jitpack.io" }