Repository navigation
fix-low: name each pre-1.37 mode as ZoneMinder does - #61
Merged
Merged
Conversation
Monitor.function called Modect (capturing Always, analysing Always, recording OnMotion) "Mocord", Nodect (Always/None/OnMotion) "Record", and Always/Always/None "Modect". ZoneMinder's own mapping (zm_update-1.37.12.sql, and function_fields here) has Modect = Always/Always/OnMotion and Mocord = Always/Always/Always, so a monitor set to Modect with function_fields read back as Mocord, and a 1.36 monitor whose Function is Modect did too. The six combinations function_fields returns now get their own names; any other combination keeps the nearest name, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 of 23 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Impact: low (
Monitor.functionnames Modect monitors "Mocord", Nodect "Record"; shown by zm-homeassistant's Mode sensor)TL;DR
Monitor.functioncalls Always/Always/OnMotion "Mocord" and Always/None/OnMotion "Record")_derive_functionlooks the fields up in the inverse offunction_fields' table first, so the six pre-1.37 modes get ZoneMinder's names; other combinations keep the nearest name. Tests and changelog line; 3 files, +37 −3Monitor.functionchanges for Modect and Nodect monitors only; nothing in the library reads itFixes #60
🤖 Generated with Claude Code