new metadata

This commit is contained in:
j 2016-11-30 11:07:09 +01:00
parent 3b3c22d7ed
commit 7a8c340312
3 changed files with 574 additions and 53 deletions

View file

@ -670,8 +670,8 @@
"sort": true
},
{
"id": "keyword",
"title": "Keyword",
"id": "topic",
"title": "Topic",
"type": ["string"],
"autocomplete": true,
"filter": true,
@ -683,6 +683,380 @@
"type": "text",
"find": true
},
{
"id": "releasedate",
"title": "Release Date",
"type": "date"
},
{
"id": "censorshipcertificatenumber",
"title": "Censorship Certificate Number",
"type": "integer"
},
{
"id": "dateofcensorcertificate",
"title": "Date of Censor Certificate",
"type": "date"
},
{
"id": "ratingcertificate",
"title": "Rating/Certificate",
"type": "string"
},
{
"id": "length",
"title": "Length",
"type": "integer"
},
{
"id": "numberofreels",
"title": "Number of Reels",
"type": "integer"
},
{
"id": "format",
"title": "Format",
"type": "string"
},
{
"id": "presentedby",
"title": "Presented by",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "coproducer",
"title": "Co-Producer",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "associateproducer",
"title": "Associate Producer",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "executiveproducer",
"title": "Executive Producer",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "associatedirector",
"title": "Associate Director",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "chiefassistantdirector",
"title": "Chief Assistant Director",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "assistantdirector",
"title": "Assistant Director",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "story",
"title": "Story",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "screenplay",
"title": "Screenplay",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "dialogue",
"title": "Dialogue",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "adaptation",
"title": "Adaptation",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "musicdirector",
"title": "Music Director",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "backgroundmusic",
"title": "Background Music",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "orchestration",
"title": "Orchestration",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "arranger",
"title": "Arranger",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "sounddesign",
"title": "Sound design",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "soundrecording",
"title": "Sound recording",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "rerecording",
"title": "Re-Recording",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "musiclabel",
"title": "Music Label",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "assistantcinematographer",
"title": "Assistant Cinematographer",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "artdirector",
"title": "Art Director",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "costumedesign",
"title": "Costume design",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "productiondesign",
"title": "Production design",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "specialeffects",
"title": "Special Effects",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "animation",
"title": "Animation",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "singer",
"title": "Singer",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "coeditor",
"title": "Co-Editor",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "stills",
"title": "Stills",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "publicitydesign",
"title": "Publicity Design",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "makeup",
"title": "Make-Up",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "hairstyles",
"title": "Hair Styles",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "dancedirector",
"title": "Dance Director",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "productioncontroller",
"title": "Production Controller",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "stuntdirector",
"title": "Stunt Director",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "continuity",
"title": "Continuity",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "publicity",
"title": "Publicity",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "courtesy",
"title": "Courtesy",
"type": ["string"],
"advanced": true,
"columnWidth": 180,
"find": true,
"sortType": "person"
},
{
"id": "songs",
"title": "Song Titles",
"type": "text",
"find": true
},
{
"id": "id",
"title": "ID",
@ -747,6 +1121,13 @@
"type": "layer",
"find": true
},
{
"id": "numberofannotations",
"title": "Number of Annotations",
"type": "integer",
"columnWidth": 60,
"sort": true
},
{
"id": "duration",
"title": "Duration",

View file

@ -318,7 +318,7 @@ pandora.ui.infoView = function(data) {
renderGroup(['actor']);
renderGroup(canSeeAllMetadata ? ['genre', 'keyword'] : ['genre']);
renderGroup(canSeeAllMetadata ? ['genre', 'topic'] : ['genre']);
renderGroup(['imdbId', 'links']);
@ -363,6 +363,90 @@ pandora.ui.infoView = function(data) {
.appendTo($text);
}
// Extra Metadata
renderGroup([
'censorshipcertificatenumber',
'dateofcensorcertificate',
'ratingcertificate',
'length',
'numberofreels',
'format'
]);
renderGroup([
'presentedby',
'coproducer',
'associateproducer',
'executiveproducer',
'associatedirector',
'chiefassistantdirector',
'assistantdirector',
'story',
'screenplay',
'dialogue',
'adaptation'
]);
renderGroup([
'musicdirector',
'backgroundmusic',
'orchestration',
'arranger',
'sounddesign',
'soundrecording',
'rerecording',
'musiclabel'
]);
renderGroup([
'assistantcinematographer',
'artdirector',
'costumedesign',
'productiondesign',
'specialeffects',
'animation',
'singer',
'coeditor',
'stills',
'publicitydesign',
'makeup',
'hairstyles',
'dancedirector',
'productioncontroller',
'stuntdirector',
'continuity',
'publicity',
'courtesy',
]);
// Songs
if (data.songs || canEdit) {
Ox.EditableContent({
clickLink: pandora.clickLink,
collapseToEnd: false,
editable: canEdit,
format: function(value) {
return value.replace(
/<img src=/g,
'<img style="float: left; max-width: 256px; max-height: 256px; margin: 0 16px 16px 0" src='
);
},
placeholder: formatLight(Ox._('No Songs')),
tooltip: canEdit ? pandora.getEditTooltip() : '',
type: 'textarea',
value: data.songs || ''
})
.css(css)
.css({
marginTop: '12px',
overflow: 'hidden'
})
.bindEvent({
submit: function(data) {
editMetadata('songs', data.value);
}
})
.appendTo($text);
}
// Descriptions ------------------------------------------------------------
$descriptions = $('<div>').attr({id: 'descriptions'}).appendTo($text);
@ -371,6 +455,7 @@ pandora.ui.infoView = function(data) {
$('<div>').css({height: '16px'}).appendTo($text);
if (data.parts && data.rendered) {
// Duration, Aspect Ratio --------------------------------------------------
['duration', 'aspectratio'].forEach(function(key) {
@ -421,6 +506,39 @@ pandora.ui.infoView = function(data) {
.appendTo($statistics);
});
$('<div>')
.css({marginBottom: '4px'})
.append(formatKey('Annotations', 'statistics'))
.append(
Ox.Theme.formatColor(null, 'gradient')
.css({textAlign: 'right'})
.html(Ox.formatNumber(data.numberofannotations || 0))
)
.appendTo($statistics);
} else {
// no video placeholder
}
$('<div>')
.css({marginBottom: '4px'})
.append(formatKey('Documents', 'statistics'))
.append(
Ox.Theme.formatColor(null, 'gradient')
.css({textAlign: 'right'})
.html(Ox.formatNumber(data.numberofdocuments || 0))
)
.on({
click: function() {
if (data.numberofdocuments) {
pandora.UI.set({
itemView: 'documents'
});
}
}
})
.appendTo($statistics);
// Rights Level ------------------------------------------------------------
var $rightsLevel = $('<div>');
@ -792,7 +910,7 @@ pandora.ui.infoView = function(data) {
.css({marginLeft: '52px'})
.bindEvent({
click: function() {
pandora.UI.set({page: 'rights'});
pandora.UI.set({page: 'copyrights'});
}
})
.appendTo($line);
@ -998,9 +1116,11 @@ pandora.ui.infoView = function(data) {
})
.appendTo($rightsLevel);
}
if (data.parts) {
$capabilities = $('<div>').appendTo($rightsLevel);
renderCapabilities(data.rightslevel);
}
}
function toggleIconSize() {
iconSize = iconSize == 256 ? 512 : 256;

View file

@ -36,18 +36,38 @@ pandora.ui.item = function() {
if (!result.data.rendered && [
'clips', 'timeline', 'player', 'editor', 'map', 'calendar'
].indexOf(pandora.user.ui.itemView) > -1) {
pandora.$ui.contentPanel.replaceElement(1,
Ox.Element()
.css({marginTop: '32px', fontSize: '12px', textAlign: 'center'})
.html(
Ox._('Sorry, <i>{0}</i>'
var html = Ox._('Sorry, <i>{0}</i>'
+ ' currently doesn\'t have '
+ (['a', 'e', 'i', 'o'].indexOf(
pandora.user.ui.itemView.slice(0, 1)
) > -1 ? 'an': 'a') + ' '
+'{1} view.', [result.data.title, Ox._(pandora.user.ui.itemView)])
)
+'{1} view.', [result.data.title, Ox._(pandora.user.ui.itemView)]);
pandora.$ui.contentPanel.replaceElement(1,
Ox.Element()
.css({marginTop: '32px', fontSize: '12px', textAlign: 'center'})
.html(html)
);
pandora.site.itemViews.filter(function(view) {
return view.id == 'documents';
}).length && pandora.api.get({
id: pandora.user.ui.item,
keys: ['numberofdocuments']
}, function(result) {
if (result.data.numberofdocuments) {
var $text = Ox.Element()
.css({marginTop: '32px', fontSize: '12px', textAlign: 'center'})
.html(
html
+ '<br>'
+ Ox._('There are <a href="{0}">{1}</a>', [
'/' + pandora.user.ui.item + '/documents',
Ox.formatCount(result.data.numberofdocuments, 'document')
])
)
pandora.$ui.contentPanel.replaceElement(1, $text);
pandora.createLinks($text);
}
});
result.data.parts > 0 && pandora.updateStatus(pandora.user.ui.item);
} else if (pandora.user.ui.itemView == 'info') {