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

Generalise tagger view to all scraping sources #1812

Merged
merged 14 commits into from
Oct 13, 2021

Conversation

WithoutPants
Copy link
Collaborator

This is a significant rewrite of the Tagger code. Changed so that common data and functions are consolidated in a context, and generalised so that it supports non-stash-box sources.

The header section has been redesigned to allow selection of the scraper source, and options is moved to a button on the right:

image

Qualifying sources are stash-box instances, scene scrapers that allow string queries, and scene scrapers that allow scraping via fragment.

The scene card has been changed to add a Scrape by fragment button. This is the same as the old Match fingerprints button but for a single scene - it will scrape by fragment for supported scrapers. This button is not shown if the current source does not support scraping by fragment.

image

The stash-id is shown. The presence of a stash-id no longer prevents querying on the scene.

The behaviour of the performer and studio buttons have been changed. When create is clicked and the dialog is confirmed, the applicable object is created instantly and the display changes to show that it is matched to the new object.

image

For stash-box sources, a disk button is shown to the right of the selector. This allows linking an existing performer/studio to the selected one - by setting the stash-id on the object. This linking is no longer done when saving the scene. This button is not shown for non-stash-box sources.

When querying scenes using a keyword, only summarised results are returned. As such, when a search result is clicked on, the system resolves the scene, in the same way as doing in the scene edit page.

The Scrape All button is shown only for stash-box and sources that allow scraping by fragment. For stash-box sources, it operates the same way as the previous Match fingerprints button. For scraper-sources, it sequentially searches each scene one by one, populating results as each request returns. This process can be stopped by clicking on the stop button, which appears when clicking on the Scrape All button.

@WithoutPants WithoutPants added the feature Pull requests that add a new feature label Oct 6, 2021
@WithoutPants WithoutPants added this to the Version 0.11.0 milestone Oct 6, 2021
@bnkai
Copy link
Collaborator

bnkai commented Oct 11, 2021

Looks and works great.
A minor regression, when using the stash-box scraper it shows results even for scenes that have a stashid and allows you to save which then results to a 422 error

{
   "errors":[
      {
         "message":"unknown field",
         "path":[
            "variable",
            "input",
            "stash_ids",
            0,
            "__typename"
         ],
         "extensions":{
            "code":"GRAPHQL_VALIDATION_FAILED"
         }
      }

With the current scene tagger scenes with a stashid can not be modified in the tagger view

To reproduce

  • go to scene tagger (stash-box as a source)
  • add scene filter Stash ID is not NULL
  • scrape all
  • select any of the matching scenes and hit save

@WithoutPants
Copy link
Collaborator Author

Thanks, this should now be fixed.

Noticed that running with the Auto Tag scraper looks gross. So there's still so work to do there.

@WithoutPants WithoutPants mentioned this pull request Oct 13, 2021
4 tasks
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants