[150] minor fixes

pull/1133/head^2
meisnate12 2 years ago
parent af63b6ee34
commit 90204502ea

@ -1 +1 @@
1.17.3-develop149 1.17.3-develop150

@ -45,6 +45,25 @@ dynamic_collections:
translation_key: translation_key:
default: content_rating_cs default: content_rating_cs
other: content_rating_other other: content_rating_other
order:
1: "01_"
2: "02_"
3: "03_"
4: "04_"
5: "05_"
6: "06_"
7: "07_"
8: "08_"
9: "09_"
10: "10_"
11: "11_"
12: "12_"
13: "13_"
14: "14_"
15: "15_"
16: "16_"
17: "17_"
18: "18_"
include: include:
- 1 - 1
- 2 - 2

@ -15,10 +15,6 @@ translations:
pmm: translations pmm: translations
collections: collections:
Chart Collections:
template:
- name: separator
separator: chart
Newly Released: Newly Released:
variables: variables:

@ -1,6 +1,6 @@
############################################################################## ##############################################################################
# FlixPatrol Charts Collections # # FlixPatrol Charts Collections #
# Created by Yozora, Bullmoose20, anon_fawkes & Sohjiro # # Created by Yozora, Bullmoose20, anon_fawkes, & Sohjiro #
# EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL # # EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL #
# https://metamanager.wiki/en/latest/defaults/chart/flixpatrol.html # # https://metamanager.wiki/en/latest/defaults/chart/flixpatrol.html #
############################################################################## ##############################################################################

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@ -0,0 +1,171 @@
##############################################################################
# Languages Overlays #
# Created by Yozora, Bullmoose20, Cpt Kuesel, & Sohjiro #
# EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL #
# https://metamanager.wiki/en/latest/defaults/overlays/languages.html #
##############################################################################
external_templates:
pmm: templates
template_variables:
default:
style: round
country: <<key>>
queue: position
pmm: flag/<<style>>/<<country>>
queues:
position:
left:
- horizontal_align: left
vertical_align: top
horizontal_offset: 15
vertical_offset: 15
- horizontal_align: left
vertical_align: top
horizontal_offset: 15
vertical_offset: 75
- horizontal_align: left
vertical_align: top
horizontal_offset: 15
vertical_offset: 135
- horizontal_align: left
vertical_align: top
horizontal_offset: 15
vertical_offset: 195
- horizontal_align: left
vertical_align: top
horizontal_offset: 15
vertical_offset: 255
right:
- horizontal_align: right
vertical_align: top
horizontal_offset: 15
vertical_offset: 15
- horizontal_align: right
vertical_align: top
horizontal_offset: 15
vertical_offset: 75
- horizontal_align: right
vertical_align: top
horizontal_offset: 15
vertical_offset: 135
- horizontal_align: right
vertical_align: top
horizontal_offset: 15
vertical_offset: 195
- horizontal_align: right
vertical_align: top
horizontal_offset: 15
vertical_offset: 255
templates:
flags:
conditionals:
search_attribute:
default: audio_language
conditions:
- use_subtitles: true
value: subtitle_language
ignore_blank_results: true
plex_search:
all:
<<search_attribute>>: <<key>>
overlays:
german:
variables: {key: de, weight: 240}
template: [name: standard, name: flags]
english:
variables: {key: en, weight: 230, country: us}
template: [name: standard, name: flags]
french:
variables: {key: fr, weight: 220}
template: [name: standard, name: flags]
japanese:
variables: {key: ja, weight: 210, country: jp}
template: [name: standard, name: flags]
korean:
variables: {key: ko, weight: 200, country: kr}
template: [name: standard, name: flags]
chinese:
variables: {key: zh, weight: 190, country: cn}
template: [name: standard, name: flags]
danish:
variables: {key: da, weight: 180, country: dk}
template: [name: standard, name: flags]
russian:
variables: {key: ru, weight: 170}
template: [name: standard, name: flags]
spanish:
variables: {key: es, weight: 160}
template: [name: standard, name: flags]
italian:
variables: {key: it, weight: 150}
template: [name: standard, name: flags]
portuguese:
variables: {key: pt, weight: 140}
template: [name: standard, name: flags]
hindi:
variables: {key: hi, weight: 130, country: in}
template: [name: standard, name: flags]
telugu:
variables: {key: te, weight: 120, country: in}
template: [name: standard, name: flags]
farsi:
variables: {key: fa, weight: 110, country: ir}
template: [name: standard, name: flags]
thai:
variables: {key: th, weight: 100}
template: [name: standard, name: flags]
dutch:
variables: {key: nl, weight: 90}
template: [name: standard, name: flags]
norwegian:
variables: {key: no, weight: 80}
template: [name: standard, name: flags]
icelandic:
variables: {key: is, weight: 70}
template: [name: standard, name: flags]
swedish:
variables: {key: sv, weight: 60, country: se}
template: [name: standard, name: flags]
turkish:
variables: {key: tr, weight: 50}
template: [name: standard, name: flags]
polish:
variables: {key: pl, weight: 40}
template: [name: standard, name: flags]
czech:
variables: {key: cs, weight: 30, country: cz}
template: [name: standard, name: flags]
ukrainian:
variables: {key: uk, weight: 20, country: ua}
template: [name: standard, name: flags]
hungarian:
variables: {key: hu, weight: 10}
template: [name: standard, name: flags]

@ -1,15 +1,15 @@
############################################################################## ##############################################################################
# Audio Language Overlay # # Language Count Overlay #
# Created by Yozora, Bullmoose20, & Sohjiro # # Created by Yozora, Bullmoose20, & Sohjiro #
# Credit to Magic815 for base images # # Credit to Magic815 for base images #
# EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL # # EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL #
# https://metamanager.wiki/en/latest/defaults/overlays/audio_language.html # # https://metamanager.wiki/en/latest/defaults/overlays/language_count.html #
############################################################################## ##############################################################################
external_templates: external_templates:
pmm: templates pmm: templates
template_variables: template_variables:
group: audio_language group: language
horizontal_offset: 0 horizontal_offset: 0
horizontal_align: center horizontal_align: center
vertical_offset: 30 vertical_offset: 30
@ -20,7 +20,7 @@ external_templates:
pmm: <<overlay_name>> pmm: <<overlay_name>>
templates: templates:
audio_language: language:
default: default:
minimum: 2 minimum: 2
optional: optional:
@ -35,9 +35,8 @@ overlays:
Dual-Audio: Dual-Audio:
variables: {key: dual, weight: 20, lt: 3} variables: {key: dual, weight: 20, lt: 3}
template: [name: standard, name: audio_language] template: [name: standard, name: language]
Multi-Audio: Multi-Audio:
variables: {key: multi, weight: 10} variables: {key: multi, weight: 10}
template: [name: standard, name: audio_language] template: [name: standard, name: language]

@ -130,7 +130,7 @@ html_theme_options = {
("QNAP Walkthrough", "home/guides/qnap"), ("QNAP Walkthrough", "home/guides/qnap"),
("Synology Walkthrough", "home/guides/synology"), ("Synology Walkthrough", "home/guides/synology"),
]), ]),
("Docker Images", "home/guides/alternative-docker"), ("Docker Images", "home/docker"),
("Log Files", "home/logs"), ("Log Files", "home/logs"),
("Run Commands & Environment Variables", "home/environmental"), ("Run Commands & Environment Variables", "home/environmental"),
("Knowledgebase/FAQ", "home/kb"), ("Knowledgebase/FAQ", "home/kb"),
@ -269,11 +269,12 @@ html_theme_options = {
("Shared Variables", "defaults/overlays/variables"), ("Shared Variables", "defaults/overlays/variables"),
("_divider", ), ("_divider", ),
("Audio Codec", "defaults/overlays/audio_codec"), ("Audio Codec", "defaults/overlays/audio_codec"),
("Audio Languages", "defaults/overlays/audio_language"),
("Common Sense Age Ratings", "defaults/overlays/commonsense"), ("Common Sense Age Ratings", "defaults/overlays/commonsense"),
("Direct Play Only", "defaults/overlays/direct_play"), ("Direct Play Only", "defaults/overlays/direct_play"),
("Episode Info", "defaults/overlays/episode_info"), ("Episode Info", "defaults/overlays/episode_info"),
("FlixPatrol Top", "defaults/overlays/flixpatrol"), ("FlixPatrol Top", "defaults/overlays/flixpatrol"),
("Language Count", "defaults/overlays/language_count"),
("Languages", "defaults/overlays/languages"),
("MediaStinger", "defaults/overlays/mediastinger"), ("MediaStinger", "defaults/overlays/mediastinger"),
("Ratings", "defaults/overlays/ratings"), ("Ratings", "defaults/overlays/ratings"),
("Resolution/Edition", "defaults/overlays/resolution"), ("Resolution/Edition", "defaults/overlays/resolution"),

@ -11,13 +11,14 @@ These overlays are applied by calling the below paths into the `overlay_path` [s
### Overlay Files ### Overlay Files
| Default | path | Example Overlays | Movies | Shows | Seasons | Episodes | | Default | path | Example Overlays | Movies | Shows | Seasons | Episodes |
|:-----------------------------------------------|:-----------------:|:--------------------------------------------------------------------------|:--------:|:---------:|:---------:|:--------:| |:-----------------------------------------------|:----------------:|:--------------------------------------------------------------------------|:--------:|:---------:|:---------:|:--------:|
| [Audio Codec](overlays/audio_codec) | `audio_codec` | Dolby Atmos logo, DTS logo | &#9989; | &#9989; | &#9989; | &#9989; | | [Audio Codec](overlays/audio_codec) | `audio_codec` | Dolby Atmos logo, DTS logo | &#9989; | &#9989; | &#9989; | &#9989; |
| [Audio Language](overlays/audio_language) | `audio_language` | French Audio, Korean Audio | &#9989; | &#9989; | &#9989; | &#9989; |
| [CommonSense Age Rating](overlays/commonsense) | `commonsense` | "3+", "16+" | &#9989; | &#9989; | &#10071; | &#10071; | | [CommonSense Age Rating](overlays/commonsense) | `commonsense` | "3+", "16+" | &#9989; | &#9989; | &#10071; | &#10071; |
| [Direct Play](overlays/direct_play) | `direct_play` | "Direct Play Only" | &#9989; | &#10071; | &#10071; | &#9989; | | [Direct Play](overlays/direct_play) | `direct_play` | "Direct Play Only" | &#9989; | &#10071; | &#10071; | &#9989; |
| [Episode Info](overlays/episode_info) | `episode_info` | "S01E01", "S02E09" | &#10060; | &#10060; | &#10060; | &#9989; | | [Episode Info](overlays/episode_info) | `episode_info` | "S01E01", "S02E09" | &#10060; | &#10060; | &#10060; | &#9989; |
| [FlixPatrol](overlays/flixpatrol) | `flixpatrol` | "Streaming service logo with words "TOP" | &#9989; | &#9989; | &#10060; | &#10060; | | [FlixPatrol](overlays/flixpatrol) | `flixpatrol` | "Streaming service logo with words "TOP" | &#9989; | &#9989; | &#10060; | &#10060; |
| [Language Count](overlays/language_count) | `language_count` | Dual-Audio, Multi-Audio, Dual-Subtitle, Multi-Subtitle | &#9989; | &#9989; | &#9989; | &#9989; |
| [Languages](overlays/languages) | `languages` | Flags Based on the Audio/Subtitles a file has | &#9989; | &#9989; | &#9989; | &#9989; |
| [Mediastinger](overlays/mediastinger) | `mediastinger` | Mediastinger Logo for After/During Credit Scenes | &#9989; | &#9989; | &#10060; | &#10060; | | [Mediastinger](overlays/mediastinger) | `mediastinger` | Mediastinger Logo for After/During Credit Scenes | &#9989; | &#9989; | &#10060; | &#10060; |
| [Ratings](overlays/ratings) | `ratings` | IMDb Audience Rating, Metacritic Critic Rating | &#9989; | &#9989; | &#10060; | &#9989; | | [Ratings](overlays/ratings) | `ratings` | IMDb Audience Rating, Metacritic Critic Rating | &#9989; | &#9989; | &#10060; | &#9989; |
| [Resolution/Editions](overlays/resolution) | `resolution` | 4K Dolby Vision logo, 720P logo, "Director's Cut", "Criterion Collection" | &#9989; | &#9989; | &#10060; | &#9989; | | [Resolution/Editions](overlays/resolution) | `resolution` | 4K Dolby Vision logo, 720P logo, "Director's Cut", "Criterion Collection" | &#9989; | &#9989; | &#10060; | &#9989; |

@ -0,0 +1,7 @@
| f |
|:--------------------------------------------------------------------------:|
| Languages Overlays |
| Created by Yozora, Bullmoose20, Cpt Kuesel, & Sohjiro |
| EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL |
| https://metamanager.wiki/en/latest/defaults/overlays/languages.html |
# Languages Overlays #

@ -2219,10 +2219,8 @@ class CollectionBuilder:
return True return True
def check_missing_filters(self, item_id, is_movie, tmdb_item=None, check_released=False): def check_missing_filters(self, item_id, is_movie, tmdb_item=None, check_released=False):
final_return = True
if self.has_tmdb_filters or check_released: if self.has_tmdb_filters or check_released:
try: try:
final_return = False
if tmdb_item is None: if tmdb_item is None:
if is_movie: if is_movie:
tmdb_item = self.config.TMDb.get_movie(item_id, ignore_cache=True) tmdb_item = self.config.TMDb.get_movie(item_id, ignore_cache=True)
@ -2234,6 +2232,9 @@ class CollectionBuilder:
date_to_check = tmdb_item.release_date if is_movie else tmdb_item.first_air_date date_to_check = tmdb_item.release_date if is_movie else tmdb_item.first_air_date
if not date_to_check or date_to_check > self.current_time: if not date_to_check or date_to_check > self.current_time:
return False return False
final_return = True
if self.has_tmdb_filters:
final_return = False
for filter_list in self.filters: for filter_list in self.filters:
tmdb_f = [(k, v) for k, v in filter_list if k in tmdb_filters] tmdb_f = [(k, v) for k, v in filter_list if k in tmdb_filters]
if not tmdb_f: if not tmdb_f:

@ -116,13 +116,13 @@ class ConfigFile:
self.overlays_only = attrs["overlays_only"] if "overlays_only" in attrs else False self.overlays_only = attrs["overlays_only"] if "overlays_only" in attrs else False
current_time = datetime.now() current_time = datetime.now()
self.data = YAML(self.config_path).data
with open(self.config_path, encoding="utf-8") as fp: with open(self.config_path, encoding="utf-8") as fp:
logger.separator("Redacted Config", space=False, border=False, trace=True) logger.separator("Redacted Config", space=False, border=False, debug=True)
for line in fp.readlines(): for line in fp.readlines():
logger.trace(re.sub(r"(token|client.*|url|api_*key|secret|webhooks|error|run_start|run_end|version|changes|username|password): .+", r"\1: (redacted)", line.strip("\r\n"))) logger.debug(re.sub(r"(token|client.*|url|api_*key|secret|webhooks|error|run_start|run_end|version|changes|username|password): .+", r"\1: (redacted)", line.strip("\r\n")))
logger.trace("") logger.debug("")
self.data = YAML(self.config_path).data
def replace_attr(all_data, attr, par): def replace_attr(all_data, attr, par):
if "settings" not in all_data: if "settings" not in all_data:
@ -830,8 +830,6 @@ class ConfigFile:
if lib and "template_variables" in lib and lib["template_variables"] and isinstance(lib["template_variables"], dict): if lib and "template_variables" in lib and lib["template_variables"] and isinstance(lib["template_variables"], dict):
lib_vars = lib["template_variables"] lib_vars = lib["template_variables"]
logger.separator("Metadata Files", space=False, border=False)
try: try:
if lib and "metadata_path" in lib: if lib and "metadata_path" in lib:
if not lib["metadata_path"]: if not lib["metadata_path"]:
@ -859,8 +857,6 @@ class ConfigFile:
except NotScheduled: except NotScheduled:
params["skip_library"] = True params["skip_library"] = True
logger.separator("Overlay Files", space=False, border=False)
params["overlay_path"] = [] params["overlay_path"] = []
params["remove_overlays"] = False params["remove_overlays"] = False
params["reapply_overlays"] = False params["reapply_overlays"] = False

@ -207,8 +207,9 @@ class DataFile:
elif not isinstance(self.templates[variables["name"]][0], dict): elif not isinstance(self.templates[variables["name"]][0], dict):
raise Failed(f"{self.data_type} Error: template {variables['name']} is not a dictionary") raise Failed(f"{self.data_type} Error: template {variables['name']} is not a dictionary")
else: else:
logger.debug(f"Template {variables['name']}") logger.separator(f"Template {variables['name']}", space=False, border=False, debug=True)
logger.debug(f"Call: {variables}") logger.trace("")
logger.trace(f"Call: {variables}")
remove_variables = [] remove_variables = []
optional = [] optional = []
@ -248,6 +249,7 @@ class DataFile:
(extra_variables, "Definition", False), (extra_variables, "Definition", False),
(self.temp_vars, "Config", True) (self.temp_vars, "Config", True)
]: ]:
logger.trace("")
logger.trace(f"{input_type}: {input_dict}") logger.trace(f"{input_type}: {input_dict}")
for input_key, input_value in input_dict.items(): for input_key, input_value in input_dict.items():
if input_key == "conditionals": if input_key == "conditionals":
@ -386,7 +388,7 @@ class DataFile:
if "move_prefix" in template: if "move_prefix" in template:
prefix = template["move_prefix"] prefix = template["move_prefix"]
elif "move_collection_prefix" in template: elif "move_collection_prefix" in template:
logger.debuf("") logger.debug("")
logger.debug(f"{self.data_type} Warning: template sub-attribute move_collection_prefix will run as move_prefix") logger.debug(f"{self.data_type} Warning: template sub-attribute move_collection_prefix will run as move_prefix")
prefix = template["move_collection_prefix"] prefix = template["move_collection_prefix"]
if prefix: if prefix:
@ -413,14 +415,15 @@ class DataFile:
default = {k: v for k, v in default.items() if k not in variables} default = {k: v for k, v in default.items() if k not in variables}
optional = [o for o in optional if o not in variables and o not in default] optional = [o for o in optional if o not in variables and o not in default]
logger.debug("") logger.trace("")
logger.debug(f"Variables: {variables}") logger.trace(f"Variables: {variables}")
logger.debug("") logger.trace("")
logger.debug(f"Defaults: {default}") logger.trace(f"Defaults: {default}")
logger.debug("") logger.trace("")
logger.debug(f"Optional: {optional}") logger.trace(f"Optional: {optional}")
logger.trace("") logger.trace("")
logger.trace(f"Translation: {translation_variables}") logger.trace(f"Translation: {translation_variables}")
logger.debug("")
def check_for_var(_method, _data): def check_for_var(_method, _data):
def scan_text(og_txt, var, actual_value): def scan_text(og_txt, var, actual_value):
@ -522,6 +525,7 @@ class MetadataFile(DataFile):
else: else:
logger.info("") logger.info("")
logger.separator(f"Loading Metadata {file_type}: {path}") logger.separator(f"Loading Metadata {file_type}: {path}")
logger.debug("")
data = self.load_file(self.type, self.path) data = self.load_file(self.type, self.path)
self.metadata = get_dict("metadata", data, library.metadatas) self.metadata = get_dict("metadata", data, library.metadatas)
self.templates = get_dict("templates", data) self.templates = get_dict("templates", data)
@ -1464,6 +1468,7 @@ class PlaylistFile(DataFile):
self.data_type = "Playlist" self.data_type = "Playlist"
logger.info("") logger.info("")
logger.info(f"Loading Playlist {file_type}: {path}") logger.info(f"Loading Playlist {file_type}: {path}")
logger.debug("")
data = self.load_file(self.type, self.path) data = self.load_file(self.type, self.path)
self.playlists = get_dict("playlists", data, self.config.playlist_names) self.playlists = get_dict("playlists", data, self.config.playlist_names)
self.templates = get_dict("templates", data) self.templates = get_dict("templates", data)
@ -1480,6 +1485,7 @@ class OverlayFile(DataFile):
self.data_type = "Overlay" self.data_type = "Overlay"
logger.info("") logger.info("")
logger.info(f"Loading Overlay {file_type}: {path}") logger.info(f"Loading Overlay {file_type}: {path}")
logger.debug("")
data = self.load_file(self.type, self.path, overlay=True) data = self.load_file(self.type, self.path, overlay=True)
self.overlays = get_dict("overlays", data) self.overlays = get_dict("overlays", data)
self.templates = get_dict("templates", data) self.templates = get_dict("templates", data)

@ -131,10 +131,9 @@ class TVDb:
else: else:
raise Failed(f"TVDb Error: {tvdb_url} must begin with {urls['movies']} or {urls['series']}") raise Failed(f"TVDb Error: {tvdb_url} must begin with {urls['movies']} or {urls['series']}")
expired = None expired = None
tvdb_id = None if self.config.Cache and not ignore_cache and not is_movie:
if self.config.Cache and not ignore_cache:
tvdb_id, expired = self.config.Cache.query_tvdb_map(tvdb_url, self.expiration) tvdb_id, expired = self.config.Cache.query_tvdb_map(tvdb_url, self.expiration)
if tvdb_id and not expired and not is_movie: if tvdb_id and not expired:
return tvdb_id, None, None return tvdb_id, None, None
logger.trace(f"URL: {tvdb_url}") logger.trace(f"URL: {tvdb_url}")
try: try:
@ -161,7 +160,7 @@ class TVDb:
pass pass
if tmdb_id is None and imdb_id is None: if tmdb_id is None and imdb_id is None:
raise Failed(f"TVDb Error: No TMDb ID or IMDb ID found") raise Failed(f"TVDb Error: No TMDb ID or IMDb ID found")
if self.config.Cache and not ignore_cache: if self.config.Cache and not ignore_cache and not is_movie:
self.config.Cache.update_tvdb_map(expired, tvdb_url, tvdb_id, self.expiration) self.config.Cache.update_tvdb_map(expired, tvdb_url, tvdb_id, self.expiration)
return tvdb_id, tmdb_id, imdb_id return tvdb_id, tmdb_id, imdb_id
elif tvdb_url.startswith(urls["movie_id"]): elif tvdb_url.startswith(urls["movie_id"]):

Loading…
Cancel
Save