Hi,
This Python application allows you to sync your Plex watch status to AniList, some of its features are:
I recommend using the HAMA agent with Plex like mentioned in the readme as matching works pretty well with it.
Documentation and code is located here:
For the dockerized version:
https://github.com/RickDB/PlexAniSync/pkgs/container/plexanisync

Updated documentation for the setup part which goes a bit more in detail now, any feedback is appreciated as I would like to know how it runs on other setups and if improvements can be made.
Was thinking of adding a few things:
Recent change in AniList API broke user list retrieval, replaced the deprecated method and after updating everything will work as usual.
Thanks @Josh for pointing it out on Discord.
Has this update been pushed to GitHub because as of March 24th it still doesn't work. No rush just sanity checking. Keep of the great work it its much appreciated!
Yeah is on github and make sure to download and overwrite all files when updating as AniList.py was updated for this bugfix.
Easiest way is to download the complete archive and overwrite all:
https://github.com/RickDB/PlexAniSync/archive/master.zip
If you'are still getting an error would create a new AniList access token (see readme) as mine was not working after the AniList server migration for some reason, let me know how it goes :)
Will try it by then end of the day today and it back to you
I included a pastebin link just to show but, it runs and I don't get the same error I get a TypeErrror. https://pastebin.com/aADbbjLd . To rule out most issues off the bat I completely deleted the plex Anime Library, used ASS and HamaTV to re-downloaded all metadata. Sonarr doesn't use Seasoned folders so all episode are placed in the root folder of the Show. Any info/help would be appreciated.
Thanks for the detailed logs.
Seems it can't get a valid number of episodes for One Piece from AniList API, will add check there and push fix later.
Pushed fixes to Github so can redownload and will log + skip over the error instead of crashing, looks like data error on the AniList end or the way it returns total episodes for that series in particular.
Can use all the feedback so if you find any more bugs please let me know.
Noticed that some series like the one below uses a different season naming scheme in title (2nd season vs season 2):
Tensei Shitara Slime Datta Ken 2nd season
So added ordinal title matching and make sure to rerun pip install from readme to add the new requirement (Inflect) as otherwise will get an error.
Hi, I'm unable to get the last script python PlexAniSync.py working.
Log:
PS H:\Program Files\Plex Media Server\Plug-ins\PlexAniSync-master> python PlexAniSync.py
2019-05-16 17:02:00 [MAPPING] Custom map file not found: custom_mappings.ini
2019-05-16 17:02:00 [ANILIST] Retrieving AniList list for user: dyslexia
2019-05-16 17:02:00 [ANILIST] Found 62 anime series on list
2019-05-16 17:02:00 [PLEX] Retrieving anime series from section: Anime
Traceback (most recent call last):
File "PlexAniSync.py", line 107, in
start()
File "PlexAniSync.py", line 95, in start
plex_anime_series = plexmodule.get_anime_shows()
File "H:\Program Files\Plex Media Server\Plug-ins\PlexAniSync-master\plexmodule.py", line 53, in get_anime_shows
plex = authenticate()
File "H:\Program Files\Plex Media Server\Plug-ins\PlexAniSync-master\plexmodule.py", line 35, in authenticate
plex = PlexServer(base_url, token)
File "H:\Program Files\Python\lib\site-packages\plexapi\server.py", line 102, in init
data = self.query(self.key, timeout=timeout)
File "H:\Program Files\Python\lib\site-packages\plexapi\server.py", line 343, in query
response = method(url, headers=headers, timeout=timeout, kwargs)
File "H:\Program Files\Python\lib\site-packages\requests\sessions.py", line 546, in get
return self.request('GET', url, kwargs)
File "H:\Program Files\Python\lib\site-packages\requests\sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "H:\Program Files\Python\lib\site-packages\requests\sessions.py", line 640, in send
adapter = self.get_adapter(url=request.url)
File "H:\Program Files\Python\lib\site-packages\requests\sessions.py", line 731, in get_adapter
raise InvalidSchema("No connection adapters were found for '%s'" % url)
requests.exceptions.InvalidSchema: No connection adapters were found for '192.XX:Port/'
No seen updates to my anidb account.
Might be interesting to add integreation with plex's new webhooks feature somehow, i know it has a trigger for "scobble" (90% watched). Don't know just how you'd go about it though as webhooks are a bit... different but some simple web thing that listens for updates might be doable?
added this in and got some scanning working, havent actually added HAMA to my setup (tvdb was all matched up no issues for pretty much anything, HAMA cant even match half my stuff so kinda stuck there.) But i do have the fun issue on the script crashing on any anime with special characters in the name such as ' or !.
Haven't looked at webhooks but would require something always running in the background I think and currently script is run once at the moment or triggered, once I get some more time will see if Python has something for it.
In the meantime it does support Tautulli for realtime watch updates:
https://github.com/RickDB/PlexAniSync/wiki/Tautulli-sync-script
For the special character problem we do sanitize during matching so wondering where that could go wrong, can you post the console output for PlexAniSync and the name of the Anime?
sure thing, here you go.
``2019-06-04 23:10:49 [ANILIST] Found AniList entry for Plex title: I Can't Understand What My Husband Is Saying
2019-06-04 23:10:49 [ANILIST] Series is already marked as completed on AniList so skipping update
2019-06-04 23:10:49 [PLEX] Retrieving episode watch count for show: I Can't Understand What My Husband Is Saying | season: 2
Traceback (most recent call last):
File "PlexAniSync.py", line 117, in
start()
File "PlexAniSync.py", line 110, in start
plex_series_watched)
File "E:! Projects\PlexAniSync-master\anilist.py", line 572, in match_to_plex
plex_total_seasons)
File "E:! Projects\PlexAniSync-master\anilist.py", line 692, in match_series_with_seasons
plex_title, counter_season, plex_year)
File "E:! Projects\PlexAniSync-master\anilist.py", line 882, in find_id_season_best_match
started_year = int(media_item.startDate.year)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Ah it's failing because of the lack of startdate year for that one as naming wise just checked and can handle any special character, that show has a bit different season naming (2nd Thread vs 2nd Season) so added that season naming logic and additional validation so it no longer crashes on that part.
It's now up on Github for downloading.
If it still doesn't line up properly would suggest adding a custom mapping (see readme) if it's only for a few series, most likely not gonna be possible to match it automatically then as there's too much difference between AniList and the Plex metadata.
Ah thats good, ill grab it and give it a test in a moment. Also i was wondering about that, could we add writing a custom file with no match ids when it finds something it cant match? Like it could be commented out, but it'd make it alot easier filling in the blanks where matching doesnt cooperate?
Is it possible to add multiple plex users on the same server to sync to different Anilist accounts?
Was brainstorming a bit but what I can do is add an argument to the script for selecting specific settings file like so:
PlexAniSync.py settings_user1.ini
PlexAniSync.py settings_user2.ini
TautulliSyncHelper.py settings_user1.ini 'some show'
That would mean can just update easily from one central project folder, let me know what you think about this solution.
The former suggestion would work, but the issue is he's a home user so he uses my login info and selects his profiles. Tried looking to see if his user had a different token, but apparently you can only get that with the admin account. I may just have him make his own separate account, tested out having the python script read a second settings.ini, it seemed to work fine.

The PlexAPI we use does support home users so will take a look.
I did a little more digging, and the managed users do get their own plex token.
Pushed to Github and updated readme, in short need to do the following:
home_user_sync = True
home_username = Megumin
home_admin_token = abcdef123456789
home_server_base_url = http://127.0.0.1:32400
skip_list_update to True for your initial sync, while I tested it here for normal and home user your mileage may vary so for this first release best to be carefulTried to get it to work without requiring the server token but seems Plex stores that info locally and doesn't allow a MyPlex account to retrieve any home user tokens, if someone knows a better way please let me know.
As a side note keep your server token secure, also it changes whenever your update your Plex admin account password.
You can now also supply a settings file as the first parameter like so:
python PlexAniSync.py settings_alternate.ini
I've looked far and wide but I am completely lost on how to install this, can anyone help me please?
Would check out the readme and go thru it step by step, updated it just now to describe the Python 3 install:
https://github.com/RickDB/PlexAniSync/blob/master/README.md
If you get stuck somewhere just let me know and will do my best to help get you setup.
Where is settings.ini, I cannot seem to find it.
You copy it from the example file like in Step 3:
From the project directory rename settings.ini.example to settings.ini, open settings.ini with your favorite text editor and edit where needed.
Will update the wording to rename in the readme now that it's a bit more clear, updated other sections as well.
Hi,
Thank you so much for this! Just started using AniList since MAL API is no longer working... I'll try to set this up this week-end.
I have a question though: I have ~15 users on my Plex, do i have to run PlexAniSync.py for each user? Like
PlexAniSync.py settings_user1.ini
PlexAniSync.py settings_user3.ini
PlexAniSync.py settings_user1.ini
...
Thanks in advance!
Yeah that's exactly right.
Thanks for the reply.
So, i just took a look at the doc but it seems that i would need their passwords right? Or did i miss something?
Sorry for the bother. I appreciate your project!
If they are home users don't need password just the username like so:
server = Sadala
myplex_user = your plex admin account username
myplex_password = uour plex admin account password
home_user_sync = True
home_username = the plex home username you want to sync with
home_server_base_url = http://127.0.0.1:32400
If they are external users which aren't in a plex home you might not be able to read their watched data but unable to test as I only have home users, if you run into errors try syncing with their own plex account in which case you do need their Plex password:
server = Sadala
myplex_user = some other non-admin Plex username
myplex_password = some other non-admin Plex password
Hey, I just set this up today and think it's pretty neat. I have some questions about how to handle some edge cases.
Multiple Entries in One Season
TVDB tends to put OVAs and Movies and stuff into Season 0, so for example for Armored Trooper VOTOMs there are like 7 or 8 AniList entries that all fall into the Season 0 bucket. How would I set up that mapping? Is it possible to set a mapping from a particular episode/range of episodes to an AniList ID?
TVDB/AniList Disagreements
The Custom Mapping works great for a show like Mob Psycho 100 that has 2 seasons on TVDB and 2 entries on AniList. What about shows where that mapping isn't the same? For example:
Update Skips
I only have one library for all my TV stuff—I guess I have the option of splitting it into one for anime and one for everything else, but I would prefer to keep them all in the same place. Would it be possible to a.) add an ignore list so that it's not checking through 43 seasons of Super Sentai and a bunch of other non-anime shows, or b.) only check shows that are tagged with Anime in their genres?
Multiple Entries in One Season
Checked code and in theory Season 0 matching should work in custom mapping, like so:
Some show^0^anilist ID of OVA
If not would need some example show names for testing locally.
TVDB/AniList Disagreements
That's a tricky one, do know that with HAMA they tend to get pushed into one season but custom mappings will help for this.
In case of One Piece being in multiple seasons you can create multiple mappings for each of its seasons:
One Piece^1^21
One Piece^2^21
etc..
Not ideal but programming against these kind of cases without any errors / mismatching has proven difficult due to the somewhat random differences on the AniDB or TVDB side, would rather have to solve it with custom mapping then have it update something incorrectly on the AniList side :)
Update Skips
Tags in Plex would need to get manually tagged as Anime which isn't something that is supported right now but do plan to add an ignore list in future updates (on the to-do list already), will add tag filtering for it as well then.
Multiple Entries in One Season
Season 0 seems to work when there's only one thing in that season, but for example One Piece has a boatload of movies and specials in S0 but each with individual AL IDs.
One Piece S0E19 / AL#4155
One Piece S0E27 / AL#12859
I think the ideal case for me would be specifying what each of the individual episodes within that S0 map to, e.g.:
Neon Genesis Evangelion^0x01^34
Neon Genesis Evangelion^0x02^32
Neon Genesis Evangelion^0x03^2759
...etc. (Those are D&R, EoE, and 1.0)
I can't think of any anime examples on AL, but another wrinkle is that shows (e.g. Garo) will sometimes have a mix of movies (e.g. S00E01) and OVAs (e.g. S00E02-05). Though if multiple seasons of One Piece can all map to the same ALID, maybe that's not an issue.
I think a fair alternative would just be being able to ignore S0 scanning altogether and just log those to AL manually, since it can be so messy and inconsistent across different TVDB shows.
TVDB/AniList Disagreements
That solves the One Piece case, I think with Concrete Revolutio (where >1 ALIDs are joined in one TVDB season), the answer might actually be to just submit a change to TVDB to split it into two. (Though I suppose this is the same problem as S0 being multiple AL entries.)
Year Disagreements
Thought I had the mappings for a few shows all smoothed out, but doesn't seem to be happy about it.
My custom mappings:
Lupin III^2^1425
Lupin III^3^1426
Lupin III^4^20906
Lupin III^5^100957
And logs from the sync:
2019-08-14 13:38:08 Found multiple seasons so using season search instead for: Lupin III
2019-08-14 13:38:08 [PLEX] Retrieving episode watch count for show: Lupin III | season: 1
2019-08-14 13:38:08 [ANILIST] Found AniList entry for Plex title: Lupin III
2019-08-14 13:38:08 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-08-14 13:38:08 [PLEX] Retrieving episode watch count for show: Lupin III | season: 2
2019-08-14 13:38:09 [MAPPING] Used custom mapping id | title: Lupin III | season: 2 | anilist id: 1425
2019-08-14 13:38:09 [ANILIST] Adding new series id to list: 1425 | Plex episodes watched: 0
2019-08-14 13:38:09 [ANILIST] Found AniList entry for Plex title: Lupin III
2019-08-14 13:38:09 [ANILIST] Series year did not match (skipping update) => Plex has 1971 and AniList has 1977
2019-08-14 13:38:09 [PLEX] Retrieving episode watch count for show: Lupin III | season: 3
2019-08-14 13:38:09 [MAPPING] Used custom mapping id | title: Lupin III | season: 3 | anilist id: 1426
2019-08-14 13:38:09 [ANILIST] Adding new series id to list: 1426 | Plex episodes watched: 0
2019-08-14 13:38:10 [ANILIST] Found AniList entry for Plex title: Lupin III
2019-08-14 13:38:10 [ANILIST] Series year did not match (skipping update) => Plex has 1971 and AniList has 1984
2019-08-14 13:38:10 [PLEX] Retrieving episode watch count for show: Lupin III | season: 4
2019-08-14 13:38:10 [MAPPING] Used custom mapping id | title: Lupin III | season: 4 | anilist id: 20906
2019-08-14 13:38:10 [ANILIST] Adding new series id to list: 20906 | Plex episodes watched: 0
2019-08-14 13:38:10 [ANILIST] Found AniList entry for Plex title: Lupin III
2019-08-14 13:38:10 [ANILIST] Series year did not match (skipping update) => Plex has 1971 and AniList has 2015
2019-08-14 13:38:10 [PLEX] Retrieving episode watch count for show: Lupin III | season: 5
2019-08-14 13:38:11 [MAPPING] Used custom mapping id | title: Lupin III | season: 5 | anilist id: 100957
2019-08-14 13:38:11 [ANILIST] Found AniList entry for Plex title: Lupin III: Part V
2019-08-14 13:38:11 [ANILIST] Series is already marked as completed on AniList so skipping update
Multiple Entries in One Season
Depending on how much more info Plex can give us will check something this weekend, if I come up with a better solution to OVA / Season matching will let you know.
If not will add a ignore S0 setting as to not flood the console output with repeated unmatched releases.
Year Disagreements
Thanks for the logs, looks to be oversight on my part as it should ignore the year there so long as custom mapping is forcing the match.
Will push fix in a few hours.
/Update
Fix is now online.
I think the ignore list that you're working on will give me a workaround for this issue, but I thought it might be worthwhile to log it here.
Basically, I have on my server Ultraman (the live-action show that started in 1966) and also ULTRAMAN (the CG show on Netflix that started in 2019). The 1966 show is not on anilist, but the 2019 show is. PAS.py tries to map the 1966 show to the 2019 show, which causes the program to crash. Anything after Ultraman alphabetically doesn't sync as a result.
Crash log: https://www.dropbox.com/s/u5z8zcl0au1lkq4/Screen%20Shot%202019-09-17%20at%201.18.52%20PM.png?dl=0
Thanks for the logs and it seems like Plex doesn't have year for that show which results in a hard crash, added check for that and pushed to Github which should report and skip over that error :)
Still working on ignore list support but not a lot of free time so no exact date yet but should be at least this month.
Thanks! This does resolve the crash since it skips over the 1966 series, but as far as I can tell, Plex does have date metadata for both the 1966 and 2019 series at both the show level and per episode.
Some logs in case they're useful:
2019-09-17 16:08:59 --------------------------------------------------
2019-09-17 16:08:59 Found multiple seasons so using season search instead for: Ultraman
2019-09-17 16:08:59 [PLEX] Retrieving episode watch count for show: Ultraman | season: 1
2019-09-17 16:09:00 [ANILIST] Found AniList entry for Plex title: Ultraman
2019-09-17 16:09:00 [ANILIST] Series is already marked as completed on AniList so skipping update
2019-09-17 16:09:00 [PLEX] Retrieving episode watch count for show: Ultraman | season: 2
2019-09-17 16:09:01 [ANILIST] Found match: ULTRAMAN Season 2 [109911]
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 3
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 4
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 5
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 6
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 7
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 8
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 9
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 10
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 11
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 12
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 13
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 14
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 15
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 16
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 17
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 18
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 19
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 20
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 [PLEX] Retrieving episode watch count for show: ULTRAMAN Season 2 | season: 21
2019-09-17 16:09:01 [ANILIST] Skipped season lookup as Plex did not supply a show year for ULTRAMAN Season 2 , recommend checking Plex Web and correcting the show year manually.
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: ULTRAMAN Season 2
2019-09-17 16:09:01 Series had no total episodes or invalid info on AniList (NoneType), using Plex watched count as fallback
2019-09-17 16:09:01 [ANILIST] Episodes watched was the same on AniList and Plex so skipping update
2019-09-17 16:09:01 --------------------------------------------------
2019-09-17 16:09:01 [ANILIST] Used custom mapping id | title: Ultraman (2019) | season: 1 | anilist id: 100663
2019-09-17 16:09:01 [ANILIST] Found AniList entry for Plex title: Ultraman (2019)
2019-09-17 16:09:01 [ANILIST] Series is already marked as completed on AniList so skipping update
2019-09-17 16:09:01 --------------------------------------------------
That's an odd one, will check code further as it could be a combination of invalid AniList data vs our fallback Plex data.
Added OVA year fallback to 1900 for debugging purposes, if run again and it reports the Plex year is 1900 it means that show for some reason does not give us a year in the Plex metadata.
To check that would need to do an XML output for an episode:
Also does every season of that show have > 1 episodes in them?
It sounds like maybe this is partially because there isn't a 1966!Ultraman season 3 on my server, and/or also because 2019!Ultraman only has one season released and a second just barely announced.
But, here's hella logs:
full output of PAS running: https://www.dropbox.com/s/7me7l9906s0m5o0/PASlog.txt?dl=0
1966
...on Plex: https://www.dropbox.com/s/uj7fjq83cz4p1xl/IMG_0581.jpg?dl=0
...on tvdb: https://www.thetvdb.com/series/ultraman
...on anilist: (null)
2019
...on Plex: https://www.dropbox.com/s/s5al5udmi8fws3f/IMG_0582.jpg?dl=0
...on tvdb: https://www.thetvdb.com/series/ultraman-2019
...on anilist: ULTRAMAN ULTRAMAN Season 2
1966 XML output: https://www.dropbox.com/s/kq8pywsehzrz1bj/ultramanS02E01.xml?dl=0
Is there an error on my side with this setup? This is using the most recent commit from earlier this month.
Seems like it's called My Hero Academia Season 2 in Plex which is resulting in the mismatch in your custom mappings, could you post a screenshot on how the show and seasons are listed on the Plex side?
If this isn't the case just pushed change to Github where it could have re-used a different Plex title.
My Plex side is identical to what’s on TVDB, except some specials are missing. Notably it’s titled My Hero Academia and not My Hero Academia Season 2. I think it’s picking that up from the Anilist entry for S2? And then it’s looking for season 3 and searching for MHA Season 2 | season 2 instead. I see something similar in a few other places.
Without the custom mapping I get the same issue: https://www.dropbox.com/s/mwl72gtdoqgv3dn/PASmha_nomap.jpg?dl=0
I’ll try in a bit with the build you just pushed.
That fixes the MHA case, thank you! It ended up causing some more weirdness with confusion between the two versions of Ultraman (taking the episodes I've watched of the second season of the toku show and counting them toward the unreleased second season of the CGI show). I think as a temporary workaround I'll just change the Plex title of the toku series to something weird so it doesn't get any hits on AniList.
(Thanks for your quick responses on these, also!)
Hei there
In my understanding this script only adds anime wich is marked "watched" by the user. Is ther some way to just add the whole library? Like that I could easily see what good anime my collection is missing
cheers!
Hi,
Right now not possible as it would require a fair rewrite with the checks in place for Plex episodes watched, you will need at least one watched episode in Plex before PlexAniSync will include that show and sync to AniList.
Also on AniList we need to add a state (Dropped / Planning / Watching etc..) and marking all Plex shows as Planning for instance would most likely pollute your AniList profile , so don't think can think this can be added anytime soon :)
How well does with work with the tvdb agent? It should be pretty easy to convert back and forth between tvdb and anidb using scudlee's list and thexem.de right? potentially useful as well is tvdb adding support for absolute episode ordering in v3 which should making conversion between anidb and tvdb even easier for many shows.
Can work fine with tvdb agent however naming there might be slightly different and season arrangement as well.
HAMA (Plex agent) uses a reference map to correct those from different sources (AniDB / Scudlee / TVDB / User submissions), we could add that to PlexAniSync just not familiar enough working with the extended metadata and doing x-refs and if HAMA can do that for us don't have to reinvent the wheel :)
Would love to see (Preferably 2 way sync) plugin for Jellyfin.
https://anilist.co/forum/thread/9732
sorry the creator doesn't support inferior platforms at the current time and has no plans to in the future
:^)
doesn't support inferior platforms
Well actually the developer is already supporting an inferior platform. Plex.
Well actually the developer is already supporting an inferior platform. Plex.
Well actually the developer is actually supporting the superior platform. Plex.
Well actually the developer is currently supporting the inferior platform. Plex.
FTFY.
Well actually the developer isn't currently supporting the inferior platform. Emby.
Plex currently has a large userbase however once Jellyfin stabilizes will see how that turns out, personally tried Emby a few times and found the client apps lacking and configuration obscure so that is one thing Jellyfin would need to tackle first :)
Also their Anime plugin compared to HAMA (Plex agent) for instance has limitations and lack of development, right now Plex + HAMA is near perfect when it comes to matching and metadata (airdates / summary / seasons etc..) so has that going for it as well.
For a more detailed look by another user which I replied to a while back:
https://anilist.co/forum/thread/5722/comment/194162
That said the way Plex is heading with limiting development costs (merging platform base) and limiting client functionality to some extend it will be interesting how this will develop in the months / years to come.
I'm having trouble finding out how to match shows that don't match automatically. What I'm trying to match right now is hero academia, but it doesn't seem to work. I'm using ass/hama and I have ass formatted in the tvdb format.
cat custom_mappings.ini
The Rising of the Shield Hero^1^99263
My Hero Academia^1^21459
My Hero Academia^2^21856
Boku no Hero Academia^4^104276
My Hero Academia^4^104276
Chihayafuru^3^101215
that's the output of my custom mappings config.
Hero Aca season 4 won't automatically update. Am I doing something wrong?
https://i.imgur.com/l5ipJlv.png
there's a screenshot of what plex views the show as.
That looks alright, make sure to update PlexAniSync as there were some custom mapping fixes and if it still fails to match please post the output log :)
I'm using the docker version. Is that using the latest version?
Not sure how Docker handles the updates but you could try using a fresh pull just in case:
docker pull chrus/plexanisync
I couldn't find an output log but here's the output when I run the sync.
chihayafuru grep:
2019-12-25 04:40:33 [MAPPING] Adding custom mapping | title: Chihayafuru | season: 3 | anilist id: 101215
2019-12-25 04:41:00 Found multiple seasons so using season search instead for: Chihayafuru
2019-12-25 04:41:00 [PLEX] Retrieving episode watch count for show: Chihayafuru | season: 1
2019-12-25 04:41:00 [ANILIST] Found AniList entry for Plex title: Chihayafuru
2019-12-25 04:41:00 [PLEX] Retrieving episode watch count for show: Chihayafuru | season: 2
2019-12-25 04:41:00 [ANILIST] Found match: Chihayafuru 2 [14397]
2019-12-25 04:41:00 [ANILIST] Found AniList entry for Plex title: Chihayafuru 2
2019-12-25 04:41:00 [PLEX] Retrieving episode watch count for show: Chihayafuru 2 | season: 3
2019-12-25 04:41:01 [ANILIST] Failed to find valid season title match on AniList for: Chihayafuru 2
Hero Aca grep:
2019-12-25 04:40:33 [MAPPING] Adding custom mapping | title: My Hero Academia | season: 1 | anilist id: 21459
2019-12-25 04:40:33 [MAPPING] Adding custom mapping | title: My Hero Academia | season: 2 | anilist id: 21856
2019-12-25 04:40:33 [MAPPING] Adding custom mapping | title: Boku no Hero Academia | season: 4 | anilist id: 104276
2019-12-25 04:40:59 Found multiple seasons so using season search instead for: Boku no Hero Academia
2019-12-25 04:40:59 [PLEX] Retrieving episode watch count for show: Boku no Hero Academia | season: 1
2019-12-25 04:40:59 [ANILIST] Found AniList entry for Plex title: Boku no Hero Academia
2019-12-25 04:40:59 [PLEX] Retrieving episode watch count for show: Boku no Hero Academia | season: 2
2019-12-25 04:40:59 [ANILIST] Found match: Boku no Hero Academia 2 [21856]
2019-12-25 04:40:59 [ANILIST] Found AniList entry for Plex title: My Hero Academia Season 2
2019-12-25 04:40:59 [PLEX] Retrieving episode watch count for show: My Hero Academia Season 2 | season: 3
2019-12-25 04:41:00 [ANILIST] Failed to find valid season title match on AniList for: My Hero Academia Season 2
2019-12-25 04:41:00 [PLEX] Retrieving episode watch count for show: My Hero Academia Season 2 | season: 4
2019-12-25 04:41:00 [ANILIST] Failed to find valid season title match on AniList for: My Hero Academia Season 2
For some reason it looks like its searching for Chihayafuru 2 Season 3 and HeroAca Season 2 Season 4. I'm not sure why or how to fix that.
Yep that's the old bug where it kept the previous title in memory, if you do a fresh docker pull / install should clear that up.
Don't use Docker myself as that is maintained but someone else but afaik it will do a git pull from master branch but if someone with more experience with it can let me know would be appreciated :)
In the next build will add some versioning in output to make it easier.
Hey, I noticed the docker image 404s.
Hi,
The docker link works for me here at the moment:
https://hub.docker.com/r/chrus/plexanisync
However the docker image is currently not updated by its maintainer and is using old code (with a few bugs), created issue for it here:
https://github.com/Thundernerd/Docker-PlexAniSync/issues/2
Gonna hold off this week and if this doesn't get sorted will create a docker image myself based on that one.
What you could do in the meantime is use the docker image and manually update the .py files of github like another user recently did so that you are running the latest version of PlexAniSync.
Thank you for the reply! sorry, but updating the python files seems like a little too much for me.
Created new docker image based on Thundernerd's and will be maintained to always use the latest code:
https://hub.docker.com/r/rickdb/plexanisync
You will need to remove the other docker image but configuration is the same.
are there plans to improve support for shows with multiple seasons? ever since I updated to the latest version of plexanisync it fixed the issues related to having custom_mappings not work, but what would be even better would be if it could figure it out on it's own. it seems like most multi-season shows don't work without custom mappings.
Multi season matching currently relies on a bit of fuzzy matching and multiple common naming schemes, if you can post some examples of shows with multiple seasons that aren't matching without custom mappings will take a look and see if those can be included in it :)
Xref database lookups are another solution but the HAMA agent usually solves the naming in Plex in a way that we don't need it as that has all the anidb / tvdb mapping corrections already.
the latest season of hero aca didn't work without manual matching, same with chihayafuru and oregairu season 2. I don't really think that hardcoding shows to work is really a sustainable or good long term solution. Couldn't you offload that work on to stuff like scudlee's list or thexem.de? I would think that could fix all of the matching for you and wouldn't even require long term maintenance once set up.
For what it's worth I am using hama but I have my content laid out in a strict tvdb conforming manner. "tvdb" under the absolute series scanner guid_type. I'm not sure if that would complicate things.
My hero academia season 4 will match correctly as it falls within the default season naming scheme, tested with:
It’s not really hardcoded as Anime shows tend to follow a certain naming logic, agree that xem list would improve this but would need a few shows to test it with in which don’t match.
If you can post how it’s arranged / named in Plex will take a further look.
That said of the 450 shows in my library only 2 OVA’s fail to match due to Anilist data offset being too high (airdate / year) with HAMA pretty much at default.
So I went and I built an lxc container with plexanisync to remove any possibility that the docker container I was using was giving me problems. The lxc container is ubuntu 18.04 if that matters. Also my folders are named using tvdb naming conventions with seasons using hama/ass. They are all recognized by plex other than the ones that are very obviously misnamed or not on anidb/tvdb like my monogatari stuff and one pace.
Alright so here's the aggregation of everything I tried:
Infinity shows like Naruto, Bleach, Fairy Tail, Dragon Ball and One Piece are quite broken. I got the output for hama with the default names and the output with english names and grep'ed it for the word fail and default yielded 101 results and english yielded 99 results.
here's the pastebin for each:
default hama names ungrep'ed: https://pastebin.com/3Hb6TSNS
default hama names grep'ed: https://pastebin.com/XMzv8kks
english names ungrep'ed: https://pastebin.com/qUTPjx4t
english names grep'ed: https://pastebin.com/5ihE7zvd
Yu-Gi-Oh is broken when I use default names but fixed when I use english names. Detective Conan is broken when I use english names (it's called Case Closed, at least I think it's broken) but works when I use default names.
I'm gunna switch back to default now though because some of those english names are ridiculous.
Updated docker links to new official one, highly recommend switching to this as it includes the latest bugfixes / changes:
https://hub.docker.com/r/rickdb/plexanisync
Thexem / xref support is now on the to do list for next month but because of new job functions might take a bit longer :)