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(),