Skip to content

Commit 32be33c

Browse files
committed
Update code docs
1 parent ac974f9 commit 32be33c

19 files changed

Lines changed: 237 additions & 103 deletions

docs/components_data_ChannelData.bs.html

Lines changed: 6 additions & 1 deletion
Large diffs are not rendered by default.

docs/components_data_CollectionData.bs.html

Lines changed: 9 additions & 6 deletions
Large diffs are not rendered by default.

docs/components_data_FolderData.bs.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@
2424
sub setPoster()
2525
if isValid(m.top.image)
2626
m.top.posterURL = m.top.image.url
27-
else if m.top.json.Type = "Studio"
27+
else if m.top.json.Type = "Studio" and isValidAndNotEmpty(m.top.json.ParentThumbImageTag)
2828
imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ParentThumbImageTag }
2929
m.top.posterURL = ImageURL(m.top.json.id, "Thumb", imgParams)
30-
else if isValid(m.top.json.ImageTags.Primary)
30+
else if isValid(m.top.json.ImageTags) and isValidAndNotEmpty(m.top.json.ImageTags.Primary)
3131
imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ImageTags.Primary }
3232
m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams)
33+
else
34+
' Set posterURL to empty string when no valid tags exist to prevent 404 requests
35+
m.top.posterURL = ""
3336
end if
3437
end sub
3538

docs/components_data_HomeData.bs.html

Lines changed: 77 additions & 38 deletions
Large diffs are not rendered by default.

docs/components_data_MovieData.bs.html

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,31 @@
4747
m.top.posterURL = m.top.image.url
4848
else
4949
if isValid(m.top.json)
50-
if isValid(m.top.json.ImageTags) and isValid(m.top.json.ImageTags.Primary)
50+
if isValid(m.top.json.ImageTags) and isValidAndNotEmpty(m.top.json.ImageTags.Primary)
5151
imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ImageTags.Primary }
5252
m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams)
53-
else if isValid(m.top.json.BackdropImageTags) and isValid(m.top.json.BackdropImageTags[0])
53+
else if isValid(m.top.json.BackdropImageTags) and isValidAndNotEmpty(m.top.json.BackdropImageTags[0])
5454
imgParams = { "maxHeight": 440, "Tag": m.top.json.BackdropImageTags[0] }
5555
m.top.posterURL = ImageURL(m.top.json.id, "Backdrop", imgParams)
56-
else if isValid(m.top.json.ParentThumbImageTag) and isValid(m.top.json.ParentThumbItemId)
56+
else if isValidAndNotEmpty(m.top.json.ParentThumbImageTag) and isValid(m.top.json.ParentThumbItemId)
5757
imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ParentThumbImageTag }
5858
m.top.posterURL = ImageURL(m.top.json.ParentThumbItemId, "Thumb", imgParams)
59+
else
60+
' Set posterURL to empty string when no valid tags exist to prevent 404 requests
61+
m.top.posterURL = ""
5962
end if
6063

6164
' Add Backdrop Image
62-
if isValid(m.top.json.BackdropImageTags) and isValid(m.top.json.BackdropImageTags[0])
65+
if isValid(m.top.json.BackdropImageTags) and isValidAndNotEmpty(m.top.json.BackdropImageTags[0])
6366
imgParams = { "maxHeight": 720, "maxWidth": 1280, "Tag": m.top.json.BackdropImageTags[0] }
6467
m.top.backdropURL = ImageURL(m.top.json.id, "Backdrop", imgParams)
68+
else
69+
' Set backdropURL to empty string when no valid backdrop tags exist
70+
m.top.backdropURL = ""
6571
end if
72+
else
73+
' Set posterURL to empty string when json is invalid
74+
m.top.posterURL = ""
6675
end if
6776
end if
6877
end sub

docs/components_data_MusicAlbumData.bs.html

Lines changed: 6 additions & 1 deletion
Large diffs are not rendered by default.

docs/components_data_MusicAlbumSongListData.bs.html

Lines changed: 14 additions & 10 deletions
Large diffs are not rendered by default.

docs/components_data_MusicArtistData.bs.html

Lines changed: 14 additions & 10 deletions
Large diffs are not rendered by default.

docs/components_data_PersonData.bs.html

Lines changed: 10 additions & 6 deletions
Large diffs are not rendered by default.

docs/components_data_PhotoData.bs.html

Lines changed: 10 additions & 6 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)