diff options
author | Jesus E <heckyel@riseup.net> | 2023-05-28 21:10:39 -0400 |
---|---|---|
committer | Jesus E <heckyel@riseup.net> | 2023-05-28 21:10:39 -0400 |
commit | 14c8cf3f5b34a40fe019eb7c0b4a9dc47527d387 (patch) | |
tree | c25ad3f2be40f2af924c8152be6c626d61cae285 | |
parent | 3025158d145babbfa2e3737eede1991e6251f4d3 (diff) | |
download | yt-local-14c8cf3f5b34a40fe019eb7c0b4a9dc47527d387.tar.lz yt-local-14c8cf3f5b34a40fe019eb7c0b4a9dc47527d387.tar.xz yt-local-14c8cf3f5b34a40fe019eb7c0b4a9dc47527d387.zip |
Fix error with non-channel-id urls
Only update channel id based on the url if we have it
-rw-r--r-- | youtube/channel.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube/channel.py b/youtube/channel.py index 0dcf695..799c001 100644 --- a/youtube/channel.py +++ b/youtube/channel.py @@ -356,8 +356,10 @@ def get_channel_page_general_url(base_url, tab, request, channel_id=None): info['header_playlist_names'] = local_playlist.get_playlist_names() if tab in ('videos', 'playlists'): info['current_sort'] = sort - info['channel_url'] = 'https://www.youtube.com/channel/' + channel_id - info['channel_id'] = channel_id + if channel_id: + info['channel_url'] = ('https://www.youtube.com/channel/' + + channel_id) + info['channel_id'] = channel_id elif tab == 'search': info['search_box_value'] = query info['header_playlist_names'] = local_playlist.get_playlist_names() |