From 8869225760bd431911ee8e58d0eb84af08f50644 Mon Sep 17 00:00:00 2001 From: TheErrorExe <161362055+TheErrorExe@users.noreply.github.com> Date: Thu, 26 Dec 2024 21:02:12 +0100 Subject: [PATCH] bug fix --- revivetube.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/revivetube.py b/revivetube.py index 0505e22..4ad9e74 100644 --- a/revivetube.py +++ b/revivetube.py @@ -816,13 +816,14 @@ def channel_m(): with yt_dlp.YoutubeDL(ydl_opts) as ydl: url = f"https://www.youtube.com/channel/{channel_id}/videos" info = ydl.extract_info(url, download=False) - + if 'entries' not in info: return "No videos found.", 404 results = [ { 'id': video['id'], + 'duration': 'Duration not available on Channel View', 'title': video['title'], 'uploader': info.get('uploader', 'Unknown'), 'thumbnail': f"http://yt.old.errexe.xyz/thumbnail/{video['id']}" @@ -836,4 +837,4 @@ def channel_m(): return f"An error occurred: {str(e)}", 500 if __name__ == "__main__": - app.run(host="0.0.0.0", debug=True, port=5000) \ No newline at end of file + app.run(host="0.0.0.0", debug=True, port=5000)