diff --git a/stream_fusion/utils/filter/language_filter.py b/stream_fusion/utils/filter/language_filter.py index a3b79e3..1387308 100644 --- a/stream_fusion/utils/filter/language_filter.py +++ b/stream_fusion/utils/filter/language_filter.py @@ -11,9 +11,9 @@ def __init__(self, config): r"^(BDHD|FtLi|Goldenyann|HeavyWeight|MARBLECAKE|MUSTANG|Obi|PEPiTE|QUEBEC63|QC63|ROMKENT)$", r"^(FLOP|FRATERNiTY|FoX|Psaro)$", r"^(DUSTiN|FCK|FrIeNdS|QUALiTY)$", - r"^(BDHD|FoX|FRATERNiTY|FrIeNdS|MAX|Psaro|T3KASHi)$", - r"^(FUJiSAN|HANAMi|HDForever|HeavyWeight|MARBLECAKE|MYSTERiON|NoNE|ONLY|ONLYMOViE|TkHD|UTT)$", - r"^(BONBON|FCK|FW|FoX|FRATERNiTY|FrIeNdS|MOONLY|MTDK|PATOPESTO|Psaro|T3KASHi|TFA)$", + r"^(BDHD|FoX|FRATERNiTY|FrIeNdS|MAX|Psaro|T3KASHi|Tsundere-Raws|FTMVHD|Amen)$", + r"^(FUJiSAN|HANAMi|HeavyWeight|MARBLECAKE|MYSTERiON|NoNE|ONLY|ONLYMOViE|TkHD|UTT)$", + r"^(BONBON|FCK|FW|FoX|FRATERNiTY|FrIeNdS|MOONLY|MTDK|PATOPESTO|Psaro|T3KASHi|TFA|KENOBi3838|SERQPH|TG|QTZ|FERVEX)$", r"^(ALLDAYiN|ARK01|FUJiSAN|HANAMi|HeavyWeight|NEO|NoNe|ONLYMOViE|Slay3R|TkHD)$", r"^(4FR|AiR3D|AiRDOCS|AiRFORCE|AiRLiNE|AiRTV|AKLHD|AMB3R)$", r"^(ANMWR|AVON|AYMO|AZR|BANKAi|BAWLS|BiPOLAR|BLACKPANTERS|BODIE|BOOLZ|BRiNK|CARAPiLS|CiELOS)$", diff --git a/stream_fusion/utils/jackett/jackett_service.py b/stream_fusion/utils/jackett/jackett_service.py index 13ddbc4..13c0636 100644 --- a/stream_fusion/utils/jackett/jackett_service.py +++ b/stream_fusion/utils/jackett/jackett_service.py @@ -25,7 +25,10 @@ def __init__(self, config): self.__session = requests.Session() def search(self, media): - self.logger.info("Started Jackett search for " + media.type + " " + media.titles[0]) + parts = media.titles[0].split(':', 1) + newtitle = parts[0].strip() + + self.logger.info("Started Jackett search for " + media.type + " " + newtitle + "[" + media.titles[0] + "]") indexers = self.__get_indexers() threads = [] @@ -140,11 +143,17 @@ def __search_series_indexer(self, series, indexer): results = [] for index, lang in enumerate(languages): + if series.origin == "JP": + parts = titles[index].split(':', 1) + newtitle = parts[0].strip() + else: + newtitle = titles[index] + params = { 'apikey': self.__api_key, 't': 'tvsearch', 'cat': '5000', - 'q': titles[index], + 'q': newtitle, } if has_imdb_search_capability: diff --git a/stream_fusion/utils/metdata/tmdb.py b/stream_fusion/utils/metdata/tmdb.py index 19d4547..3fe96c8 100644 --- a/stream_fusion/utils/metdata/tmdb.py +++ b/stream_fusion/utils/metdata/tmdb.py @@ -32,6 +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"], languages=self.config['languages'] ) else: diff --git a/stream_fusion/utils/models/series.py b/stream_fusion/utils/models/series.py index c348de1..d38ee7d 100644 --- a/stream_fusion/utils/models/series.py +++ b/stream_fusion/utils/models/series.py @@ -2,8 +2,9 @@ class Series(Media): - def __init__(self, id, titles, season, episode, languages): + def __init__(self, id, titles, season, episode, origin, languages): super().__init__(id, titles, languages, "series") self.season = season self.episode = episode + self.origin = origin self.seasonfile = None