From 9a86ddce016ac269dd7bc353cbcec6e669619bac Mon Sep 17 00:00:00 2001 From: j Date: Fri, 5 Aug 2016 17:57:40 +0200 Subject: [PATCH] include upload_date --- pandora/archive/external.py | 2 ++ static/js/importMediaDialog.js | 1 + 2 files changed, 3 insertions(+) diff --git a/pandora/archive/external.py b/pandora/archive/external.py index 5dac990ec..518a0b963 100644 --- a/pandora/archive/external.py +++ b/pandora/archive/external.py @@ -52,6 +52,8 @@ def get_info(url): for k in info_keys if k in i and i[k] }) + if 'upload_date' in i: + info[-1]['date'] = '-'.join([i['upload_date'][:4], i['upload_date'][4:6], i['upload_date'][6:]]) return info def add_subtitles(item, media, tmp): diff --git a/static/js/importMediaDialog.js b/static/js/importMediaDialog.js index 2f0d11e1e..699eabd88 100644 --- a/static/js/importMediaDialog.js +++ b/static/js/importMediaDialog.js @@ -90,6 +90,7 @@ pandora.ui.importMediaDialog = function(options) { result.data.items.forEach(function(info) { pandora.api.add({title: info.title}, function(result) { var edit = { + date: info.date, director: info.uploader ? [info.uploader] : [], id: result.data.id, notes: info.url,