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": "year", "title": "Year", "type": "integer"},
{"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": "producer", "title": "Producer", "type": "string"},
{"id": "cinematographer", "title": "Cinematographer", "type": "string"},
{"id": "editor", "title": "Editor", "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"}
],
"flags": true,
@ -203,6 +206,22 @@
"format": {"type": "duration", "args": [0, "short"]},
"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",
"title": "Writer",
@ -279,6 +298,15 @@
"autocomplete": true,
"find": true
},
{
"id": "productionCompany",
"title": "Production Company",
"type": ["string"],
"autocomplete": true,
"columnWidth": 180,
"find": true,
"sort": true
},
{
"id": "series",
"title": "TV Series",

View File

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