mirror of
https://github.com/wukko/cobalt.git
synced 2025-02-24 03:58:49 +01:00
api/youtube: return correct audio url in hls mode
my disappointment in its quality is immeasurable
This commit is contained in:
parent
0ddb3e3ecc
commit
effec1bfb9
1 changed files with 7 additions and 2 deletions
|
@ -368,12 +368,17 @@ export default async function(o) {
|
||||||
|
|
||||||
if (audio && o.isAudioOnly) {
|
if (audio && o.isAudioOnly) {
|
||||||
let bestAudio = format === "h264" ? "m4a" : "opus";
|
let bestAudio = format === "h264" ? "m4a" : "opus";
|
||||||
if (o.youtubeHLS) bestAudio = "m4a";
|
let urls = audio.url;
|
||||||
|
|
||||||
|
if (o.youtubeHLS) {
|
||||||
|
bestAudio = "m4a";
|
||||||
|
urls = audio.uri;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
type: "audio",
|
type: "audio",
|
||||||
isAudioOnly: true,
|
isAudioOnly: true,
|
||||||
urls: audio.url,
|
urls,
|
||||||
filenameAttributes,
|
filenameAttributes,
|
||||||
fileMetadata,
|
fileMetadata,
|
||||||
bestAudio,
|
bestAudio,
|
||||||
|
|
Loading…
Reference in a new issue