youtube: add ratelimit error, update sign in error

This commit is contained in:
wukko
2024-06-08 22:59:30 +06:00
parent 04d66946fc
commit 1d5fa62271
3 changed files with 9 additions and 3 deletions

View File

@ -124,6 +124,9 @@ export default async function(o) {
return { error: 'ErrorYTAgeRestrict' }
}
}
if (playability.status === "UNPLAYABLE" && playability.reason.endsWith('request limit.')) {
return { error: 'ErrorYTRateLimit' }
}
if (playability.status !== 'OK') return { error: 'ErrorYTUnavailable' };
if (info.basic_info.is_live) return { error: 'ErrorLiveVideo' };