-
Notifications
You must be signed in to change notification settings - Fork 45
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
Use "Sort title" and "Original title" as alternative titles for search #24
Comments
Added 👍 Small caveat is that PlexAPI doesn't seem to always supply the original title or is limited to movie objects. |
Awesome! 😃 Unfortunately the new feature doesn't work for me. All of the movies it is trying to sync have japanese characters in the original title, and I just get unicode encode errors when it tries to encode the title. |
Should be fixable with forcing unicode encoding but believe that is also OS related with Python, if you can post both logs (debug and standard) will take a look :) |
Here you go: PlexAniSync-logs.zip |
Don't see any encoding error tracebacks in log, could you make a screenshot and post the title of one that it's having issues with. |
You can also try the docker image which rules out any Python or local OS issues: |
Sorry, I thought the logfiles reflected what I could see in the console. Here's the console output: PlexAniSync-console.log |
It should have logged to file so that's odd, thanks and will check the console logs now :) |
Our guessit implementation looks like the root cause so will try some solutions now. |
Could you retry with replacing anilist.py with this one: https://gist.github.com/RickDB/d533c4d6f94a324bf8f049293a97bc85 This will force encoding to UTF8 for guessit, since it also break logging it could be an operating system + Python issue where it doesn't properly translates these characters. |
Guessit Exception: PlexAniSync-logs.zip |
What operating system and Python version are you currently testing under? Found some other user reports for Guessit but it seems only under Python 2 and certain Windows versions, for now will add a workaround which logs + skips over Guessit if error occured. |
Windows 10 64bit |
Added some checks and forcing locale in below Python files, also includes PlexAniSync.py this time: https://gist.github.com/RickDB/d533c4d6f94a324bf8f049293a97bc85 What seems to happen is Guessit is throwing error and logger fails to output it because Python locale under Windows is cp1252 (non-unicode) which explains the lack of log output, either way this is fixable but probably need a few tries to get it right :) |
New logs: PlexAniSync.zip |
Updated to include encoding in logger creation: https://gist.github.com/RickDB/d533c4d6f94a324bf8f049293a97bc85 |
For some reason it's not taking the logging parameters, could you post a few problematic titles here so I can test locally as well. In the meantime a new try with logger changes: |
They did show up in the console log I attached. Does it not show the japanese characters for you?
The debug log wasn't created this time: PlexAniSync.zip |
Seems to be working now judging by console output but hard to see if there are real matches for the other titles, when testing those problematic titles show no more errors in logger so gonna clean up and restore a few functions. Noticed title in the console log before just not sure if that got trimmed down :) |
New version with debug logging restored: |
Still no debug log for me: PlexAniSync.zip |
Fixed in below version. |
The debug logs are back now: PlexAniSync.zip |
Logs look clean now with no more crashes, OVA / Movie matching is still experimental so for now would use custom mappings for those that are not lining up until a better solution is added :) Pushed fixes to repo and updated docker image should be out soon. |
But did you manage to sync anything using "original title" as alternate title? None of the movies with alternative titles got synced for me. It doesn't say anything about it attempting it in the log either. |
Those get included in the generic matching pool of potential titles and don't log those as those can flood the log. Attached a debug version of anilist.py which will output all 3 Plex titles which among others get included for lookup, if the original title there is the same as the standard / sort title it means PlexAPI sadly didn't supply it. |
Thank you for the debug version. Logs: PlexAniSync.zip |
Console output for it could look a bit off as there's no new line before it but it's for the entry after it for sure. |
Pretty sure I found the bug and new version below, it will be a bit slower when searching AniList as there's a 100ms delay between each potential title search and for no results that could mean 1.2s per show worse case. |
Okay, got one step further now. Ponyo got detected this time, but it was matched incorrectly to 5702. In fact it seems like all "original title" results have incorrect Anilist id's, though I haven't checked every one of them. Here's the latest logs: PlexAniSync.zip I just realized I have a Raspberry Pi at the same location where my Plex server is, so I've installed docker on it and I did the pull command for |
For the mismatch it might be guessit fuzzy matching, new test version below to rule this out: The docker docs need updating with some steps for users new to Docker and will see about adding them 👍 |
I will do some reading on docker later, but a guide would definitely be helpful for new users. |
Updated docs pushed some tweaks mostly for small fine tuning the title searches and reduce unnecessary load on the AniList API: https://hub.docker.com/r/rickdb/plexanisync Back on this early next week but if you found out more please don't hesitate to post :) |
Updated docker docs and with the latest version do you still have issues with matching? |
When I try to run the docker image using On windows I've not been able to sync any movie using the "original title"-feature. It just adds some seemingly random other movie to anilist, for every movie. |
Disabling original title for the time being and will test it again later, do have a rework on the matching in progress which uses XREF sources like HAMA does at the moment Keeping it in this issue is fine :) |
Not sure which cross reference sources HAMA uses (thetvdb?), but sound great! Here's the logs for the loop issue described I above: PlexAniSync.1.2.4.zip |
Hama uses several lists (AniDB / TVDB) and a cross reference table managed by anime community, integrating it will vastly improve matching but want to clean up the code first so it fits in perfectly :) Thanks for the logs and will fix the loop today. |
Pushed fix for loop and if you can retry with latest version of this repo that would be great 👍 |
Didn't get stuck in loop this time :) |
Awesome, thanks for testing again 👍 Hopefully by end of the month I can fork over the HAMA code for XREF matching (AniDB / TVDB) so we can get matching on par with that but it all depends on my workload. |
Looking forward to it 😄 |
I have a lot of anime movies and series that doesn't use english or japanese titles. It would be great if PlexAniSync could use "Sort title" and "Original title" from Plex, as alternative titles when searching Anilist for the movie/series fails.
The sort title is usually the same as the title, but I like to add the english title together with the translated title there, so for my situation it would be nice if the sort title was used as well.
But the "Original title" field would probably give the correct result from anilist most of the time.
The text was updated successfully, but these errors were encountered: