Subscriptions: Don't show videos from muted channels

This commit is contained in:
James Taylor 2019-08-17 12:54:03 -07:00
parent 897755e836
commit aa5b9efca1

View File

@ -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()