Skip to content

Commit 1dcedf7

Browse files
Add Readme to bulkImageScraper Plugin (#549)
1 parent ed95e01 commit 1dcedf7

File tree

6 files changed

+44
-3
lines changed

6 files changed

+44
-3
lines changed

plugins/bulkImageScrape/BulkImageScrape.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Bulk Image Scrape
22
description: Apply an image scraper to all images
3-
version: 0.1
3+
version: 0.2
44
url: https://github.com/stashapp/CommunityScripts/
55
exec:
66
- python

plugins/bulkImageScrape/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Bulk Image Scraper
2+
3+
Apply any image scraper to all of your images
4+
5+
## Install
6+
7+
After you installed the plugin, make sure you have the latest version of stashapi installed by running `pip install -r <path to your stash>/plugins/community/bulkImageScraper/requirements.txt`
8+
9+
## Config
10+
11+
Go into your Stash then under `Settings > Plugins` you'll find the config for Bulk Image Scrape
12+
13+
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.
14+
15+
![Settings](./res/settings.png)
16+
17+
- `Create Missing movies/groups from scrape result`
18+
> if the scraper returns a movie/group and it is not already in your stash, the plugin will create it if enabled
19+
- `Create Missing performer from scrape result`
20+
> if the scraper returns a performer and it is not already in your stash, the plugin will create it if enabled
21+
- `Create Missing studios from scrape result`
22+
> if the scraper returns a studio and it is not already in your stash, the plugin will create it if enabled
23+
- `Exclude images that are set as organized`
24+
> Any image that is set as organized will be skipped if enabled
25+
- `Merge existingtags with scraped tags`
26+
> merge scraped tags with existing tags instead of overwriting them when enabled
27+
- `The Scraper ID of the image scraper to use`
28+
> 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
29+
- `List of tags to skip`
30+
> 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
31+
32+
## Task
33+
34+
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`
35+
36+
![Task](./res/task.png)
37+
38+
Once the Task is running you can track the progress in `Settings > Log`
39+
If the plugin encounters any issues you will be informed here
40+
41+
![Running](./res/running.png)

plugins/bulkImageScrape/bulkImageScrape.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ def update_image(client: StashInterface, update: dict) -> dict | None:
257257
scrape: dict | list[dict] | None = scrape_image(stash, image["id"], scraper_id)
258258
valid: bool = scrape_is_valid(scrape)
259259
if not valid:
260-
log.error(
261-
f"Scraper returned invalid result for image {image['id']} with scraper {scraper_id}"
260+
log.debug(
261+
f"Scraper returned invalid/empty result for image {image['id']} with scraper {scraper_id} - skipping"
262262
)
263263
continue
264264

473 KB
Loading
520 KB
Loading
199 KB
Loading

0 commit comments

Comments
 (0)