-
-
Notifications
You must be signed in to change notification settings - Fork 801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Checking For Updates to Scene StashID Matches #2903
Comments
I'm wondering why we wouldn't do date checking on the stashapp side of things? In that situation we would just need get the |
An additional solution could even be something like an RSS feed from stashbox, providing a list of StashIDs that have been recently changed? Stashapp could query this automatically every once in a while, compare the results to its own StashIDs, then it knows what scenes should be queued for an update. (On an unrelated tangent, even a similar thing with oshash would seem smart? I don't know much about how stashdb's backend is working, but it'd feel like RSS-esque requests would be the most sustainable longterm solution anyways? It feels "wrong" to send hundreds of thousands of graphql requests to stashbox when it's unlikely the majority are going to give any positive responses...) |
I think this can be broken up into smaller component parts: The following would be an initial mvp:
The other parts are more of an optimisation of this process. |
Problem
Once a scene has been matched, a user typically wouldn't be able to receive any updates if details have been updated (maybe males were added or titles were fixed), or if the scene was deleted as a duplicate. There is an update function for performers currently but I think it could be improved as well along with adding the scene behaviour, though this issue will focus on the scene side of things as the performer behaviour is likely similar if not the same and could later be extended.
I believe the solution for this lives on both Stash and Stash-Box sides.
Stash Backend Side
Currently a
StashID
in Stash is made up of anendpoint
and astash_id
. I believe another attribute should be added to it, to store the lastedupdated_at
time of the external resource. Not hard set on the name but this field could be something likeexternal_updated_at
.Stash-Box Backend Side
For the sake of making the process optimal Stash-Box should have a new query
findUpdatedScenes
that takes an array ofSceneUpdateInput
structured something like:This call can return a
updated
Boolean, deleted Boolean, andScene
object for each input.last_recorded_update
is NOT older than theupdated_at
on thescene_id
, it will returnupdated: false
,deleted: false
, and no scene objectlast_recorded_update
is older than theupdated_at
on thescene_id
but the scene has been deleted,updated: true
,deleted: true
, and no scene objectlast_recorded_update
is older than theupdated_at
on thescene_id
and the scene is not deleted,updated: true
,deleted: false
, and the updated Scene objectStash Frontend Side
The scene tagger view will get a new
Batch Check for Updates
button. This will collect all the scenes the user wants to check (whether this is all scenes or just a sub-set) and call back toStash-Box
withfindUpdatedScenes
.No new updates
Scene has been deleted
with an external link to the ID so the user can investigateButtons could also be added to
Show only updated
andShow only deleted
for quick filtering of the list.The text was updated successfully, but these errors were encountered: