diff --git a/pandora/item/models.py b/pandora/item/models.py index 172f76405..b399c177a 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -1089,7 +1089,10 @@ class Item(models.Model): icons = os.path.abspath(os.path.join(settings.MEDIA_ROOT, icon)) icons = glob(icons.replace('.jpg', '*.jpg')) for f in filter(lambda p: not p.endswith('/icon.jpg'), icons): - os.unlink(f) + try: + os.unlink(f) + except: + pass return icon def load_subtitles(self): diff --git a/pandora/padma.jsonc b/pandora/padma.jsonc index 20eb5e959..ea1f4fc5b 100644 --- a/pandora/padma.jsonc +++ b/pandora/padma.jsonc @@ -522,7 +522,7 @@ "sidebarSize": 256, "theme": "classic", "videoPoints": {}, - "videoResolution": 96, + "videoResolution": 240, "videoScale": "fit", "videoMuted": false, "videoSize": "small", diff --git a/static/js/pandora/infoView.padma.js b/static/js/pandora/infoView.padma.js index 0fc355ac9..3a8b47bf1 100644 --- a/static/js/pandora/infoView.padma.js +++ b/static/js/pandora/infoView.padma.js @@ -222,7 +222,7 @@ pandora.ui.infoView = function(data) { placeholder: formatLight('unknown'), tooltip: 'Doubleclick to edit', value: key == 'country' - ? (data[key] ? data[key].join(', ') : ['']) + ? (data[key] ? data[key].join(', ') : '') : data[key] || '' }) .css({float: 'left'}) @@ -284,10 +284,7 @@ pandora.ui.infoView = function(data) { }) .bindEvent({ submit: function(event) { - var value = ['language', 'category'].indexOf(key) >= 0 - ? event.value.split(', ') - : event.value; - editMetadata(key, value); + editMetadata(key, event.value); } }) .appendTo($div); @@ -388,8 +385,8 @@ pandora.ui.infoView = function(data) { var edit = {id: data.id}; if (key == 'title') { Ox.extend(edit, parseTitle(value)); - } else if (key == 'director' || key == 'country') { - edit[key] = value.split(', '); + } else if(['director', 'country', 'language', 'category'].indexOf(key) >= 0) { + edit[key] = value ? value.split(', ') : []; } else { edit[key] = value; } diff --git a/static/js/pandora/item.js b/static/js/pandora/item.js index 3a014e620..2eef3bd25 100644 --- a/static/js/pandora/item.js +++ b/static/js/pandora/item.js @@ -32,7 +32,9 @@ pandora.ui.item = function() { pandora.$ui.itemTitle .options({ title: '' + result.data.title - + (result.data.director ? ' (' + result.data.director.join(', ') + ')' : '') + + (result.data.director && result.data.director.length + ? ' (' + result.data.director.join(', ') + ')' + : '') + (result.data.year ? ' ' + result.data.year : '') + '' }) .show();