plexinc-plugins/Disney.bundle — pull request #1 by machristie (2013-07-05 19:00:17+00:00)
Title: Disney show may not have anything suitable for a thumbnail

I ran into an issue recently where the Disney Plex plugin channel wasn't pulling in the list of "Shows" (but the "Collections" worked just fine). The error I was getting in the plugin log was:

2013-07-05 14:07:13,384 (-4faed000) : CRITICAL (runtime:877) - Exception (most recent call last):
File "/Users/marcus/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 837, in handle_request
result = f(**d)
File "/Users/marcus/Library/Application Support/Plex Media Server/Plug-ins/Disney.bundle/Contents/Code/__init__.py", line 39, in Shows
except: thumb = show['square']
File "/Users/marcus/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 110, in
_getitem_ = lambda x, y: x.__getitem__(y),
KeyError: 'square'

Looking at the code it would appear there is a show that has neither a 'logo', nor a 'square2x' nor a 'square' attribute in the JSON response. I looked at the JSON http://video.disney.com/_grill/json/shows/all and I see that there is a show, Camp Lakebottom, that doesn't have any of these attributes.

So I made a small fix that just sets thumb to `None` when it can't find any of those attributes.

Should I open an issue for this? Not sure. This is my first time with Plex Plug-in development.