Update Scenes' 'Updated At' Date on Heatmap Gen & Expand Error Log #5401
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.
The "Updated At" field of a Scene will now update when an associated Heatmap is created via the Generate task..
I am not sure whether a Scene's 'Update At' would be better updated:
at the moment it is neither. perhaps it could be both? but it should at least be one.
see this long-standing issue #3738 about why this functionality is needed, which this PR will close.
If necessary I can work to move this functionality from the Generate to the Scan task. I attempted that at first, tracing where a Scene's 'Update At' property could be modified as a result of the scan.go message about 'Updating Metadata'. I thought that the best trigger for this may be when a Scene's 'Interactive' property is modified there, but I could not work it out.
I was very surprised by the simplicity of the solution in this PR but I am not a go developer so blind to any issues or offenses I could have included here. I am not sure if the error messaging in the code I added is necessary or not and I was told 'I settled on a simplified error messaging due to this function not being so critical', but I really have no idea what I'm doing.
Sorry to include a second thing, but I happened to notice that this file also included the same error message which has been frustrating me for a long time. In my logs after any Generate task I would keep seeing the following, filling up 40 or more lines of text:
"error generating heatmap: json: cannot unmarshal number into Go struct field Script.version of type string"
including the Scene Path in this error message has made it possible for me to identify those problem scripts lost in my library.