Updates based on review
This commit is contained in:
parent
60be572753
commit
ff5e756839
|
@ -4,6 +4,7 @@ sub init()
|
||||||
setupMainNode()
|
setupMainNode()
|
||||||
setupAudioNode()
|
setupAudioNode()
|
||||||
setupButtons()
|
setupButtons()
|
||||||
|
setupInfoNodes()
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
sub setupMainNode()
|
sub setupMainNode()
|
||||||
|
@ -25,6 +26,11 @@ sub setupButtons()
|
||||||
m.buttons.setFocus(true)
|
m.buttons.setFocus(true)
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
|
sub setupInfoNodes()
|
||||||
|
m.albumCover = m.top.findNode("albumCover")
|
||||||
|
m.backDrop = m.top.findNode("backdrop")
|
||||||
|
end sub
|
||||||
|
|
||||||
sub audioIndexChanged()
|
sub audioIndexChanged()
|
||||||
pageContentChanged()
|
pageContentChanged()
|
||||||
end sub
|
end sub
|
||||||
|
@ -72,7 +78,9 @@ end sub
|
||||||
' Set poster image on screen
|
' Set poster image on screen
|
||||||
sub setPosterImage(posterURL)
|
sub setPosterImage(posterURL)
|
||||||
if isValid(posterURL)
|
if isValid(posterURL)
|
||||||
m.top.findNode("albumCover").uri = posterURL
|
if m.albumCover.uri <> posterURL
|
||||||
|
m.albumCover.uri = posterURL
|
||||||
|
end if
|
||||||
end if
|
end if
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
|
@ -90,7 +98,10 @@ sub setScreenTitle(json)
|
||||||
newTitle = newTitle + json.name
|
newTitle = newTitle + json.name
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
m.top.overhangTitle = newTitle
|
|
||||||
|
if m.top.overhangTitle <> newTitle
|
||||||
|
m.top.overhangTitle = newTitle
|
||||||
|
end if
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
' Populate on screen text variables
|
' Populate on screen text variables
|
||||||
|
@ -106,7 +117,9 @@ end sub
|
||||||
' Add backdrop image to screen
|
' Add backdrop image to screen
|
||||||
sub setBackdropImage()
|
sub setBackdropImage()
|
||||||
if isValid(m.top.backgroundContent[m.top.audio.contentIndex])
|
if isValid(m.top.backgroundContent[m.top.audio.contentIndex])
|
||||||
m.top.findNode("backdrop").uri = m.top.backgroundContent[m.top.audio.contentIndex]
|
if m.backDrop.uri <> m.top.backgroundContent[m.top.audio.contentIndex]
|
||||||
|
m.backDrop.uri = m.top.backgroundContent[m.top.audio.contentIndex]
|
||||||
|
end if
|
||||||
end if
|
end if
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
|
@ -129,7 +142,7 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
||||||
end if
|
end if
|
||||||
|
|
||||||
' Key bindings for button group
|
' Key bindings for button group
|
||||||
if m.top.findNode("buttons").hasFocus()
|
if m.buttons.hasFocus()
|
||||||
if key = "OK"
|
if key = "OK"
|
||||||
if m.buttons.buttons[m.buttons.focusedIndex] = tr("Play/Pause")
|
if m.buttons.buttons[m.buttons.focusedIndex] = tr("Play/Pause")
|
||||||
return playAction()
|
return playAction()
|
||||||
|
|
|
@ -133,7 +133,15 @@ function ItemMetaData(id as string)
|
||||||
else if data.type = "Audio"
|
else if data.type = "Audio"
|
||||||
' User clicked on a song and wants it to play
|
' User clicked on a song and wants it to play
|
||||||
tmp = CreateObject("roSGNode", "MusicSongData")
|
tmp = CreateObject("roSGNode", "MusicSongData")
|
||||||
tmp.image = PosterImage(data.id)
|
|
||||||
|
' Try using song's parent for poster image
|
||||||
|
tmp.image = PosterImage(data.ParentId)
|
||||||
|
|
||||||
|
' Song's parent poster image is no good, try using the song's poster image
|
||||||
|
if tmp.image = invalid
|
||||||
|
tmp.image = PosterImage(data.id)
|
||||||
|
end if
|
||||||
|
|
||||||
tmp.json = data
|
tmp.json = data
|
||||||
return tmp
|
return tmp
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user