Skip to content

Commit

Permalink
Update French Teams + New title for JP series
Browse files Browse the repository at this point in the history
  • Loading branch information
TEALC82 committed Jul 13, 2024
1 parent 7261129 commit 37f9dec
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
6 changes: 3 additions & 3 deletions stream_fusion/utils/filter/language_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)$",
Expand Down
13 changes: 11 additions & 2 deletions stream_fusion/utils/jackett/jackett_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions stream_fusion/utils/metdata/tmdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion stream_fusion/utils/models/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 37f9dec

Please sign in to comment.