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',
|
'encoding': 'Processing video on server',
|
||||||
'failed': 'Encoding failed'
|
'failed': 'Encoding failed'
|
||||||
}[data.state])
|
}[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._('Use this file')
|
||||||
: Ox._('Dont use this file');
|
: Ox._('Dont use this file');
|
||||||
},
|
},
|
||||||
|
@ -294,8 +297,10 @@ pandora.ui.mediaView = function(options) {
|
||||||
})
|
})
|
||||||
.open();
|
.open();
|
||||||
} else {
|
} else {
|
||||||
var ignored = self.$filesList.value(data.id, 'instances')
|
var instances = self.$filesList.value(data.id, 'instances'),
|
||||||
.filter(function(i) {return i.ignore; }).length > 0;
|
selected = self.$filesList.value(data.id, 'selected'),
|
||||||
|
ignored = (instances.length == 0 && ! selected) ||
|
||||||
|
instances.filter(function(i) {return i.ignore; }).length > 0;
|
||||||
pandora.api.editMedia({
|
pandora.api.editMedia({
|
||||||
files: [{
|
files: [{
|
||||||
id: data.id,
|
id: data.id,
|
||||||
|
|
Loading…
Reference in a new issue