in similarClipsDialog, use getItemTitle
This commit is contained in:
parent
2e3d828b08
commit
5fbb001c1b
1 changed files with 5 additions and 4 deletions
|
@ -8,6 +8,7 @@ pandora.ui.similarClipsDialog = function() {
|
||||||
height: Math.round((window.innerHeight - 48) * 0.9),
|
height: Math.round((window.innerHeight - 48) * 0.9),
|
||||||
width: Math.round(window.innerWidth * 0.9)
|
width: Math.round(window.innerWidth * 0.9)
|
||||||
},
|
},
|
||||||
|
itemTitleKeys = pandora.site.itemTitleKeys,
|
||||||
left = getLeft(),
|
left = getLeft(),
|
||||||
fixedRatio = pandora.site.video.previewRatio,
|
fixedRatio = pandora.site.video.previewRatio,
|
||||||
fps = 25,
|
fps = 25,
|
||||||
|
@ -70,7 +71,7 @@ pandora.ui.similarClipsDialog = function() {
|
||||||
.appendTo($toolbar),
|
.appendTo($toolbar),
|
||||||
|
|
||||||
$sortSelect = Ox.Select({
|
$sortSelect = Ox.Select({
|
||||||
items: ['title', 'director', 'position', 'duration'].map(function(id) {
|
items: itemTitleKeys.concat(['position', 'duration']).map(function(id) {
|
||||||
var item = Ox.getObjectById(pandora.site.itemKeys, id)
|
var item = Ox.getObjectById(pandora.site.itemKeys, id)
|
||||||
|| Ox.getObjectById(pandora.site.clipKeys, id),
|
|| Ox.getObjectById(pandora.site.clipKeys, id),
|
||||||
title = Ox._(item ? item.title : Ox.toTitleCase(id));
|
title = Ox._(item ? item.title : Ox.toTitleCase(id));
|
||||||
|
@ -209,7 +210,7 @@ pandora.ui.similarClipsDialog = function() {
|
||||||
$status && $status.html(Ox._('Loading...'));
|
$status && $status.html(Ox._('Loading...'));
|
||||||
pandora.api.get({
|
pandora.api.get({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
keys: ['director', 'duration', 'title', 'videoRatio']
|
keys: itemTitleKeys.concat(['duration', 'videoRatio'])
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
Ox.extend(item, result.data);
|
Ox.extend(item, result.data);
|
||||||
pandora.api.getSequence({
|
pandora.api.getSequence({
|
||||||
|
@ -268,7 +269,7 @@ pandora.ui.similarClipsDialog = function() {
|
||||||
}
|
}
|
||||||
}), callback);
|
}), callback);
|
||||||
},
|
},
|
||||||
keys: ['director', 'id', 'title', 'videoRatio'],
|
keys: itemTitleKeys.concat(['id', 'videoRatio']),
|
||||||
max: 1,
|
max: 1,
|
||||||
orientation: 'both',
|
orientation: 'both',
|
||||||
size: 128,
|
size: 128,
|
||||||
|
@ -351,7 +352,7 @@ pandora.ui.similarClipsDialog = function() {
|
||||||
height: height,
|
height: height,
|
||||||
id: data.id,
|
id: data.id,
|
||||||
info: Ox.formatDuration(data['in'], 2) + '-' + Ox.formatDuration(data.out, 2),
|
info: Ox.formatDuration(data['in'], 2) + '-' + Ox.formatDuration(data.out, 2),
|
||||||
title: data.title + (data.director.length ? ' (' + data.director.join(', ') + ')' : ''),
|
title: pandora.getItemTitle(data),
|
||||||
url: pandora.getMediaURL('/' + data.id.split('/')[0] + '/' + height + 'p' + data['in'] + '.jpg'),
|
url: pandora.getMediaURL('/' + data.id.split('/')[0] + '/' + height + 'p' + data['in'] + '.jpg'),
|
||||||
width: width
|
width: width
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue