From aa5b9efca11f4fe52f176f378bd6ed96290ad9d0 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sat, 17 Aug 2019 12:54:03 -0700 Subject: Subscriptions: Don't show videos from muted channels --- youtube/subscriptions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube/subscriptions.py b/youtube/subscriptions.py index 26958d0..a4fef5a 100644 --- a/youtube/subscriptions.py +++ b/youtube/subscriptions.py @@ -144,13 +144,14 @@ def _get_videos(cursor, number_per_page, offset, tag = None): FROM videos INNER JOIN subscribed_channels on videos.sql_channel_id = subscribed_channels.id INNER JOIN tag_associations on videos.sql_channel_id = tag_associations.sql_channel_id - WHERE tag = ? + WHERE tag = ? AND muted = 0 ORDER BY time_published DESC LIMIT ? OFFSET ?''', (tag, number_per_page*9, offset)).fetchall() else: db_videos = cursor.execute('''SELECT video_id, title, duration, time_published, is_time_published_exact, channel_name FROM videos INNER JOIN subscribed_channels on videos.sql_channel_id = subscribed_channels.id + WHERE muted = 0 ORDER BY time_published DESC LIMIT ? OFFSET ?''', (number_per_page*9, offset)).fetchall() -- cgit v1.2.3