tubearchivist / tubearchivist

Your self hosted YouTube media server

Home Page:https://www.tubearchivist.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Channel-specific auto-delete setting not used if greater than global setting

jonvmey opened this issue · comments

I've read the documentation

Operating System

Debian 11

Your Bug Report

Describe the bug

Channel-specific overrides for auto-deleting watched videos don't get applied properly if the global auto-delete time is shorter than the channel-specific time.

Steps To Reproduce

Set the global auto-delete watched videos time to X days, then set a channel-specific auto-delete override to Y day, with X < Y. Mark some videos on that channel as watched. Those videos will be deleted after X days.

Expected behavior

Videos for channels with an override set should be ignored by the global auto-delete settings and only be deleted after the channel-specific number of days.

Relevant log output

N/A

Anything else?

Looking at the auto-delete code this is occurring because auto_delete_all doesn't do any filtering for channel-specific settings when querying which videos to delete. The reverse scenario of global auto-delete being longer works fine because the channel-specific delete will still occur at the expected time.

On a related note it doesn't appear to be possible to have global auto-delete enabled and then disable auto-delete for specific channels. Setting the channel-specific value to 0 just disables the channel-specific setting making it fall back to the global setting. I know the same effect could be achieved by disabling global auto-delete and just setting it on every channel I want auto-delete on. In my setup I want auto-delete on almost every channel so manually setting this gets rather tedious. If possible this would be nice to have, I can open a separate feature request for this though if you'd like. It's somewhat similar to #486 but at a channel level I suppose.

I see how this could happen. Looks like you have a good grasp on things. Please look into it.