Manually link Scenes and Actors to Stashdb #1888
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change allows users to manually link Scenes or Actors with Stashdb. A list of possible matches is presented to the user to choose. The Title/Name in the result list is a hyperlink to tahe the user to the Stashdb entry to check details further. In the Performer list, the studios displayed are also hyperlinks that will take you to the scenes, for that studio, for the selected performer.
Different fields are used in matching with a weighting to decide the order to present the list. e.g. the performers name matching will have a high weighting, the performers alias matching will increase the weighting but not as much as the name matching, likewise matching studios between XBVR and Stashdb that the actor has performed in increases weighting.
The same approach is used for scenes, just different fields, eg title, release date, duration, actors in the scenes. Only scenes from the studio/s are searched. If required multiple studios to search for an xbvr site can be specified in the actor_scraper_custom_config.json file. Note: however, search takes a few seconds, that has to be repeated for each site setup and can become quite slow, very quickly.
The Scene Title or Actor Name are the defaults used in the search, but the user can put in their own search string.
The user may also search by specifying the Stashdb Id or URL to link to a specific scene or performer they want. Note: if matching to a specific scene, the Stashdb studio does not have to match the XBVR site.
Scenes/Performers are queried from Stashdb and then the XBVR match weighting is applied. The number of scenes requested from Stashdb is limited for performance reasons, a scene or actor can be in Stash but may not be returned in the page of results from Stash and therefore will not appear in the result list. Therefore, at times an obvious match is not shown, and other times the highest match suggested may bear very little resemblance but on investigating as in fact the correct match, the joys of matching. Usually, if I don't see a match in the first half dozen matches I check directory in Stashdb and then copy the Id if I find it there.
When searching scenes from the Scene Detail in XBVR, the result list is positioned so you can compare the Scene description in the result list with the XBVR scene description. If the XBVR scene does not have a Description the result list is positioned so you can compare the scene images.
This mod requires #1886 which enables multiple Stashdb Studios to be configured to be searched for one XBVR site.
Also requires #1889 to fix bug with rules not been loaded