Skip to content

Commit

Permalink
Handle split seasons correctly again
Browse files Browse the repository at this point in the history
  • Loading branch information
reconman committed Apr 9, 2023
1 parent cb0399a commit 93f6e05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion plexanisync/anilist.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def match_to_plex(self, anilist_series: List[AnilistSeries], plex_series_watched
season_mappings: List[AnilistCustomMapping] = self.__retrieve_season_mappings(
plex_title, plex_season.season_number
)
if season_mappings:
# split season -> handle it in "any remaining seasons" section
if season_mappings and len(season_mappings) == 1:
matched_id = season_mappings[0].anime_id
mapped_start = season_mappings[0].start

Expand Down
6 changes: 3 additions & 3 deletions plexanisync/graphql.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def search_by_id(self, anilist_id: int):
'episodes',
'synonyms'
)
media.title.__fields__('romaji', 'english', 'native')
media.title.__fields__('romaji', 'english')
media.start_date.year()
media.end_date.year()

Expand All @@ -87,7 +87,7 @@ def search_by_name(self, anilist_show_name: str) -> List[AnilistSeries]:
'episodes',
'synonyms'
)
media.title.__fields__('romaji', 'english', 'native')
media.title.__fields__('romaji', 'english')
media.start_date.year()
media.end_date.year()

Expand Down Expand Up @@ -115,7 +115,7 @@ def fetch_user_list(self) -> List[AnilistSeries]:
)
lists.entries.media.start_date.year()
lists.entries.media.end_date.year()
lists.entries.media.title.__fields__('romaji', 'english', 'native')
lists.entries.media.title.__fields__('romaji', 'english')

data = self.__send_graphql_request(operation)
list_items = (operation + data).media_list_collection
Expand Down

0 comments on commit 93f6e05

Please sign in to comment.