Feature: Tag StashID support#6255
Conversation
|
Will test it later, havent had a chance to look at the code yet. Would it be possible to update them via GQL? I have a plugin that does auto-search and match either via my tag DB or by searching StashDB. Wouldn't recommend it for prod but would be great as a plugin |
So, currently you can already do this with this: New Tag: Update Existing: |
|
Not user friendly as is. Also, since the StashID can only be applied via scene tagger (via UI), there is effectively not way have multiple StashIDs linked to the same tag. Be it from the same stash-box instance or multiple ones. I think at least manual input field is needed. Though a proper search interface be it tagger or something else would be ideal. |
I agree with you overall. Currently I kept it the same implementation as the rest of the StashID infrastructure. This could be step 1 of a larger project of eventually adding in a tagger for Tags. I could modify it to allow users to add in StashID's in the tag edit modal as a stopgap till that eventuality. I think it would need to be a conversation with WP for the larger scope of the project. Edit: Since you can apply it via GraphQL you could also apply them via plugin |
WithoutPants
left a comment
There was a problem hiding this comment.
Static code review only. Not yet tested.
Needs the following missing bits:
- cover tag stash id table in
anonymise.go - add
StashIDstojsonschema.Tagand import/export functionality - add unit test coverage for the new fields, see the performer tests for reference
Agree with Gykes here - let's push manually linking into a separate PR targeting 0.30 release. I'd like to get something in for manually linking stash-ids to all supporting objects (performers, studios, scenes, etc). |
Fixed, took me a minute to figure out the unit testing but I think it's good? |
Once you are content with the major implementation I can go ahead and do the UI ability to manually add StashIDs. |
remove wrapper update updateAt Update tag.go please.... Fix builds
e1410ce to
a405455
Compare
There was a problem hiding this comment.
I'm happy with this implementation.
Tests ran:
- creating tags from the tagger interface correctly sets the stash id
- tags matched in the tagger by name do not set stash id when saving, as expected
- creating a tag from the scrape scene dialog does not set the stash id, more on this below
- exporting includes stash id in json data
- importing correctly sets stash id from json data
- anonymise correctly removed stash ids from anonymised database
- submitted draft to stash-box after renaming a tag with a stash id, to ensure it didn't match on name
I'd like to add the following work into 0.30 scope as a result of this addition:
as a first step, add stash-ids to created performers/studios/tags when creating inside the scrape dialog, to be more consistent with the tagger (ref: #4239)done: #6269- improve the create tag operation inside the tagger. This should probably be discussed in a separate issue, but clicking the plus button on a new tag should optionally allow the tag to be matched to an existing tag - something similar to what we do for performers
- add the ability to add stash ids to scenes/performers/studios/tags - again this should probably be discussed in a separate issue. I figure an add button dropdown to select the stash-box instance, then opens a dialog to search for the object via name or stash id
merged in core stashapp/stash#6255
This adds the ability to add and store the associated StashIds with tags.
Currently StashIDs are added automatically when you add a tag via tagger or via plugin and GraphQL.
The only way to add StashId's to currently existing tags is to:
My testing:
Scrape a scene via tagger against StashDB. Add tags in the Tagger. Profit
If there is a better way to handle this other than building a dedicated tag tagger similar to studio tagger then let me know.
Fixes: #2643

UI: