Merge pull request #924 from 1hitsong/revert605

Revert "Merge pull request #605 from jimdogx/fixes/flickering-items"
This commit is contained in:
1hitsong 2023-01-25 08:40:04 -05:00 committed by GitHub
commit f9116f646f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 50 additions and 26 deletions

View File

@ -11,10 +11,10 @@ sub setPoster()
if m.top.image <> invalid if m.top.image <> invalid
m.top.posterURL = m.top.image.url m.top.posterURL = m.top.image.url
else if m.top.json.ImageTags <> invalid and m.top.json.ImageTags.Primary <> invalid else if m.top.json.ImageTags <> invalid and m.top.json.ImageTags.Primary <> invalid
imgParams = { "maxHeight": 60 } imgParams = { "maxHeight": 60, "Tag": m.top.json.ImageTags.Primary }
m.top.hdsmalliconurl = ImageURL(m.top.json.id, "Primary", imgParams) m.top.hdsmalliconurl = ImageURL(m.top.json.id, "Primary", imgParams)
imgParams = { "maxHeight": 440, "maxWidth": 295 } imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ImageTags.Primary }
m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams) m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams)
end if end if
end sub end sub

View File

@ -18,16 +18,16 @@ sub setPoster()
else else
if m.top.json.ImageTags.Primary <> invalid if m.top.json.ImageTags.Primary <> invalid
imgParams = { "maxHeight": 440, "maxWidth": 295 } imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ImageTags.Primary }
m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams) m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams)
else if m.top.json.BackdropImageTags <> invalid else if m.top.json.BackdropImageTags <> invalid
imgParams = { "maxHeight": 440 } imgParams = { "maxHeight": 440, "Tag": m.top.json.BackdropImageTags[0] }
m.top.posterURL = ImageURL(m.top.json.id, "Backdrop", imgParams) m.top.posterURL = ImageURL(m.top.json.id, "Backdrop", imgParams)
end if end if
' Add Backdrop Image ' Add Backdrop Image
if m.top.json.BackdropImageTags <> invalid if m.top.json.BackdropImageTags <> invalid
imgParams = { "maxHeight": 720, "maxWidth": 1280 } imgParams = { "maxHeight": 720, "maxWidth": 1280, "Tag": m.top.json.BackdropImageTags[0] }
m.top.backdropURL = ImageURL(m.top.json.id, "Backdrop", imgParams) m.top.backdropURL = ImageURL(m.top.json.id, "Backdrop", imgParams)
end if end if

View File

@ -21,7 +21,7 @@ sub setPoster()
imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ParentThumbImageTag } imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ParentThumbImageTag }
m.top.posterURL = ImageURL(m.top.json.id, "Thumb", imgParams) m.top.posterURL = ImageURL(m.top.json.id, "Thumb", imgParams)
else if m.top.json.ImageTags.Primary <> invalid else if m.top.json.ImageTags.Primary <> invalid
imgParams = { "maxHeight": 440, "maxWidth": 295 } imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ImageTags.Primary }
m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams) m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams)
end if end if
end sub end sub

View File

