fix: ensure clen is a string
fixes clipious playback
This commit is contained in:
@@ -279,6 +279,10 @@ def rebuildFormatsFromYtdlpApi(ydata: dict):
|
||||
newRow[ "clen"] = safeTraverse(params, ["clen"], default=safeTraverse(stream, ["filesize"], default="0"))
|
||||
newRow[ "lmt"] = safeTraverse(params, ["lmt"], default="0")
|
||||
|
||||
if newRow["clen"] is None:
|
||||
# for clipious sake which expects a string
|
||||
newRow["clen"] = "0"
|
||||
|
||||
newRow[ "projectionType"] = "RECTANGULAR" # clipious requires this to be mentioned explicitly and cannot be nulled
|
||||
newRow[ "container"] = safeTraverse(stream, ["ext"], default="unknown_container")
|
||||
newRow[ "encoding"] = safeTraverse(invidious_formats.FORMATS, [int("0" + newRow["itag"].split("-")[0]), "ext"], default="unknown_encoding") # not sure this split is necessary
|
||||
|
||||
Reference in New Issue
Block a user