diff --git a/pandora/backend/models.py b/pandora/backend/models.py index 6c7f158d4..66df8db3b 100644 --- a/pandora/backend/models.py +++ b/pandora/backend/models.py @@ -189,7 +189,7 @@ class Movie(models.Model): poster = {} poster['width'] = self.poster_width poster['height'] = self.poster_height - poster['url'] = '/poster/%s.jpg' % self.movieId + poster['url'] = '/%s/poster.jpg' % self.movieId ''' if self.poster: poster['url'] = self.poster.url diff --git a/pandora/backend/views.py b/pandora/backend/views.py index 95a87a9b9..f38e014d9 100644 --- a/pandora/backend/views.py +++ b/pandora/backend/views.py @@ -569,6 +569,8 @@ def poster(request, id, size=128): else: poster_path = movie.poster.path else: + if not size: size='large' + return redirect('http:///0xdb.org/%s/poster.%s.jpg' % (movie.movieId, size)) poster_path = os.path.join(settings.STATIC_ROOT, 'png/posterDark.48.png') return HttpFileResponse(poster_path, content_type='image/jpeg') diff --git a/pandora/static/js/pandora.js b/pandora/static/js/pandora.js index c4c6196fe..a3e9f2312 100755 --- a/pandora/static/js/pandora.js +++ b/pandora/static/js/pandora.js @@ -490,8 +490,7 @@ app.constructInfo = function() { app.constructList = function(view) { var $list, - info = $.inArray(app.user.ui.sort[0].key, ['title', 'director']) > -1 ? 'year' : app.user.ui.sort[0].key, - keys = Ox.unique(['director', 'id', 'poster', 'title', info]); + keys = ['director', 'id', 'poster', 'title', 'year']; Ox.print('constructList', view); if (view == 'list' || view == 'calendar') { $list = new Ox.TextList({ @@ -520,7 +519,7 @@ app.constructList = function(view) { return { height: data.poster.height || 128, // fixme: remove later id: data['id'], - info: data[info], + info: data[['title', 'director'].indexOf(sort[0].key) > -1 ? 'year' : sort[0].key], title: data.title + (data.director ? ' (' + data.director + ')' : ''), url: data.poster.url.replace(/jpg$/, size + '.jpg'), width: data.poster.width || 80 // fixme: remove later @@ -528,6 +527,7 @@ app.constructList = function(view) { }, keys: keys, request: function(options) { + Ox.print('options, Query.toObject', options, app.Query.toObject()) app.request('find', $.extend(options, { query: app.Query.toObject() }), options.callback); @@ -908,12 +908,12 @@ app.constructMainMenu = function() { app.$ui.findSelect.selectItem(id); } else if (data.id == 'ordermovies') { var id = data.checked[0].id; - app.$ui.list.sort(user.ui.sort[0].key, id == 'ascending' ? '' : '-'); + app.$ui.list.sortList(user.ui.sort[0].key, id == 'ascending' ? '' : '-'); } else if (data.id == 'sortmovies') { var id = data.checked[0].id, operator = Ox.getObjectById(app.config.sortKeys, id).operator; app.$ui.mainMenu.checkItem('sortMenu_ordermovies_' + (operator === '' ? 'ascending' : 'descending')); - app.$ui.list.sort(id, operator); + app.$ui.list.sortList(id, operator); } }, click: function(event, data) { diff --git a/pandora/templates/pandora.json b/pandora/templates/pandora.json index c284a06df..7c400e805 100644 --- a/pandora/templates/pandora.json +++ b/pandora/templates/pandora.json @@ -108,7 +108,7 @@ "itemView": "info", "listQuery": {"conditions": [], "operator": ""}, "listsSize": 192, - "listView": "list", + "listView": "icons", "sections": ["history", "lists", "public", "featured"], "showGroups": true, "showInfo": true, @@ -119,6 +119,6 @@ ], "theme": "classic" }, - "name": "" + "username": "" } -} \ No newline at end of file +}