mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
YT: check if player URI is valid
This commit is contained in:
@@ -100,6 +100,14 @@ var YouTubeClient = GObject.registerClass({
|
||||
break;
|
||||
}
|
||||
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}`);
|
||||
|
||||
/* TODO: cache */
|
||||
|
Reference in New Issue
Block a user