empty lists
This commit is contained in:
parent
2a3c09d0ce
commit
40e8eeb0cb
4 changed files with 12 additions and 10 deletions
|
@ -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):
|
||||
try:
|
||||
os.unlink(f)
|
||||
except:
|
||||
pass
|
||||
return icon
|
||||
|
||||
def load_subtitles(self):
|
||||
|
|
|
@ -522,7 +522,7 @@
|
|||
"sidebarSize": 256,
|
||||
"theme": "classic",
|
||||
"videoPoints": {},
|
||||
"videoResolution": 96,
|
||||
"videoResolution": 240,
|
||||
"videoScale": "fit",
|
||||
"videoMuted": false,
|
||||
"videoSize": "small",
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,9 @@ pandora.ui.item = function() {
|
|||
pandora.$ui.itemTitle
|
||||
.options({
|
||||
title: '<b>' + 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 : '') + '</b>'
|
||||
})
|
||||
.show();
|
||||
|
|
Loading…
Reference in a new issue