Skip to content

Commit dca389e

Browse files
committed
Remove redundant variables
1 parent 52de5ec commit dca389e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/srgssr.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -546,14 +546,13 @@ def build_episode_menu(self, video_id_or_urn, include_segments=True,
546546
(default: False)
547547
"""
548548
self.log(f'build_episode_menu, video_id_or_urn = {video_id_or_urn}')
549-
content_type = 'video'
550549
if ':' in video_id_or_urn:
551550
json_url = 'https://il.srgssr.ch/integrationlayer/2.0/' \
552551
f'mediaComposition/byUrn/{video_id_or_urn}.json'
553552
video_id = video_id_or_urn.split(':')[-1]
554553
else:
555554
json_url = f'https://il.srgssr.ch/integrationlayer/2.0/{self.bu}' \
556-
f'/mediaComposition/{content_type}/{video_id_or_urn}' \
555+
f'/mediaComposition/video/{video_id_or_urn}' \
557556
'.json'
558557
video_id = video_id_or_urn
559558
self.log(f'build_episode_menu. Open URL {json_url}')
@@ -582,11 +581,9 @@ def build_episode_menu(self, video_id_or_urn, include_segments=True,
582581
json_chapter_list = utils.try_get(
583582
json_response, 'chapterList', data_type=list, default=[])
584583
json_chapter = None
585-
chapter_index = -1
586584
for (ind, chapter) in enumerate(json_chapter_list):
587585
if utils.try_get(chapter, 'id') == chapter_id:
588586
json_chapter = chapter
589-
chapter_index = ind
590587
break
591588
if not json_chapter:
592589
self.log(f'build_episode_menu: No chapter ID found \

0 commit comments

Comments
 (0)