From 9ffad130d1d945128a2bc4739d79d0435d3d233e Mon Sep 17 00:00:00 2001 From: j Date: Thu, 21 Feb 2019 20:07:53 +0530 Subject: [PATCH] add more metadata keys --- pandora/config.indiancinema.jsonc | 13 +++++++++++++ static/js/infoView.indiancinema.js | 7 +++++++ static/js/metadataDialog.js | 3 ++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/pandora/config.indiancinema.jsonc b/pandora/config.indiancinema.jsonc index 8f1a9e69c..42bae5881 100644 --- a/pandora/config.indiancinema.jsonc +++ b/pandora/config.indiancinema.jsonc @@ -715,6 +715,11 @@ "title": "Date of Censor Certificate", "type": "date" }, + { + "id": "certificationcentre", + "title": "Certification centre", + "type": "string" + }, { "id": "ratingcertificate", "title": "Rating/Certificate", @@ -1059,6 +1064,14 @@ "find": true, "sortType": "person" }, + { + "id": "laboratory", + "title": "Laboratory", + "type": ["string"], + "advanced": true, + "columnWidth": 180, + "find": true + }, { "id": "courtesy", "title": "Courtesy", diff --git a/static/js/infoView.indiancinema.js b/static/js/infoView.indiancinema.js index ef1e74997..0c4b9c3b3 100644 --- a/static/js/infoView.indiancinema.js +++ b/static/js/infoView.indiancinema.js @@ -329,6 +329,7 @@ pandora.ui.infoView = function(data, isMixed) { renderGroup([ 'censorshipcertificatenumber', 'dateofcensorcertificate', + 'censorshipcertificatecentre', 'ratingcertificate', 'length', 'numberofreels', @@ -422,6 +423,7 @@ pandora.ui.infoView = function(data, isMixed) { 'stuntdirector', 'continuity', 'publicity' + 'laboratory' ]); renderGroup([ 'courtesy', @@ -629,6 +631,11 @@ pandora.ui.infoView = function(data, isMixed) { : []; } else if (key == 'imdbId') { edit[key] = value.match(/\d{7}/)[0]; + } else if (key == 'dateofcensorcertificate') { + if (/\d{2}-\d{2}-\d{4}/.test(value)) { + value = Ox.reverse(value.split('-')).join('-') + } + edit[key] = value; } else { edit[key] = value; } diff --git a/static/js/metadataDialog.js b/static/js/metadataDialog.js index f92770650..06ee9d7d2 100644 --- a/static/js/metadataDialog.js +++ b/static/js/metadataDialog.js @@ -8,7 +8,8 @@ pandora.ui.metadataDialog = function(data) { 'productionCompany', 'filmingLocations', 'producer', 'writer', 'cinematographer', 'editor', 'composer', 'actor', 'lyricist', 'singer', - 'genre', 'keyword', 'summary' + 'genre', 'keyword', 'summary', + 'laboratory' ], mapKeys = { 'keyword': 'topic'