api/youtube: return an appropriate error if a video is locked behind DRM

This commit is contained in:
wukko 2025-03-13 13:23:03 +06:00
parent d00d94f3dc
commit 2ebe2899be
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -428,6 +428,10 @@ export default async function (o) {
}
}
if (video?.drm_families || audio?.drm_families) {
return { error: "youtube.drm" };
}
const fileMetadata = {
title: basicInfo.title.trim(),
artist: basicInfo.author.replace("- Topic", "").trim()