You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# In apply_all_status, map libraries according to this JSON.
101
+
102
+
reset_posters:
103
+
track_reset_status: 1# should reset-posters-* keep track of status and pick up where it left off?
104
+
clear_reset_status: 0
105
+
local_reset_archive: 1# should reset-posters-tmdb keep a local archive of posters?
106
+
override_overlay_status: 0
107
+
target_labels: this label, that label # comma-separated list of labels to reset posters on
108
+
remove_labels: 0# attempt to remove the TARGET_LABELs from items after resetting the poster
109
+
reset_seasons: 1# reset-posters-* resets season artwork as well in TV libraries
110
+
reset_episodes: 1# reset-posters-* resets episode artwork as well in TV libraries [requires RESET_SEASONS=True]
111
+
retain_reset_status_file: 0# Don't delete the reset progress file at the end
112
+
flush_status_at_start: 0# Delete the reset progress file at the start instead of reading it
113
+
reset_seasons_with_series: 0# If there isn't a season poster, use the series poster
114
+
dry_run: 0# [currently only works with reset-posters-*]; don't actually do anything, just log
115
+
116
+
list_item_ids:
117
+
include_collection_members: 0
118
+
only_collection_members: 0
119
+
120
+
delete_collection:
121
+
keep_collections: "bing,bang"# List of collections to keep
122
+
123
+
refresh_metadata:
124
+
refresh_1970_only: 1# If 1, only refresh things that have an originally-available date of 1970-01-01
125
+
126
+
rematch_items:
127
+
unmatched_only: 1# If 1, only rematch things that are currently unmatched
128
+
129
+
reset_added_at:
130
+
adjust_date_futures_only: 0# Only look at items that show up as added in the future
131
+
adjust_date_epoch_only: 1# Only adjust items that have "originally available" dates of `1970-01-01`
132
+
133
+
actor:
134
+
cast_depth: 20# how deep to go into the cast for actor collections
135
+
top_count: 10# how many actors to export
136
+
job_type: "Actor"
137
+
known_for_only: 0# ignore cast members who are not primarily known as actors
138
+
build_collections: 0# build yaml for Kometa config.yml
139
+
num_collections: 20# this many actors in Kometa yaml
140
+
track_gender: 1# Pay attention to actor gender [as recorded on TMDB]
141
+
min_gender_none: 5# include minimum this many "none" gendered actors in the YAML, if possible
142
+
min_gender_female: 5# include minimum this many "female" gendered actors in the YAML, if possible
143
+
min_gender_male: 5# include minimum this many "male" gendered actors in the YAML, if possible
144
+
min_gender_nb: 5# include minimum this many "non-binary" gendered actors in the YAML, if possible
145
+
146
+
low_poster_count:
147
+
poster_threshold: 10# how many posters counts as a "low" count?
148
+
149
+
crew:
150
+
depth: 20
151
+
count: 100
152
+
target_job: Director
153
+
show_jobs: 0
17
154
```
18
155
19
156
## Scripts:
@@ -34,18 +171,21 @@ You've deleted stuff from Plex and want to clean up the leftover backup art that
34
171
35
172
### Settings
36
173
37
-
The script uses these settings from the `.env`:
38
-
```
39
-
LIBRARY_NAMES=Movies,TV Shows,Movies 4K # comma-separated list of libraries to act on
40
-
DELAY=1 # optional delay between items
41
-
KOMETA_CONFIG_DIR=/opt/kometa/config/ # path to Kometa config directory
174
+
The script uses these settings from the `config.yaml`:
175
+
```yaml
176
+
general:
177
+
delay: 1 # optional delay between items
178
+
library_names: Movies,TV Shows,Movies 4K # comma-separated list of libraries to act on
179
+
180
+
kometa:
181
+
config_dir: /kometa/is/here # location of Kometa config dir as seen by this script
42
182
```
43
183
44
184
### Usage
45
185
1. setup as above
46
186
2. Run with `python clean-overlay-backup.py`
47
187
48
-
The script will catalog the backup files and current Plex contents for each library listed in the `.env`.
188
+
The script will catalog the backup files and current Plex contents for each library listed in the `config.yaml`.
49
189
50
190
It then compares the two lists, and any files in the backup dir that do not correspond to current items in Plkex are deleted.
51
191
@@ -56,7 +196,7 @@ connecting to https://plex.bing.bang...
56
196
Loading Movies ...
57
197
Loading movies from Movies ...
58
198
Completed loading 6965 of 6965 movie(s) from Movies
59
-
Clean Overlay Backup Movies |████████████████████████████████████████| 6965/6965 [100%] in 11.0s (633.23/s)
199
+
Clean Overlay Backup Movies |████████████████████████████████████████| 6965/6965 [100%] in 11.0s (633.23/s)
60
200
Processed 6965 of 6965
61
201
0 items to delete
62
202
279 items in Plex with no backup art
@@ -72,6 +212,7 @@ You're getting started with Kometa and you want to export your existing collecti
72
212
Here is a quick and dirty [emphasis on "quick" and "dirty"] way to do that.
73
213
74
214
### Usage
215
+
75
216
1. setup as above
76
217
2. Run with `python extract-collections.py`
77
218
@@ -110,7 +251,7 @@ Here is a basic script to do that.
110
251
111
252
The script will clone or update the `Kometa-Images` repo, then iterate through it applying overlays to each image and storing them in a parallel file system rooted at `Kometa-Images-Overlaid`, ready for you to use with the Kometa Asset Directory [after moving them to that directory] or via template variables.
112
253
113
-
It chooses the overlay by name based on the "group" that each collection is part of:
254
+
It chooses the overlay by name based on the "group" that each collection is part of:
114
255
```
115
256
Kometa-Images
116
257
├── aspect
@@ -143,7 +284,7 @@ If there isn't a specific image for a "group", then `Kometa/default_collection_o
143
284
Fetch/Pull on Kometa-Images
144
285
Using default_collection_overlays/overlay-template.png as global overlay
@@ -266,18 +407,29 @@ Note, this will only copy images that have received overlays, and for which the
266
407
267
408
If you don't have overlays on any episodes, this script will not put any episode images in the asset directory, and so on.
268
409
410
+
```yaml
411
+
image_download:
412
+
where_to_put_it:
413
+
use_asset_folders: 1# should those Kometa-Asset-Directory names use asset folders?
414
+
asset_dir: "assets"# top-level directory for those Kometa-Asset-Directory images
269
415
```
270
-
# ORIGINAL TO ASSETS
271
-
USE_ASSET_FOLDERS=1 # should the asset directory use asset folders?
272
-
ASSET_DIR=assets # top-level directory for those assets
416
+
417
+
The asset file system will be rooted at the directory in the `asset_dir` setting, and `use_asset_folders` controls whether the images are stored as:
418
+
419
+
```yaml
420
+
use_asset_folders: 1
273
421
```
274
-
The asset file system will be rooted at the directory in the `ASSET_DIR` setting, and `USE_ASSET_FOLDERS` controls whether the images are stored as:
275
422
276
-
`USE_ASSET_FOLDERS=1`
277
423
```
278
424
Media-Scripts/Plex/assets/All That Jazz (1979) {imdb-tt0078754} {tmdb-16858}.jpg
279
425
```
280
-
or `USE_ASSET_FOLDERS=0`
426
+
427
+
or
428
+
429
+
```yaml
430
+
use_asset_folders: 0
431
+
```
432
+
281
433
```
282
434
Media-Scripts/Plex/assets/All That Jazz (1979) {imdb-tt0078754} {tmdb-16858}/poster.jpg
283
435
```
@@ -289,7 +441,7 @@ connecting to https://test-plex.DOMAIN.TLD...
289
441
Loading Test-Movies ...
290
442
Loading movies ...
291
443
Completed loading 35 of 35 movie(s) from Test-Movies
292
-
Grab all posters Test-Movies |████████████████████████████████████████| 35/35 [100%] in 0.2s (190.63/s)
444
+
Grab all posters Test-Movies |████████████████████████████████████████| 35/35 [100%] in 0.2s (190.63/s)
293
445
Processed 35 of 35
294
446
Complete!
295
447
```
@@ -370,10 +522,12 @@ For each movie, gets the cast from TMDB; keeps track across all movies how many
370
522
371
523
At the end, builds a basic Kometa metadata file for the top N actors.
372
524
373
-
Script-specific variables in .env:
374
-
```
375
-
CAST_DEPTH=20 ### HOW DEEP TO GO INTO EACH MOVIE CAST
376
-
TOP_COUNT=10 ### PUT THIS MANY INTO THE FILE AT THE END
525
+
Script-specific variables in `config.yaml`:
526
+
527
+
```yaml
528
+
actor:
529
+
cast_depth: 20# how deep to go into the cast for actor collections
530
+
top_count: 10# how many actors to export
377
531
```
378
532
379
533
`CAST_DEPTH` is meant to prevent some journeyman character actor from showing up in the top ten; I'm thinking of someone like Clint Howard who's been in the cast of many movies, but I'm guessing when you think of the top ten actors in your library you're not thinking about Clint. Maybe you are, though, in which case set that higher.
0 commit comments