[53] minor fixes

pull/1058/head
meisnate12 2 years ago
parent 9d91428e3d
commit 4a17f36067

@ -1 +1 @@
1.17.3-develop52 1.17.3-develop53

@ -1631,8 +1631,12 @@ class CollectionBuilder:
self.missing_shows.append(tvdb_id) self.missing_shows.append(tvdb_id)
elif tmdb_type == "movie" and self.do_missing and _id not in self.missing_movies: elif tmdb_type == "movie" and self.do_missing and _id not in self.missing_movies:
self.missing_movies.append(_id) self.missing_movies.append(_id)
elif tmdb_type == "show" and self.do_missing: elif tmdb_type in ["show", "episode"] and self.do_missing:
tvdb_id = self.config.Convert.tmdb_to_tvdb(_id, fail=True) if tmdb_type == "episode":
tmdb_id, _, _ = _id.split("_")
else:
tmdb_id = _id
tvdb_id = self.config.Convert.tmdb_to_tvdb(tmdb_id, fail=True)
if tvdb_id not in self.missing_shows: if tvdb_id not in self.missing_shows:
self.missing_shows.append(tvdb_id) self.missing_shows.append(tvdb_id)
except Failed as e: except Failed as e:
@ -1649,13 +1653,19 @@ class CollectionBuilder:
break break
if not found and input_id not in self.missing_movies: if not found and input_id not in self.missing_movies:
self.missing_movies.append(input_id) self.missing_movies.append(input_id)
elif id_type in ["tvdb", "tmdb_show"] and not self.parts_collection: elif id_type in ["tvdb", "tmdb_show", "tvdb_season", "tvdb_episode"] and not self.parts_collection:
if id_type == "tmdb_show": if id_type == "tmdb_show":
try: try:
tvdb_id = self.config.Convert.tmdb_to_tvdb(input_id, fail=True) tvdb_id = self.config.Convert.tmdb_to_tvdb(input_id, fail=True)
except Failed as e: except Failed as e:
logger.warning(e) logger.warning(e)
continue continue
elif id_type == "tvdb_season":
tvdb_id, _ = input_id.split("_")
tvdb_id = int(tvdb_id)
elif id_type == "tvdb_episode":
tvdb_id, _, _ = input_id.split("_")
tvdb_id = int(tvdb_id)
else: else:
tvdb_id = int(input_id) tvdb_id = int(input_id)
if tvdb_id not in self.ignore_ids: if tvdb_id not in self.ignore_ids:

@ -34,7 +34,7 @@ class GitHub:
def config_tags(self): def config_tags(self):
if not self._config_tags: if not self._config_tags:
try: try:
self._config_tags = [r["ref"][10:] for r in self.config.get_json(f"{base_url}-Configs/git/refs/tags")] self._config_tags = [r["ref"][11:] for r in self.config.get_json(f"{base_url}-Configs/git/refs/tags")]
except TypeError: except TypeError:
pass pass
return self._config_tags return self._config_tags
@ -43,10 +43,9 @@ class GitHub:
def configs_url(self): def configs_url(self):
if self._configs_url is None: if self._configs_url is None:
self._configs_url = f"{configs_raw_url}/master/" self._configs_url = f"{configs_raw_url}/master/"
if self.config.latest_version[1] != self.config.version[1]: if self.config.version[1] in self.config_tags and (
if self.config.version[1] in self.config_tags: self.config.latest_version[1] != self.config.version[1]
self._configs_url = f"{configs_raw_url}/{self.config.version[1]}/" or (not self.config.check_nightly and 0 <= self.config.version[2] <= util.get_develop()[2])
elif not self.config.check_nightly and self.config.version[2] > 0: ):
if util.get_develop()[2] >= self.config.version[2]: self._configs_url = f"{configs_raw_url}/v{self.config.version[1]}/"
self._configs_url = f"{configs_raw_url}/{self.config.version[1]}/"
return self._configs_url return self._configs_url

@ -74,7 +74,7 @@ class MyAnimeListObj:
self.score = self._data["score"] self.score = self._data["score"]
self.rank = self._data["rank"] self.rank = self._data["rank"]
self.popularity = self._data["popularity"] self.popularity = self._data["popularity"]
self.genres = self._data["genres"].split("|") if cache else [g["name"] for g in self._data["genres"]] self.genres = [] if not self._data["genres"] else self._data["genres"].split("|") if cache else [g["name"] for g in self._data["genres"]]
class MyAnimeList: class MyAnimeList:

@ -434,9 +434,9 @@ class MetadataFile(DataFile):
og_exclude = util.parse("Config", "exclude", dynamic, parent=map_name, methods=methods, datatype="strlist") og_exclude = util.parse("Config", "exclude", dynamic, parent=map_name, methods=methods, datatype="strlist")
include = [] include = []
if "include" in self.temp_vars: if "include" in self.temp_vars:
include = util.parse("Config", "include", self.temp_vars["include"], parent="template_variable", datatype="strlist") include = [i for i in util.parse("Config", "include", self.temp_vars["include"], parent="template_variable", datatype="strlist") if i not in og_exclude]
elif "include" in methods: elif "include" in methods:
include = util.parse("Config", "include", dynamic, parent=map_name, methods=methods, datatype="strlist") include = [i for i in util.parse("Config", "include", dynamic, parent=map_name, methods=methods, datatype="strlist") if i not in og_exclude]
addons = util.parse("Config", "addons", dynamic, parent=map_name, methods=methods, datatype="dictliststr") if "addons" in methods else {} addons = util.parse("Config", "addons", dynamic, parent=map_name, methods=methods, datatype="dictliststr") if "addons" in methods else {}
exclude = [str(e) for e in og_exclude] exclude = [str(e) for e in og_exclude]
for k, v in addons.items(): for k, v in addons.items():
@ -708,7 +708,8 @@ class MetadataFile(DataFile):
logger.debug(f"Mapping Name: {map_name}") logger.debug(f"Mapping Name: {map_name}")
logger.debug(f"Type: {auto_type}") logger.debug(f"Type: {auto_type}")
logger.debug(f"Data: {dynamic_data}") logger.debug(f"Data: {dynamic_data}")
logger.debug(f"Exclude: {exclude}") logger.debug(f"Exclude: {og_exclude}")
logger.debug(f"Exclude Final: {exclude}")
logger.debug(f"Addons: {addons}") logger.debug(f"Addons: {addons}")
logger.debug(f"Template: {template_names}") logger.debug(f"Template: {template_names}")
logger.debug(f"Other Template: {other_templates}") logger.debug(f"Other Template: {other_templates}")

Loading…
Cancel
Save