Fix: Switch yt-dlp to Android/iOS client and fix meta tags
This commit is contained in:
parent
3264286f7f
commit
a65ff6785b
2 changed files with 10 additions and 2 deletions
|
|
@ -165,7 +165,13 @@ class YouTubeService:
|
||||||
'format': 'bestaudio[ext=m4a]/best[ext=mp4]/best',
|
'format': 'bestaudio[ext=m4a]/best[ext=mp4]/best',
|
||||||
'quiet': True,
|
'quiet': True,
|
||||||
'noplaylist': True,
|
'noplaylist': True,
|
||||||
'force_ipv4': True, # Force IPv4 to avoid cloud range blocks
|
'force_ipv4': True,
|
||||||
|
# Use mobile clients to avoid web scraping blocks
|
||||||
|
'extractor_args': {
|
||||||
|
'youtube': {
|
||||||
|
'player_client': ['android', 'ios']
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
||||||
info = ydl.extract_info(url, download=False)
|
info = ydl.extract_info(url, download=False)
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,12 @@ export const metadata: Metadata = {
|
||||||
manifest: "/manifest.json",
|
manifest: "/manifest.json",
|
||||||
referrer: "no-referrer",
|
referrer: "no-referrer",
|
||||||
appleWebApp: {
|
appleWebApp: {
|
||||||
capable: true,
|
|
||||||
statusBarStyle: "black-translucent",
|
statusBarStyle: "black-translucent",
|
||||||
title: "Audiophile Web Player",
|
title: "Audiophile Web Player",
|
||||||
},
|
},
|
||||||
|
other: {
|
||||||
|
"mobile-web-app-capable": "yes",
|
||||||
|
},
|
||||||
icons: {
|
icons: {
|
||||||
icon: "/icons/icon-192x192.png",
|
icon: "/icons/icon-192x192.png",
|
||||||
apple: "/icons/icon-512x512.png",
|
apple: "/icons/icon-512x512.png",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue