Skip to content

Commit

Permalink
Log : origin
Browse files Browse the repository at this point in the history
  • Loading branch information
TEALC82 committed Jul 13, 2024
1 parent 37f9dec commit ed9e5a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions stream_fusion/utils/jackett/jackett_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down Expand Up @@ -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]

Expand Down
3 changes: 2 additions & 1 deletion stream_fusion/utils/metdata/tmdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

0 comments on commit ed9e5a5

Please sign in to comment.