mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Add tag stash ids filter criterion (#6403)
* Add stash id filter to tag filter * Add tag stash id criterion in UI
This commit is contained in:
@@ -1688,6 +1688,13 @@ func getTagChildCount(id int) int {
|
||||
return 0
|
||||
}
|
||||
|
||||
func tagStashID(i int) models.StashID {
|
||||
return models.StashID{
|
||||
StashID: getTagStringValue(i, "stashid"),
|
||||
Endpoint: getTagStringValue(i, "endpoint"),
|
||||
}
|
||||
}
|
||||
|
||||
// createTags creates n tags with plain Name and o tags with camel cased NaMe included
|
||||
func createTags(ctx context.Context, tqb models.TagReaderWriter, n int, o int) error {
|
||||
const namePlain = "Name"
|
||||
@@ -1709,6 +1716,12 @@ func createTags(ctx context.Context, tqb models.TagReaderWriter, n int, o int) e
|
||||
IgnoreAutoTag: getIgnoreAutoTag(i),
|
||||
}
|
||||
|
||||
if (index+1)%5 != 0 {
|
||||
tag.StashIDs = models.NewRelatedStashIDs([]models.StashID{
|
||||
tagStashID(i),
|
||||
})
|
||||
}
|
||||
|
||||
err := tqb.Create(ctx, &tag)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user