From f39491161e466140251ecec2432caf4a9c9040d8 Mon Sep 17 00:00:00 2001 From: Mirko Ceroni Date: Sat, 10 May 2025 17:10:45 +0200 Subject: [PATCH] Update IntentExtractor.java fixed bug 4541 share of youtube shorten link does not open id has no url ? paramter https://github.com/yuliskov/SmartTube/issues/4541 --- .../smartyoutubetv2/common/utils/IntentExtractor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/utils/IntentExtractor.java b/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/utils/IntentExtractor.java index cac367034..db81b957d 100644 --- a/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/utils/IntentExtractor.java +++ b/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/utils/IntentExtractor.java @@ -135,8 +135,8 @@ public class IntentExtractor { // https://www.youtube.com/@IngaMezerya or https://youtu.be/builditbasement String lastPathSegment = url.getLastPathSegment(); - if (Helpers.endsWithAny(url.toString(), lastPathSegment)) { // Exclude this case: https://www.youtube.com/watch?v=LxiZ7BFWQSQ - channelId = Helpers.startsWith(lastPathSegment, "@") ? lastPathSegment : "@" + lastPathSegment; + if (lastPathSegment != null && lastPathSegment.startsWith("@")) { + channelId = lastPathSegment; } }