diff --git a/plugins/bulkImageScrape/BulkImageScrape.yml b/plugins/bulkImageScrape/BulkImageScrape.yml index 36ce5998..f7077914 100644 --- a/plugins/bulkImageScrape/BulkImageScrape.yml +++ b/plugins/bulkImageScrape/BulkImageScrape.yml @@ -1,6 +1,6 @@ name: Bulk Image Scrape description: Apply an image scraper to all images -version: 0.1 +version: 0.2 url: https://github.com/stashapp/CommunityScripts/ exec: - python diff --git a/plugins/bulkImageScrape/README.md b/plugins/bulkImageScrape/README.md new file mode 100644 index 00000000..fe93dd5f --- /dev/null +++ b/plugins/bulkImageScrape/README.md @@ -0,0 +1,41 @@ +# Bulk Image Scraper + +Apply any image scraper to all of your images + +## Install + +After you installed the plugin, make sure you have the latest version of stashapi installed by running `pip install -r /plugins/community/bulkImageScraper/requirements.txt` + +## Config + +Go into your Stash then under `Settings > Plugins` you'll find the config for Bulk Image Scrape + +It is mandatory to enter the Scraper ID (the Name) of the Scraper you want to use. In this example [SHALookup](https://github.com/FansDB/metadata-scrapers) is used but you can use any Scraper that is installed in your Stash and is valid for image scraping. + +![Settings](./res/settings.png) + +- `Create Missing movies/groups from scrape result` +> if the scraper returns a movie/group and it is not already in your stash, the plugin will create it if enabled +- `Create Missing performer from scrape result` +> if the scraper returns a performer and it is not already in your stash, the plugin will create it if enabled +- `Create Missing studios from scrape result` +> if the scraper returns a studio and it is not already in your stash, the plugin will create it if enabled +- `Exclude images that are set as organized` +> Any image that is set as organized will be skipped if enabled +- `Merge existingtags with scraped tags` +> merge scraped tags with existing tags instead of overwriting them when enabled +- `The Scraper ID of the image scraper to use` +> Enter the ID/Name of the scraper you want to use here. If this is not set correctly the plugin will tell you in the logs when you run the plugin task +- `List of tags to skip` +> Any image that has one or more of the Tags from this setting will be skipped by the plugin if Tags are specified here. Multiple Tags must be comma separated. If the plugin can't find a tag you specified it will notify you in the logs + +## Task + +After you adapted the config to your liking and made sure your image scraper of choice works properly simply start the task in `Settings > Tasks` + +![Task](./res/task.png) + +Once the Task is running you can track the progress in `Settings > Log` +If the plugin encounters any issues you will be informed here + +![Running](./res/running.png) diff --git a/plugins/bulkImageScrape/bulkImageScrape.py b/plugins/bulkImageScrape/bulkImageScrape.py index c5d45717..38f227d2 100644 --- a/plugins/bulkImageScrape/bulkImageScrape.py +++ b/plugins/bulkImageScrape/bulkImageScrape.py @@ -257,8 +257,8 @@ def update_image(client: StashInterface, update: dict) -> dict | None: scrape: dict | list[dict] | None = scrape_image(stash, image["id"], scraper_id) valid: bool = scrape_is_valid(scrape) if not valid: - log.error( - f"Scraper returned invalid result for image {image['id']} with scraper {scraper_id}" + log.debug( + f"Scraper returned invalid/empty result for image {image['id']} with scraper {scraper_id} - skipping" ) continue diff --git a/plugins/bulkImageScrape/res/running.png b/plugins/bulkImageScrape/res/running.png new file mode 100644 index 00000000..03035982 Binary files /dev/null and b/plugins/bulkImageScrape/res/running.png differ diff --git a/plugins/bulkImageScrape/res/settings.png b/plugins/bulkImageScrape/res/settings.png new file mode 100644 index 00000000..fc8bfff6 Binary files /dev/null and b/plugins/bulkImageScrape/res/settings.png differ diff --git a/plugins/bulkImageScrape/res/task.png b/plugins/bulkImageScrape/res/task.png new file mode 100644 index 00000000..f3d8c013 Binary files /dev/null and b/plugins/bulkImageScrape/res/task.png differ