Skip to content

Bug: Upload date parsing in channel poller skips same-day auto-downloads #23

@windoze95

Description

@windoze95

Problem

In app/services/channel_poller.py (around line 55), the channel poller parses the upload_date from yt-dlp, which only contains the date part (e.g. 20260306). This is parsed into a datetime object set at exactly 00:00:00 UTC for that day.

Later, in _determine_auto_downloads (around line 185), it checks if a video should be auto-downloaded for FUTURE_ONLY tracking mode:

if video.uploaded_at > sub.subscribed_at:
    auto_download_set.add(video_id)

If a user subscribes at 15:00 UTC on March 6th (sub.subscribed_at), and a video is uploaded later that same day on YouTube, yt-dlp still returns 20260306. The parsed video.uploaded_at is 00:00:00 UTC, which is less than 15:00 UTC. The condition is false and the new video is skipped.

Suggested Fix

Use >= date logic when comparing uploaded_at and subscribed_at. Convert the subscription time to a date (midnight) and use >= so that any video uploaded on the same day as subscription (or later) gets downloaded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions