Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ratings Sync not working in docker-compose #188

Closed
noggl opened this issue Mar 29, 2023 · 4 comments
Closed

Ratings Sync not working in docker-compose #188

noggl opened this issue Mar 29, 2023 · 4 comments

Comments

@noggl
Copy link

noggl commented Mar 29, 2023

I'm trying to use this feature in the docker container and I wasn't able to get it working with just docker-compose. I have the docker-compose set according to the instructions in the docker/plexanisync subfolder README, except for the tag which is "latest" in the readme and I am using "master". My Docker-Compose is below:

     container_name: plexanisync
     image: 'ghcr.io/rickdb/plexanisync:master'
     restart: unless-stopped
     environment:
       - PLEX_SECTION=Anime|Anime Movies
       - 'PLEX_URL=http://[REDACTED]:32400'
       - PLEX_TOKEN=[REDACTED]
       - ANI_USERNAME=[REDACTED]
       - ANI_TOKEN=[REDACTED]
       - INTERVAL=3600
       - SYNC_RATINGS=True
     volumes:
       - '/etc/localtime:/etc/localtime:ro'
       - './custom_mappings.yaml:/plexanisync/custom_mappings.yaml'

To test, I've been setting Lycoris Recoil to completed with a rating of 3 stars on plex and 3 episodes watched with no rating on Anilist. PlexAniSync detects the episode update and marks anilist as completed, but doesn't make a rating. The docker container logs are below:

2023-03-29 15:11:38 PlexAniSync - version: 1.3.23
2023-03-29 15:11:38 [MAPPING] Custom map file not found: custom_mappings.yaml
2023-03-29 15:11:38 [ANILIST] Retrieving AniList list for user: [REDACTED]
2023-03-29 15:11:38 [ANILIST] Found 321 anime series on list
2023-03-29 15:11:38 [PLEX] Retrieving anime series from section: Anime
2023-03-29 15:11:39 [PLEX] Found 34 anime series in section: Anime
2023-03-29 15:11:39 [PLEX] Retrieving anime series from section: Anime Movies
2023-03-29 15:11:39 [PLEX] Found 21 anime series in section: Anime Movies
2023-03-29 15:11:39 [PLEX] Retrieving watch count for series
2023-03-29 15:11:39 [PLEX] 13 episodes watched for Blue Lock season 1
2023-03-29 15:11:40 [PLEX] 9 episodes watched for Lycoris Recoil season 1
2023-03-29 15:11:40 [PLEX] 25 episodes watched for My Hero Academia season 6
2023-03-29 15:11:41 [PLEX] 7 episodes watched for My Teen Romantic Comedy: SNAFU season 1
2023-03-29 15:11:41 [PLEX] 5 episodes watched for Platinum End season 1
2023-03-29 15:11:42 [PLEX] 9 episodes watched for Re:Creators season 1
2023-03-29 15:11:42 [PLEX] 5 episodes watched for Summer Time Rendering season 1
2023-03-29 15:11:43 [PLEX] 17 episodes watched for To Your Eternity season 1
2023-03-29 15:11:43 [PLEX] Found 9 watched series
2023-03-29 15:11:43 [PLEX] Watched series also contained 1 releases with no episode attribute (probably movie / OVA), support for this is still experimental
2023-03-29 15:11:43 [ANILIST] Matching Plex series to Anilist
2023-03-29 15:11:43 [ANILIST] --------------------------------------------------
2023-03-29 15:11:43 [ANILIST] Found AniList entry for Plex title: Blue Lock
2023-03-29 15:11:43 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2023-03-29 15:11:43 [ANILIST] --------------------------------------------------
2023-03-29 15:11:43 [ANILIST] Found AniList entry for Plex title: Lycoris Recoil
2023-03-29 15:11:43 [ANILIST] Plex episode watch count [9] was higher than the one on AniList [3] which has total of 13 episodes | updating AniList entry to CURRENT
2023-03-29 15:11:47 [ANILIST] --------------------------------------------------
2023-03-29 15:11:47 [ANILIST] Anilist series did not have year attribute so skipping this result and moving to next:  | Boku no Hero Academia 7
2023-03-29 15:11:47 [ANILIST] Found match: My Hero Academia Season 6 [139630]
2023-03-29 15:11:47 [ANILIST] Updating series: My Hero Academia Season 6 | Episodes watched: 25
2023-03-29 15:11:47 [ANILIST] Found AniList entry for Plex title: My Hero Academia
2023-03-29 15:11:47 [ANILIST] Series year did not match however skip year check was given so adding anyway => Plex has 2016 and AniList has 2022
2023-03-29 15:11:47 [ANILIST] Plex episode watch count [25] was higher than the one on AniList total episodes for that series [25] | updating AniList entry to completed
2023-03-29 15:11:47 [ANILIST] --------------------------------------------------
2023-03-29 15:11:47 [ANILIST] Found AniList entry for Plex title: My Teen Romantic Comedy: SNAFU
2023-03-29 15:11:47 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2023-03-29 15:11:47 [ANILIST] --------------------------------------------------
2023-03-29 15:11:47 [ANILIST] Found AniList entry for Plex title: Platinum End
2023-03-29 15:11:47 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2023-03-29 15:11:47 [ANILIST] --------------------------------------------------
2023-03-29 15:11:47 [ANILIST] Found AniList entry for Plex title: Re:Creators
2023-03-29 15:11:47 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2023-03-29 15:11:47 [ANILIST] --------------------------------------------------
2023-03-29 15:11:47 [ANILIST] Found AniList entry for Plex title: Summer Time Rendering
2023-03-29 15:11:47 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2023-03-29 15:11:47 [ANILIST] --------------------------------------------------
2023-03-29 15:11:47 [ANILIST] Found AniList entry for Plex title: To Your Eternity
2023-03-29 15:11:47 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2023-03-29 15:11:47 [ANILIST] --------------------------------------------------
2023-03-29 15:11:47 [ANILIST] Found AniList entry for Plex title: Your Name.
2023-03-29 15:11:47 [ANILIST] Series is already marked as completed on AniList so skipping update
2023-03-29 15:11:47 Plex to AniList sync finished

I have, however, been able to get it to work by specifying a settings.ini file, which I will include logs and details of in just a second

@noggl
Copy link
Author

noggl commented Mar 29, 2023

By using a settings.ini file, the sync does in fact work.
docker-compose

   plexanisync:
     container_name: plexanisync
     image: 'ghcr.io/rickdb/plexanisync:master'
     restart: unless-stopped
     environment:
       - 'SETTINGS_FILE=/config/settings.ini'
       - INTERVAL=3600
     volumes:
       - '/etc/localtime:/etc/localtime:ro'
       - './custom_mappings.yaml:/plexanisync/custom_mappings.yaml'
       - './plexanisync/settings.ini:/config/settings.ini:ro'

settings.ini

[PLEX]
anime_section = Anime|Anime Movies
authentication_method = direct
base_url = http://[REDACTED]:32400
token = [REDACTED]
 
[ANILIST]
username = [REDACTED]
access_token = [REDACTED]
plex_episode_count_priority = False
skip_list_update = False
log_failed_matches = False
sync_scores = True

Log

Recreating plexanisync ... done
Using custom config: /config/settings.ini
2023-03-29 15:42:14 PlexAniSync - version: 1.3.23
2023-03-29 15:42:14 [MAPPING] Custom map file not found: custom_mappings.yaml
2023-03-29 15:42:14 [ANILIST] Retrieving AniList list for user: [REDACTED]
2023-03-29 15:42:14 [ANILIST] Found 321 anime series on list
2023-03-29 15:42:14 [PLEX] Retrieving anime series from section: Anime
2023-03-29 15:42:15 [PLEX] Found 34 anime series in section: Anime
2023-03-29 15:42:15 [PLEX] Retrieving anime series from section: Anime Movies
2023-03-29 15:42:15 [PLEX] Found 21 anime series in section: Anime Movies
2023-03-29 15:42:15 [PLEX] Retrieving watch count for series
2023-03-29 15:42:15 [PLEX] 13 episodes watched for Blue Lock season 1
2023-03-29 15:42:15 [PLEX] 9 episodes watched for Lycoris Recoil season 1
2023-03-29 15:42:16 [PLEX] 25 episodes watched for My Hero Academia season 6
2023-03-29 15:42:16 [PLEX] 7 episodes watched for My Teen Romantic Comedy: SNAFU season 1
2023-03-29 15:42:17 [PLEX] 5 episodes watched for Platinum End season 1
2023-03-29 15:42:17 [PLEX] 9 episodes watched for Re:Creators season 1
2023-03-29 15:42:18 [PLEX] 5 episodes watched for Summer Time Rendering season 1
2023-03-29 15:42:18 [PLEX] 17 episodes watched for To Your Eternity season 1
2023-03-29 15:42:19 [PLEX] Found 9 watched series
2023-03-29 15:42:19 [PLEX] Watched series also contained 1 releases with no episode attribute (probably movie / OVA), support for this is still experimental
2023-03-29 15:42:19 [ANILIST] Matching Plex series to Anilist
2023-03-29 15:42:19 [ANILIST] --------------------------------------------------
2023-03-29 15:42:19 [ANILIST] Found AniList entry for Plex title: Blue Lock
2023-03-29 15:42:19 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2023-03-29 15:42:19 [ANILIST] --------------------------------------------------
2023-03-29 15:42:19 [ANILIST] Found AniList entry for Plex title: Lycoris Recoil
2023-03-29 15:42:19 [ANILIST] Episode count was up to date, but Plex score is different than Anilist score. The Anilist score will be updated to the Plex rating.
2023-03-29 15:42:19 [ANILIST] --------------------------------------------------
2023-03-29 15:42:20 [ANILIST] Anilist series did not have year attribute so skipping this result and moving to next:  | Boku no Hero Academia 7
2023-03-29 15:42:20 [ANILIST] Found match: My Hero Academia Season 6 [139630]
2023-03-29 15:42:20 [ANILIST] Updating series: My Hero Academia Season 6 | Episodes watched: 25
2023-03-29 15:42:20 [ANILIST] Found AniList entry for Plex title: My Hero Academia
2023-03-29 15:42:20 [ANILIST] Series year did not match however skip year check was given so adding anyway => Plex has 2016 and AniList has 2022
2023-03-29 15:42:20 [ANILIST] Plex episode watch count [25] was higher than the one on AniList total episodes for that series [25] | updating AniList entry to completed
2023-03-29 15:42:20 [ANILIST] --------------------------------------------------
2023-03-29 15:42:20 [ANILIST] Found AniList entry for Plex title: My Teen Romantic Comedy: SNAFU
2023-03-29 15:42:20 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2023-03-29 15:42:20 [ANILIST] --------------------------------------------------
2023-03-29 15:42:20 [ANILIST] Found AniList entry for Plex title: Platinum End
2023-03-29 15:42:20 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2023-03-29 15:42:20 [ANILIST] --------------------------------------------------
2023-03-29 15:42:20 [ANILIST] Found AniList entry for Plex title: Re:Creators
2023-03-29 15:42:20 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2023-03-29 15:42:20 [ANILIST] --------------------------------------------------
2023-03-29 15:42:20 [ANILIST] Found AniList entry for Plex title: Summer Time Rendering
2023-03-29 15:42:20 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2023-03-29 15:42:20 [ANILIST] --------------------------------------------------
2023-03-29 15:42:20 [ANILIST] Found AniList entry for Plex title: To Your Eternity
2023-03-29 15:42:20 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2023-03-29 15:42:20 [ANILIST] --------------------------------------------------
2023-03-29 15:42:20 [ANILIST] Found AniList entry for Plex title: Your Name.
2023-03-29 15:42:20 [ANILIST] Series is already marked as completed on AniList so skipping update
2023-03-29 15:42:20 Plex to AniList sync finished

Unless I'm mistaken, these 2 methods should produce the same result, right?

@reconman
Copy link
Collaborator

Can you test with the latest master image?

I renamed the config parameter at some point and forgot to change it everywhere.

The code used sync_scores, while the docker container and documentation used sync_ratings.

@noggl
Copy link
Author

noggl commented Mar 29, 2023

Yep, that fixed it!

I also see that the docker readme still says the image is 'ghcr.io/rickdb/plexanisync:latest' when it should say 'ghcr.io/rickdb/plexanisync:master'. I figured that out but others might get confused.

Thank you so much for your help!

@reconman
Copy link
Collaborator

latest is the latest release. master is like a beta.

Sometimes I forget doing a release, but I'll publish latest soon for this bugfix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants