pull/1268/head
YozoraXCII 2 years ago
commit 6fe7911262

@ -1 +1 @@
1.18.2-develop12 1.18.2-develop14

@ -8,6 +8,8 @@ Items in your List Exclusions will be ignored by PMM.
A `radarr` mapping can be either in the root of the config file as global mapping for all libraries, or you can specify the `radarr` mapping individually per library. A `radarr` mapping can be either in the root of the config file as global mapping for all libraries, or you can specify the `radarr` mapping individually per library.
At the library level, only those settings which are different to the global settings need to be specified; there is an example of this at the end of the page.
Below is a `radarr` mapping example and the full set of attributes: Below is a `radarr` mapping example and the full set of attributes:
```yaml ```yaml
radarr: radarr:
@ -52,34 +54,61 @@ radarr:
# Other examples: # Other examples:
Specifying a second Radarr instance for a specific library: Specifying different options for specific libraries:
In this example we have two Radarr instances, standard and 4K. We want to add 4K movies to the 4K Radarr instance with a different root folder and availability. In this example we have two Radarr instances, standard and 4K, and four libraries showing how one can override individual settings at the library level. Also, movies are being added to the "Library05" library outside Radarr via a custom script and I want those new movies added to Radarr for tracking.
```yaml
```
libraries: libraries:
Movies: Library01: # this library uses the default radarr config
metadata_path: metadata_path:
- file: config/Movies.yml - file: config/Movies.yml
Movies - 4K:
Library02: # this library overrides radarr root path and profile
metadata_path: metadata_path:
- file: config/Movies.yml - file: config/Movies.yml
radarr: radarr:
url: https://radarr-4K.bing.bang root_folder_path: /data/media/movies/tony
token: SOME_TOKEN quality_profile: Better
root_folder_path: /movies-4K
availability: cinemas Library03: # this library overrides radarr quality profile
metadata_path:
- file: config/Movies.yml
radarr:
quality_profile: Best
Library04: # this library uses the 4K radarr instance
metadata_path:
- file: config/Movies.yml
radarr:
url: https://radarr-4k.bing.bang
token: SOME_OTHER_TOKEN
root_folder_path: /data/media/movies/geezer
quality_profile: Bestest
Library05: # movies get added by a custom script so they should get added to radarr-4k
metadata_path:
- file: config/Movies.yml
radarr:
url: https://radarr-4k.bing.bang
token: SOME_OTHER_TOKEN
root_folder_path: /data/media/movies/bill
quality_profile: Bestest
add_existing: true
sonarr_path: /data/media/movies/bill
plex_path: /mnt/unionfs/movies/bill
... ...
radarr: radarr:
url: https://radarr.bing.bang url: https://radarr.bing.bang
token: SOME_TOKEN token: SOME_TOKEN
quality_profile: Good
add_missing: true add_missing: true
add_existing: false add_existing: false
upgrade_existing: false upgrade_existing: false
root_folder_path: /movies root_folder_path: /movies
monitor: movie monitor: movie
availability: released availability: released
quality_profile: Any
tag: tag:
search: false search: false
radarr_path: radarr_path:

@ -8,6 +8,9 @@ Items in your List Exclusions will be ignored by PMM.
A `sonarr` mapping can be either in the root of the config file as global mapping for all libraries, or you can specify the `sonarr` mapping individually per library. A `sonarr` mapping can be either in the root of the config file as global mapping for all libraries, or you can specify the `sonarr` mapping individually per library.
At the library level, only those settings which are different to the global settings need to be specified; there is an example of this at the end of the page.
Below is a `sonarr` mapping example and the full set of attributes: Below is a `sonarr` mapping example and the full set of attributes:
```YAML ```YAML
sonarr: sonarr:
@ -59,24 +62,48 @@ sonarr:
Specifying a second Sonarr instance for a specific library: Specifying a second Sonarr instance for a specific library:
In this example we have two Sonarr instances, standard and 4K. We want to add 4K shows to the 4K Sonarr instance with a different root folder and quality profile. Also, shows are being added to the "TV Shows - 4K" library outside Sonarr via a custom script and I want those new shows added to Sonarr for tracking. In this example we have two Sonarr instances, standard and 4K, with five libraries that override various details. Also, shows are being added to the "Library05" library outside Sonarr via a custom script and I want those new shows added to Sonarr for tracking.
```yaml ```
libraries: libraries:
TV Shows: Library01: # this library uses the default sonarr config
metadata_path: metadata_path:
- file: config/TV.yml - file: config/TV.yml
TV Shows - 4K:
Library02: # this library overrides sonarr root path and profile
metadata_path: metadata_path:
- file: config/TV.yml - file: config/TV.yml
sonarr: radarr:
url: https://sonarr-4K.bing.bang root_folder_path: /data/media/shows/tony
token: SOME_TOKEN quality_profile: Better
root_folder_path: /shows-4K
quality_profile: 4K Library03: # this library overrides sonarr quality profile
metadata_path:
- file: config/TV.yml
radarr:
quality_profile: Best
Library04: # this library uses the 4K sonarr instance
metadata_path:
- file: config/TV.yml
radarr:
url: https://sonarr-4k.bing.bang
token: SOME_OTHER_TOKEN
root_folder_path: /data/media/shows/geezer
quality_profile: Bestest
Library05: # shows get added by a custom script so they should get added to sonarr-4k
metadata_path:
- file: config/TV.yml
radarr:
url: https://sonarr-4k.bing.bang
token: SOME_OTHER_TOKEN
root_folder_path: /data/media/shows/bill
quality_profile: Bestest
add_existing: true add_existing: true
sonarr_path: /shows-4K sonarr_path: /data/media/shows/bill
plex_path: /mnt/unionfs/Media/TV plex_path: /mnt/unionfs/shows/bill
... ...
sonarr: sonarr:
url: https://sonarr.bing.bang url: https://sonarr.bing.bang
@ -84,9 +111,9 @@ sonarr:
add_missing: false add_missing: false
add_existing: false add_existing: false
upgrade_existing: false upgrade_existing: false
root_folder_path: /shows root_folder_path: /data/media/shows/ozzy
monitor: all monitor: all
quality_profile: HD-1080p quality_profile: Good
language_profile: English language_profile: English
series_type: standard series_type: standard
season_folder: true season_folder: true

@ -145,7 +145,7 @@ There are some attributes unique to `templates`; `default`, `optional`, `conditi
* `optional` can specify variables that if not specified on the template call will cause any attribute using one of those variables to be ignored in the template. You can make any template variable optional per collection by setting it to `null`. * `optional` can specify variables that if not specified on the template call will cause any attribute using one of those variables to be ignored in the template. You can make any template variable optional per collection by setting it to `null`.
* `conditionals` can specify variables based on conditions set by the user. See more [here](#conditionals) * `conditionals` can specify variables based on conditions set by the user. See more [here](#conditionals)
* `move_prefix` can be given a list or comma-separated string of prefixes to move to the end of the collection/playlist name for sorting. * `move_prefix` can be given a list or comma-separated string of prefixes to move to the end of the collection/playlist name for sorting.
i.e. If you have `move_prefix: The` and a collection is called `The Avengers` then `<<collection_name>>` is replaced with `Avengers, The` instead of `The Avengers` for that collection. i.e. If you have `move_prefix: The` and a collection is called `The Avengers` then `<<collection_sort>>` is replaced with `Avengers, The` instead of `The Avengers` for that collection.
Every template call is given these template variables. Every template call is given these template variables.

@ -185,8 +185,11 @@ class Operations:
if any([o.startswith("mal") for o in self.library.meta_operations]): if any([o.startswith("mal") for o in self.library.meta_operations]):
if item.ratingKey in reverse_mal: if item.ratingKey in reverse_mal:
mal_id = reverse_mal[item.ratingKey] mal_id = reverse_mal[item.ratingKey]
elif not anidb_id or anidb_id not in self.config.Convert._anidb_to_mal: elif not anidb_id:
logger.warning(f"No AniDB ID to Convert to MyAnimeList ID for Guid: {item.guid}") logger.warning(f"Covert Warning: No AniDB ID to Convert to MyAnimeList ID for Guid: {item.guid}")
mal_id = None
elif anidb_id not in self.config.Convert._anidb_to_mal:
logger.warning(f"Covert Warning: No MyAnimeList Found for AniDB ID: {anidb_id} of Guid: {item.guid}")
mal_id = None mal_id = None
else: else:
mal_id = self.config.Convert._anidb_to_mal[anidb_id] mal_id = self.config.Convert._anidb_to_mal[anidb_id]

@ -404,8 +404,10 @@ def time_window(tw):
return f"{today - timedelta(weeks=1):%Y-0%V}" return f"{today - timedelta(weeks=1):%Y-0%V}"
elif tw == "this_month": elif tw == "this_month":
return f"{today:%Y-%m}" return f"{today:%Y-%m}"
elif tw == "last_month" and today.month == 1:
return f"{today.year - 1}-12"
elif tw == "last_month": elif tw == "last_month":
return f"{today.year}-{today.month - 1 or 12}" return f"{today.year}-{today.month - 1:02}"
elif tw == "this_year": elif tw == "this_year":
return f"{today.year}" return f"{today.year}"
elif tw == "last_year": elif tw == "last_year":

@ -292,7 +292,7 @@ def start(attrs):
logger.separator(f"{err_type.lower().capitalize()} Summary", space=False, border=False) logger.separator(f"{err_type.lower().capitalize()} Summary", space=False, border=False)
logger.info("") logger.info("")
logger.info(f"Count | Message") logger.info("Count | Message")
logger.separator(f"{logger.separating_character * 5}|", space=False, border=False, side_space=False, left=True) logger.separator(f"{logger.separating_character * 5}|", space=False, border=False, side_space=False, left=True)
for k, v in Counter(log_data[err_type]).most_common(): for k, v in Counter(log_data[err_type]).most_common():
logger.info(f"{v:>5} | {k}") logger.info(f"{v:>5} | {k}")

Loading…
Cancel
Save