LiveStreamDVR icon indicating copy to clipboard operation
LiveStreamDVR copied to clipboard

Auto cleanup always keeps deleted VODs

Open condor125 opened this issue 2 years ago • 8 comments

The auto cleanup always keeps deleted VODs, even when "Keep Twitch deleted VODs" is disabled in config. Manual cleanup works as expected.

condor125 avatar Jul 19 '22 21:07 condor125

i've seen some weird behavior, not sure how to pinpoint it though.

the log message "Cleanup old VODs for ${data_username}" shows up when it happens, does the candidate filter show anything odd?

MrBrax avatar Jul 21 '22 09:07 MrBrax

I have a similar issue where no files are deleted.

I get this message in the logs:

Keeping [filename] due to it not being over storage limit (0.00 B/30.00 GB) and not being over vod limit (0/1)

But there are already 2 recordings of the same streamer with combined more than 30GB. I get this message also for other streamers.

MSDev201 avatar Jul 31 '22 13:07 MSDev201

Ah okey, I see that it is ignoring the latest recording and therefore its within the limit. So there is currently no possibility to just keep one recording and replace it every time a new recording has finished?

MSDev201 avatar Jul 31 '22 13:07 MSDev201

It works when setting the max vod count to 0. But this only works on the global setting because setting 0 on the channel vod setting makes it use the global setting.

MSDev201 avatar Aug 01 '22 15:08 MSDev201

i've rewritten it twice but still can't really understand how to handle all the cases

MrBrax avatar Aug 01 '22 20:08 MrBrax

This works for me perfectly fine. I download all files from my public server, where I have limited storage, to my private home server where I can serve them over Jellyfin. So having set the limit of 0 globaly works for me without problems.

I think that it could work better if the total count of vods checked starts with 1, because the latest recorded vod is ignored after recording has finished. https://github.com/MrBrax/LiveStreamDVR/blob/b67889bae08937c058737b2acdcad30840d0ad07/server/src/Core/TwitchChannel.ts#L467

The total size would have to be increased by the size of the same last recorded vod. But I dont know where to get the value from ^^

But maybe I am overlooking something here.

MSDev201 avatar Aug 02 '22 21:08 MSDev201

i'm trying to write some tests and yeah i don't understand how this would work at all still, i'm so bad with math

MrBrax avatar Aug 03 '22 21:08 MrBrax

ok so with a ton of tests i think it's a lot better now, but i'm still scared of vods randomly being deleted

legacy mode that only deletes one vod is still kinda broken though, but i doubt anyone but me uses it

MrBrax avatar Aug 03 '22 21:08 MrBrax