Skip to content
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

[Feature] Mass-create studios? (or built-in solution?) #278

Closed
tritnaha opened this issue Dec 19, 2019 · 8 comments
Closed

[Feature] Mass-create studios? (or built-in solution?) #278

tritnaha opened this issue Dec 19, 2019 · 8 comments
Labels
feature Pull requests that add a new feature help wanted Extra attention is needed

Comments

@tritnaha
Copy link

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.

@Leopere Leopere added feature Pull requests that add a new feature question help wanted Extra attention is needed labels Dec 20, 2019
@Ch00nassid
Copy link

Ch00nassid commented Dec 20, 2019

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

  1. Make a name

  2. Generate the checksum based on the name

  3. I then created a custom JSON that kept the same format as if I was importing data into stash:

example:

{
        "name":  "18EIGHTEEN",
        "checksum":  "18EIGHTEEN"
 }
  1. I completed an "Export" of my current stash.

  2. 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]
  1. 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 :)

@echo6ix
Copy link
Contributor

echo6ix commented Dec 21, 2019

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.

  1. User initiates autotag or something.
  2. 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.

@Leopere
Copy link
Collaborator

Leopere commented Dec 21, 2019

Updated OP for syntax highlighting and code blocks for readability.

@GernBlanston12
Copy link

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.

@tritnaha
Copy link
Author

tritnaha commented Jan 7, 2020

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

@Leopere
Copy link
Collaborator

Leopere commented Jan 28, 2020

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.

@MisterMcDuck
Copy link

MisterMcDuck commented Apr 6, 2020

stash.import.studios.txt

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

@Maista6969
Copy link
Contributor

Can probably be closed since Studio tagger was merged in #3510

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Pull requests that add a new feature help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

9 participants