From 102c05e92759ecfd896c192cb24401480e7138d9 Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Sat, 26 Mar 2022 21:21:07 +0100 Subject: [PATCH] FIx breaking changes --- .../newpipe/fragments/detail/DescriptionFragment.java | 2 +- .../newpipe/settings/PeertubeInstanceListFragment.java | 2 +- .../java/us/shandian/giga/get/DownloadMissionRecover.java | 2 +- .../main/java/us/shandian/giga/get/MissionRecoveryInfo.kt | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java index 9b1bf121b..d57ddb02d 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java @@ -84,7 +84,7 @@ public class DescriptionFragment extends BaseFragment { private void setupDescription() { final Description description = streamInfo.getDescription(); if (description == null || isEmpty(description.getContent()) - || description == Description.emptyDescription) { + || description == Description.EMPTY_DESCRIPTION) { binding.detailDescriptionView.setVisibility(View.GONE); binding.detailSelectDescriptionButton.setVisibility(View.GONE); return; diff --git a/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java b/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java index 5767d266f..c7eb0be40 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/PeertubeInstanceListFragment.java @@ -185,7 +185,7 @@ public class PeertubeInstanceListFragment extends Fragment { .setNegativeButton(R.string.cancel, null) .setPositiveButton(R.string.ok, (dialog, which) -> { sharedPreferences.edit().remove(savedInstanceListKey).apply(); - selectInstance(PeertubeInstance.defaultInstance); + selectInstance(PeertubeInstance.DEFAULT_INSTANCE); updateInstanceList(); instanceListAdapter.notifyDataSetChanged(); }) diff --git a/app/src/main/java/us/shandian/giga/get/DownloadMissionRecover.java b/app/src/main/java/us/shandian/giga/get/DownloadMissionRecover.java index 5b2858aa2..90886b63c 100644 --- a/app/src/main/java/us/shandian/giga/get/DownloadMissionRecover.java +++ b/app/src/main/java/us/shandian/giga/get/DownloadMissionRecover.java @@ -132,7 +132,7 @@ public class DownloadMissionRecover extends Thread { switch (mRecovery.getKind()) { case 'a': for (AudioStream audio : mExtractor.getAudioStreams()) { - if (audio.average_bitrate == mRecovery.getDesiredBitrate() && audio.getFormat() == mRecovery.getFormat()) { + if (audio.getAverageBitrate() == mRecovery.getDesiredBitrate() && audio.getFormat() == mRecovery.getFormat()) { url = audio.getUrl(); break; } diff --git a/app/src/main/java/us/shandian/giga/get/MissionRecoveryInfo.kt b/app/src/main/java/us/shandian/giga/get/MissionRecoveryInfo.kt index 403eee0c7..11293a610 100644 --- a/app/src/main/java/us/shandian/giga/get/MissionRecoveryInfo.kt +++ b/app/src/main/java/us/shandian/giga/get/MissionRecoveryInfo.kt @@ -21,13 +21,13 @@ class MissionRecoveryInfo( constructor(stream: Stream) : this(format = stream.getFormat()!!) { when (stream) { is AudioStream -> { - desiredBitrate = stream.average_bitrate + desiredBitrate = stream.averageBitrate isDesired2 = false kind = 'a' } is VideoStream -> { - desired = stream.getResolution() - isDesired2 = stream.isVideoOnly() + desired = stream.resolution + isDesired2 = stream.isVideoOnly kind = 'v' } is SubtitlesStream -> {