From 0fa2e76c3e396d9456215bd9f5784b3531691107 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Tue, 26 Dec 2023 16:36:07 +0100 Subject: [PATCH 1/3] Fix NPE when ChannelTabLHFactory not implemented for a service Fixes #10698 --- .../fragments/list/channel/ChannelTabFragment.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelTabFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelTabFragment.java index 76849d94d70..95ac42eed08 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelTabFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelTabFragment.java @@ -17,6 +17,7 @@ import org.schabi.newpipe.extractor.channel.tabs.ChannelTabInfo; import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler; +import org.schabi.newpipe.extractor.linkhandler.ListLinkHandlerFactory; import org.schabi.newpipe.extractor.linkhandler.ReadyChannelTabListLinkHandler; import org.schabi.newpipe.extractor.stream.StreamInfoItem; import org.schabi.newpipe.fragments.list.BaseListInfoFragment; @@ -128,10 +129,13 @@ public void handleResult(@NonNull final ChannelTabInfo result) { // once `handleResult` is called, the parsed data was already saved to cache, so // we can discard any raw data in ReadyChannelTabListLinkHandler and create a // link handler with identical properties, but without any raw data - tabHandler = result.getService() - .getChannelTabLHFactory() - .fromQuery(tabHandler.getId(), tabHandler.getContentFilters(), - tabHandler.getSortFilter()); + final ListLinkHandlerFactory channelTabLHFactory = result.getService() + .getChannelTabLHFactory(); + if (channelTabLHFactory != null) { + // some services do not not have a ChannelTabLHFactory + tabHandler = channelTabLHFactory.fromQuery(tabHandler.getId(), + tabHandler.getContentFilters(), tabHandler.getSortFilter()); + } } catch (final ParsingException e) { // silently ignore the error, as the app can continue to function normally Log.w(TAG, "Could not recreate channel tab handler", e); From d0f4600be4ab11f41753c1333c71d295521a35a5 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Tue, 26 Dec 2023 16:58:49 +0100 Subject: [PATCH 2/3] Add changelog for NewPipe 0.26.1 --- fastlane/metadata/android/en-US/changelogs/996.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 fastlane/metadata/android/en-US/changelogs/996.txt diff --git a/fastlane/metadata/android/en-US/changelogs/996.txt b/fastlane/metadata/android/en-US/changelogs/996.txt new file mode 100644 index 00000000000..8e5af53a480 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/996.txt @@ -0,0 +1,2 @@ +Fixed a NullPointerException when opening a channel / conference in media.ccc.de. +The Grinch tried to break our Christmas gift to you, but we fixed it. From 3df21ad25ee6cbb23f0b45804f0006e5288ce39d Mon Sep 17 00:00:00 2001 From: TobiGr Date: Tue, 26 Dec 2023 16:59:02 +0100 Subject: [PATCH 3/3] Bump version to 0.26.1 (996) --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 993363e32ff..9d64e59d469 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -20,8 +20,8 @@ android { resValue "string", "app_name", "NewPipe" minSdk 21 targetSdk 33 - versionCode 995 - versionName "0.26.0" + versionCode 996 + versionName "0.26.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"