Skip to content

Commit

Permalink
Fix incorrect logging resulting from 4702545
Browse files Browse the repository at this point in the history
  • Loading branch information
MoojMidge committed Sep 29, 2024
1 parent afbd303 commit 354a428
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,24 +83,26 @@ def add_url(self, url, context):
))
return

item = None

if 'video_ids' in new_params:
for video_id in new_params['video_ids'].split(','):
video_item = VideoItem(
item = VideoItem(
name='',
uri=context.create_uri(
(PATHS.PLAY,),
dict(new_params, video_id=video_id),
)
)
self._video_id_dict[video_id] = video_item
self._video_id_dict[video_id] = item

elif 'video_id' in new_params:
video_id = new_params['video_id']

video_item = VideoItem(
item = VideoItem(
'', context.create_uri((PATHS.PLAY,), new_params)
)
self._video_id_dict[video_id] = video_item
self._video_id_dict[video_id] = item

if 'playlist_id' in new_params:
playlist_id = new_params['playlist_id']
Expand All @@ -109,10 +111,10 @@ def add_url(self, url, context):
self._playlist_ids.append(playlist_id)
return

playlist_item = DirectoryItem(
item = DirectoryItem(
'', context.create_uri(('playlist', playlist_id,), new_params),
)
self._playlist_id_dict[playlist_id] = playlist_item
self._playlist_id_dict[playlist_id] = item

if 'channel_id' in new_params:
channel_id = new_params['channel_id']
Expand All @@ -122,14 +124,14 @@ def add_url(self, url, context):
self._channel_ids.append(channel_id)
return

channel_item = VideoItem(
item = VideoItem(
'', context.create_uri((PATHS.PLAY,), new_params)
) if live else DirectoryItem(
'', context.create_uri(('channel', channel_id,), new_params)
)
self._channel_id_dict[channel_id] = channel_item
self._channel_id_dict[channel_id] = item

else:
if not item:
context.log_debug('No items found in url "{0}"'.format(url))

def add_urls(self, urls, context):
Expand Down

0 comments on commit 354a428

Please sign in to comment.