aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/subscriptions.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2019-06-10 15:36:53 -0700
committerJames Taylor <user234683@users.noreply.github.com>2019-06-10 15:36:53 -0700
commite7989db931132f71c54b8924e5194410cc7f9bbc (patch)
tree2a158d72e37fa54227de85565a721de3968a9a55 /youtube/subscriptions.py
parent8539b48c7b858b826a660bd606149f8b84e72a84 (diff)
downloadyt-local-e7989db931132f71c54b8924e5194410cc7f9bbc.tar.lz
yt-local-e7989db931132f71c54b8924e5194410cc7f9bbc.tar.xz
yt-local-e7989db931132f71c54b8924e5194410cc7f9bbc.zip
Order channel names in a case-insensitive manner
Diffstat (limited to 'youtube/subscriptions.py')
-rw-r--r--youtube/subscriptions.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube/subscriptions.py b/youtube/subscriptions.py
index 45a34b5..b6a4e0e 100644
--- a/youtube/subscriptions.py
+++ b/youtube/subscriptions.py
@@ -101,7 +101,7 @@ def _get_videos(cursor, number, offset):
def _get_subscribed_channels(cursor):
for item in cursor.execute('''SELECT channel_name, yt_channel_id
FROM subscribed_channels
- ORDER BY channel_name'''):
+ ORDER BY channel_name COLLATE NOCASE'''):
yield item
@@ -151,7 +151,7 @@ def _channels_with_tag(cursor, tag, order=False):
)
'''
if order:
- statement += '''ORDER BY channel_name'''
+ statement += '''ORDER BY channel_name COLLATE NOCASE'''
return cursor.execute(statement, [tag]).fetchall()
@@ -398,7 +398,7 @@ def get_subscription_manager_page(env, start_response):
WHERE id NOT IN (
SELECT sql_channel_id FROM tag_associations
)
- ORDER BY channel_name''').fetchall()
+ ORDER BY channel_name COLLATE NOCASE''').fetchall()
if channel_list:
sub_list_html = ''
for channel_id, channel_name in channel_list: