revert addition of second audio-only formatStream, which breaks Clipious
This commit is contained in:
@@ -212,21 +212,21 @@ def rebuildFormats(data):
|
|||||||
"container": invidious_formats.FORMATS[data[best_bitrate_video]['itag']]['ext'],
|
"container": invidious_formats.FORMATS[data[best_bitrate_video]['itag']]['ext'],
|
||||||
"encoding": invidious_formats.FORMATS[data[best_bitrate_video]['itag']]['vcodec']
|
"encoding": invidious_formats.FORMATS[data[best_bitrate_video]['itag']]['vcodec']
|
||||||
},
|
},
|
||||||
{
|
# {
|
||||||
"audioChannels": data[best_bitrate_audio]['audioChannels'],
|
# "audioChannels": data[best_bitrate_audio]['audioChannels'],
|
||||||
"init": result[best_bitrate_audio]['init'],
|
# "init": result[best_bitrate_audio]['init'],
|
||||||
"index": result[best_bitrate_audio]['index'],
|
# "index": result[best_bitrate_audio]['index'],
|
||||||
"bitrate": str(data[best_bitrate_audio]['averageBitrate']),
|
# "bitrate": str(data[best_bitrate_audio]['averageBitrate']),
|
||||||
"url": data[best_bitrate_audio]['url'],
|
# "url": data[best_bitrate_audio]['url'],
|
||||||
"itag": str(data[best_bitrate_audio]['itag']),
|
# "itag": str(data[best_bitrate_audio]['itag']),
|
||||||
"type": data[best_bitrate_audio]['mimeType'],
|
# "type": data[best_bitrate_audio]['mimeType'],
|
||||||
"clen": result[best_bitrate_audio]['clen'],
|
# "clen": result[best_bitrate_audio]['clen'],
|
||||||
"lmt": result[best_bitrate_audio]['lmt'],
|
# "lmt": result[best_bitrate_audio]['lmt'],
|
||||||
"projectionType": result[best_bitrate_audio]['projectionType'],
|
# "projectionType": result[best_bitrate_audio]['projectionType'],
|
||||||
"audioQuality": result[best_bitrate_audio]['audioQuality'],
|
# "audioQuality": result[best_bitrate_audio]['audioQuality'],
|
||||||
"audioSampleRate": result[best_bitrate_audio]['audioSampleRate'],
|
# "audioSampleRate": result[best_bitrate_audio]['audioSampleRate'],
|
||||||
"qualityLabel": "audio"
|
# "qualityLabel": "audio"
|
||||||
}
|
# }
|
||||||
]
|
]
|
||||||
|
|
||||||
# not all itags have width and/or height
|
# not all itags have width and/or height
|
||||||
@@ -249,8 +249,10 @@ def videos(data):
|
|||||||
|
|
||||||
hls_url = safeTraverse(idata, ['stage1', 'streamingData', 'hlsManifestUrl'], default="")
|
hls_url = safeTraverse(idata, ['stage1', 'streamingData', 'hlsManifestUrl'], default="")
|
||||||
adaptive_formats = safeTraverse(idata, ['stage1', 'streamingData', 'adaptiveFormats'], default=[])
|
adaptive_formats = safeTraverse(idata, ['stage1', 'streamingData', 'adaptiveFormats'], default=[])
|
||||||
if not hls_url:
|
if not hls_url or not adaptive_formats:
|
||||||
print(f"serious error: couldn't get hls_url or adaptive_formats!\ndumping idata:\n{idata}")
|
print(f"serious error: couldn't get hls_url or adaptive_formats!\n"
|
||||||
|
f"dumping idata:\n"
|
||||||
|
f"{idata}")
|
||||||
return send(500, {'error': getError(idata)})
|
return send(500, {'error': getError(idata)})
|
||||||
|
|
||||||
wdata = ythdd_extractor.WEBextractSinglePage(data[3])
|
wdata = ythdd_extractor.WEBextractSinglePage(data[3])
|
||||||
@@ -435,34 +437,6 @@ def videos(data):
|
|||||||
# }
|
# }
|
||||||
# ],
|
# ],
|
||||||
"recommendedVideos": related
|
"recommendedVideos": related
|
||||||
# "recommendedVideos": [
|
|
||||||
# {
|
|
||||||
# "videoId": String,
|
|
||||||
# "title": String,
|
|
||||||
# "videoThumbnails": [
|
|
||||||
# {
|
|
||||||
# "quality": String,
|
|
||||||
# "url": String,
|
|
||||||
# "width": Int32,
|
|
||||||
# "height": Int32
|
|
||||||
# }
|
|
||||||
# ],
|
|
||||||
# "author": String,
|
|
||||||
# "authorUrl": String,
|
|
||||||
# "authorId": String?,
|
|
||||||
# "authorVerified": Boolean,
|
|
||||||
# "authorThumbnails": [
|
|
||||||
# {
|
|
||||||
# "url": string,
|
|
||||||
# "width": Int32,
|
|
||||||
# "height": Int32
|
|
||||||
# }
|
|
||||||
# ],
|
|
||||||
# "lengthSeconds": Int32,
|
|
||||||
# "viewCount":
|
|
||||||
# "viewCountText": String
|
|
||||||
# }
|
|
||||||
# ]
|
|
||||||
}
|
}
|
||||||
#'''
|
#'''
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user