diff --git a/pandora/item/urls.py b/pandora/item/urls.py index 436212e..a789555 100644 --- a/pandora/item/urls.py +++ b/pandora/item/urls.py @@ -23,7 +23,7 @@ urlpatterns = patterns("item.views", #poster (r'^(?P[A-Z0-9].+)/poster(?P\d+)\.jpg$', 'poster'), - (r'^(?P[A-Z0-9].+)/siteposter(?P\d+)\.jpg$', 'siteposter'), + (r'^(?P[A-Z0-9].+)/siteposter(?P\d*)\.jpg$', 'siteposter'), (r'^(?P[A-Z0-9].+)/poster\.jpg$', 'siteposter'), (r'^(?P[A-Z0-9].+)/frameposter(?P\d+).jpg$', 'poster_frame'), diff --git a/pandora/item/views.py b/pandora/item/views.py index 32a326e..1912fcf 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -604,6 +604,7 @@ def siteposter(request, id, size=None): poster = item.path('siteposter.jpg') poster = os.path.abspath(os.path.join(settings.MEDIA_ROOT, poster)) if size: + size = int(size) image = Image.open(poster) image_size = max(image.size) if size < image_size: