mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
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:
@@ -969,6 +969,11 @@ function checkYouTubeUri(uri)
|
|||||||
const originalHost = gstUri.get_host();
|
const originalHost = gstUri.get_host();
|
||||||
gstUri.normalize();
|
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();
|
const host = gstUri.get_host();
|
||||||
let videoId = null;
|
let videoId = null;
|
||||||
|
|
||||||
@@ -988,7 +993,6 @@ function checkYouTubeUri(uri)
|
|||||||
videoId = gstUri.get_path_segments()[1];
|
videoId = gstUri.get_path_segments()[1];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
const scheme = gstUri.get_scheme();
|
|
||||||
if(scheme === 'yt' || scheme === 'youtube') {
|
if(scheme === 'yt' || scheme === 'youtube') {
|
||||||
/* ID is case sensitive */
|
/* ID is case sensitive */
|
||||||
videoId = originalHost;
|
videoId = originalHost;
|
||||||
|
Reference in New Issue
Block a user