ShokoAnime / ShokoOnPlex

Repository for Shoko On Plex, a Plex channel plugin.
http://shokoanime.com/plex/
22 stars 5 forks source link

Channel main menu crash in Plex for Android native application #23

Closed hidden4003 closed 8 years ago

hidden4003 commented 8 years ago

I've figured out the reason why the channel was crashing the Plex app for me.

in init.py inside def MainMenu(): around line 105 there is following code

return req.content.replace('< /MediaContainer>','<Directory prompt="Search" thumb="'+R(ICON_SEARCH)+'" art="'...

On my older tablet I have root so I was able to get a stacktrace which said:

IndexOutOfBoundsException Invalid index 5, size is 5

And that is exactly the value of <MediaContainer size="5" so this value was not adjusted when extra element was added.

I've replaced this line with: return req.content and I no longer have crashes, no search icon either but I prefer no search button rather than crashes :)

maxpiva commented 8 years ago

Will fix on the server, it will returns size+1, instead size.