[62] add ignore_cache option to the arrs

This commit is contained in:
meisnate12 2023-02-06 22:20:05 -05:00
parent 1155eb9ca7
commit 28ba768606
8 changed files with 21 additions and 7 deletions

View file

@ -1 +1 @@
1.18.3-develop61 1.18.3-develop62

View file

@ -35,6 +35,7 @@ radarr:
| `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-definition-settings) in the collection definition to add missing per collection.<br>**boolean:** true or false | false | &#10060; | | `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-definition-settings) in the collection definition to add missing per collection.<br>**boolean:** true or false | false | &#10060; |
| `add_existing` | Adds all existing movies in collections to Radarr.<br>Use the `radarr_add_existing` [Radarr Details](../metadata/details/arr.md#radarr-definition-settings) in the collection definition to add existing per collection.<br>**boolean:** true or false | false | &#10060; | | `add_existing` | Adds all existing movies in collections to Radarr.<br>Use the `radarr_add_existing` [Radarr Details](../metadata/details/arr.md#radarr-definition-settings) in the collection definition to add existing per collection.<br>**boolean:** true or false | false | &#10060; |
| `upgrade_existing` | Upgrades all existing movies in collections to match the Quality Profile of the collection.<br>Use the `radarr_upgrade_existing` [Radarr Details](../metadata/details/arr.md#radarr-definition-settings) in the collection definition to upgrade the Quality Profile per collection.<br>**boolean:** true or false | false | &#10060; | | `upgrade_existing` | Upgrades all existing movies in collections to match the Quality Profile of the collection.<br>Use the `radarr_upgrade_existing` [Radarr Details](../metadata/details/arr.md#radarr-definition-settings) in the collection definition to upgrade the Quality Profile per collection.<br>**boolean:** true or false | false | &#10060; |
| `ignore_cache` | Ignores PMM's cache when adding items to Radarr.<br>Use the `radarr_ignore_cache` [Radarr Details](../metadata/details/arr.md#radarr-definition-settings) in the collection definition to ignore per collection.<br>**boolean:** true or false | false | &#10060; |
| `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-definition-settings) in the collection definition to set the Root Folder per collection. | N/A | &#9989; | | `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-definition-settings) in the collection definition to set the Root Folder per collection. | N/A | &#9989; |
| `monitor` | Monitor the movie when adding new movies.<br>Use the `radarr_monitor` [Radarr Details](../metadata/details/arr.md#radarr-definition-settings) in the collection definition to set the Monitor value per collection.<br>**Options:** `movie`, `collection`, `none` | true | &#10060; | | `monitor` | Monitor the movie when adding new movies.<br>Use the `radarr_monitor` [Radarr Details](../metadata/details/arr.md#radarr-definition-settings) in the collection definition to set the Monitor value per collection.<br>**Options:** `movie`, `collection`, `none` | true | &#10060; |
| `availability` | Default Minimum Availability to use when adding new movies.<br>Use the `radarr_availability` [Radarr Details](../metadata/details/arr.md#radarr-definition-settings) in the collection definition to set the Availability per collection.<br>**Options:** `announced`, `cinemas`, `released`, `db` | `announced` | &#9989; | | `availability` | Default Minimum Availability to use when adding new movies.<br>Use the `radarr_availability` [Radarr Details](../metadata/details/arr.md#radarr-definition-settings) in the collection definition to set the Availability per collection.<br>**Options:** `announced`, `cinemas`, `released`, `db` | `announced` | &#9989; |

View file

@ -38,6 +38,7 @@ sonarr:
| `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-definition-settings) in the collection definition to add missing per collection.<br>**boolean:** true or false | false | &#10060; | | `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-definition-settings) in the collection definition to add missing per collection.<br>**boolean:** true or false | false | &#10060; |
| `add_existing` | Adds all existing shows in collections to Sonarr.<br>Use the `sonarr_add_existing` [Sonarr Details](../metadata/details/arr.md#sonarr-definition-settings) in the collection definition to add existing per collection.<br>**boolean:** true or false | false | &#10060; | | `add_existing` | Adds all existing shows in collections to Sonarr.<br>Use the `sonarr_add_existing` [Sonarr Details](../metadata/details/arr.md#sonarr-definition-settings) in the collection definition to add existing per collection.<br>**boolean:** true or false | false | &#10060; |
| `upgrade_existing` | Upgrades all existing shows in collections to match the Quality Profile of the collection.<br>Use the `sonarr_upgrade_existing` [Sonarr Details](../metadata/details/arr.md#sonarr-definition-settings) in the collection definition to upgrade the Quality Profile per collection.<br>**boolean:** true or false | false | &#10060; | | `upgrade_existing` | Upgrades all existing shows in collections to match the Quality Profile of the collection.<br>Use the `sonarr_upgrade_existing` [Sonarr Details](../metadata/details/arr.md#sonarr-definition-settings) in the collection definition to upgrade the Quality Profile per collection.<br>**boolean:** true or false | false | &#10060; |
| `ignore_cache` | Ignores PMM's cache when adding items to Sonarr.<br>Use the `sonarr_ignore_cache` [Sonarr Details](../metadata/details/arr.md#sonarr-definition-settings) in the collection definition to ignore per collection.<br>**boolean:** true or false | false | &#10060; |
| `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-definition-settings) in the collection definition to set the Root Folder per collection. | N/A | &#9989; | | `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-definition-settings) in the collection definition to set the Root Folder per collection. | N/A | &#9989; |
| `monitor` | Default Monitor to use when adding new shows.<br>Use the `sonarr_monitor` [Sonarr Details](../metadata/details/arr.md#sonarr-definition-settings) 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` | &#10060; | | `monitor` | Default Monitor to use when adding new shows.<br>Use the `sonarr_monitor` [Sonarr Details](../metadata/details/arr.md#sonarr-definition-settings) 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` | &#10060; |
| `quality_profile` | Default Quality Profile to use when adding new shows.<br>Use the `sonarr_quality` [Sonarr Details](../metadata/details/arr.md#sonarr-definition-settings) in the collection definition to set the Quality Profile per collection. | N/A | &#9989; | | `quality_profile` | Default Quality Profile to use when adding new shows.<br>Use the `sonarr_quality` [Sonarr Details](../metadata/details/arr.md#sonarr-definition-settings) in the collection definition to set the Quality Profile per collection. | N/A | &#9989; |

View file

@ -9,6 +9,7 @@ All the following attributes can override the global/library [Radarr](../../conf
| `radarr_add_missing` | **Description:** Override Radarr `add_missing` attribute<br>**Values:** `true` or `false` | | `radarr_add_missing` | **Description:** Override Radarr `add_missing` attribute<br>**Values:** `true` or `false` |
| `radarr_add_existing` | **Description:** Override Radarr `add_existing` attribute<br>**Values:** `true` or `false` | | `radarr_add_existing` | **Description:** Override Radarr `add_existing` attribute<br>**Values:** `true` or `false` |
| `radarr_upgrade_existing` | **Description:** Override Radarr `upgrade_existing` attribute<br>**Values:** `true` or `false` | | `radarr_upgrade_existing` | **Description:** Override Radarr `upgrade_existing` attribute<br>**Values:** `true` or `false` |
| `radarr_ignore_cache` | **Description:** Override Radarr `ignore_cache` attribute<br>**Values:** `true` or `false` |
| `radarr_folder` | **Description:** Override Radarr `root_folder_path` attribute<br>**Values:** Folder Path | | `radarr_folder` | **Description:** Override Radarr `root_folder_path` attribute<br>**Values:** Folder Path |
| `radarr_monitor` | **Description:** Override Radarr `monitor` attribute<br>**Values:** `movie`, `collection`, or `none` | | `radarr_monitor` | **Description:** Override Radarr `monitor` attribute<br>**Values:** `movie`, `collection`, or `none` |
| `radarr_availability` | **Description:** Override Radarr `availability` attribute<br>**Values:** `announced`, `cinemas`, `released`, `db` | | `radarr_availability` | **Description:** Override Radarr `availability` attribute<br>**Values:** `announced`, `cinemas`, `released`, `db` |
@ -28,6 +29,7 @@ All the following attributes can override the global/library [Sonarr](../../conf
| `sonarr_add_missing` | **Description:** Override Sonarr `add_missing` attribute<br>**Values:** `true` or `false` | | `sonarr_add_missing` | **Description:** Override Sonarr `add_missing` attribute<br>**Values:** `true` or `false` |
| `sonarr_add_existing` | **Description:** Override Sonarr `add_existing` attribute<br>**Values:** `true` or `false` | | `sonarr_add_existing` | **Description:** Override Sonarr `add_existing` attribute<br>**Values:** `true` or `false` |
| `sonarr_upgrade_existing` | **Description:** Override Sonarr `upgrade_existing` attribute<br>**Values:** `true` or `false` | | `sonarr_upgrade_existing` | **Description:** Override Sonarr `upgrade_existing` attribute<br>**Values:** `true` or `false` |
| `sonarr_ignore_cache` | **Description:** Override Sonarr `ignore_cache` attribute<br>**Values:** `true` or `false` |
| `sonarr_folder` | **Description:** Override Sonarr `root_folder_path` attribute<br>**Values:** Folder Path | | `sonarr_folder` | **Description:** Override Sonarr `root_folder_path` attribute<br>**Values:** Folder Path |
| `sonarr_monitor` | **Description:** Override Sonarr `monitor` attribute<br>**Values:** `all`, `future`, `missing`, `existing`, `pilot`, `first`, `latest`, `none` | | `sonarr_monitor` | **Description:** Override Sonarr `monitor` attribute<br>**Values:** `all`, `future`, `missing`, `existing`, `pilot`, `first`, `latest`, `none` |
| `sonarr_quality` | **Description:** Override Sonarr `quality_profile` attribute<br>**Values:** Sonarr Quality Profile | | `sonarr_quality` | **Description:** Override Sonarr `quality_profile` attribute<br>**Values:** Sonarr Quality Profile |

View file

@ -57,11 +57,11 @@ item_details = ["non_item_remove_label", "item_label", "item_genre", "item_editi
none_details = ["label.sync", "item_label.sync", "item_genre.sync", "radarr_taglist", "sonarr_taglist", "item_edition"] none_details = ["label.sync", "item_label.sync", "item_genre.sync", "radarr_taglist", "sonarr_taglist", "item_edition"]
radarr_details = [ radarr_details = [
"radarr_add_missing", "radarr_add_existing", "radarr_upgrade_existing", "radarr_folder", "radarr_monitor", "radarr_add_missing", "radarr_add_existing", "radarr_upgrade_existing", "radarr_folder", "radarr_monitor",
"radarr_search", "radarr_availability", "radarr_quality", "radarr_tag", "item_radarr_tag" "radarr_search", "radarr_availability", "radarr_quality", "radarr_tag", "item_radarr_tag", "radarr_ignore_cache"
] ]
sonarr_details = [ sonarr_details = [
"sonarr_add_missing", "sonarr_add_existing", "sonarr_upgrade_existing", "sonarr_folder", "sonarr_monitor", "sonarr_language", "sonarr_add_missing", "sonarr_add_existing", "sonarr_upgrade_existing", "sonarr_folder", "sonarr_monitor", "sonarr_language",
"sonarr_series", "sonarr_quality", "sonarr_season", "sonarr_search", "sonarr_cutoff_search", "sonarr_tag", "item_sonarr_tag" "sonarr_series", "sonarr_quality", "sonarr_season", "sonarr_search", "sonarr_cutoff_search", "sonarr_tag", "item_sonarr_tag", "sonarr_ignore_cache"
] ]
album_details = ["non_item_remove_label", "item_label", "item_album_sorting"] album_details = ["non_item_remove_label", "item_label", "item_album_sorting"]
sub_filters = [ sub_filters = [
@ -1069,7 +1069,7 @@ class CollectionBuilder:
self.item_details[method_name] = str(method_data).lower() self.item_details[method_name] = str(method_data).lower()
def _radarr(self, method_name, method_data): def _radarr(self, method_name, method_data):
if method_name in ["radarr_add_missing", "radarr_add_existing", "radarr_upgrade_existing", "radarr_search", "radarr_monitor"]: if method_name in ["radarr_add_missing", "radarr_add_existing", "radarr_upgrade_existing", "radarr_search", "radarr_monitor", "radarr_ignore_cache"]:
self.radarr_details[method_name[7:]] = util.parse(self.Type, method_name, method_data, datatype="bool") self.radarr_details[method_name[7:]] = util.parse(self.Type, method_name, method_data, datatype="bool")
elif method_name == "radarr_folder": elif method_name == "radarr_folder":
self.radarr_details["folder"] = method_data self.radarr_details["folder"] = method_data
@ -1088,7 +1088,7 @@ class CollectionBuilder:
self.builders.append((method_name, True)) self.builders.append((method_name, True))
def _sonarr(self, method_name, method_data): def _sonarr(self, method_name, method_data):
if method_name in ["sonarr_add_missing", "sonarr_add_existing", "sonarr_upgrade_existing", "sonarr_season", "sonarr_search", "sonarr_cutoff_search"]: if method_name in ["sonarr_add_missing", "sonarr_add_existing", "sonarr_upgrade_existing", "sonarr_season", "sonarr_search", "sonarr_cutoff_search", "sonarr_ignore_cache"]:
self.sonarr_details[method_name[7:]] = util.parse(self.Type, method_name, method_data, datatype="bool") self.sonarr_details[method_name[7:]] = util.parse(self.Type, method_name, method_data, datatype="bool")
elif method_name in ["sonarr_folder", "sonarr_quality", "sonarr_language"]: elif method_name in ["sonarr_folder", "sonarr_quality", "sonarr_language"]:
self.sonarr_details[method_name[7:]] = method_data self.sonarr_details[method_name[7:]] = method_data

View file

@ -640,6 +640,7 @@ class ConfigFile:
"add_missing": check_for_attribute(self.data, "add_missing", parent="radarr", var_type="bool", default=False), "add_missing": check_for_attribute(self.data, "add_missing", parent="radarr", var_type="bool", default=False),
"add_existing": check_for_attribute(self.data, "add_existing", parent="radarr", var_type="bool", default=False), "add_existing": check_for_attribute(self.data, "add_existing", parent="radarr", var_type="bool", default=False),
"upgrade_existing": check_for_attribute(self.data, "upgrade_existing", parent="radarr", var_type="bool", default=False), "upgrade_existing": check_for_attribute(self.data, "upgrade_existing", parent="radarr", var_type="bool", default=False),
"ignore_cache": check_for_attribute(self.data, "ignore_cache", parent="radarr", var_type="bool", default=False),
"root_folder_path": check_for_attribute(self.data, "root_folder_path", parent="radarr", default_is_none=True), "root_folder_path": check_for_attribute(self.data, "root_folder_path", parent="radarr", default_is_none=True),
"monitor": check_for_attribute(self.data, "monitor", parent="radarr", var_type="bool", default=True), "monitor": check_for_attribute(self.data, "monitor", parent="radarr", var_type="bool", default=True),
"availability": check_for_attribute(self.data, "availability", parent="radarr", test_list=radarr.availability_descriptions, default="announced"), "availability": check_for_attribute(self.data, "availability", parent="radarr", test_list=radarr.availability_descriptions, default="announced"),
@ -655,6 +656,7 @@ class ConfigFile:
"add_missing": check_for_attribute(self.data, "add_missing", parent="sonarr", var_type="bool", default=False), "add_missing": check_for_attribute(self.data, "add_missing", parent="sonarr", var_type="bool", default=False),
"add_existing": check_for_attribute(self.data, "add_existing", parent="sonarr", var_type="bool", default=False), "add_existing": check_for_attribute(self.data, "add_existing", parent="sonarr", var_type="bool", default=False),
"upgrade_existing": check_for_attribute(self.data, "upgrade_existing", parent="sonarr", var_type="bool", default=False), "upgrade_existing": check_for_attribute(self.data, "upgrade_existing", parent="sonarr", var_type="bool", default=False),
"ignore_cache": check_for_attribute(self.data, "ignore_cache", parent="sonarr", var_type="bool", default=False),
"root_folder_path": check_for_attribute(self.data, "root_folder_path", parent="sonarr", default_is_none=True), "root_folder_path": check_for_attribute(self.data, "root_folder_path", parent="sonarr", default_is_none=True),
"monitor": check_for_attribute(self.data, "monitor", parent="sonarr", test_list=sonarr.monitor_descriptions, default="all"), "monitor": check_for_attribute(self.data, "monitor", parent="sonarr", test_list=sonarr.monitor_descriptions, default="all"),
"quality_profile": check_for_attribute(self.data, "quality_profile", parent="sonarr", default_is_none=True), "quality_profile": check_for_attribute(self.data, "quality_profile", parent="sonarr", default_is_none=True),
@ -923,6 +925,7 @@ class ConfigFile:
"add_missing": check_for_attribute(lib, "add_missing", parent="radarr", var_type="bool", default=self.general["radarr"]["add_missing"], save=False), "add_missing": check_for_attribute(lib, "add_missing", parent="radarr", var_type="bool", default=self.general["radarr"]["add_missing"], save=False),
"add_existing": check_for_attribute(lib, "add_existing", parent="radarr", var_type="bool", default=self.general["radarr"]["add_existing"], save=False), "add_existing": check_for_attribute(lib, "add_existing", parent="radarr", var_type="bool", default=self.general["radarr"]["add_existing"], save=False),
"upgrade_existing": check_for_attribute(lib, "upgrade_existing", parent="radarr", var_type="bool", default=self.general["radarr"]["upgrade_existing"], save=False), "upgrade_existing": check_for_attribute(lib, "upgrade_existing", parent="radarr", var_type="bool", default=self.general["radarr"]["upgrade_existing"], save=False),
"ignore_cache": check_for_attribute(lib, "ignore_cache", parent="radarr", var_type="bool", default=self.general["radarr"]["ignore_cache"], save=False),
"root_folder_path": check_for_attribute(lib, "root_folder_path", parent="radarr", default=self.general["radarr"]["root_folder_path"], req_default=True, save=False), "root_folder_path": check_for_attribute(lib, "root_folder_path", parent="radarr", default=self.general["radarr"]["root_folder_path"], req_default=True, save=False),
"monitor": check_for_attribute(lib, "monitor", parent="radarr", var_type="bool", default=self.general["radarr"]["monitor"], save=False), "monitor": check_for_attribute(lib, "monitor", parent="radarr", var_type="bool", default=self.general["radarr"]["monitor"], save=False),
"availability": check_for_attribute(lib, "availability", parent="radarr", test_list=radarr.availability_descriptions, default=self.general["radarr"]["availability"], save=False), "availability": check_for_attribute(lib, "availability", parent="radarr", test_list=radarr.availability_descriptions, default=self.general["radarr"]["availability"], save=False),
@ -951,6 +954,7 @@ class ConfigFile:
"add_missing": check_for_attribute(lib, "add_missing", parent="sonarr", var_type="bool", default=self.general["sonarr"]["add_missing"], save=False), "add_missing": check_for_attribute(lib, "add_missing", parent="sonarr", var_type="bool", default=self.general["sonarr"]["add_missing"], save=False),
"add_existing": check_for_attribute(lib, "add_existing", parent="sonarr", var_type="bool", default=self.general["sonarr"]["add_existing"], save=False), "add_existing": check_for_attribute(lib, "add_existing", parent="sonarr", var_type="bool", default=self.general["sonarr"]["add_existing"], save=False),
"upgrade_existing": check_for_attribute(lib, "upgrade_existing", parent="sonarr", var_type="bool", default=self.general["sonarr"]["upgrade_existing"], save=False), "upgrade_existing": check_for_attribute(lib, "upgrade_existing", parent="sonarr", var_type="bool", default=self.general["sonarr"]["upgrade_existing"], save=False),
"ignore_cache": check_for_attribute(lib, "ignore_cache", parent="sonarr", var_type="bool", default=self.general["sonarr"]["ignore_cache"], save=False),
"root_folder_path": check_for_attribute(lib, "root_folder_path", parent="sonarr", default=self.general["sonarr"]["root_folder_path"], req_default=True, save=False), "root_folder_path": check_for_attribute(lib, "root_folder_path", parent="sonarr", default=self.general["sonarr"]["root_folder_path"], req_default=True, save=False),
"monitor": check_for_attribute(lib, "monitor", parent="sonarr", test_list=sonarr.monitor_descriptions, default=self.general["sonarr"]["monitor"], save=False), "monitor": check_for_attribute(lib, "monitor", parent="sonarr", test_list=sonarr.monitor_descriptions, default=self.general["sonarr"]["monitor"], save=False),
"quality_profile": check_for_attribute(lib, "quality_profile", parent="sonarr", default=self.general["sonarr"]["quality_profile"], req_default=True, save=False), "quality_profile": check_for_attribute(lib, "quality_profile", parent="sonarr", default=self.general["sonarr"]["quality_profile"], req_default=True, save=False),

View file

@ -38,6 +38,7 @@ class Radarr:
self.search = params["search"] self.search = params["search"]
self.radarr_path = params["radarr_path"] if params["radarr_path"] and params["plex_path"] else "" self.radarr_path = params["radarr_path"] if params["radarr_path"] and params["plex_path"] else ""
self.plex_path = params["plex_path"] if params["radarr_path"] and params["plex_path"] else "" self.plex_path = params["plex_path"] if params["radarr_path"] and params["plex_path"] else ""
self.ignore_cache = params["ignore_cache"]
def add_tmdb(self, tmdb_ids, **options): def add_tmdb(self, tmdb_ids, **options):
_ids = [] _ids = []
@ -55,6 +56,7 @@ class Radarr:
logger.debug(tmdb_id) logger.debug(tmdb_id)
logger.trace("") logger.trace("")
upgrade_existing = options["upgrade_existing"] if "upgrade_existing" in options else self.upgrade_existing upgrade_existing = options["upgrade_existing"] if "upgrade_existing" in options else self.upgrade_existing
ignore_cache = options["ignore_cache"] if "ignore_cache" in options else self.ignore_cache
folder = options["folder"] if "folder" in options else self.root_folder_path folder = options["folder"] if "folder" in options else self.root_folder_path
monitor = options["monitor"] if "monitor" in options else self.monitor monitor = options["monitor"] if "monitor" in options else self.monitor
availability = availability_translation[options["availability"] if "availability" in options else self.availability] availability = availability_translation[options["availability"] if "availability" in options else self.availability]
@ -62,6 +64,7 @@ class Radarr:
tags = options["tag"] if "tag" in options else self.tag tags = options["tag"] if "tag" in options else self.tag
search = options["search"] if "search" in options else self.search search = options["search"] if "search" in options else self.search
logger.trace(f"Upgrade Existing: {upgrade_existing}") logger.trace(f"Upgrade Existing: {upgrade_existing}")
logger.trace(f"Ignore Cache: {ignore_cache}")
logger.trace(f"Folder: {folder}") logger.trace(f"Folder: {folder}")
logger.trace(f"Monitor: {monitor}") logger.trace(f"Monitor: {monitor}")
logger.trace(f"Availability: {availability}") logger.trace(f"Availability: {availability}")
@ -96,7 +99,7 @@ class Radarr:
tmdb_id = item[0] if isinstance(item, tuple) else item tmdb_id = item[0] if isinstance(item, tuple) else item
logger.ghost(f"Loading TMDb ID {i}/{len(tmdb_ids)} ({tmdb_id})") logger.ghost(f"Loading TMDb ID {i}/{len(tmdb_ids)} ({tmdb_id})")
try: try:
if self.config.Cache: if self.config.Cache and not ignore_cache:
_id = self.config.Cache.query_radarr_adds(tmdb_id, self.library.original_mapping_name) _id = self.config.Cache.query_radarr_adds(tmdb_id, self.library.original_mapping_name)
if _id: if _id:
skipped.append(item) skipped.append(item)

View file

@ -58,6 +58,7 @@ class Sonarr:
self.cutoff_search = params["cutoff_search"] self.cutoff_search = params["cutoff_search"]
self.sonarr_path = params["sonarr_path"] if params["sonarr_path"] and params["plex_path"] else "" self.sonarr_path = params["sonarr_path"] if params["sonarr_path"] and params["plex_path"] else ""
self.plex_path = params["plex_path"] if params["sonarr_path"] and params["plex_path"] else "" self.plex_path = params["plex_path"] if params["sonarr_path"] and params["plex_path"] else ""
self.ignore_cache = params["ignore_cache"]
def add_tvdb(self, tvdb_ids, **options): def add_tvdb(self, tvdb_ids, **options):
_ids = [] _ids = []
@ -74,6 +75,7 @@ class Sonarr:
for tvdb_id in _paths: for tvdb_id in _paths:
logger.debug(tvdb_id) logger.debug(tvdb_id)
upgrade_existing = options["upgrade_existing"] if "upgrade_existing" in options else self.upgrade_existing upgrade_existing = options["upgrade_existing"] if "upgrade_existing" in options else self.upgrade_existing
ignore_cache = options["ignore_cache"] if "ignore_cache" in options else self.ignore_cache
folder = options["folder"] if "folder" in options else self.root_folder_path folder = options["folder"] if "folder" in options else self.root_folder_path
monitor = monitor_translation[options["monitor"] if "monitor" in options else self.monitor] monitor = monitor_translation[options["monitor"] if "monitor" in options else self.monitor]
quality_profile = options["quality"] if "quality" in options else self.quality_profile quality_profile = options["quality"] if "quality" in options else self.quality_profile
@ -85,6 +87,7 @@ class Sonarr:
search = options["search"] if "search" in options else self.search search = options["search"] if "search" in options else self.search
cutoff_search = options["cutoff_search"] if "cutoff_search" in options else self.cutoff_search cutoff_search = options["cutoff_search"] if "cutoff_search" in options else self.cutoff_search
logger.trace(f"Upgrade Existing: {upgrade_existing}") logger.trace(f"Upgrade Existing: {upgrade_existing}")
logger.trace(f"Ignore Cache: {ignore_cache}")
logger.trace(f"Folder: {folder}") logger.trace(f"Folder: {folder}")
logger.trace(f"Monitor: {monitor}") logger.trace(f"Monitor: {monitor}")
logger.trace(f"Quality Profile: {quality_profile}") logger.trace(f"Quality Profile: {quality_profile}")
@ -120,7 +123,7 @@ class Sonarr:
tvdb_id = item[0] if isinstance(item, tuple) else item tvdb_id = item[0] if isinstance(item, tuple) else item
logger.ghost(f"Loading TVDb ID {i}/{len(tvdb_ids)} ({tvdb_id})") logger.ghost(f"Loading TVDb ID {i}/{len(tvdb_ids)} ({tvdb_id})")
try: try:
if self.config.Cache: if self.config.Cache and not ignore_cache:
_id = self.config.Cache.query_sonarr_adds(tvdb_id, self.library.original_mapping_name) _id = self.config.Cache.query_sonarr_adds(tvdb_id, self.library.original_mapping_name)
if _id: if _id:
skipped.append(item) skipped.append(item)