fix: make clipious and freetube work by adding some made-up metadata

for the most part ok, but there are some (music) videos which won't work
This commit is contained in:
2025-06-28 05:56:05 +02:00
parent 4e066e4b23
commit 6cdae051b5
2 changed files with 17 additions and 7 deletions

View File

@@ -31,7 +31,7 @@ def api_global_catchall(received_request):
except Exception as e:
ythdd_globals.apiFailedRequests += 1
stripped_filename = __file__[max(__file__.rfind("/"), __file__.rfind("\\")) + 1:]
print(f"\n{c.FAIL}Error! /api/{received_request} -> {stripped_filename}:L{e.__traceback__.tb_lineno} -> {type(e).__name__}{c.ENDC}:"
print(f"\n{c.FAIL}Error! /api/{received_request} -> {stripped_filename}:L{e.__traceback__.tb_lineno} -> {type(e).__name__}{c.ENDC}:\n"
+ f"{traceback.format_exc()}")
status, received, data = 500, f"internal server error: call ended in failure: {e}", []
if ythdd_globals.config["general"]["debug"]:
@@ -56,7 +56,7 @@ def api_global_catchall(received_request):
except Exception as e:
ythdd_globals.apiFailedRequests += 1
stripped_filename = __file__[max(__file__.rfind("/"), __file__.rfind("\\")) + 1:]
print(f"\n{c.FAIL}Error! /api/{received_request} -> {stripped_filename}:L{e.__traceback__.tb_lineno} -> {type(e).__name__}{c.ENDC}:"
print(f"\n{c.FAIL}Error! /api/{received_request} -> {stripped_filename}:L{e.__traceback__.tb_lineno} -> {type(e).__name__}{c.ENDC}:\n"
+ f"{traceback.format_exc()}")
status, received, data = 500, f"internal server error: invidious translation call ended in failure: {e}", []
if ythdd_globals.config["general"]["debug"]: