diff options
author | James Taylor <user234683@users.noreply.github.com> | 2019-02-26 17:27:53 -0800 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2019-02-26 17:27:53 -0800 |
commit | 8ceaa34a53ebe4c1fb78342bbf70763641cbd186 (patch) | |
tree | 865a6d439d16bfbc43dd05e1b906647c4f5fa63a /youtube/watch.py | |
parent | 89daa27be257c6170e7d730529bee9ce1294f73d (diff) | |
download | yt-local-8ceaa34a53ebe4c1fb78342bbf70763641cbd186.tar.lz yt-local-8ceaa34a53ebe4c1fb78342bbf70763641cbd186.tar.xz yt-local-8ceaa34a53ebe4c1fb78342bbf70763641cbd186.zip |
html_common: remove x_item_html functions
Diffstat (limited to 'youtube/watch.py')
-rw-r--r-- | youtube/watch.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube/watch.py b/youtube/watch.py index e8c10a2..06b525a 100644 --- a/youtube/watch.py +++ b/youtube/watch.py @@ -127,9 +127,11 @@ def get_related_items_html(info): result = "" for item in info['related_vids']: if 'list' in item: # playlist: - result += html_common.small_playlist_item_html(watch_page_related_playlist_info(item)) + item = watch_page_related_playlist_info(item) + result += html_common.playlist_item_html(item, html_common.small_playlist_item_template) else: - result += html_common.small_video_item_html(watch_page_related_video_info(item)) + item = watch_page_related_video_info(item) + result += html_common.video_item_html(item, html_common.small_video_item_template) return result @@ -142,6 +144,7 @@ def watch_page_related_video_info(item): result['views'] = item['short_view_count_text'] except KeyError: result['views'] = '' + result['thumbnail'] = util.get_thumbnail_url(item['id']) return result def watch_page_related_playlist_info(item): @@ -150,6 +153,7 @@ def watch_page_related_playlist_info(item): 'title': item['playlist_title'], 'id': item['list'], 'first_video_id': item['video_id'], + 'thumbnail': util.get_thumbnail_url(item['video_id']), } |