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

Crowcamcleanup log messages could be timed better #87

Closed tfabris closed 5 months ago

tfabris commented 5 months ago

Crowcamcleanup runs every 30mins, but it doesn’t log what it’s doing except at certain times a day. This is to keep the log less chatty. For example it doesn’t log the number of videos processed, or when it’s uploading files, except at midnight and 7pm.

instead of certain times a day, what if it chose to log only after changes were made. Such as a when a video was deleted, or when a new video segment was started and was freshly added to the list.

tfabris commented 5 months ago

Hopefully I've fixed this with 6328acd - Watch the logs and see if it looks like what you wanted.

tfabris commented 5 months ago

Reopening this issue. The original set of changes in 6328acd mostly worked, but they would cause a log message to appear every single run of CrowCamCleanup during the daytime. This is caused because the caching system is designed so that in-progress live videos are always a cache miss (deliberately).

I have special-cased around that particular situation with checkin 7dd93ef, so it's less chatty now, but, that also might prevent the code from doing the thing I wanted it to do in the first place: write a Synology log the first time a new entry appears in the videodata file.

To do: Watch the logs after checkin 7dd93ef - it will probably just "not log anything" if a new video appears. If this is the case, then try to write a more intelligent system of when the logs appear, rather than basing it off the cache misses.

tfabris commented 5 months ago

Actually I think this one is good! Watching the logs after checking 7dd93ef, I see that it does notify the new user about playlist processing after the first instance of a new video, and then not repeatedly afterwards. So, closing this bug again.