api/rutube: catch a region lock error

closes #930
This commit is contained in:
wukko 2024-11-24 18:43:50 +06:00
parent 2ed52a161e
commit 6039eae6a3
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -33,6 +33,10 @@ export default async function(obj) {
const play = await requestJSON(requestURL);
if (!play) return { error: "fetch.fail" };
if (play.detail?.type === "blocking_rule") {
return { error: "content.video.region" };
}
if (play.detail || !play.video_balancer) return { error: "fetch.empty" };
if (play.live_streams?.hls) return { error: "content.video.live" };