aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/comments.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2018-12-17 02:24:55 -0800
committerJames Taylor <user234683@users.noreply.github.com>2018-12-17 02:24:55 -0800
commit75b0c52f5743f837f7dc676fb780882388820e4d (patch)
treef2047e26ed8fd69e3830405e9fa8f1c2a0090377 /youtube/comments.py
parent4825337f3b4ba7064e83f75c12abf44ff30ab6d7 (diff)
downloadyt-local-75b0c52f5743f837f7dc676fb780882388820e4d.tar.lz
yt-local-75b0c52f5743f837f7dc676fb780882388820e4d.tar.xz
yt-local-75b0c52f5743f837f7dc676fb780882388820e4d.zip
Ability to sort channel videos by oldest and by views
Diffstat (limited to 'youtube/comments.py')
-rw-r--r--youtube/comments.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube/comments.py b/youtube/comments.py
index fe89ac9..abc0a79 100644
--- a/youtube/comments.py
+++ b/youtube/comments.py
@@ -272,11 +272,11 @@ def get_comments_html(comments):
def video_comments(video_id, sort=0, offset=0, lc='', secret_key=''):
if settings.enable_comments:
post_comment_url = common.URL_ORIGIN + "/post_comment?video_id=" + video_id
- post_comment_link = '''<a class="post-comment-link" href="''' + post_comment_url + '''">Post comment</a>'''
+ post_comment_link = '''<a class="sort-button" href="''' + post_comment_url + '''">Post comment</a>'''
other_sort_url = common.URL_ORIGIN + '/comments?ctoken=' + make_comment_ctoken(video_id, sort=1 - sort, lc=lc)
other_sort_name = 'newest' if sort == 0 else 'top'
- other_sort_link = '''<a href="''' + other_sort_url + '''">Sort by ''' + other_sort_name + '''</a>'''
+ other_sort_link = '''<a class="sort-button" href="''' + other_sort_url + '''">Sort by ''' + other_sort_name + '''</a>'''
comment_links = '''<div class="comment-links">\n'''
comment_links += other_sort_link + '\n' + post_comment_link + '\n'
@@ -355,7 +355,7 @@ def get_comments_page(query_string):
other_sort_url = common.URL_ORIGIN + '/comments?ctoken=' + make_comment_ctoken(metadata['video_id'], sort=1 - metadata['sort'])
other_sort_name = 'newest' if metadata['sort'] == 0 else 'top'
- other_sort_link = '''<a href="''' + other_sort_url + '''">Sort by ''' + other_sort_name + '''</a>'''
+ other_sort_link = '''<a class="sort-button" href="''' + other_sort_url + '''">Sort by ''' + other_sort_name + '''</a>'''
comment_links = '''<div class="comment-links">\n'''