tfabris / CrowCam

A set of Bash scripts to control and maintain a YouTube live cam from a Synology NAS.
GNU General Public License v3.0
3 stars 3 forks source link

Orphaned "upcoming" video causes infinite repeat messages in the log #94

Closed tfabris closed 2 months ago

tfabris commented 2 months ago

Secondary bug caused after issue #93 occurred. When an "upcoming" video is orphaned, the CrowCamCleanup process repeatedly thinks it is a cache miss and needs to be dealt with. The log repeats these entries forever, for every run of the cleanup process:

2024-06-27 15:00:23  CrowCam Cleanup - Did not find a recordingDate from video lsx7QDXooWU - video may be an upcoming scheduled video.
2024-06-27 15:00:23  CrowCam Cleanup - Cache miss, new video lsx7QDXooWU titled CrowCam.
2024-06-27 15:03:46  CrowCam Cleanup - Processed: 323 items.
2024-06-27 15:30:24  CrowCam Cleanup - Did not find a recordingDate from video lsx7QDXooWU - video may be an upcoming scheduled video.
2024-06-27 15:30:24  CrowCam Cleanup - Cache miss, new video lsx7QDXooWU titled CrowCam.
2024-06-27 15:33:50  CrowCam Cleanup - Processed: 323 items.
2024-06-27 16:00:24  CrowCam Cleanup - Did not find a recordingDate from video lsx7QDXooWU - video may be an upcoming scheduled video.
2024-06-27 16:00:24  CrowCam Cleanup - Cache miss, new video lsx7QDXooWU titled CrowCam.
2024-06-27 16:03:48  CrowCam Cleanup - Processed: 323 items.

To do: Figure out how the cleanup process can tell the difference between a true new/working video and an orphaned "upcoming" video. Perhaps it already knows (the lack of a RecordingDate seems to be the trigger) and all we need to do is suppress the logging if that's the only new cache miss for that run.

In particular, I don't want to skip the step where it continues to save the entry to the playlist and the videodata file. It is useful to me to see the orphaned video in the videodata file so that I know it's there when I look at my web page. Really, the main problem here is just how it clogs up the log entries.

tfabris commented 2 months ago

Should be fixed with checkin 02cf0ab. Only the logging has changed, the actual handling of the videos remains the same. This is by design: I still want to see these orphaned "upcoming" videos appear in the playlist and on the web site, so that I can address and fix whatever issues caused it (for example, addressing bug #93, or perhaps just hand-deleting the orphaned video when needed). But I don't need the log to infinitely repeat the chattiness about the orphaned video being a cache miss every time.