[Feature] Mass-create studios? (or built-in solution?)
Is your feature request related to a problem? Please describe. Wondering if it would be possible to create multiple studios at once with one name per line or something. Otherwise it would be nice if we could compile a list of known studios that stash would ship with, and upon scanning it would see if the studio-name is somewhere in the filename/directory name and if so add it to said studio.
Describe the solution you'd like Possibility to mass-create studios with one name/studio per line. Or ship Stash with a bunch of known studio-names that would allow stash to automatically add scenes to studios based on file/directory-names.
Describe alternatives you've considered Maintaining a bunch of manual lists seems a bit cumbersome, probably better to have at least a standard-list embedded - with the ability to mass-add more if you want to, manually.
My homemade solution to this was to run a powershell script that accepted the name of the studio (one per line as suggested above.) and a possible image
-
Make a name
-
Generate the checksum based on the name
-
I then created a custom JSON that kept the same format as if I was importing data into stash:
example:
{
"name": "18EIGHTEEN",
"checksum": "18EIGHTEEN"
}
-
I completed an "Export" of my current stash.
-
I then copied all of the studios i received from my powershell into the "mappings.json" file that was generated from my stash export....
into the section:
"studios": [null]
- re-imported the "mappings.json" file into stash
If this can be programmed with a default picture, i can see how this would be much easier :)
Otherwise it would be nice if we could compile a list of known studios that stash would ship with, and upon scanning it would see if the studio-name is somewhere in the filename/directory name and if so add it to said studio.
+1 for this idea.
- User initiates autotag or something.
- Stash displays a Blueprint overlay with all studios it found that do not exist in the database. Prompts the user for review of findings, and if they want to proceed adding the found studios to the database.
Example:
Autotag found 3 new studios that do not exist in your database
- [ ] Studio name 1
- [ ] Studio name 2
- [ ] Studio name 3
Check each applicable studio and click <apply> to complete Autotag new studio creation.
Updated OP for syntax highlighting and code blocks for readability.
I'd really like to be able to drag + drop an image or images into an area of the "new" studios page, and have Stash automatically create the Studio. Since I have hundreds of Studios already created for PG, each with a 16x9 image associated, I'd like it to mimic PG and be able to just dump my existing studios in. Same with Performer.
As a bump to this, aliases for studios could also work. If we could implement an abbrevation-list like this, it would save a lot of time/headaches; https://paste2.org/aGp2PnbD
A lot of the mass creation stuff is going to likely be done through the API a hand full of times by the initial content submitters so I doubt that this will be a priority but I'll put it on the wants list.
For anyone else looking for another option, I used this, feeding in studios.txt with one studio per line:
while read p; do echo "submitting $p" curl --header "Content-Type: application/json" \ --request POST \ --data '{"operationName":"StudioCreate","variables":{"name":"'"$p"'"},"query":"mutation StudioCreate($name: String!, $url: String, $image: String) {\n studioCreate(input: {name: $name, url: $url, image: $image}) {\n ...StudioData\n __typename\n }\n}\n\nfragment StudioData on Studio {\n id\n checksum\n name\n url\n image_path\n scene_count\n __typename\n}\n"}' \ http://localhost:9999/graphql sleep 5 echo "" done <studios.txt
Seemed to work okay:
submitting BangBrosClips {"data":{"studioCreate":{"id":"53","checksum":"02f42b3f05848a2c9fe6072c95ef3dfa","name":"BangBrosClips","url":null,"image_path":"http://localhost:9999/studio/53/image","scene_count":0,"__typename":"Studio"}}} submitting BangBrosRemastered {"data":{"studioCreate":{"id":"54","checksum":"98aefd6a5916f2e4c2ba3760a10ad8ba","name":"BangBrosRemastered","url":null,"image_path":"http://localhost:9999/studio/54/image","scene_count":0,"__typename":"Studio"}}}
I also used this:
ls | grep -Eo '^(\w+)\.' | awk '!x[$0]++' | rev | cut -c 2- | rev >studios.txt to make studios.txt
Can probably be closed since Studio tagger was merged in #3510