Skip to content

Commit dedd12f

Browse files
committed
channel url parsing fix
1 parent 4b850d9 commit dedd12f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

common/src/main/java/com/liskovsoft/smartyoutubetv2/common/utils/IntentExtractor.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public class IntentExtractor {
2828
* https://youtube.com/channel/BLABLA/video
2929
*/
3030
private static final String CHANNEL_KEY = "channel";
31+
private static final String USER_KEY = "user";
3132
private static final String CHANNEL_ALT_KEY = "c";
3233
private static final String USER_URL = "/user/";
3334
private static final String SUBSCRIPTIONS_URL = "https://www.youtube.com/tv#/zylon-surface?c=FEsubscriptions"; // last 'resume' param isn't parsed by intent and should be removed
@@ -131,6 +132,11 @@ public static String extractChannelId(Intent intent) {
131132
// https://www.youtube.com/c/IngaMezerya
132133
channelId = parser.get(CHANNEL_ALT_KEY);
133134

135+
if (channelId == null) {
136+
// https://youtube.com/user/RVLucius
137+
channelId = parser.get(USER_KEY);
138+
}
139+
134140
if (channelId != null) {
135141
channelId = "@" + channelId; // add the prefix to quickly distinguish later
136142
}

0 commit comments

Comments
 (0)