From ca4a7356924450f21228e823b4bcc1416aea05d3 Mon Sep 17 00:00:00 2001 From: Astound Date: Mon, 22 Jan 2024 05:55:59 +0800 Subject: Add settings for filtering out shorts in subscriptions and channels --- youtube/channel.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'youtube/channel.py') diff --git a/youtube/channel.py b/youtube/channel.py index aaf4f79..75b0a15 100644 --- a/youtube/channel.py +++ b/youtube/channel.py @@ -2,6 +2,7 @@ import base64 from youtube import (util, yt_data_extract, local_playlist, subscriptions, playlist) from youtube import yt_app +import settings import urllib import json @@ -382,7 +383,8 @@ def get_channel_page_general_url(base_url, tab, request, channel_id=None): # sort 2: oldest # sort 3: newest # sort 4: newest - no shorts (Just a kludge on our end, not internal to yt) - sort = request.args.get('sort', '3') + default_sort = '3' if settings.include_shorts_in_channel else '4' + sort = request.args.get('sort', default_sort) view = request.args.get('view', '1') query = request.args.get('query', '') ctoken = request.args.get('ctoken', '') -- cgit v1.2.3