From 491f81dd2a94d2bf623c28a461535c3e867e5ac5 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Fri, 7 Jul 2023 20:29:53 +0200 Subject: [PATCH] cast to str --- backend/stream.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/backend/stream.py b/backend/stream.py index 07b3a1f..0ebb791 100755 --- a/backend/stream.py +++ b/backend/stream.py @@ -140,8 +140,8 @@ class MainHandler(tornado.web.RequestHandler): video_info = VideoInfo() video_info.ctype = provider_data.ctype() if handler.direct: - video_info.upstream = provider_data.upstream() - video_info.poster = provider_data.thumbnail() + video_info.upstream = str(provider_data.upstream()) + video_info.poster = str(provider_data.thumbnail()) else: proxied = await handler.proxy.proxy_url( [ @@ -169,6 +169,14 @@ class MainHandler(tornado.web.RequestHandler): video_info.poster = proxied[2] return ( + if video_info.upstream: + video_info.upstream = str(video_info.upstream) + if video_info.download: + video_info.download = str(video_info.download) + if video_info.poster: + video_info.poster = str(video_info.poster) + if video_info.ctype: + video_info.ctype = str(video_info.ctype) dataclasses.asdict(video_info), provider_data.meta(), provider_data.title(),