use pandora.site.importMetadata

This commit is contained in:
j 2016-09-19 19:56:42 +02:00
parent cad911a807
commit 2869dbafab
2 changed files with 5 additions and 2 deletions

View file

@ -137,7 +137,8 @@ pandora.ui.addFilesDialog = function(options) {
}
(isNewItem ? pandora.api.edit : Ox.noop)(Ox.extend(
Ox.filter(item, function(value, key) {
return key != 'title';
return key != 'title' &&
Object.keys(pandora.site.importMetadata).indexOf(key) > -1;
}),
{'id': id}
), function(result) {

View file

@ -106,7 +106,7 @@ pandora.ui.addItemDialog = function(options) {
pandora.api.getMediaUrlInfo({
url: input
}, function(result) {
onInfo(result.data.items);
onInfo(result.data.items.map(getVideoInfo));
});
}
}
@ -175,6 +175,8 @@ pandora.ui.addItemDialog = function(options) {
}
return value;
});
values.url= info.url;
return Ox.extend(info, values);
}
function onInfo(items) {