@ -16,7 +16,7 @@ sub setData()
' Set appropriate Images for Wide and Tall based on type ' Set appropriate Images for Wide and Tall based on type
if datum.type = "CollectionFolder" or datum.type = "UserView" if datum.type = "CollectionFolder" or datum.type = "UserView"
params = { "maxHeight": 261, "maxWidth": 464 } params = { "Tag": datum.ImageTags.Primary, "maxHeight": 261, "maxWidth": 464 }
m.top.thumbnailURL = ImageURL(datum.id, "Primary", params) m.top.thumbnailURL = ImageURL(datum.id, "Primary", params)
m.top.widePosterUrl = m.top.thumbnailURL m.top.widePosterUrl = m.top.thumbnailURL
@ -33,14 +33,22 @@ sub setData()
imgParams.Append({ "maxHeight": 261 }) imgParams.Append({ "maxHeight": 261 })
imgParams.Append({ "maxWidth": 464 }) imgParams.Append({ "maxWidth": 464 })
if datum.ImageTags.Primary <> invalid
param = { "Tag": datum.ImageTags.Primary }
imgParams.Append(param)
end if
m.top.thumbnailURL = ImageURL(datum.id, "Primary", imgParams) m.top.thumbnailURL = ImageURL(datum.id, "Primary", imgParams)
' Add Wide Poster (Series Backdrop) ' Add Wide Poster (Series Backdrop)
if datum.ParentThumbImageTag <> invalid if datum.ParentThumbImageTag <> invalid
imgParams["Tag"] = datum.ParentThumbImageTag
m.top.widePosterUrl = ImageURL(datum.ParentThumbItemId, "Thumb", imgParams) m.top.widePosterUrl = ImageURL(datum.ParentThumbItemId, "Thumb", imgParams)
else if datum.ParentBackdropImageTags <> invalid else if datum.ParentBackdropImageTags <> invalid
imgParams["Tag"] = datum.ParentBackdropImageTags[0]
m.top.widePosterUrl = ImageURL(datum.ParentBackdropItemId, "Backdrop", imgParams) m.top.widePosterUrl = ImageURL(datum.ParentBackdropItemId, "Backdrop", imgParams)
else if datum.ImageTags.Primary <> invalid else if datum.ImageTags.Primary <> invalid
imgParams["Tag"] = datum.SeriesPrimaryImageTag
m.top.widePosterUrl = ImageURL(datum.id, "Primary", imgParams) m.top.widePosterUrl = ImageURL(datum.id, "Primary", imgParams)
end if end if
@ -52,8 +60,10 @@ sub setData()
' Add Wide Poster (Series Backdrop) ' Add Wide Poster (Series Backdrop)
if datum.ImageTags <> invalid and datum.imageTags.Thumb <> invalid if datum.ImageTags <> invalid and datum.imageTags.Thumb <> invalid
imgParams["Tag"] = datum.imageTags.Thumb
m.top.widePosterUrl = ImageURL(datum.Id, "Thumb", imgParams) m.top.widePosterUrl = ImageURL(datum.Id, "Thumb", imgParams)
else if datum.BackdropImageTags <> invalid else if datum.BackdropImageTags <> invalid
imgParams["Tag"] = datum.BackdropImageTags[0]
m.top.widePosterUrl = ImageURL(datum.Id, "Backdrop", imgParams) m.top.widePosterUrl = ImageURL(datum.Id, "Backdrop", imgParams)
end if end if
@ -63,14 +73,21 @@ sub setData()
imgParams.Append({ "maxHeight": 261 }) imgParams.Append({ "maxHeight": 261 })
imgParams.Append({ "maxWidth": 175 }) imgParams.Append({ "maxWidth": 175 })
if datum.ImageTags.Primary <> invalid
param = { "Tag": datum.ImageTags.Primary }
imgParams.Append(param)
end if
m.top.posterURL = ImageURL(datum.id, "Primary", imgParams) m.top.posterURL = ImageURL(datum.id, "Primary", imgParams)
' For wide image, use backdrop ' For wide image, use backdrop
imgParams["maxWidth"] = 464 imgParams["maxWidth"] = 464
if datum.ImageTags <> invalid and datum.imageTags.Thumb <> invalid if datum.ImageTags <> invalid and datum.imageTags.Thumb <> invalid
imgParams["Tag"] = datum.imageTags.Thumb
m.top.thumbnailUrl = ImageURL(datum.Id, "Thumb", imgParams) m.top.thumbnailUrl = ImageURL(datum.Id, "Thumb", imgParams)
else if datum.BackdropImageTags[0] <> invalid else if datum.BackdropImageTags[0] <> invalid
imgParams["Tag"] = datum.BackdropImageTags[0]
m.top.thumbnailUrl = ImageURL(datum.id, "Backdrop", imgParams) m.top.thumbnailUrl = ImageURL(datum.id, "Backdrop", imgParams)
end if end if
@ -80,24 +97,31 @@ sub setData()
imgParams.Append({ "maxHeight": 261 }) imgParams.Append({ "maxHeight": 261 })
imgParams.Append({ "maxWidth": 175 }) imgParams.Append({ "maxWidth": 175 })
if datum.ImageTags.Primary <> invalid
param = { "Tag": datum.ImageTags.Primary }
imgParams.Append(param)
end if
m.top.posterURL = ImageURL(datum.id, "Primary", imgParams) m.top.posterURL = ImageURL(datum.id, "Primary", imgParams)
' For wide image, use backdrop ' For wide image, use backdrop
imgParams["maxWidth"] = 464 imgParams["maxWidth"] = 464
if datum.ImageTags <> invalid and datum.imageTags.Thumb <> invalid if datum.ImageTags <> invalid and datum.imageTags.Thumb <> invalid
imgParams["Tag"] = datum.imageTags.Thumb
m.top.thumbnailUrl = ImageURL(datum.Id, "Thumb", imgParams) m.top.thumbnailUrl = ImageURL(datum.Id, "Thumb", imgParams)
else if datum.BackdropImageTags[0] <> invalid else if datum.BackdropImageTags[0] <> invalid
imgParams["Tag"] = datum.BackdropImageTags[0]
m.top.thumbnailUrl = ImageURL(datum.id, "Backdrop", imgParams) m.top.thumbnailUrl = ImageURL(datum.id, "Backdrop", imgParams)
end if end if
else if datum.type = "MusicAlbum" else if datum.type = "MusicAlbum"
params = { "maxHeight": 261, "maxWidth": 261 } params = { "Tag": datum.ImageTags.Primary, "maxHeight": 261, "maxWidth": 261 }
m.top.thumbnailURL = ImageURL(datum.id, "Primary", params) m.top.thumbnailURL = ImageURL(datum.id, "Primary", params)
m.top.widePosterUrl = m.top.thumbnailURL m.top.widePosterUrl = m.top.thumbnailURL
m.top.posterUrl = m.top.thumbnailURL m.top.posterUrl = m.top.thumbnailURL
else if datum.type = "TvChannel" or datum.type = "Channel" else if datum.type = "TvChannel" or datum.type = "Channel"
params = { "maxHeight": 261, "maxWidth": 464 } params = { "Tag": datum.ImageTags.Primary, "maxHeight": 261, "maxWidth": 464 }
m.top.thumbnailURL = ImageURL(datum.id, "Primary", params) m.top.thumbnailURL = ImageURL(datum.id, "Primary", params)
m.top.widePosterUrl = m.top.thumbnailURL m.top.widePosterUrl = m.top.thumbnailURL
m.top.iconUrl = "pkg:/images/media_type_icons/live_tv_white.png" m.top.iconUrl = "pkg:/images/media_type_icons/live_tv_white.png"

View File

@ -40,20 +40,20 @@ sub setPoster()
else else
if m.top.json.ImageTags.Primary <> invalid if m.top.json.ImageTags.Primary <> invalid
imgParams = { "maxHeight": 440, "maxWidth": 295 } imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ImageTags.Primary }
m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams) m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams)
else if m.top.json.BackdropImageTags[0] <> invalid else if m.top.json.BackdropImageTags[0] <> invalid
imgParams = { "maxHeight": 440 } imgParams = { "maxHeight": 440, "Tag": m.top.json.BackdropImageTags[0] }
m.top.posterURL = ImageURL(m.top.json.id, "Backdrop", imgParams) m.top.posterURL = ImageURL(m.top.json.id, "Backdrop", imgParams)
else if m.top.json.ParentThumbImageTag <> invalid and m.top.json.ParentThumbItemId <> invalid else if m.top.json.ParentThumbImageTag <> invalid and m.top.json.ParentThumbItemId <> invalid
imgParams = { "maxHeight": 440, "maxWidth": 295 } imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ParentThumbImageTag }
m.top.posterURL = ImageURL(m.top.json.ParentThumbItemId, "Thumb", imgParams) m.top.posterURL = ImageURL(m.top.json.ParentThumbItemId, "Thumb", imgParams)
end if end if
' Add Backdrop Image ' Add Backdrop Image
if m.top.json.BackdropImageTags <> invalid if m.top.json.BackdropImageTags <> invalid
if m.top.json.BackdropImageTags[0] <> invalid if m.top.json.BackdropImageTags[0] <> invalid
imgParams = { "maxHeight": 720, "maxWidth": 1280 } imgParams = { "maxHeight": 720, "maxWidth": 1280, "Tag": m.top.json.BackdropImageTags[0] }
m.top.backdropURL = ImageURL(m.top.json.id, "Backdrop", imgParams) m.top.backdropURL = ImageURL(m.top.json.id, "Backdrop", imgParams)
end if end if
end if end if

View File

@ -12,19 +12,19 @@ sub setPoster()
else else
if m.top.json.ImageTags.Primary <> invalid if m.top.json.ImageTags.Primary <> invalid
imgParams = { "maxHeight": 440, "maxWidth": 295 } imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ImageTags.Primary }
m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams) m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams)
else if m.top.json.BackdropImageTags[0] <> invalid else if m.top.json.BackdropImageTags[0] <> invalid
imgParams = { "maxHeight": 440 } imgParams = { "maxHeight": 440, "Tag": m.top.json.BackdropImageTags[0] }
m.top.posterURL = ImageURL(m.top.json.id, "Backdrop", imgParams) m.top.posterURL = ImageURL(m.top.json.id, "Backdrop", imgParams)
else if m.top.json.ParentThumbImageTag <> invalid and m.top.json.ParentThumbItemId <> invalid else if m.top.json.ParentThumbImageTag <> invalid and m.top.json.ParentThumbItemId <> invalid
imgParams = { "maxHeight": 440, "maxWidth": 295 } imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ParentThumbImageTag }
m.top.posterURL = ImageURL(m.top.json.ParentThumbItemId, "Thumb", imgParams) m.top.posterURL = ImageURL(m.top.json.ParentThumbItemId, "Thumb", imgParams)
end if end if
' Add Backdrop Image ' Add Backdrop Image
if m.top.json.BackdropImageTags[0] <> invalid if m.top.json.BackdropImageTags[0] <> invalid
imgParams = { "maxHeight": 720, "maxWidth": 1280 } imgParams = { "maxHeight": 720, "maxWidth": 1280, "Tag": m.top.json.BackdropImageTags[0] }
m.top.backdropURL = ImageURL(m.top.json.id, "Backdrop", imgParams) m.top.backdropURL = ImageURL(m.top.json.id, "Backdrop", imgParams)
end if end if

View File

@ -14,19 +14,19 @@ sub setPoster()
else else
if m.top.json.ImageTags.Primary <> invalid if m.top.json.ImageTags.Primary <> invalid
imgParams = { "maxHeight": 440, "maxWidth": 295 } imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ImageTags.Primary }
m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams) m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams)
else if m.top.json.BackdropImageTags[0] <> invalid else if m.top.json.BackdropImageTags[0] <> invalid
imgParams = { "maxHeight": 440 } imgParams = { "maxHeight": 440, "Tag": m.top.json.BackdropImageTags[0] }
m.top.posterURL = ImageURL(m.top.json.id, "Backdrop", imgParams) m.top.posterURL = ImageURL(m.top.json.id, "Backdrop", imgParams)
else if m.top.json.ParentThumbImageTag <> invalid and m.top.json.ParentThumbItemId <> invalid else if m.top.json.ParentThumbImageTag <> invalid and m.top.json.ParentThumbItemId <> invalid
imgParams = { "maxHeight": 440, "maxWidth": 295 } imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ParentThumbImageTag }
m.top.posterURL = ImageURL(m.top.json.ParentThumbItemId, "Thumb", imgParams) m.top.posterURL = ImageURL(m.top.json.ParentThumbItemId, "Thumb", imgParams)
end if end if
' Add Backdrop Image ' Add Backdrop Image
if m.top.json.BackdropImageTags[0] <> invalid if m.top.json.BackdropImageTags[0] <> invalid
imgParams = { "maxHeight": 720, "maxWidth": 1280 } imgParams = { "maxHeight": 720, "maxWidth": 1280, "Tag": m.top.json.BackdropImageTags[0] }
m.top.backdropURL = ImageURL(m.top.json.id, "Backdrop", imgParams) m.top.backdropURL = ImageURL(m.top.json.id, "Backdrop", imgParams)
end if end if

View File

@ -36,7 +36,7 @@ sub setPoster()
m.top.posterURL = m.top.image.url m.top.posterURL = m.top.image.url
else else
if m.top.json.ImageTags <> invalid and m.top.json.ImageTags.Thumb <> invalid if m.top.json.ImageTags <> invalid and m.top.json.ImageTags.Thumb <> invalid
imgParams = { "maxHeight": 500, "maxWidth": 500 } imgParams = { "maxHeight": 500, "maxWidth": 500, "Tag": m.top.json.ImageTags.Thumb }
m.top.posterURL = ImageURL(m.top.json.id, "Thumb", imgParams) m.top.posterURL = ImageURL(m.top.json.id, "Thumb", imgParams)
end if end if
end if end if

View File

@ -32,16 +32,16 @@ sub setPoster()
if m.top.json.ImageTags.Primary <> invalid if m.top.json.ImageTags.Primary <> invalid
imgParams = { "maxHeight": 440, "maxWidth": 295 } imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ImageTags.Primary }
m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams) m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams)
else if m.top.json.BackdropImageTags <> invalid else if m.top.json.BackdropImageTags <> invalid
imgParams = { "maxHeight": 440 } imgParams = { "maxHeight": 440, "Tag": m.top.json.BackdropImageTags[0] }
m.top.posterURL = ImageURL(m.top.json.id, "Backdrop", imgParams) m.top.posterURL = ImageURL(m.top.json.id, "Backdrop", imgParams)
end if end if
' Add Backdrop Image ' Add Backdrop Image
if m.top.json.BackdropImageTags <> invalid if m.top.json.BackdropImageTags <> invalid
imgParams = { "maxHeight": 720, "maxWidth": 1280 } imgParams = { "maxHeight": 720, "maxWidth": 1280, "Tag": m.top.json.BackdropImageTags[0] }
m.top.backdropURL = ImageURL(m.top.json.id, "Backdrop", imgParams) m.top.backdropURL = ImageURL(m.top.json.id, "Backdrop", imgParams)
end if end if

View File

@ -15,7 +15,7 @@ sub setPoster()
if m.top.image <> invalid if m.top.image <> invalid
m.top.posterURL = m.top.image.url m.top.posterURL = m.top.image.url
else if m.top.json.ImageTags.Primary <> invalid else if m.top.json.ImageTags.Primary <> invalid
imgParams = { "maxHeight": 440, "maxWidth": 295 } imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ImageTags.Primary }
m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams) m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams)
end if end if
end sub end sub