mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
YT: check if player URI is valid
This commit is contained in:
@@ -100,6 +100,14 @@ var YouTubeClient = GObject.registerClass({
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
const ytUri = `https://www.youtube.com${ytPath}`;
|
const ytUri = `https://www.youtube.com${ytPath}`;
|
||||||
|
if(
|
||||||
|
/* check if site has "/" after ".com" */
|
||||||
|
ytUri[23] !== '/'
|
||||||
|
|| !Gst.Uri.is_valid(ytUri)
|
||||||
|
) {
|
||||||
|
debug(`misformed player URI: ${ytUri}`);
|
||||||
|
break;
|
||||||
|
}
|
||||||
debug(`found player URI: ${ytUri}`);
|
debug(`found player URI: ${ytUri}`);
|
||||||
|
|
||||||
/* TODO: cache */
|
/* TODO: cache */
|
||||||
|
Reference in New Issue
Block a user