kuruoujou / XBMal

XBMal - the XBMC MAL Plugin. Update your MyAnimeList based on your XBMC Library!
GNU General Public License v3.0
10 stars 4 forks source link

Fix a crash when the mapping process retrieved an error and one tries to... #18

Closed iraturus closed 9 years ago

iraturus commented 9 years ago

... remap it manually.

Make script update a tv show, that has season numbering in Kodi, with proper episode number, which are not in season form in MAL (e.g. Detective Conan is scraped with seasons, but MAL only offers Detective Conan as one tv show. So every season is mapped to the same MAL-ID, which didn't update the episode numbers properly.) This change relies on offline information, so one needs to have the complete former seasons for this to work. Change mal-api.ramblingahoge.net to api.atarashiiapp.com, because first one didn't update MAL anymore.

kuruoujou commented 9 years ago

Excellent! I like it. I'll test it this weekend and merge it in if it works. Although, I think I'll change back to using ramblingahoge - I don't want to use the atarashii guy's API without their permission (though I am using their version of the API), but I wasn't seeing any issues with updating myself. Then again, I haven't been watching a lot lately that xbmal can update as is, so that might be why. I can fix the ramblingahoge one myself.

Do you know if this addresses #17 at all? I can't tell right off the bat if it does or not, but at a glance it doesn't look like it.

iraturus commented 9 years ago

It looks like it is related. I got a Retrieval Error of the mapping on an anime show as well (Young Kindaichi's Casebook) (probably API related?). If you then tried to map it manually it would crash the script, so I made it to go to manual search mode in that case.

kuruoujou commented 9 years ago

Excellent. I've started looking at it, but I have a question, what distribution of Linux are you using? Is it Ubuntu, and if so, which version?

kuruoujou commented 9 years ago

Alright, so it does exactly what it says on the tin! Sweet. I didn't check if it closes #17 yet, I don't have either of the shows listed so I can't check immediately - give me a few days (it's getting rough at work with a new build going on).

I did notice one bug, though: the bug is that it counts each "season" of a show that's listed as a single season on MAL as a separate show, so when you see the "X Shows Updated" notice, it shows you the number of seasons updated, not the number of shows. This, admittedly, may have existed before this merge - I haven't dived too deep into it. Before I cut a new version I want to get this fixed (and admittedly I'm buying time to try to get ramblingahoge.net to play nicely again :P)

I thought I had noticed a potential issue, but I took another look at the code involved and I was wrong, so instead of "a few bugs", there is "a bug". I'll take a look myself sometime in the next few days (maybe next week...) when I have a chance, but if someone who has more spare time wants to fix this up, please please please go for it.

Thanks iraturus for your commit. Yay fixing things!

iraturus commented 9 years ago

The bug should be fixed in my newest commit. I'm using openSUSE 13.2 for programming purposes, but I'm testing the script on Windows 7 on my main PC in Kodi 14.2.