center guide grid

This commit is contained in:
Luke Pulverenti 2014-01-18 00:55:21 -05:00
parent 35e37c8027
commit e91d8b6800
11 changed files with 109 additions and 89 deletions

View file

@ -36,7 +36,8 @@
context: 'games',
useAverageAspectRatio: false,
showTitle: true,
showParentTitle: true
showParentTitle: true,
centerText: true
});
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);

View file

@ -255,11 +255,7 @@
LibraryBrowser.renderOverview($('.itemOverview', page), item);
if (item.CommunityRating || item.CriticRating) {
$('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(item)).show();
} else {
$('.itemCommunityRating', page).hide();
}
$('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(item));
if (item.Type != "Episode" && item.Type != "Movie" && item.Type != "Series") {
var premiereDateElem = $('#itemPremiereDate', page).show();

View file

@ -1508,20 +1508,8 @@
html += '<div class="starRatingValue">';
html += item.CommunityRating.toFixed(1);
html += '</div>';
//var rating = item.CommunityRating / 2;
//for (var i = 1; i <= 5; i++) {
// if (rating <= i - 1) {
// html += "<div class='starRating emptyStarRating' title='" + item.CommunityRating + "'></div>";
// }
// else if (rating < i) {
// html += "<div class='starRating halfStarRating' title='" + item.CommunityRating + "'></div>";
// }
// else {
// html += "<div class='starRating' title='" + item.CommunityRating + "'></div>";
// }
//}
} else {
html += '<div style="display:inline-block;margin-left:-1.25em;"></div>';
}
if (item.CriticRating != null) {

View file

@ -12,11 +12,7 @@
$('.itemEpisodeName', page).html(program.EpisodeTitle || '');
if (program.CommunityRating) {
$('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(program)).show();
} else {
$('.itemCommunityRating', page).hide();
}
$('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(program));
LibraryBrowser.renderGenres($('.itemGenres', page), program, context);
LibraryBrowser.renderOverview($('.itemOverview', page), program);

View file

@ -44,11 +44,7 @@
$('.itemEpisodeName', page).html(item.EpisodeTitle || '');
if (item.CommunityRating) {
$('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(item)).show();
} else {
$('.itemCommunityRating', page).hide();
}
$('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(item));
$('.userDataIcons', page).html(LibraryBrowser.getUserDataIconsHtml(item));

View file

@ -45,11 +45,7 @@
$('.itemEpisodeName', page).html(item.EpisodeTitle || '');
if (item.CommunityRating) {
$('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(item)).show();
} else {
$('.itemCommunityRating', page).hide();
}
$('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(item));
$('.userDataIcons', page).html(LibraryBrowser.getUserDataIconsHtml(item));

View file

@ -32,11 +32,7 @@
$('.itemEpisodeName', page).html(programInfo.EpisodeTitle || '');
if (programInfo.CommunityRating) {
$('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(programInfo)).show();
} else {
$('.itemCommunityRating', page).hide();
}
$('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(programInfo));
LibraryBrowser.renderGenres($('.itemGenres', page), programInfo, context);
LibraryBrowser.renderOverview($('.itemOverview', page), programInfo);

View file

@ -192,7 +192,7 @@
}
// Chrome or IE with plugin installed
if (media.canPlayType('video/webm').replace(/no/, '')) {
if (media.canPlayType('video/webm').replace(/no/, '') && !$.browser.mozilla) {
return '.webm';
}
@ -616,6 +616,7 @@
// Some 1080- videos are reported as 1912?
if (maxAllowedWidth >= 1910) {
options.push({ name: '1080p - 15Mbps', maxWidth: 1920, bitrate: 15000000 });
options.push({ name: '1080p - 10Mbps', maxWidth: 1920, bitrate: 10000000 });
options.push({ name: '1080p - 8Mbps', maxWidth: 1920, bitrate: 8000000 });
options.push({ name: '1080p - 6Mbps', maxWidth: 1920, bitrate: 6000000 });
@ -888,11 +889,11 @@
}).on("error", function () {
var errorCode = this.error ? this.error.code : '';
console.log('Html5 Video error code: ' + errorCode);
}).on("ended.playbackstopped", onPlaybackStopped).on('ended.playnext', playNextAfterEnded);
}).on("ended.playbackstopped", onPlaybackStopped)
.on('ended.playnext', playNextAfterEnded);
currentItem = item;
curentDurationTicks = item.RunTimeTicks;