Merge pull request #426 from jd1123/folderimage
This commit is contained in:
commit
5c862aa6b7
|
@ -42,6 +42,7 @@ sub itemContentChanged()
|
|||
m.itemPoster.uri = itemData.PosterUrl
|
||||
m.itemText.text = itemData.Title
|
||||
else if itemData.type = "Folder" then
|
||||
m.itemPoster.uri = itemData.PosterUrl
|
||||
m.itemIcon.uri = itemData.iconUrl
|
||||
m.itemText.text = itemData.Title
|
||||
else if itemData.type = "Video" then
|
||||
|
|
|
@ -6,4 +6,19 @@ sub setFields()
|
|||
m.top.Type = "Folder"
|
||||
|
||||
m.top.iconUrl = "pkg:/images/media_type_icons/folder_white.png"
|
||||
' This is a temporary measure to avoid displaying landscape photos
|
||||
' in GridItem components that only support portrait. It will be fixed
|
||||
' after the ItemGrid is reworked.
|
||||
if m.top.json.Type <> "CollectionFolder"
|
||||
setPoster()
|
||||
end if
|
||||
end sub
|
||||
|
||||
sub setPoster()
|
||||
if m.top.image <> invalid
|
||||
m.top.posterURL = m.top.image.url
|
||||
else if m.top.json.ImageTags.Primary <> invalid then
|
||||
imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ImageTags.Primary }
|
||||
m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams)
|
||||
end if
|
||||
end sub
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<component name="FolderData" extends="JFContentItem">
|
||||
<script type="text/brightscript" uri="FolderData.brs" />
|
||||
<script type="text/brightscript" uri="pkg:/source/api/Image.brs" />
|
||||
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
|
||||
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
|
||||
</component>
|
||||
|
|
Loading…
Reference in New Issue
Block a user