Skip to content

Commit

Permalink
Correct sync_scores to sync_ratings
Browse files Browse the repository at this point in the history
  • Loading branch information
reconman committed Mar 29, 2023
1 parent 243a074 commit 8ae04ad
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion plexanisync/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.3.23"
__version__ = "1.3.24"
6 changes: 3 additions & 3 deletions plexanisync/anilist.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def __update_entry(
status = series.status

if status == "COMPLETED":
if plex_rating and series.score != plex_rating and self.graphql.sync_scores:
if plex_rating and series.score != plex_rating and self.graphql.sync_ratings:
logger.info(
"Series is completed, but Plex rating is different than Anilist score. "
"The Anilist score will be updated to the Plex rating."
Expand Down Expand Up @@ -664,7 +664,7 @@ def __update_entry(
self.__update_episode_incremental(series, watched_episode_count, anilist_episodes_watched, new_status, plex_rating)
return
elif watched_episode_count == anilist_episodes_watched:
if plex_rating and series.score != plex_rating and self.graphql.sync_scores:
if plex_rating and series.score != plex_rating and self.graphql.sync_ratings:
logger.info(
"Episode count was up to date, but Plex score is different than Anilist score. "
"The Anilist score will be updated to the Plex rating."
Expand Down Expand Up @@ -697,7 +697,7 @@ def __update_entry(
"However, the Plex watched count is 0 so the update is skipped."
)
elif anilist_episodes_watched > watched_episode_count:
if plex_rating and series.score != plex_rating and self.graphql.sync_scores:
if plex_rating and series.score != plex_rating and self.graphql.sync_ratings:
logger.info(
f"Episodes watched was higher on AniList [{anilist_episodes_watched}] than on Plex [{watched_episode_count}]. "
"However, the Plex rating is different than the Anilist The Anilist score will be updated to the Plex rating."
Expand Down
4 changes: 2 additions & 2 deletions plexanisync/graphql.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(self, anilist_settings: SectionProxy):
)
self.endpoint.logger = logger
self.skip_list_update = self.anilist_settings.getboolean("skip_list_update", False)
self.sync_scores = self.anilist_settings.getboolean("sync_scores", False)
self.sync_ratings = self.anilist_settings.getboolean("sync_ratings", False)

def search_by_id(self, anilist_id: int):
operation = Operation(schema.Query)
Expand Down Expand Up @@ -138,7 +138,7 @@ def update_series(self, media_id: int, progress: int, status: str, score_raw: in
return

op = Operation(schema.Mutation)
if score_raw and self.sync_scores:
if score_raw and self.sync_ratings:
op.save_media_list_entry(
media_id=media_id,
status=status,
Expand Down
2 changes: 1 addition & 1 deletion settings.ini.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ plex_episode_count_priority = False
skip_list_update = False
username = SomeUsername
log_failed_matches = False
sync_scores = False
sync_ratings = False

0 comments on commit 8ae04ad

Please sign in to comment.