Skip to content

Commit

Permalink
异常修复 可能会引入新的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xhlove committed Jan 20, 2022
1 parent ef98395 commit 6885230
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions XstreamDL_CLI/extractors/dash/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,14 @@ def walk_representation(self, adaptationset: AdaptationSet, period: Period, sind
Roles = adaptationset.find('Role') # type: List[Role]
BaseURLs = representation.find('BaseURL') # type: List[BaseURL]
if len(BaseURLs) == 1:
if len(Roles) == 1 and Roles[0].value == 'subtitle':
if len(Roles) == 1 and Roles[0].value in ['subtitle', 'caption']:
stream.set_subtitle_url(BaseURLs[0].innertext)
streams.append(stream)
continue
if len(segmenttemplates) == 0 and len(representation.find('SegmentTimeline')) == 0:
stream.base2url(period.duration)
streams.append(stream)
continue
# if len(segmenttemplates) == 0 and len(representation.find('SegmentTimeline')) == 0:
# stream.base2url(period.duration)
# streams.append(stream)
# continue
segmentlists = representation.find('SegmentList') # type: List[SegmentList]
r_segmenttemplates = representation.find('SegmentTemplate') # type: List[SegmentTemplate]
# 针对视频音频流处理 分情况生成链接
Expand Down

0 comments on commit 6885230

Please sign in to comment.