Improve Object Names
This commit is contained in:
parent
b97d7e2694
commit
78a9e4e1c4
|
@ -1,8 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<<<<<<< unstable:components/music/MusicAlbumSongList.xml
|
||||||
<component name="MusicAlbumSongList" extends="MarkupList">
|
<component name="MusicAlbumSongList" extends="MarkupList">
|
||||||
|
=======
|
||||||
|
<component name="AlbumRow" extends="RowList">
|
||||||
|
>>>>>>> Improve Object Names:components/music/AlbumRow.xml
|
||||||
<interface>
|
<interface>
|
||||||
<field id="MusicArtistAlbumData" type="assocarray" onChange="getData" />
|
<field id="MusicArtistAlbumData" type="assocarray" onChange="getData" />
|
||||||
<field id="doneLoading" type="boolean" value="false"/>
|
<field id="doneLoading" type="boolean" value="false"/>
|
||||||
</interface>
|
</interface>
|
||||||
<script type="text/brightscript" uri="MusicAlbumSongList.brs" />
|
<script type="text/brightscript" uri="AlbumRow.brs" />
|
||||||
</component>
|
</component>
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<component name="MusicArtistAlbumRow" extends="RowList">
|
<component name="AlbumTrackList" extends="LabelList">
|
||||||
<interface>
|
<interface>
|
||||||
<field id="MusicArtistAlbumData" type="assocarray" onChange="getData" />
|
<field id="MusicArtistAlbumData" type="assocarray" onChange="getData" />
|
||||||
</interface>
|
</interface>
|
||||||
<script type="text/brightscript" uri="MusicArtistAlbumRow.brs" />
|
<script type="text/brightscript" uri="AlbumTrackList.brs" />
|
||||||
</component>
|
</component>
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<component name="MusicAlbumDetails" extends="JFScreen">
|
<component name="AlbumView" extends="JFScreen">
|
||||||
<children>
|
<children>
|
||||||
<LayoutGroup id="toplevel" layoutDirection="vert" itemSpacings="[-10]" >
|
<LayoutGroup id="toplevel" layoutDirection="vert" itemSpacings="[-10]" >
|
||||||
<LayoutGroup id="main_group" layoutDirection="horiz" itemSpacings="[15]" >
|
<LayoutGroup id="main_group" layoutDirection="horiz" itemSpacings="[15]" >
|
||||||
|
@ -15,7 +15,11 @@
|
||||||
<LayoutGroup id="infoGroup" layoutDirection="vert" itemSpacings="[15]">
|
<LayoutGroup id="infoGroup" layoutDirection="vert" itemSpacings="[15]">
|
||||||
<Label id="overview" wrap="true" height="310" width="1250" ellipsisText=" ... (Press * to read more)" />
|
<Label id="overview" wrap="true" height="310" width="1250" ellipsisText=" ... (Press * to read more)" />
|
||||||
<Rectangle id='songListRect' translation="[-30, 0]" width="1260" height="510" color="0x202020ff">
|
<Rectangle id='songListRect' translation="[-30, 0]" width="1260" height="510" color="0x202020ff">
|
||||||
|
<<<<<<< unstable:components/music/MusicAlbumDetails.xml
|
||||||
<MusicAlbumSongList itemComponentName="SongItem" id="songList" translation="[45, 25]" itemSize="[1170,60]" numRows="7" />
|
<MusicAlbumSongList itemComponentName="SongItem" id="songList" translation="[45, 25]" itemSize="[1170,60]" numRows="7" />
|
||||||
|
=======
|
||||||
|
<AlbumTrackList id="songList" translation="[45, 25]" itemSize="[1170,60]" numRows="7" />
|
||||||
|
>>>>>>> Improve Object Names:components/music/AlbumView.xml
|
||||||
</Rectangle>
|
</Rectangle>
|
||||||
</LayoutGroup>
|
</LayoutGroup>
|
||||||
</LayoutGroup>
|
</LayoutGroup>
|
||||||
|
@ -30,5 +34,5 @@
|
||||||
<field id="instantMixSelected" alias="instantMix.buttonSelected" />
|
<field id="instantMixSelected" alias="instantMix.buttonSelected" />
|
||||||
</interface>
|
</interface>
|
||||||
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
|
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
|
||||||
<script type="text/brightscript" uri="MusicAlbumDetails.brs" />
|
<script type="text/brightscript" uri="AlbumView.brs" />
|
||||||
</component>
|
</component>
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<component name="MusicArtistDetails" extends="JFGroup">
|
<component name="ArtistView" extends="JFGroup">
|
||||||
<children>
|
<children>
|
||||||
<Poster id="backdrop" opacity=".4" loadDisplayMode="scaleToZoom" width="1920" height="1200" blendColor="#3f3f3f" />
|
<Poster id="backdrop" opacity=".4" loadDisplayMode="scaleToZoom" width="1920" height="1200" blendColor="#3f3f3f" />
|
||||||
<LayoutGroup id="toplevel" layoutDirection="vert" itemSpacings="[35]" >
|
<LayoutGroup id="toplevel" layoutDirection="vert" itemSpacings="[35]" >
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
<Label id="overview" wrap="true" maxLines="9" width="1250" ellipsisText=" ... (Press * to read more)" />
|
<Label id="overview" wrap="true" maxLines="9" width="1250" ellipsisText=" ... (Press * to read more)" />
|
||||||
</LayoutGroup>
|
</LayoutGroup>
|
||||||
<Rectangle id='albumRect' translation="[0, 0]" width="1720" height="325" color="0x00000066">
|
<Rectangle id='albumRect' translation="[0, 0]" width="1720" height="325" color="0x00000066">
|
||||||
<MusicArtistAlbumRow id="albums" translation="[35, 10]" rowLabelColor="#999999" rowLabelFont="font:SmallestSystemFont" />
|
<AlbumRow id="albums" translation="[35, 10]" rowLabelColor="#999999" rowLabelFont="font:SmallestSystemFont" />
|
||||||
</Rectangle>
|
</Rectangle>
|
||||||
</LayoutGroup>
|
</LayoutGroup>
|
||||||
</children>
|
</children>
|
||||||
|
@ -18,5 +18,5 @@
|
||||||
<field id="musicAlbumSelected" alias="albums.rowItemSelected" />
|
<field id="musicAlbumSelected" alias="albums.rowItemSelected" />
|
||||||
</interface>
|
</interface>
|
||||||
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
|
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
|
||||||
<script type="text/brightscript" uri="MusicArtistDetails.brs" />
|
<script type="text/brightscript" uri="ArtistView.brs" />
|
||||||
</component>
|
</component>
|
|
@ -159,9 +159,9 @@ sub Main (args as dynamic) as void
|
||||||
else if selectedItem.type = "Photo"
|
else if selectedItem.type = "Photo"
|
||||||
' Nothing to do here, handled in ItemGrid
|
' Nothing to do here, handled in ItemGrid
|
||||||
else if selectedItem.type = "MusicArtist"
|
else if selectedItem.type = "MusicArtist"
|
||||||
group = CreateMusicArtistDetailsGroup(selectedItem.json)
|
group = CreateArtistView(selectedItem.json)
|
||||||
else if selectedItem.type = "MusicAlbum"
|
else if selectedItem.type = "MusicAlbum"
|
||||||
group = CreateMusicAlbumDetailsGroup(selectedItem.json)
|
group = CreateAlbumView(selectedItem.json)
|
||||||
else if selectedItem.type = "Audio"
|
else if selectedItem.type = "Audio"
|
||||||
group = CreateAudioPlayerGroup([selectedItem.json])
|
group = CreateAudioPlayerGroup([selectedItem.json])
|
||||||
else
|
else
|
||||||
|
@ -189,7 +189,7 @@ sub Main (args as dynamic) as void
|
||||||
' ptr is for [row, col] of selected item... but we only have 1 row
|
' ptr is for [row, col] of selected item... but we only have 1 row
|
||||||
albums = msg.getRoSGNode()
|
albums = msg.getRoSGNode()
|
||||||
node = albums.musicArtistAlbumData.items[ptr[1]]
|
node = albums.musicArtistAlbumData.items[ptr[1]]
|
||||||
group = CreateMusicAlbumDetailsGroup(node)
|
group = CreateAlbumView(node)
|
||||||
else if isNodeEvent(msg, "playSong")
|
else if isNodeEvent(msg, "playSong")
|
||||||
' User has selected audio they want us to play
|
' User has selected audio they want us to play
|
||||||
selectedIndex = msg.getData()
|
selectedIndex = msg.getData()
|
||||||
|
|
|
@ -369,13 +369,13 @@ function CreateSeriesDetailsGroup(series)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
' Shows details on selected artist. Bio, image, and list of available albums
|
' Shows details on selected artist. Bio, image, and list of available albums
|
||||||
function CreateMusicArtistDetailsGroup(musicartist)
|
function CreateArtistView(musicartist)
|
||||||
musicData = MusicAlbumList(musicartist.id)
|
musicData = MusicAlbumList(musicartist.id)
|
||||||
|
|
||||||
' User only has songs under artists
|
' User only has songs under artists
|
||||||
if musicData = invalid or musicData.Items.Count() = 0
|
if musicData = invalid or musicData.Items.Count() = 0
|
||||||
' Just songs under artists...
|
' Just songs under artists...
|
||||||
group = CreateObject("roSGNode", "MusicAlbumDetails")
|
group = CreateObject("roSGNode", "AlbumView")
|
||||||
group.pageContent = ItemMetaData(musicartist.id)
|
group.pageContent = ItemMetaData(musicartist.id)
|
||||||
group.albumData = MusicSongList(musicartist.id)
|
group.albumData = MusicSongList(musicartist.id)
|
||||||
group.observeField("playSong", m.port)
|
group.observeField("playSong", m.port)
|
||||||
|
@ -383,7 +383,7 @@ function CreateMusicArtistDetailsGroup(musicartist)
|
||||||
group.observeField("instantMixSelected", m.port)
|
group.observeField("instantMixSelected", m.port)
|
||||||
else
|
else
|
||||||
' User has albums under artists
|
' User has albums under artists
|
||||||
group = CreateObject("roSGNode", "MusicArtistDetails")
|
group = CreateObject("roSGNode", "ArtistView")
|
||||||
group.pageContent = ItemMetaData(musicartist.id)
|
group.pageContent = ItemMetaData(musicartist.id)
|
||||||
group.musicArtistAlbumData = musicData
|
group.musicArtistAlbumData = musicData
|
||||||
group.observeField("musicAlbumSelected", m.port)
|
group.observeField("musicAlbumSelected", m.port)
|
||||||
|
@ -395,8 +395,8 @@ function CreateMusicArtistDetailsGroup(musicartist)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
' Shows details on selected album. Description text, image, and list of available songs
|
' Shows details on selected album. Description text, image, and list of available songs
|
||||||
function CreateMusicAlbumDetailsGroup(album)
|
function CreateAlbumView(album)
|
||||||
group = CreateObject("roSGNode", "MusicAlbumDetails")
|
group = CreateObject("roSGNode", "AlbumView")
|
||||||
m.global.sceneManager.callFunc("pushScene", group)
|
m.global.sceneManager.callFunc("pushScene", group)
|
||||||
|
|
||||||
group.pageContent = ItemMetaData(album.id)
|
group.pageContent = ItemMetaData(album.id)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user