Use gtuber lib for URIs with "gtuber" scheme

Take a different code path when URI uses "gtuber" scheme.
This allows testing new WIP lib as an opt-in.
This commit is contained in:
Rafał Dzięgiel
2021-11-29 22:33:45 +01:00
parent 24905f1d60
commit 810aea476f

View File

@@ -969,6 +969,11 @@ function checkYouTubeUri(uri)
const originalHost = gstUri.get_host();
gstUri.normalize();
/* TODO: Remove all this YT code */
const scheme = gstUri.get_scheme();
if (scheme && scheme === 'gtuber')
return [false, null];
const host = gstUri.get_host();
let videoId = null;
@@ -988,7 +993,6 @@ function checkYouTubeUri(uri)
videoId = gstUri.get_path_segments()[1];
break;
default:
const scheme = gstUri.get_scheme();
if(scheme === 'yt' || scheme === 'youtube') {
/* ID is case sensitive */
videoId = originalHost;