Fix search bug

This commit is contained in:
Markus Nyman 2023-01-17 01:57:37 +02:00
parent 0f869788fb
commit 033ad1e79b
2 changed files with 3 additions and 2 deletions

View file

@ -133,7 +133,7 @@ class TVShowProcessor(Processor):
return True
def _search_trakt(self, tv_time_show: TVTimeTVShow) -> TraktTVShow:
return TVShowSearcher(tv_time_show).search_trakt(tv_time_show.name)
return TVShowSearcher(tv_time_show).search(tv_time_show.title)
def _process(self, tv_time_show: TVTimeTVShow, trakt_show: TraktItem, progress: float) -> None:
logging.info(
@ -188,7 +188,7 @@ class MovieProcessor(Processor):
return True
def _search_trakt(self, tv_time_movie: TVTimeMovie) -> TraktMovie:
return MovieSearcher().search_trakt(tv_time_movie.name)
return MovieSearcher().search(tv_time_movie.title)
def _process(self, tv_time_movie: TVTimeMovie, trakt_movie: TraktMovie, progress: float) -> None:
logging.info(f"({progress}) - Processing '{tv_time_movie.name}'")

View file

@ -92,6 +92,7 @@ class Title:
class TVTimeItem:
def __init__(self, name: str, updated_at: str):
self.name = name
self.title = Title(name)
# Get the date which the show was marked 'watched' in TV Time
# and parse the watched date value into a Python object
self.date_watched = datetime.strptime(