mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Add support for favorite Studios (#4675)
* Backend changes * Add favorite icon to studio cards * Add favorite button to studio page * Add studio favorite filtering
This commit is contained in:
@@ -1610,6 +1610,11 @@ func createStudioFromModel(ctx context.Context, sqb *sqlite.StudioStore, studio
|
||||
return nil
|
||||
}
|
||||
|
||||
func getStudioBoolValue(index int) bool {
|
||||
index = index % 2
|
||||
return index == 1
|
||||
}
|
||||
|
||||
// createStudios creates n studios with plain Name and o studios with camel cased NaMe included
|
||||
func createStudios(ctx context.Context, n int, o int) error {
|
||||
sqb := db.Studio
|
||||
@@ -1630,6 +1635,7 @@ func createStudios(ctx context.Context, n int, o int) error {
|
||||
studio := models.Studio{
|
||||
Name: name,
|
||||
URL: getStudioStringValue(index, urlField),
|
||||
Favorite: getStudioBoolValue(index),
|
||||
IgnoreAutoTag: getIgnoreAutoTag(i),
|
||||
}
|
||||
// only add aliases for some scenes
|
||||
|
||||
Reference in New Issue
Block a user