plexinc-plugins/Apple-Movie-Trailers.bundle — Issue #4: AMT service explodes on /app
Author: indirect
Created: 2011-12-11 04:49:25+00:00
State: open

According to an exception email I just got, the AMT service raises an exception on the url "http://trailers.apple.com/app/". Here's the exception report:

`IndexError: list index out of range`

```
Traceback (most recent call last):
File "/data/node/shared/plex/bundle/com.plexapp.framework/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 606, in handle_request
result = cf(**d)
File "/data/node/releases/20111119233206/vendor/plex/bundle/com.plexapp.system/Contents/Code/codeservice.py", line 19, in cs_url_lookup
c = URLService.MetadataObjectForURL(url, allow_deferred=True, in_container=True)
File "/data/node/shared/plex/bundle/com.plexapp.framework/Contents/Resources/Versions/2/Python/Framework/api/servicekit.py", line 223, in MetadataObjectForURL
return self._get_result_from_function_for_url(self._metadata_object_for_url_from_service, url, do_normalization, dict(add_items_automatically = add_items_automatically, allow_deferred = allow_deferred, in_container = in_container))
File "/data/node/shared/plex/bundle/com.plexapp.framework/Contents/Resources/Versions/2/Python/Framework/api/servicekit.py", line 208, in _get_result_from_function_for_url
result = func(url, service, **kwargs)
File "/data/node/shared/plex/bundle/com.plexapp.framework/Contents/Resources/Versions/2/Python/Framework/api/servicekit.py", line 148, in _metadata_object_for_url_from_service
metadata = self._core.services._call_named_function_in_service('MetadataObjectForURL', service, [url], context = self._context)
File "/data/node/shared/plex/bundle/com.plexapp.framework/Contents/Resources/Versions/2/Python/Framework/core.py", line 836, in _call_named_function_in_service
result = host.call_named_function(fname, context=new_context, allow_deferred=allow_deferred, raise_exceptions=raise_exceptions, args=f_args, kwargs=f_kwargs)
File "/data/node/shared/plex/bundle/com.plexapp.framework/Contents/Resources/Versions/2/Python/Framework/code.py", line 689, in call_named_function
result = f(*args, **kwargs)
File "/data/node/releases/20111119233206/vendor/plex/bundle/com.plexapp.system.services/Contents/Service Sets/com.plexapp.plugins.amt/URL/Apple Movie Trailers/ServiceCode.pys", li
```