mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
[5] various minor fixes
This commit is contained in:
parent
66f9aa8af9
commit
9894d2fbf1
7 changed files with 53 additions and 48 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.16.2-develop4
|
||||
1.16.2-develop5
|
||||
|
|
|
@ -11,7 +11,8 @@ Below is a `radarr` mapping example and the full set of attributes:
|
|||
radarr:
|
||||
url: http://192.168.1.12:32788
|
||||
token: ################################
|
||||
add: true
|
||||
add_missing: false
|
||||
add_existing: false
|
||||
root_folder_path: S:/Movies
|
||||
monitor: true
|
||||
availability: announced
|
||||
|
@ -22,25 +23,25 @@ radarr:
|
|||
plex_path: /share/CACHEDEV1_DATA/Multimedia
|
||||
```
|
||||
|
||||
| Attribute | Allowed Values | Default | Required |
|
||||
|:-------------------|:-----------------------------------------------------------------------------------------------|:-----------:|:--------:|
|
||||
| `url` | Radarr URL (Including URL Base if set)<br>**Example:** http://192.168.1.12:32788 | N/A | ✅ |
|
||||
| `token` | Radarr API Token | N/A | ✅ |
|
||||
| `add` | Add missing movies found to Radarr<br>**boolean:** true or false | false | ❌ |
|
||||
| `add_existing` | Add movie existing in this collection to Radarr<br>**boolean:** true or false | false | ❌ |
|
||||
| `root_folder_path` | Radarr Root Folder Path To Use | N/A | ✅ |
|
||||
| `monitor` | Monitor the added movie | true | ❌ |
|
||||
| `availability` | Minimum Availability of the Movie<br>**Options:** `announced`, `cinemas`, `released`, `db` | `announced` | ✅ |
|
||||
| `quality_profile` | Quality Profile To Use | N/A | ❌ |
|
||||
| `tag` | Add this list or comma-separated string of tags to every movie added to Radarr | ` ` | ❌ |
|
||||
| `search` | Search when adding missing movies to Radarr<br>**boolean:** true or false | false | ❌ |
|
||||
| `plex_path` | When using `add_existing` or `radarr_add_all` Convert this part of the path to `radarr_path` | ` ` | ❌ |
|
||||
| `radarr_path` | When using `add_existing` or `radarr_add_all` Convert the `plex_path` part of the path to this | ` ` | ❌ |
|
||||
| Attribute | Allowed Values | Default | Required |
|
||||
|:-------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------:|:--------:|
|
||||
| `url` | Radarr URL (Including URL Base if set).<br>**Example:** http://192.168.1.12:32788 | N/A | ✅ |
|
||||
| `token` | Radarr API Token. | N/A | ✅ |
|
||||
| `add_missing` | Adds all missing movies found from all collections to Radarr.<br>Use the `radarr_add_missing` [Radarr Details](../metadata/details/arr.md#radarr-details) in the collection definition to add missing per collection.<br>**boolean:** true or false | false | ❌ |
|
||||
| `add_existing` | Adds all existing movies in collections to Radarr.<br>Use the `radarr_add_existing` [Radarr Details](../metadata/details/arr.md#radarr-details) in the collection definition to add existing per collection.<br>**boolean:** true or false | false | ❌ |
|
||||
| `root_folder_path` | Default Root Folder Path to use when adding new movies.<br>Use the `radarr_folder` [Radarr Details](../metadata/details/arr.md#radarr-details) in the collection definition to set the Root Folder per collection. | N/A | ✅ |
|
||||
| `monitor` | Monitor the movie when adding new movies.<br>Use the `radarr_monitor` [Radarr Details](../metadata/details/arr.md#radarr-details) in the collection definition to set the Monitor value per collection. | true | ❌ |
|
||||
| `availability` | Default Minimum Availability to use when adding new movies.<br>Use the `radarr_availability` [Radarr Details](../metadata/details/arr.md#radarr-details) in the collection definition to set the Availability per collection.<br>**Options:** `announced`, `cinemas`, `released`, `db` | `announced` | ✅ |
|
||||
| `quality_profile` | Default Quality Profile to use when adding new movies.<br>Use the `radarr_quality` [Radarr Details](../metadata/details/arr.md#radarr-details) in the collection definition to set the Quality Profile per collection. | N/A | ❌ |
|
||||
| `tag` | Default this list or comma-separated string of tags to use when adding new movies.<br>Use the `radarr_tag` [Radarr Details](../metadata/details/arr.md#radarr-details) in the collection definition to set the Tags per collection. | ` ` | ❌ |
|
||||
| `search` | Start search for missing movie when adding new movies.<br>Use the `radarr_search` [Radarr Details](../metadata/details/arr.md#radarr-details) in the collection definition to set the search value per collection.<br>**boolean:** true or false | false | ❌ |
|
||||
| `plex_path` | When using `add_existing` or `radarr_add_all` Convert this part of the path to `radarr_path`. | ` ` | ❌ |
|
||||
| `radarr_path` | When using `add_existing` or `radarr_add_all` Convert the `plex_path` part of the path to this. | ` ` | ❌ |
|
||||
|
||||
* The `token` can be found by going to `Radarr > Settings > General > Security > API Key`
|
||||
|
||||
* The `quality_profile` must be the exact name of the desired quality profile, including all spaces and capitalization.
|
||||
|
||||
* You can set most attributes per collection by using the [Radarr Details](../metadata/details/arr.md#radarr-details)
|
||||
* You can set most attributes per collection by using the [Radarr Details](../metadata/details/arr.md#radarr-details) in the collection definition.
|
||||
|
||||
![Radarr Details](radarr.png)
|
||||
|
|
|
@ -11,7 +11,8 @@ Below is a `sonarr` mapping example and the full set of attributes:
|
|||
sonarr:
|
||||
url: http://192.168.1.12:32789
|
||||
token: ################################
|
||||
add: true
|
||||
add_missing: false
|
||||
add_existing: false
|
||||
root_folder_path: S:/Shows
|
||||
monitor: all
|
||||
quality_profile: HD-1080p
|
||||
|
@ -25,28 +26,28 @@ sonarr:
|
|||
plex_path: /share/CACHEDEV1_DATA/Multimedia
|
||||
```
|
||||
|
||||
| Attribute | Allowed Values | Default | Required |
|
||||
|:-------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------:|:--------:|
|
||||
| `url` | Sonarr URL (Including URL Base if set)<br>**Example:** http://192.168.1.12:32788 | N/A | ✅ |
|
||||
| `token` | Sonarr API Token | N/A | ✅ |
|
||||
| `add` | Add missing shows found to Sonarr<br>**boolean:** true or false | false | ❌ |
|
||||
| `add_existing` | Add shows existing in this collection to Sonarr<br>**boolean:** true or false | false | ❌ |
|
||||
| `root_folder_path` | Sonarr Root Folder Path To Use | N/A | ✅ |
|
||||
| `monitor` | `all`: Monitor all episodes except specials<br>`future`: Monitor episodes that have not aired yet<br>`missing`: Monitor episodes that do not have files or have not aired yet<br>`existing`: Monitor episodes that have files or have not aired yet<br>`pilot`: Monitor the first episode. All other episodes will be ignored<br>`first`: Monitor all episodes of the first season. All other seasons will be ignored<br>`latest`: Monitor all episodes of the latest season and future seasons<br>`none`: No episodes will be monitored | `all` | ❌ |
|
||||
| `quality_profile` | Quality Profile To Use | N/A | ✅ |
|
||||
| `language_profile` | Language Profile To Use (v3 Only) | First Profile | ❌ |
|
||||
| `series_type` | `standard`: Episodes released with SxxEyy pattern<br>`daily`: Episodes released daily or less frequently that use year-month-day (2017-05-25)<br>`anime`: Episodes released using an absolute episode number | `standard` | ❌ |
|
||||
| `season_folder` | Use the Season Folder Option when adding to Sonarr<br>**boolean:** true or false | true | ❌ |
|
||||
| `tag` | Add this list or comma-separated string of tags to every show added to Sonarr | ` ` | ❌ |
|
||||
| `search` | Start search for missing episodes<br>**boolean:** true or false | false | ❌ |
|
||||
| `cutoff_search` | Start search for cutoff unmet episodes<br>**boolean:** true or false | false | ❌ |
|
||||
| `plex_path` | When using `add_existing` or `sonarr_add_all` Convert this part of the path to `sonarr_path` | ` ` | ❌ |
|
||||
| `sonarr_path` | When using `add_existing` or `sonarr_add_all` Convert the `plex_path` part of the path to this | ` ` | ❌ |
|
||||
| Attribute | Allowed Values | Default | Required |
|
||||
|:-------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------:|:--------:|
|
||||
| `url` | Sonarr URL (Including URL Base if set).<br>**Example:** http://192.168.1.12:32788 | N/A | ✅ |
|
||||
| `token` | Sonarr API Token. | N/A | ✅ |
|
||||
| `add_missing` | Adds all missing shows found from all collections to Sonarr.<br>Use the `sonarr_add_missing` [Sonarr Details](../metadata/details/arr.md#sonarr-details) in the collection definition to add missing per collection.<br>**boolean:** true or false | false | ❌ |
|
||||
| `add_existing` | Adds all existing shows in collections to Sonarr.<br>Use the `sonarr_add_existing` [Sonarr Details](../metadata/details/arr.md#sonarr-details) in the collection definition to add existing per collection.<br>**boolean:** true or false | false | ❌ |
|
||||
| `root_folder_path` | Default Root Folder Path to use when adding new shows.<br>Use the `sonarr_folder` [Sonarr Details](../metadata/details/arr.md#sonarr-details) in the collection definition to set the Root Folder per collection. | N/A | ✅ |
|
||||
| `monitor` | Default Monitor to use when adding new shows.<br>Use the `sonarr_monitor` [Sonarr Details](../metadata/details/arr.md#sonarr-details) in the collection definition to set the Monitor value per collection.<br>**Values:** <table class="clearTable"><tr><td>`all`</td><td>All episodes except specials</td></tr><tr><td>`future`</td><td>Episodes that have not aired yet</td></tr><tr><td>`missing`</td><td>Episodes that do not have files or have not aired yet</td></tr><tr><td>`existing`</td><td>Episodes that have files or have not aired yet</td></tr><tr><td>`pilot`</td><td>The first episode, all others will be ignored</td></tr><tr><td>`first`</td><td>All episodes of the first season, all others will be ignored</td></tr><tr><td>`latest`</td><td>All episodes of the latest season and future seasons</td></tr><tr><td>`none`</td><td>No episodes</td></tr></table> | `all` | ❌ |
|
||||
| `quality_profile` | Default Quality Profile to use when adding new shows.<br>Use the `sonarr_quality` [Sonarr Details](../metadata/details/arr.md#sonarr-details) in the collection definition to set the Quality Profile per collection. | N/A | ✅ |
|
||||
| `language_profile` | Default Language Profile to use when adding new shows.<br>Use the `sonarr_language` [Sonarr Details](../metadata/details/arr.md#sonarr-details) in the collection definition to set the Language Profile per collection. | First Profile | ❌ |
|
||||
| `series_type` | Default Series Type to use when adding new shows.<br>Use the `sonarr_series` [Sonarr Details](../metadata/details/arr.md#sonarr-details) in the collection definition to set the Series Type per collection.<br>**Values:** <table class="clearTable"><tr><td>`standard`</td><td>Episodes released with SxxEyy pattern</td></tr><tr><td>`daily`</td><td>Episodes released daily that use year-month-day pattern (2017-05-25)</td></tr><tr><td>`anime`</td><td>Episodes released using an absolute episode number</td></tr></table>`standard`: Episodes released with SxxEyy pattern<br>`daily`: Episodes released daily or less frequently that use year-month-day (2017-05-25)<br>`anime`: Episodes released using an absolute episode number | `standard` | ❌ |
|
||||
| `season_folder` | Use the Season Folder Option when adding new shows.<br>Use the `sonarr_season` [Sonarr Details](../metadata/details/arr.md#sonarr-details) in the collection definition to set the season folder value per collection. <br>**boolean:** true or false | true | ❌ |
|
||||
| `tag` | Default this list or comma-separated string of tags to use when adding new shows.<br>Use the `sonarr_tag` [Sonarr Details](../metadata/details/arr.md#sonarr-details) in the collection definition to set the tags per collection. | ` ` | ❌ |
|
||||
| `search` | Start search for missing episodes when adding new shows.<br>Use the `sonarr_search` [Sonarr Details](../metadata/details/arr.md#sonarr-details) in the collection definition to set the search value per collection.<br>**boolean:** true or false | false | ❌ |
|
||||
| `cutoff_search` | Start search for cutoff unmet episodes when adding new shows.<br>Use the `sonarr_cutoff_search` [Sonarr Details](../metadata/details/arr.md#sonarr-details) in the collection definition to set the cutoff search value per collection.<br>**boolean:** true or false | false | ❌ |
|
||||
| `plex_path` | When using `add_existing` or `sonarr_add_all` Convert this part of the path to `sonarr_path`. | ` ` | ❌ |
|
||||
| `sonarr_path` | When using `add_existing` or `sonarr_add_all` Convert the `plex_path` part of the path to this. | ` ` | ❌ |
|
||||
|
||||
* The `token` can be found by going to `Sonarr > Settings > General > Security > API Key`
|
||||
|
||||
* The `quality_profile` and `language_profile` must be the exact name of the desired quality profile, including all spaces and capitalization.
|
||||
|
||||
* You can set most attributes per collection by using the [Sonarr Details](../metadata/details/arr.md#sonarr-details)
|
||||
* You can set most attributes per collection by using the [Sonarr Details](../metadata/details/arr.md#sonarr-details) in the collection definition.
|
||||
|
||||
![Sonarr Details](sonarr.png)
|
||||
|
|
|
@ -6,7 +6,7 @@ All the following attributes can override the global/library [Radarr](../../conf
|
|||
|
||||
| Attribute | Description & Values |
|
||||
|:-------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `radarr_add_missing` | **Description:** Override Radarr `add` attribute<hr>**Values:** `true` or `false` |
|
||||
| `radarr_add_missing` | **Description:** Override Radarr `add_missing` attribute<hr>**Values:** `true` or `false` |
|
||||
| `radarr_add_existing` | **Description:** Override Radarr `add_existing` attribute<hr>**Values:** `true` or `false` |
|
||||
| `radarr_folder` | **Description:** Override Radarr `root_folder_path` attribute<hr>**Values:** Folder Path |
|
||||
| `radarr_monitor` | **Description:** Override Radarr `monitor` attribute<hr>**Values:** `true` or `false` |
|
||||
|
@ -24,7 +24,7 @@ All the following attributes can override the global/library [Sonarr](../../conf
|
|||
|
||||
| Attribute | Description & Values |
|
||||
|:-------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `sonarr_add_missing` | **Description:** Override Sonarr `add` attribute<hr>**Values:** `true` or `false` |
|
||||
| `sonarr_add_missing` | **Description:** Override Sonarr `add_missing` attribute<hr>**Values:** `true` or `false` |
|
||||
| `sonarr_add_existing` | **Description:** Override Sonarr `add_existing` attribute<hr>**Values:** `true` or `false` |
|
||||
| `sonarr_folder` | **Description:** Override Sonarr `root_folder_path` attribute<hr>**Values:** Folder Path |
|
||||
| `sonarr_monitor` | **Description:** Override Sonarr `monitor` attribute<hr>**Values:** `all`, `future`, `missing`, `existing`, `pilot`, `first`, `latest`, `none` |
|
||||
|
|
|
@ -20,7 +20,7 @@ class MDbObj:
|
|||
self.year = util.check_num(data["year"])
|
||||
try:
|
||||
self.released = datetime.strptime(data["released"], "%Y-%m-%d")
|
||||
except ValueError:
|
||||
except (ValueError, TypeError):
|
||||
self.released = None
|
||||
self.type = data["type"]
|
||||
self.imdbid = data["imdbid"]
|
||||
|
|
|
@ -415,7 +415,7 @@ class Plex(Library):
|
|||
self.is_show = self.type == "Show"
|
||||
self.is_music = self.type == "Artist"
|
||||
self.is_other = self.agent == "com.plexapp.agents.none"
|
||||
if self.is_other:
|
||||
if self.is_other and self.type == "Movie":
|
||||
self.type = "Video"
|
||||
if not self.is_music and self.update_blank_track_titles:
|
||||
self.update_blank_track_titles = False
|
||||
|
@ -1087,13 +1087,14 @@ class Plex(Library):
|
|||
check_field("mood", "mood", var_key="moods")
|
||||
check_field("style", "style", var_key="styles")
|
||||
check_field("similar", "similar_artist")
|
||||
for advance_edit in util.advance_tags_to_edit[self.type]:
|
||||
key, options = item_advance_keys[f"item_{advance_edit}"]
|
||||
if advance_edit in self.metadata_backup["exclude"] or not hasattr(item, key):
|
||||
continue
|
||||
keys = {v: k for k, v in options.items()}
|
||||
if keys[getattr(item, key)] not in ["default", "all", "never"]:
|
||||
attrs[advance_edit] = keys[getattr(item, key)]
|
||||
if self.type in util.advance_tags_to_edit:
|
||||
for advance_edit in util.advance_tags_to_edit[self.type]:
|
||||
key, options = item_advance_keys[f"item_{advance_edit}"]
|
||||
if advance_edit in self.metadata_backup["exclude"] or not hasattr(item, key):
|
||||
continue
|
||||
keys = {v: k for k, v in options.items()}
|
||||
if keys[getattr(item, key)] not in ["default", "all", "never"]:
|
||||
attrs[advance_edit] = keys[getattr(item, key)]
|
||||
|
||||
def _recur(sub):
|
||||
sub_items = {}
|
||||
|
|
|
@ -255,6 +255,8 @@ def update_libraries(config):
|
|||
for metadata in library.metadata_files:
|
||||
metadata_name = metadata.get_file_name()
|
||||
if config.requested_metadata_files and metadata_name not in config.requested_metadata_files:
|
||||
logger.info("")
|
||||
logger.separator(f"Skipping {metadata_name} Metadata File")
|
||||
continue
|
||||
logger.info("")
|
||||
logger.separator(f"Running {metadata_name} Metadata File\n{metadata.path}")
|
||||
|
@ -623,7 +625,7 @@ def library_operations(config, library):
|
|||
elif tvdb_item and library.mass_genre_update == "tvdb":
|
||||
new_genres = tvdb_item.genres
|
||||
elif anidb_item and library.mass_genre_update == "anidb":
|
||||
new_genres = anidb_item.genres
|
||||
new_genres = anidb_item.tags
|
||||
else:
|
||||
raise Failed
|
||||
if not new_genres:
|
||||
|
|
Loading…
Reference in a new issue