[61] add better imdb error handling

pull/1234/head
meisnate12 2 years ago
parent 0df9f677f3
commit b7d932d09f

@ -1 +1 @@
1.18.0-develop60
1.18.0-develop61

@ -37,7 +37,7 @@ radarr:
| `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; |
| `quality_profile` | Default Quality Profile to use when adding new movies.<br>Use the `radarr_quality` [Radarr Details](../metadata/details/arr.md#radarr-definition-settings) in the collection definition to set the Quality Profile per collection. | N/A | &#10060; |
| `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-definition-settings) in the collection definition to set the Tags per collection. | ` ` | &#10060; |
| `tag` | Default 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-definition-settings) in the collection definition to set the Tags per collection. | ` ` | &#10060; |
| `search` | Start search for missing movie when adding new movies.<br>Use the `radarr_search` [Radarr Details](../metadata/details/arr.md#radarr-definition-settings) in the collection definition to set the search value per collection.<br>**boolean:** true or false | false | &#10060; |
| `plex_path` | When using `add_existing` or `radarr_add_all` Convert this part of the path to `radarr_path`. | ` ` | &#10060; |
| `radarr_path` | When using `add_existing` or `radarr_add_all` Convert the `plex_path` part of the path to this. | ` ` | &#10060; |

@ -41,7 +41,7 @@ sonarr:
| `language_profile` | Default Language Profile to use when adding new shows.<br>Use the `sonarr_language` [Sonarr Details](../metadata/details/arr.md#sonarr-definition-settings) in the collection definition to set the Language Profile per collection. | First Profile | &#10060; |
| `series_type` | Default Series Type to use when adding new shows.<br>Use the `sonarr_series` [Sonarr Details](../metadata/details/arr.md#sonarr-definition-settings) 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` | &#10060; |
| `season_folder` | Use the Season Folder Option when adding new shows.<br>Use the `sonarr_season` [Sonarr Details](../metadata/details/arr.md#sonarr-definition-settings) in the collection definition to set the season folder value per collection. <br>**boolean:** true or false | true | &#10060; |
| `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-definition-settings) in the collection definition to set the tags per collection. | ` ` | &#10060; |
| `tag` | Default 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-definition-settings) in the collection definition to set the tags per collection. | ` ` | &#10060; |
| `search` | Start search for missing episodes when adding new shows.<br>Use the `sonarr_search` [Sonarr Details](../metadata/details/arr.md#sonarr-definition-settings) in the collection definition to set the search value per collection.<br>**boolean:** true or false | false | &#10060; |
| `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-definition-settings) in the collection definition to set the cutoff search value per collection.<br>**boolean:** true or false | false | &#10060; |
| `plex_path` | When using `add_existing` or `sonarr_add_all` Convert this part of the path to `sonarr_path`. | ` ` | &#10060; |

@ -84,9 +84,12 @@ class IMDb:
return valid_users
def _watchlist(self, user, language):
response = self.config.get_html(f"{base_url}/user/{user}/watchlist", headers=util.header(language))
imdb_url = f"{base_url}/user/{user}/watchlist"
response = self.config.get_html(imdb_url, headers=util.header(language))
group = response.xpath("//span[@class='ab_widget']/script[@type='text/javascript']/text()")
if group:
return [k for k in json.loads(str(group[0]).split("\n")[5][35:-2])["titles"]]
raise Failed(f"IMDb Error: Failed to parse URL: {imdb_url}")
def _total(self, imdb_url, language):
if imdb_url.startswith(urls["lists"]):

Loading…
Cancel
Save