DialogMusicInfo.XML missing play button in certain skins ?
#1
I have an addon which pulls video and music files from a uPNP server, creates listitems in Kodi and allows users to play the media.  it does a lot more like populating the Kodi database (i.e. syncing to the uPNP server database etc..).  Up until recently I have focused on the video playback and syncing and all has worked great.  I've recently started enhancing the music section.  Everything is working great except when I click on the Info context menu item which launches the  DialogMusicInfo.xml skin file I am not getting a play button like I do with videos.  If I point Kodi directly at the Kodi music database which is in sync with my uPNP server I get a play button so I know the funtionality works.. 

Here's the data I am sending the skins for music:

info = {
                        'duration': getSeconds(duration_text),
                        'genre': genre_text,
                        'year': release_year_text,
                        'title': title,
                        'artist': artist_text.split(','),
                        'rating': rating_val,
                        'discnumber': season_text,
                        'mediatype': 'song',
                        'tracknumber': episode_text,
                        'album': album_text,
                        'playcount': playcount,
                        'lastplayed': last_played_text,
                    }
                    li.setInfo('music', info)

I am not a skinner but have started digging through the skin code for Confluence to better understand how the skin works..  I was able to manually update the DialogMusicInfo.xml file and add button 8 as a play button and add an onclick action to play the music item but that isn't an approach I would prefer.  Since Confluence works with videos and when I point at music files in the Kodi database, the Play button functionality is in there but I cannot find where in the  skin code.  Oddly, with Estuary I get a play button for both audio and videos but no other skin I have tested presents a play button for music in the DialogMusicInfo.XML file when pulling content and populating my addon listitems. 

I think the issue may be that the my addon isn't sending the Skin something it needs to display the play button but I cannot figure out what. 

Here's the relevant section of code from the DialogMusicInfo.XML file:

                <include content="MusicInfoPanel" condition="String.IsEqual(ListItem.DBTYPE,artist) | String.IsEqual(ListItem.DBTYPE,album) | String.IsEqual(ListItem.DBTYPE,song)">
                    <param name="panel-left" value="340"/>
                    <param name="panel-width" value="900"/>
                    <param name="item-width" value="450"/>
                    <param name="label-width" value="430"/>
                </include>
                <control type="grouplist" id="9000">
                    <left>210</left>
                    <top>660</top>
                    <width>1030</width>
                    <height>40</height>
                    <itemgap>2</itemgap>
                    <align>center</align>
                    <orientation>horizontal</orientation>
                    <onleft>9000</onleft>
                    <onright>9000</onright>
                    <onup>50</onup>
                    <ondown>49</ondown>
                    <control type="button" id="6">
                        <description>Refresh</description>
                        <include>ButtonInfoDialogsCommonValues</include>
                        <label/>
                    </control>
                    <control type="button" id="10">
                        <description>Get Thumb</description>
                        <include>ButtonInfoDialogsCommonValues</include>
                        <label/>
                    </control>
                    <control type="button" id="12">
                        <description>Get Fanart / Album info</description>
                        <include>ButtonInfoDialogsCommonValues</include>
                        <label/>
                    </control>
                    <control type="button" id="7">
                        <description>Set my rating</description>
                        <include>ButtonInfoDialogsCommonValues</include>
                        <label/>
                    </control>
                </control>

I've looked through the includes.xml file at the MusicInfoPanel section but don't see where a play button might be created.  I am hoping one of you can help me out.


Thanks,

Jeff
Reply
#2
unlike for videos, kodi does not have a built-in play button for music in the info dialog.
therefor most skins will not have a play button in that dialog.

the skins that do, have added some custom implementation that may differ from skin to skin.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Note that DialogMusicInfo.xml implements two windows:  Songinformation and Albuminformation.

For my part, albuminformation provides a button that launches the play album script (script requires a library LBID).  On songinformation I do not provide a "play" button.

scott s.
.
maintainer of skin  Aeon MQ5 mods for post-Gotham Kodi releases:
Matrix see: Aeon MQ5 Mod Martix release thread
Leia see: Aeon MQ5 Mod Leia release thread
Reply
#4
Thank you both for your responses.  I've continued to look through the skin code for Confluence and Estuary and understand a chunk of the logic.  I see where the video info has a built-in play button and not in the music iinfo.  The Estuary play button is working fine for me so my addon is passing the right information.  I've also leveraged the comment field to pass additional metadata from my uPNP server. 

The last item I haven't quite figured out is the album information button 12 in the music info xml file.  It is visible but greyed out and not clickable to display the album information.  I can't quite determine what is missing.  The album information is in the Kodi database and if I drop out of my addon and go right to the album in Kodi, everything works.  My addon is setting the media type and passing the DBID for the album.  In debug mode I see the SQL query against the Kodi database:

2020-11-08 14:56:46.793 T:31532   DEBUG: SELECT albumview.*,albumartistview.*  FROM albumview  JOIN albumartistview ON albumview.idAlbum = albumartistview.idAlbum  WHERE albumview.idAlbum = 4  ORDER BY albumartistview.iOrder
2020-11-08 14:56:46.794 T:31532   DEBUG: SELECT songview.*, songartistview.* FROM songview  JOIN songartistview ON songview.idSong = songartistview.idSong  WHERE songview.idAlbum = 4  ORDER BY songview.iTrack, songartistview.idRole, songartistview.iOrder

If I run this with an SQL Lite tool against the database I get the proper results and the fact it works outside of the addon indicates the database entries are correct.  I can't determine in the skin code what missing dependency is from my addon to enable this button.  

  Jeff
Reply
#5
the state of that button is controlled by kodi, not the skin.

in case you're interested in digging into our source-code as well, you can find the relevant bit here:
https://github.com/xbmc/xbmc/blob/5b06cd...#L230-L233

as you can (hopefully) see, it needs the albumid of the song to enable the button.
however, our python interface does not provide a way to set the albumid of a song (i.e. there is no listitem.setInfo('music', { 'albumid': xxx }))
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#6
(2020-11-09, 23:31)ronie Wrote: the state of that button is controlled by kodi, not the skin.

in case you're interested in digging into our source-code as well, you can find the relevant bit here:
https://github.com/xbmc/xbmc/blob/5b06cd...#L230-L233

as you can (hopefully) see, it needs the albumid of the song to enable the button.
however, our python interface does not provide a way to set the albumid of a song (i.e. there is no listitem.setInfo('music', { 'albumid': xxx }))

Thanks again Ronie.  That explains things.  I presumed passing the DBTYPE as album and the DBID for the album would be enough since I was seeing the SQL queries fire.  I couldn't find anywhere in the skin code to instantiate the button and thought it might be something internal or something I was missing in the skin code.  I'll submit a feature request.


Jeff
Reply



Logout Mark Read Team Forum Stats Members Help
DialogMusicInfo.XML missing play button in certain skins ?0
This forum uses Lukasz Tkacz MyBB addons.