Skip to content

Commit

Permalink
fix for class attributes reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsmh authored Jan 8, 2025
1 parent ebb0e9d commit c9af2ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion biliparser/strategy/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ async def __get_video_result(self, detail, qn: int):
self.mediaurls = url
self.mediatype = "video"
self.mediaraws = False
await self.__get_dash_video()
return True

async def __get_dash_video(self):
Expand All @@ -159,7 +158,9 @@ async def __get_dash_video(self):
video_streams.sort(key=lambda x: x.video_quality.value, reverse=True)
audio_streams.sort(key=lambda x: x.audio_quality.value, reverse=True)
audio_size = await self.__test_url_status_code(audio_streams[0].url, self.url)
self.dashtype = ""
self.dashurls.append(audio_streams[0].url)
self.dashurls = [audio_streams[0].url]
for video_stream in video_streams:
result = await self.__test_url_status_code(video_stream.url, self.url)
self.dashsize = audio_size + result
Expand Down Expand Up @@ -353,4 +354,5 @@ async def handle(self):
for qn in QN:
if await self.__get_video_result(detail, qn):
break
await self.__get_dash_video()
return self

0 comments on commit c9af2ee

Please sign in to comment.