mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
factor device pixel ratio into downloaded image size
This commit is contained in:
parent
8cadabcbe5
commit
5677ce1011
27 changed files with 295 additions and 195 deletions
|
@ -2,8 +2,8 @@
|
|||
|
||||
function loadPage(page, config) {
|
||||
|
||||
$('#chkMobileClients', page).checked(config.RequireManualLoginForMobileApps).checkboxradio("refresh");
|
||||
$('#chkOtherApps', page).checked(config.RequireManualLoginForOtherApps).checkboxradio("refresh");
|
||||
$('#chkMobileClients', page).checked(config.RequireMobileManualLogin).checkboxradio("refresh");
|
||||
$('#chkOtherApps', page).checked(config.RequireNonMobileManualLogin).checkboxradio("refresh");
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
@ -32,8 +32,8 @@
|
|||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
config.RequireManualLoginForMobileApps = $('#chkMobileClients', form).checked();
|
||||
config.RequireManualLoginForOtherApps = $('#chkOtherApps', form).checked();
|
||||
config.RequireMobileManualLogin = $('#chkMobileClients', form).checked();
|
||||
config.RequireNonMobileManualLogin = $('#chkOtherApps', form).checked();
|
||||
|
||||
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
|
|
@ -68,9 +68,12 @@
|
|||
var index = getRandom(0, images.length - 1);
|
||||
var item = images[index];
|
||||
|
||||
var imgUrl = ApiClient.getImageUrl(item.id, {
|
||||
var screenWidth = $(window).width();
|
||||
|
||||
var imgUrl = ApiClient.getScaledImageUrl(item.id, {
|
||||
type: "Backdrop",
|
||||
tag: item.tag
|
||||
tag: item.tag,
|
||||
maxWidth: screenWidth
|
||||
});
|
||||
|
||||
getElement().css('backgroundImage', 'url(\'' + imgUrl + '\')');
|
||||
|
@ -99,7 +102,7 @@
|
|||
|
||||
var val = LocalSettings.val('enableBackdrops', userId);
|
||||
|
||||
return val != '0';
|
||||
return val == '1';
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', ".backdropPage", function () {
|
||||
|
|
|
@ -389,10 +389,11 @@
|
|||
|
||||
if (nowPlayingItem.LogoItemId) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(nowPlayingItem.LogoItemId, {
|
||||
imgUrl = ApiClient.getScaledImageUrl(nowPlayingItem.LogoItemId, {
|
||||
|
||||
tag: session.LogoImageTag,
|
||||
height: 48,
|
||||
maxHeight: 24,
|
||||
maxWidth: 130,
|
||||
type: 'Logo'
|
||||
|
||||
});
|
||||
|
@ -579,27 +580,27 @@
|
|||
|
||||
if (item && item.BackdropImageTag) {
|
||||
|
||||
return ApiClient.getImageUrl(item.BackdropItemId, {
|
||||
return ApiClient.getScaledImageUrl(item.BackdropItemId, {
|
||||
type: "Backdrop",
|
||||
width: 810,
|
||||
width: 275,
|
||||
tag: item.BackdropImageTag
|
||||
});
|
||||
}
|
||||
|
||||
if (item && item.ThumbImageTag) {
|
||||
|
||||
return ApiClient.getImageUrl(item.ThumbItemId, {
|
||||
return ApiClient.getScaledImageUrl(item.ThumbItemId, {
|
||||
type: "Thumb",
|
||||
width: 810,
|
||||
width: 275,
|
||||
tag: item.ThumbImageTag
|
||||
});
|
||||
}
|
||||
|
||||
if (item && item.PrimaryImageTag) {
|
||||
|
||||
return ApiClient.getImageUrl(item.PrimaryImageItemId, {
|
||||
return ApiClient.getScaledImageUrl(item.PrimaryImageItemId, {
|
||||
type: "Primary",
|
||||
width: 810,
|
||||
width: 275,
|
||||
tag: item.PrimaryImageTag
|
||||
});
|
||||
}
|
||||
|
|
|
@ -35,9 +35,10 @@
|
|||
html += '<div style="width:120px;height:180px;">';
|
||||
if (item.ImageTags.Primary) {
|
||||
|
||||
var imgUrl = ApiClient.getImageUrl(item.Id, {
|
||||
var imgUrl = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Primary",
|
||||
width: 300,
|
||||
maxWidth: 120,
|
||||
maxHeight: 180,
|
||||
tag: item.ImageTags.Primary
|
||||
});
|
||||
|
||||
|
@ -65,9 +66,10 @@
|
|||
|
||||
if (item.PrimaryImageTag) {
|
||||
|
||||
var imgUrl = ApiClient.getImageUrl(item.ItemId, {
|
||||
var imgUrl = ApiClient.getScaledImageUrl(item.ItemId, {
|
||||
type: "Primary",
|
||||
width: 200,
|
||||
maxWidth: 100,
|
||||
maxHeight: 150,
|
||||
tag: item.PrimaryImageTag
|
||||
});
|
||||
|
||||
|
|
|
@ -310,7 +310,7 @@
|
|||
|
||||
html += '<div class="editorTile imageEditorTile">';
|
||||
|
||||
html += '<div style="height:144px;vertical-align:top;background-repeat:no-repeat;background-size:contain;background-image:url(\'' + LibraryBrowser.getImageUrl(currentItem, image.ImageType, image.ImageIndex, { maxheight: 216 }) + '\');"></div>';
|
||||
html += '<div style="height:144px;vertical-align:top;background-repeat:no-repeat;background-size:contain;background-image:url(\'' + LibraryBrowser.getImageUrl(currentItem, image.ImageType, image.ImageIndex, { height: 144 }) + '\');"></div>';
|
||||
|
||||
html += '<div>';
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@
|
|||
$('#movieTabs', page).show();
|
||||
}
|
||||
|
||||
if (item.Type == "video.channelItem" || item.Type == "audio.channelItem" || item.Type == "folder.ChannelItem") {
|
||||
if (item.Type == "ChannelVideoItem" || item.Type == "ChannelAudioItem" || item.Type == "ChannelFolderItem") {
|
||||
$('#channelTabs', page).show();
|
||||
$('.channelHeader', page).show().html('<a href="channelitems.html?id=' + item.ChannelId + '">' + item.ChannelName + '</a>').trigger('create');
|
||||
} else {
|
||||
|
@ -1018,8 +1018,8 @@
|
|||
|
||||
if (chapter.ImageTag) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(item.Id, {
|
||||
maxwidth: 400,
|
||||
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
|
||||
maxWidth: 210,
|
||||
tag: chapter.ImageTag,
|
||||
type: "Chapter",
|
||||
index: i
|
||||
|
@ -1212,8 +1212,8 @@
|
|||
|
||||
if (imageTags.Primary) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(item.Id, {
|
||||
maxwidth: 500,
|
||||
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
|
||||
maxWidth: 210,
|
||||
tag: imageTags.Primary,
|
||||
type: "primary"
|
||||
});
|
||||
|
|
|
@ -457,7 +457,7 @@
|
|||
}
|
||||
|
||||
// For search hints
|
||||
return ApiClient.getImageUrl(item.Id || item.ItemId, options);
|
||||
return ApiClient.getScaledImageUrl(item.Id || item.ItemId, options);
|
||||
|
||||
},
|
||||
|
||||
|
@ -541,38 +541,40 @@
|
|||
|
||||
var forceName = false;
|
||||
|
||||
var downloadHeight = 576;
|
||||
|
||||
if (options.preferBackdrop && item.BackdropImageTags && item.BackdropImageTags.length) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(item.Id, {
|
||||
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Backdrop",
|
||||
maxwidth: 576,
|
||||
maxWidth: downloadHeight,
|
||||
tag: item.BackdropImageTags[0]
|
||||
});
|
||||
|
||||
}
|
||||
else if (options.preferThumb && item.ImageTags && item.ImageTags.Thumb) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(item.Id, {
|
||||
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Thumb",
|
||||
maxwidth: 576,
|
||||
maxWidth: downloadHeight,
|
||||
tag: item.ImageTags.Thumb
|
||||
});
|
||||
|
||||
}
|
||||
else if (options.preferBanner && item.ImageTags && item.ImageTags.Banner) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(item.Id, {
|
||||
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Banner",
|
||||
maxwidth: 1200,
|
||||
maxWidth: 500,
|
||||
tag: item.ImageTags.Banner
|
||||
});
|
||||
|
||||
}
|
||||
else if (options.preferThumb && item.SeriesThumbImageTag) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(item.SeriesId, {
|
||||
imgUrl = ApiClient.getScaledImageUrl(item.SeriesId, {
|
||||
type: "Thumb",
|
||||
maxwidth: 576,
|
||||
maxWidth: downloadHeight,
|
||||
tag: item.SeriesThumbImageTag
|
||||
});
|
||||
|
||||
|
@ -581,15 +583,15 @@
|
|||
|
||||
imgUrl = ApiClient.getThumbImageUrl(item.ParentThumbItemId, {
|
||||
type: "Thumb",
|
||||
maxwidth: 576
|
||||
maxWidth: downloadHeight
|
||||
});
|
||||
|
||||
}
|
||||
else if (options.preferThumb && item.BackdropImageTags && item.BackdropImageTags.length) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(item.Id, {
|
||||
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Backdrop",
|
||||
maxwidth: 576,
|
||||
maxWidth: downloadHeight,
|
||||
tag: item.BackdropImageTags[0]
|
||||
});
|
||||
|
||||
|
@ -610,10 +612,10 @@
|
|||
}
|
||||
else if (item.AlbumId && item.AlbumPrimaryImageTag) {
|
||||
|
||||
height = 400;
|
||||
height = 220;
|
||||
width = primaryImageAspectRatio ? Math.round(height * primaryImageAspectRatio) : null;
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(item.AlbumId, {
|
||||
imgUrl = ApiClient.getScaledImageUrl(item.AlbumId, {
|
||||
type: "Primary",
|
||||
height: height,
|
||||
width: width,
|
||||
|
@ -623,27 +625,27 @@
|
|||
}
|
||||
else if (item.BackdropImageTags && item.BackdropImageTags.length) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(item.Id, {
|
||||
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Backdrop",
|
||||
maxwidth: 576,
|
||||
maxWidth: downloadHeight,
|
||||
tag: item.BackdropImageTags[0]
|
||||
});
|
||||
|
||||
}
|
||||
else if (item.ImageTags && item.ImageTags.Thumb) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(item.Id, {
|
||||
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Thumb",
|
||||
maxwidth: 576,
|
||||
maxWidth: downloadHeight,
|
||||
tag: item.ImageTags.Thumb
|
||||
});
|
||||
|
||||
}
|
||||
else if (item.SeriesThumbImageTag) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(item.SeriesId, {
|
||||
imgUrl = ApiClient.getScaledImageUrl(item.SeriesId, {
|
||||
type: "Thumb",
|
||||
maxwidth: 576,
|
||||
maxWidth: downloadHeight,
|
||||
tag: item.SeriesThumbImageTag
|
||||
});
|
||||
|
||||
|
@ -652,7 +654,7 @@
|
|||
|
||||
imgUrl = ApiClient.getThumbImageUrl(item, {
|
||||
type: "Thumb",
|
||||
maxwidth: 576
|
||||
maxWidth: downloadHeight
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -958,7 +960,11 @@
|
|||
var name = item.EpisodeTitle || item.Name;
|
||||
|
||||
if (item.Type == "TvChannel") {
|
||||
return item.Number + ' ' + name;
|
||||
|
||||
if (item.Number) {
|
||||
return item.Number + ' ' + name;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
if (displayAsSpecial && item.Type == "Episode" && item.ParentIndexNumber == 0) {
|
||||
|
||||
|
@ -1474,45 +1480,45 @@
|
|||
|
||||
var url;
|
||||
|
||||
var imageHeight = 600;
|
||||
var imageHeight = 280;
|
||||
|
||||
if (imageTags.Primary) {
|
||||
|
||||
url = ApiClient.getImageUrl(item.Id, {
|
||||
url = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Primary",
|
||||
maxheight: imageHeight,
|
||||
maxHeight: imageHeight,
|
||||
tag: item.ImageTags.Primary
|
||||
});
|
||||
}
|
||||
else if (item.BackdropImageTags && item.BackdropImageTags.length) {
|
||||
|
||||
url = ApiClient.getImageUrl(item.Id, {
|
||||
url = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Backdrop",
|
||||
maxheight: imageHeight,
|
||||
maxHeight: imageHeight,
|
||||
tag: item.BackdropImageTags[0]
|
||||
});
|
||||
}
|
||||
else if (imageTags.Thumb) {
|
||||
|
||||
url = ApiClient.getImageUrl(item.Id, {
|
||||
url = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Thumb",
|
||||
maxheight: imageHeight,
|
||||
maxHeight: imageHeight,
|
||||
tag: item.ImageTags.Thumb
|
||||
});
|
||||
}
|
||||
else if (imageTags.Disc) {
|
||||
|
||||
url = ApiClient.getImageUrl(item.Id, {
|
||||
url = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Disc",
|
||||
maxheight: imageHeight,
|
||||
maxHeight: imageHeight,
|
||||
tag: item.ImageTags.Disc
|
||||
});
|
||||
}
|
||||
else if (item.AlbumId && item.AlbumPrimaryImageTag) {
|
||||
|
||||
url = ApiClient.getImageUrl(item.AlbumId, {
|
||||
url = ApiClient.getScaledImageUrl(item.AlbumId, {
|
||||
type: "Primary",
|
||||
maxheight: imageHeight,
|
||||
maxHeight: imageHeight,
|
||||
tag: item.AlbumPrimaryImageTag
|
||||
});
|
||||
|
||||
|
@ -1800,8 +1806,11 @@
|
|||
|
||||
if (item.BackdropImageTags && item.BackdropImageTags.length) {
|
||||
|
||||
imgUrl = LibraryBrowser.getImageUrl(item, 'Backdrop', 0, {
|
||||
maxwidth: screenWidth
|
||||
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Backdrop",
|
||||
index: 0,
|
||||
maxWidth: screenWidth,
|
||||
tag: item.BackdropImageTags[0]
|
||||
});
|
||||
|
||||
$('#itemBackdrop', page).removeClass('noBackdrop').css('background-image', 'url("' + imgUrl + '")');
|
||||
|
@ -1809,11 +1818,11 @@
|
|||
}
|
||||
else if (item.ParentBackdropItemId && item.ParentBackdropImageTags && item.ParentBackdropImageTags.length) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(item.ParentBackdropItemId, {
|
||||
imgUrl = ApiClient.getScaledImageUrl(item.ParentBackdropItemId, {
|
||||
type: 'Backdrop',
|
||||
index: 0,
|
||||
tag: item.ParentBackdropImageTags[0],
|
||||
maxwidth: screenWidth
|
||||
maxWidth: screenWidth
|
||||
});
|
||||
|
||||
$('#itemBackdrop', page).removeClass('noBackdrop').css('background-image', 'url("' + imgUrl + '")');
|
||||
|
@ -1951,7 +1960,6 @@
|
|||
createGalleryImage: function (item, type, tag, index) {
|
||||
|
||||
var screenWidth = Math.max(screen.height, screen.width);
|
||||
screenWidth = Math.min(screenWidth, 1280);
|
||||
|
||||
var html = '';
|
||||
|
||||
|
@ -1959,8 +1967,9 @@
|
|||
|
||||
html += '<div class="galleryImageContainer">';
|
||||
html += '<a href="#pop_' + index + '_' + tag + '" data-transition="fade" data-rel="popup" data-position-to="window">';
|
||||
|
||||
html += '<img class="galleryImage" src="' + LibraryBrowser.getImageUrl(item, type, index, {
|
||||
maxwidth: screenWidth,
|
||||
maxWidth: screenWidth,
|
||||
tag: tag
|
||||
}) + '" />';
|
||||
html += '</div>';
|
||||
|
@ -1969,7 +1978,7 @@
|
|||
html += '<a href="#" data-rel="back" data-role="button" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>';
|
||||
html += '<img class="" src="' + LibraryBrowser.getImageUrl(item, type, index, {
|
||||
|
||||
maxwidth: screenWidth,
|
||||
maxWidth: screenWidth,
|
||||
tag: tag
|
||||
|
||||
}) + '" />';
|
||||
|
|
|
@ -48,8 +48,8 @@
|
|||
|
||||
if (parentName && item.ParentLogoItemId) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(item.ParentLogoItemId, {
|
||||
height: logoHeight * 2,
|
||||
imgUrl = ApiClient.getScaledImageUrl(item.ParentLogoItemId, {
|
||||
height: logoHeight,
|
||||
type: 'logo',
|
||||
tag: item.ParentLogoImageTag
|
||||
});
|
||||
|
@ -59,8 +59,10 @@
|
|||
}
|
||||
else if (item.ImageTags.Logo) {
|
||||
|
||||
imgUrl = LibraryBrowser.getImageUrl(item, 'Logo', 0, {
|
||||
height: logoHeight * 2,
|
||||
imgUrl = ApiClient.getScaledImageUrl(item.Id, {
|
||||
height: logoHeight,
|
||||
type: 'logo',
|
||||
tag: item.ImageTags.Logo
|
||||
});
|
||||
|
||||
html += '<img src="' + imgUrl + '" style="max-height:' + logoHeight + 'px;max-width:' + maxLogoWidth + 'px;" />';
|
||||
|
|
|
@ -14,15 +14,26 @@
|
|||
});
|
||||
}
|
||||
|
||||
function showLoadingMessage(page) {
|
||||
|
||||
$('.popupLoading', page).popup('open');
|
||||
}
|
||||
|
||||
function hideLoadingMessage(page) {
|
||||
$('.popupLoading', page).popup('close');
|
||||
}
|
||||
|
||||
function renderChannels(page, result) {
|
||||
|
||||
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
|
||||
|
||||
updateFilterControls(this);
|
||||
|
||||
var html = getChannelsHtml(result.Items);
|
||||
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||
|
||||
$('#items', page).html(html).trigger('create');
|
||||
$('#items', page).html(html).trigger('create').createPosterItemMenus();
|
||||
|
||||
$('.btnNextPage', page).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
|
@ -44,13 +55,54 @@
|
|||
}
|
||||
|
||||
function reloadItems(page) {
|
||||
|
||||
showLoadingMessage(page);
|
||||
|
||||
apiClient.getLiveTvChannels(query).done(function (result) {
|
||||
|
||||
renderChannels(page, result);
|
||||
|
||||
hideLoadingMessage(page);
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', "#liveTvChannelsPage", function () {
|
||||
function updateFilterControls(page) {
|
||||
|
||||
$('#chkFavorite', page).checked(query.IsFavorite == true).checkboxradio('refresh');
|
||||
$('#chkLikes', page).checked(query.IsLiked == true).checkboxradio('refresh');
|
||||
$('#chkDislikes', page).checked(query.IsDisliked == true).checkboxradio('refresh');
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#liveTvChannelsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('#chkFavorite', this).on('change', function () {
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.IsFavorite = this.checked ? true : null;
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
|
||||
$('#chkLikes', this).on('change', function () {
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.IsLiked = this.checked ? true : null;
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('#chkDislikes', this).on('change', function () {
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.IsDisliked = this.checked ? true : null;
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
}).on('pagebeforeshow', "#liveTvChannelsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -67,6 +119,10 @@
|
|||
LibraryBrowser.loadSavedQueryValues('movies', query);
|
||||
|
||||
reloadItems(page);
|
||||
|
||||
}).on('pageshow', "#liveTvChannelsPage", function () {
|
||||
|
||||
updateFilterControls(this);
|
||||
});
|
||||
|
||||
})(jQuery, document, ApiClient);
|
|
@ -16,6 +16,15 @@
|
|||
};
|
||||
var channelsPromise;
|
||||
|
||||
function showLoadingMessage(page) {
|
||||
|
||||
$('.popupLoading', page).popup('open');
|
||||
}
|
||||
|
||||
function hideLoadingMessage(page) {
|
||||
$('.popupLoading', page).popup('close');
|
||||
}
|
||||
|
||||
function normalizeDateToTimeslot(date) {
|
||||
|
||||
var minutesOffset = date.getMinutes() - cellCurationMinutes;
|
||||
|
@ -39,7 +48,7 @@
|
|||
|
||||
function reloadGuide(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
showLoadingMessage(page);
|
||||
|
||||
channelQuery.userId = Dashboard.getCurrentUserId();
|
||||
|
||||
|
@ -64,7 +73,8 @@
|
|||
}).done(function (programsResult) {
|
||||
|
||||
renderGuide(page, date, channelsResult.Items, programsResult.Items);
|
||||
Dashboard.hideLoadingMsg();
|
||||
hideLoadingMessage(page);
|
||||
|
||||
});
|
||||
|
||||
var channelPagingHtml = LibraryBrowser.getPagingHtml(channelQuery, channelsResult.TotalRecordCount, false, [10, 20, 30, 50, 100]);
|
||||
|
@ -327,9 +337,9 @@
|
|||
|
||||
if (channel.ImageTags.Primary) {
|
||||
|
||||
var url = ApiClient.getImageUrl(channel.Id, {
|
||||
maxheight: 200,
|
||||
maxwidth: 200,
|
||||
var url = ApiClient.getScaledImageUrl(channel.Id, {
|
||||
maxHeight: 35,
|
||||
maxWidth: 60,
|
||||
tag: channel.ImageTags.Primary,
|
||||
type: "Primary"
|
||||
});
|
||||
|
|
|
@ -161,8 +161,8 @@
|
|||
var programImages = program.ImageTags || {};
|
||||
if (programImages.Primary) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(program.Id, {
|
||||
height: 160,
|
||||
imgUrl = ApiClient.getScaledImageUrl(program.Id, {
|
||||
height: 80,
|
||||
tag: programImages.Primary,
|
||||
type: "Primary"
|
||||
});
|
||||
|
|
|
@ -39,15 +39,15 @@
|
|||
|
||||
if (programInfo.ImageTags && programInfo.ImageTags.Primary) {
|
||||
|
||||
var imgUrl = ApiClient.getImageUrl(programInfo.Id, {
|
||||
maxwidth: 200,
|
||||
maxheight: 200,
|
||||
var imgUrl = ApiClient.getScaledImageUrl(programInfo.Id, {
|
||||
maxWidth: 200,
|
||||
maxHeight: 200,
|
||||
tag: programInfo.ImageTags.Primary,
|
||||
type: "Primary"
|
||||
});
|
||||
|
||||
$('.timerPageImageContainer', page).css("display", "inline-block")
|
||||
.html('<img src="' + imgUrl + '" />');
|
||||
.html('<img src="' + imgUrl + '" style="max-width:200px;max-height:200px;" />');
|
||||
|
||||
} else {
|
||||
$('.timerPageImageContainer', page).hide();
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
|
||||
if (program.ImageTags && program.ImageTags.Primary) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(program.Id, {
|
||||
height: 160,
|
||||
imgUrl = ApiClient.getScaledImageUrl(program.Id, {
|
||||
height: 80,
|
||||
tag: program.ImageTags.Primary,
|
||||
type: "Primary"
|
||||
});
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
var users = response1[0];
|
||||
var config = response2[0];
|
||||
|
||||
var showManualForm = config.RequireManualLoginForMobileApps || !users.length;
|
||||
var showManualForm = config.RequireMobileManualLogin || !users.length;
|
||||
|
||||
if (showManualForm) {
|
||||
|
||||
|
|
|
@ -430,8 +430,8 @@
|
|||
|
||||
if (chapter.ImageTag) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(currentItem.Id, {
|
||||
maxwidth: 200,
|
||||
imgUrl = ApiClient.getScaledImageUrl(currentItem.Id, {
|
||||
maxWidth: 100,
|
||||
tag: chapter.ImageTag,
|
||||
type: "Chapter",
|
||||
index: i
|
||||
|
|
|
@ -486,26 +486,26 @@
|
|||
|
||||
if (state.NowPlayingItem.PrimaryImageTag) {
|
||||
|
||||
url = ApiClient.getImageUrl(state.NowPlayingItem.PrimaryImageItemId, {
|
||||
url = ApiClient.getScaledImageUrl(state.NowPlayingItem.PrimaryImageItemId, {
|
||||
type: "Primary",
|
||||
height: 80,
|
||||
height: 40,
|
||||
tag: state.NowPlayingItem.PrimaryImageTag
|
||||
});
|
||||
}
|
||||
else if (state.NowPlayingItem.BackdropImageTag) {
|
||||
|
||||
url = ApiClient.getImageUrl(state.NowPlayingItem.BackdropItemId, {
|
||||
url = ApiClient.getScaledImageUrl(state.NowPlayingItem.BackdropItemId, {
|
||||
type: "Backdrop",
|
||||
height: 80,
|
||||
height: 40,
|
||||
tag: state.NowPlayingItem.BackdropImageTag,
|
||||
index: 0
|
||||
});
|
||||
|
||||
} else if (state.NowPlayingItem.ThumbImageTag) {
|
||||
|
||||
url = ApiClient.getImageUrl(state.NowPlayingItem.ThumbImageItemId, {
|
||||
url = ApiClient.getScaledImageUrl(state.NowPlayingItem.ThumbImageItemId, {
|
||||
type: "Thumb",
|
||||
height: 80,
|
||||
height: 40,
|
||||
tag: state.NowPlayingItem.ThumbImageTag
|
||||
});
|
||||
}
|
||||
|
|
|
@ -69,6 +69,15 @@
|
|||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
$('.chkStandardFilter', page).each(function () {
|
||||
|
||||
var filters = "," + (query.Filters || "");
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
||||
this.checked = filters.indexOf(',' + filterName) != -1;
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
||||
}
|
||||
|
||||
|
|
|
@ -68,6 +68,15 @@
|
|||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
$('.chkStandardFilter', page).each(function () {
|
||||
|
||||
var filters = "," + (query.Filters || "");
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
||||
this.checked = filters.indexOf(',' + filterName) != -1;
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
||||
}
|
||||
|
||||
|
|
|
@ -284,26 +284,26 @@
|
|||
|
||||
if (nowPlayingItem.PrimaryImageTag) {
|
||||
|
||||
url = ApiClient.getImageUrl(nowPlayingItem.PrimaryImageItemId, {
|
||||
url = ApiClient.getScaledImageUrl(nowPlayingItem.PrimaryImageItemId, {
|
||||
type: "Primary",
|
||||
height: 80,
|
||||
height: 40,
|
||||
tag: nowPlayingItem.PrimaryImageTag
|
||||
});
|
||||
}
|
||||
else if (nowPlayingItem.BackdropImageTag) {
|
||||
|
||||
url = ApiClient.getImageUrl(nowPlayingItem.BackdropItemId, {
|
||||
url = ApiClient.getScaledImageUrl(nowPlayingItem.BackdropItemId, {
|
||||
type: "Backdrop",
|
||||
height: 80,
|
||||
height: 40,
|
||||
tag: nowPlayingItem.BackdropImageTag,
|
||||
index: 0
|
||||
});
|
||||
|
||||
} else if (nowPlayingItem.ThumbImageTag) {
|
||||
|
||||
url = ApiClient.getImageUrl(nowPlayingItem.ThumbImageItemId, {
|
||||
url = ApiClient.getScaledImageUrl(nowPlayingItem.ThumbImageItemId, {
|
||||
type: "Thumb",
|
||||
height: 80,
|
||||
height: 40,
|
||||
tag: nowPlayingItem.ThumbImageTag
|
||||
});
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
if (chapter.ImageTag) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(itemId, {
|
||||
width: 800,
|
||||
imgUrl = ApiClient.getScaledImageUrl(itemId, {
|
||||
width: 240,
|
||||
tag: chapter.ImageTag,
|
||||
type: "Chapter",
|
||||
index: i
|
||||
|
@ -509,26 +509,26 @@
|
|||
}
|
||||
else if (item.PrimaryImageTag) {
|
||||
|
||||
url = ApiClient.getImageUrl(item.PrimaryImageItemId, {
|
||||
url = ApiClient.getScaledImageUrl(item.PrimaryImageItemId, {
|
||||
type: "Primary",
|
||||
height: 600,
|
||||
height: 300,
|
||||
tag: item.PrimaryImageTag
|
||||
});
|
||||
}
|
||||
else if (item.BackdropImageTag) {
|
||||
|
||||
url = ApiClient.getImageUrl(item.BackdropItemId, {
|
||||
url = ApiClient.getScaledImageUrl(item.BackdropItemId, {
|
||||
type: "Backdrop",
|
||||
height: 600,
|
||||
height: 300,
|
||||
tag: item.BackdropImageTag,
|
||||
index: 0
|
||||
});
|
||||
|
||||
} else if (item.ThumbImageTag) {
|
||||
|
||||
url = ApiClient.getImageUrl(item.ThumbImageItemId, {
|
||||
url = ApiClient.getScaledImageUrl(item.ThumbImageItemId, {
|
||||
type: "Thumb",
|
||||
height: 600,
|
||||
height: 300,
|
||||
tag: item.ThumbImageTag
|
||||
});
|
||||
}
|
||||
|
|
|
@ -77,7 +77,13 @@
|
|||
if (hint.PrimaryImageTag) {
|
||||
|
||||
hint.ImageTags = { Primary: hint.PrimaryImageTag };
|
||||
imgUrl = LibraryBrowser.getImageUrl(hint, "Primary", 0, { maxwidth: 150, maxheight: 150 });
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(hint.ItemId, {
|
||||
type: "Primary",
|
||||
maxWidth: 150,
|
||||
maxHeight: 150,
|
||||
tag: hint.PrimaryImageTag
|
||||
});
|
||||
|
||||
}
|
||||
else if (hint.MediaType == "Game") {
|
||||
|
|
|
@ -1129,8 +1129,8 @@ var Dashboard = {
|
|||
|
||||
if (imageTags.Primary) {
|
||||
|
||||
notification.icon = ApiClient.getImageUrl(item.Id, {
|
||||
width: 100,
|
||||
notification.icon = ApiClient.getScaledImageUrl(item.Id, {
|
||||
width: 60,
|
||||
tag: imageTags.Primary,
|
||||
type: "Primary"
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue