Update Scenes' 'Updated At' Date on Heatmap Gen & Expand Error Log#5401
Merged
WithoutPants merged 2 commits intostashapp:developfrom Oct 29, 2024
Merged
Update Scenes' 'Updated At' Date on Heatmap Gen & Expand Error Log#5401WithoutPants merged 2 commits intostashapp:developfrom
WithoutPants merged 2 commits intostashapp:developfrom
Conversation
The UpdatedAt field of a scene is now correctly updated after Generate Task is run and a heatmap linked to a scene.. I thought it made more sense here in the generate heatmap compared to scan.go, owing to funscript data not being tracked/stored in a typical sense with the scan message "updating metadata". I used a simplified error messaging as I did not think it was critcal but I do not know if did not use the correct code structure If updating the UpdatedAt field should be done there when the file is marked as interactive I can try and do that? This would fix this long-standing issue stashapp#3738 The error message change is useful as I could not tell which scripts were causing errors before but now it is clear in the logs
Collaborator
|
#3738 concerns updating the |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.