mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Ensure backwards compatability
This commit is contained in:
parent
f4a6123532
commit
0f846957c1
1 changed files with 8 additions and 4 deletions
|
@ -232,7 +232,7 @@ function Guide(options) {
|
||||||
channelQuery.Limit = channelLimit;
|
channelQuery.Limit = channelLimit;
|
||||||
channelQuery.AddCurrentProgram = false;
|
channelQuery.AddCurrentProgram = false;
|
||||||
channelQuery.EnableUserData = false;
|
channelQuery.EnableUserData = false;
|
||||||
channelQuery.EnableImageTypes = 'Logo';
|
channelQuery.EnableImageTypes = 'Primary,Logo';
|
||||||
|
|
||||||
const categories = self.categoryOptions.categories || [];
|
const categories = self.categoryOptions.categories || [];
|
||||||
const displayMovieContent = !categories.length || categories.indexOf('movies') !== -1;
|
const displayMovieContent = !categories.length || categories.indexOf('movies') !== -1;
|
||||||
|
@ -591,7 +591,8 @@ function Guide(options) {
|
||||||
let html = '';
|
let html = '';
|
||||||
|
|
||||||
for (const channel of channels) {
|
for (const channel of channels) {
|
||||||
const hasChannelImage = channel.ImageTags.Logo;
|
const hasChannelLogo = channel.ImageTags.Logo;
|
||||||
|
const hasChannelPrimary = channel.ImageTags.Primary;
|
||||||
|
|
||||||
let cssClass = 'guide-channelHeaderCell itemAction';
|
let cssClass = 'guide-channelHeaderCell itemAction';
|
||||||
|
|
||||||
|
@ -609,11 +610,14 @@ function Guide(options) {
|
||||||
|
|
||||||
html += '<button title="' + escapeHtml(title.join(' ')) + '" type="button" class="' + cssClass + '"' + ' data-action="link" data-isfolder="' + channel.IsFolder + '" data-id="' + channel.Id + '" data-serverid="' + channel.ServerId + '" data-type="' + channel.Type + '">';
|
html += '<button title="' + escapeHtml(title.join(' ')) + '" type="button" class="' + cssClass + '"' + ' data-action="link" data-isfolder="' + channel.IsFolder + '" data-id="' + channel.Id + '" data-serverid="' + channel.ServerId + '" data-type="' + channel.Type + '">';
|
||||||
|
|
||||||
|
const hasChannelImage = hasChannelLogo || hasChannelPrimary;
|
||||||
if (hasChannelImage) {
|
if (hasChannelImage) {
|
||||||
|
const imgType = hasChannelLogo ? 'Logo' : 'Primary';
|
||||||
|
const imgTag = hasChannelLogo ? channel.ImageTags.Logo : channel.ImageTags.Primary;
|
||||||
const url = apiClient.getScaledImageUrl(channel.Id, {
|
const url = apiClient.getScaledImageUrl(channel.Id, {
|
||||||
maxHeight: 220,
|
maxHeight: 220,
|
||||||
tag: channel.ImageTags.Logo,
|
tag: imgTag,
|
||||||
type: 'Logo'
|
type: imgType
|
||||||
});
|
});
|
||||||
|
|
||||||
html += '<div class="guideChannelImage lazy" data-src="' + url + '"></div>';
|
html += '<div class="guideChannelImage lazy" data-src="' + url + '"></div>';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue