forked from 0x2620/pandora
use pandora.site.importMetadata
This commit is contained in:
parent
cad911a807
commit
2869dbafab
2 changed files with 5 additions and 2 deletions
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue