diff --git a/stream_fusion/utils/jackett/jackett_service.py b/stream_fusion/utils/jackett/jackett_service.py index 13c0636..4d3bdc9 100644 --- a/stream_fusion/utils/jackett/jackett_service.py +++ b/stream_fusion/utils/jackett/jackett_service.py @@ -25,10 +25,10 @@ def __init__(self, config): self.__session = requests.Session() def search(self, media): - parts = media.titles[0].split(':', 1) - newtitle = parts[0].strip() + parts = media.titles[0].split(':') + newtitle = parts[0] - self.logger.info("Started Jackett search for " + media.type + " " + newtitle + "[" + media.titles[0] + "]") + self.logger.info("Started Jackett search for " + media.type + " " + newtitle + " [" + media.titles[0] + "]") indexers = self.__get_indexers() threads = [] @@ -144,8 +144,8 @@ def __search_series_indexer(self, series, indexer): for index, lang in enumerate(languages): if series.origin == "JP": - parts = titles[index].split(':', 1) - newtitle = parts[0].strip() + parts = titles[index].split(':') + newtitle = parts[0] else: newtitle = titles[index] diff --git a/stream_fusion/utils/metdata/tmdb.py b/stream_fusion/utils/metdata/tmdb.py index 3fe96c8..d014bf9 100644 --- a/stream_fusion/utils/metdata/tmdb.py +++ b/stream_fusion/utils/metdata/tmdb.py @@ -32,7 +32,7 @@ def get_metadata(self, id, type): titles=[self.replace_weird_characters(data["tv_results"][0]["name"])], season="S{:02d}".format(int(full_id[1])), episode="E{:02d}".format(int(full_id[2])), - origin=data["tv_results"][0]["origin_country"], + origin=data["tv_results"][0]["origin_country"][0], languages=self.config['languages'] ) else: @@ -42,4 +42,5 @@ def get_metadata(self, id, type): result.titles.append(self.replace_weird_characters(data["tv_results"][0]["name"])) self.logger.info("Got metadata for " + type + " with id " + id) + self.logger.info(">> Origin : " + result.origin + " <<") return result