forked from 0x2620/pandora
fix selecting file without instances
This commit is contained in:
parent
5354b52193
commit
43f1d07dbe
1 changed files with 8 additions and 3 deletions
|
@ -113,7 +113,10 @@ pandora.ui.mediaView = function(options) {
|
|||
'encoding': 'Processing video on server',
|
||||
'failed': 'Encoding failed'
|
||||
}[data.state])
|
||||
: data.instances.filter(function(i) {return i.ignore; }).length > 0
|
||||
: (
|
||||
data.instances.filter(function(i) {return i.ignore; }).length > 0 ||
|
||||
(data.instances.length == 0 && !data.selected)
|
||||
)
|
||||
? Ox._('Use this file')
|
||||
: Ox._('Dont use this file');
|
||||
},
|
||||
|
@ -294,8 +297,10 @@ pandora.ui.mediaView = function(options) {
|
|||
})
|
||||
.open();
|
||||
} else {
|
||||
var ignored = self.$filesList.value(data.id, 'instances')
|
||||
.filter(function(i) {return i.ignore; }).length > 0;
|
||||
var instances = self.$filesList.value(data.id, 'instances'),
|
||||
selected = self.$filesList.value(data.id, 'selected'),
|
||||
ignored = (instances.length == 0 && ! selected) ||
|
||||
instances.filter(function(i) {return i.ignore; }).length > 0;
|
||||
pandora.api.editMedia({
|
||||
files: [{
|
||||
id: data.id,
|
||||
|
|
Loading…
Reference in a new issue