Skip to content

fix: handle age_limit=None in subscribe call (#140)#141

Open
hyldmh wants to merge 1 commit into
woefe:masterfrom
hyldmh:fix/140-age-limit-none-1779106970
Open

fix: handle age_limit=None in subscribe call (#140)#141
hyldmh wants to merge 1 commit into
woefe:masterfrom
hyldmh:fix/140-age-limit-none-1779106970

Conversation

@hyldmh

@hyldmh hyldmh commented May 18, 2026

Copy link
Copy Markdown

Description

Fix TypeError when age_limit is None in video metadata during subscribe.

Root Cause

ytcc subscribe crashes when YouTube/MakerTube returns age_limit: null in video JSON metadata. The line processed.get("age_limit", 0) returns None (not the default 0) when the key exists but is null, then None > config.ytcc.age_limit raises TypeError.

Fix

Changed processed.get("age_limit", 0) to (processed.get("age_limit") or 0) which converts None to 0 before comparison.

Fixes #140

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Subscribe crashes when 'age_limit' is None (TypeError)

1 participant