add itemtitle js

This commit is contained in:
j 2017-12-15 13:06:55 +00:00
parent 5d52b1e5f2
commit a2b0d98092

View file

@ -0,0 +1,13 @@
'use strict';
pandora.getItemTitle = function(itemData, includeYear) {
return (itemData.title || Ox._('Untitled')) + (
Ox.len(itemData.author) || (includeYear && itemData.year)
? ' (' + (
Ox.len(itemData.author)
? itemData.author
: [Ox._('Unknown Author')]
).join(', ') + ')'
: ''
) + (includeYear && itemData.year ? ' ' + itemData.year : '')
};