0xDB: add color, sound and studio item keys (fixes #1609)

This commit is contained in:
rolux 2013-07-08 13:27:38 +00:00
parent 3ae04828b1
commit c24920d968
2 changed files with 40 additions and 4 deletions

View file

@ -81,12 +81,15 @@
{"id": "country", "title": "Country", "type": "string"}, {"id": "country", "title": "Country", "type": "string"},
{"id": "year", "title": "Year", "type": "integer"}, {"id": "year", "title": "Year", "type": "integer"},
{"id": "language", "title": "Language", "type": "string"}, {"id": "language", "title": "Language", "type": "string"},
{"id": "genre", "title": "Genre", "type": "string"}, {"id": "color", "title": "Color", "type": "string"},
{"id": "sound", "title": "Sound", "type": "string"},
{"id": "writer", "title": "Writer", "type": "string"}, {"id": "writer", "title": "Writer", "type": "string"},
{"id": "producer", "title": "Producer", "type": "string"}, {"id": "producer", "title": "Producer", "type": "string"},
{"id": "cinematographer", "title": "Cinematographer", "type": "string"}, {"id": "cinematographer", "title": "Cinematographer", "type": "string"},
{"id": "editor", "title": "Editor", "type": "string"}, {"id": "editor", "title": "Editor", "type": "string"},
{"id": "actor", "title": "Actor", "type": "string"}, {"id": "actor", "title": "Actor", "type": "string"},
{"id": "productionCompany", "title": "Studio", "type": "string"},
{"id": "genre", "title": "Genre", "type": "string"},
{"id": "keyword", "title": "Keyword", "type": "string"} {"id": "keyword", "title": "Keyword", "type": "string"}
], ],
"flags": true, "flags": true,
@ -203,6 +206,22 @@
"format": {"type": "duration", "args": [0, "short"]}, "format": {"type": "duration", "args": [0, "short"]},
"sort": true "sort": true
}, },
{
"id": "color",
"title": "Color",
"type": ["string"],
"columnWidth": 120,
"filter": true,
"sort": true
},
{
"id": "sound",
"title": "Sound",
"type": ["string"],
"columnWidth": 120,
"filter": true,
"sort": true
},
{ {
"id": "writer", "id": "writer",
"title": "Writer", "title": "Writer",
@ -279,6 +298,15 @@
"autocomplete": true, "autocomplete": true,
"find": true "find": true
}, },
{
"id": "productionCompany",
"title": "Production Company",
"type": ["string"],
"autocomplete": true,
"columnWidth": 180,
"find": true,
"sort": true
},
{ {
"id": "series", "id": "series",
"title": "TV Series", "title": "TV Series",

View file

@ -301,7 +301,7 @@ pandora.ui.infoView = function(data) {
.appendTo($text); .appendTo($text);
} }
// Country, Year, Language, Runtime ---------------------------------------- // Country, Year, Language, Runtime, Color, Sound --------------------------
if (isEditable) { if (isEditable) {
var $div = $('<div>') var $div = $('<div>')
@ -332,9 +332,9 @@ pandora.ui.infoView = function(data) {
}) })
.appendTo($div); .appendTo($div);
}); });
} else if (data.country || data.year || data.language || data.runtime) { } else if (data.country || data.year || data.language || data.runtime || data.color || data.sound) {
var html = []; var html = [];
['country', 'year', 'language', 'runtime'].forEach(function(key) { ['country', 'year', 'language', 'runtime', 'color', 'sound'].forEach(function(key) {
if (data[key]) { if (data[key]) {
html.push( html.push(
formatKey(key) + ( formatKey(key) + (
@ -425,6 +425,14 @@ pandora.ui.infoView = function(data) {
) )
.appendTo($text); .appendTo($text);
data.productionCompany.length && $('<div>')
.css(css)
.html(
formatKey('studio')
+ formatValue(data.productionCompany, 'productionCompany')
)
.appendTo($text);
if (data.genre || (data.keyword && canSeeAllMetadata)) { if (data.genre || (data.keyword && canSeeAllMetadata)) {
$div = $('<div>') $div = $('<div>')
.css(css) .css(css)