diff options
author | Astound <kirito@disroot.org> | 2024-01-22 05:55:59 +0800 |
---|---|---|
committer | Astound <kirito@disroot.org> | 2024-01-22 05:55:59 +0800 |
commit | ca4a7356924450f21228e823b4bcc1416aea05d3 (patch) | |
tree | 4078c2b3b0b3aab29bd2f7fca58e8ce74f65e48a /youtube/subscriptions.py | |
parent | 2140f489192f98284811e7cbaba8b6fa0e552bf7 (diff) | |
download | yt-local-ca4a7356924450f21228e823b4bcc1416aea05d3.tar.lz yt-local-ca4a7356924450f21228e823b4bcc1416aea05d3.tar.xz yt-local-ca4a7356924450f21228e823b4bcc1416aea05d3.zip |
Add settings for filtering out shorts in subscriptions and channels
Diffstat (limited to 'youtube/subscriptions.py')
-rw-r--r-- | youtube/subscriptions.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube/subscriptions.py b/youtube/subscriptions.py index ea544a3..e37ac28 100644 --- a/youtube/subscriptions.py +++ b/youtube/subscriptions.py @@ -464,8 +464,12 @@ def _get_atoma_feed(channel_id): def _get_channel_videos_first_page(channel_id, channel_status_name): try: # First try the playlist method - pl_json = playlist.get_videos('UU' + channel_id[2:], 1, - include_shorts=False, report_text=None) + pl_json = playlist.get_videos( + 'UU' + channel_id[2:], + 1, + include_shorts=settings.include_shorts_in_subscriptions, + report_text=None + ) pl_info = yt_data_extract.extract_playlist_info(pl_json) if pl_info.get('items'): pl_info['items'] = pl_info['items'][0:30] |