Jump to content

Seasons without poster are using parent thumb instead of parent poster


Recommended Posts

Posted (edited)

This is what I'm seeing on 3.2.19.0:

 

NNsrkBC.png

 

EDIT: In case it's helpful, this is my temporary fix:

function getCardImageUrl(item, apiClient, options) {
        var imageItem = item.ProgramInfo || item;
        item = imageItem;
        var width = options.width
          , height = null
          , primaryImageAspectRatio = imageLoader.getPrimaryImageAspectRatio([item])
          , forceName = !1
          , imgUrl = null
          , coverImage = !1
          , uiAspect = null;
        return options.preferThumb && item.ImageTags && item.ImageTags.Thumb ? imgUrl = apiClient.getScaledImageUrl(item.Id, {
            type: "Thumb",
            maxWidth: width,
            tag: item.ImageTags.Thumb
        }) : options.preferBanner && item.ImageTags && item.ImageTags.Banner ? imgUrl = apiClient.getScaledImageUrl(item.Id, {
            type: "Banner",
            maxWidth: width,
            tag: item.ImageTags.Banner
        }) : options.preferThumb && item.SeriesThumbImageTag && options.inheritThumb !== !1 ? imgUrl = apiClient.getScaledImageUrl(item.SeriesId, {
            type: "Thumb",
            maxWidth: width,
            tag: item.SeriesThumbImageTag
        }) : options.preferThumb && item.ParentThumbItemId && options.inheritThumb !== !1 && "Photo" !== item.MediaType ? imgUrl = apiClient.getScaledImageUrl(item.ParentThumbItemId, {
            type: "Thumb",
            maxWidth: width,
            tag: item.ParentThumbImageTag
        }) : options.preferThumb && item.ParentBackdropImageTags && options.inheritThumb !== !1 && "Photo" !== item.MediaType ? imgUrl = apiClient.getScaledImageUrl(item.ParentBackdropItemId, {
            type: "Backdrop",
            maxWidth: width,
            tag: item.ParentBackdropImageTags[0]
        }) : options.preferThumb && item.BackdropImageTags && item.BackdropImageTags.length ? (imgUrl = apiClient.getScaledImageUrl(item.Id, {
            type: "Backdrop",
            maxWidth: width,
            tag: item.BackdropImageTags[0]
        }),
        forceName = !0) : item.ImageTags && item.ImageTags.Primary ? (height = width && primaryImageAspectRatio ? Math.round(width / primaryImageAspectRatio) : null,
        imgUrl = apiClient.getScaledImageUrl(item.Id, {
            type: "Primary",
            maxHeight: height,
            maxWidth: width,
            tag: item.ImageTags.Primary
        }),
        options.preferThumb && options.showTitle !== !1 && (forceName = !0),
        primaryImageAspectRatio && (uiAspect = getDesiredAspect(options.shape),
        uiAspect && (coverImage = Math.abs(primaryImageAspectRatio - uiAspect) <= .2))) : item.PrimaryImageTag ? (height = width && primaryImageAspectRatio ? Math.round(width / primaryImageAspectRatio) : null,
        imgUrl = apiClient.getScaledImageUrl(item.PrimaryImageItemId || item.Id || item.ItemId, {
            type: "Primary",
            maxHeight: height,
            maxWidth: width,
            tag: item.PrimaryImageTag
        }),
        options.preferThumb && options.showTitle !== !1 && (forceName = !0),
        primaryImageAspectRatio && (uiAspect = getDesiredAspect(options.shape),
        uiAspect && (coverImage = Math.abs(primaryImageAspectRatio - uiAspect) <= .2))) : item.ParentPrimaryImageTag ? imgUrl = apiClient.getScaledImageUrl(item.ParentPrimaryImageItemId, {
            type: "Primary",
            maxWidth: width,
            tag: item.ParentPrimaryImageTag
        }) : item.AlbumId && item.AlbumPrimaryImageTag ? (width = primaryImageAspectRatio ? Math.round(height * primaryImageAspectRatio) : null,
        imgUrl = apiClient.getScaledImageUrl(item.AlbumId, {
            type: "Primary",
            maxHeight: height,
            maxWidth: width,
            tag: item.AlbumPrimaryImageTag
        }),
        primaryImageAspectRatio && (uiAspect = getDesiredAspect(options.shape),
        uiAspect && (coverImage = Math.abs(primaryImageAspectRatio - uiAspect) <= .2))) : "Season" === item.Type && item.ImageTags && item.ImageTags.Thumb ? imgUrl = apiClient.getScaledImageUrl(item.Id, {
            type: "Thumb",
            maxWidth: width,
            tag: item.ImageTags.Thumb
        }) : item.BackdropImageTags && item.BackdropImageTags.length ? imgUrl = apiClient.getScaledImageUrl(item.Id, {
            type: "Backdrop",
            maxWidth: width,
            tag: item.BackdropImageTags[0]
        }) : item.ImageTags && item.ImageTags.Thumb ? imgUrl = apiClient.getScaledImageUrl(item.Id, {
            type: "Thumb",
            maxWidth: width,
            tag: item.ImageTags.Thumb
        }) : item.SeriesThumbImageTag && options.inheritThumb !== !1 ? imgUrl = apiClient.getScaledImageUrl(item.SeriesId, {
            type: "Thumb",
            maxWidth: width,
            tag: item.SeriesThumbImageTag
        }) : item.Type === "Season" && options.inheritThumb !== !1 ? imgUrl = apiClient.getScaledImageUrl(item.SeriesId, {
            type: "Primary",
            maxWidth: width
        }) : item.ParentThumbItemId && options.inheritThumb !== !1 && (imgUrl = apiClient.getScaledImageUrl(item.ParentThumbItemId, {
            type: "Thumb",
            maxWidth: width,
            tag: item.ParentThumbImageTag
        })),
        {
            imgUrl: imgUrl,
            forceName: forceName,
            coverImage: coverImage
        }
    }

Relevant changes start with the check for item.Type === "Season".

Edited by bfir3
Posted

Thanks for the report. We'll take a look.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...