Kodi Community Forum

Full Version: Play album from dynamic list?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, me again..

How would I begin playing an album from the song clicked in a dynamic list?
I thought a simple <onclick>play</onclick> was supposed to do that?

It plays something all right, but it is unrelated to the list.

The item played is definitly related to the position in the dynamic list, indicating it is infact linked to some value.
Skipping to the next song in the (wrong but playing) album is also working, so more than one song is being passed to the player.

Again, sorry for spamming this forum..
Hi

I use the following command. It may be useful for you.



Quote:<onup>PlayMedia($INFO[Container(1).ListItem.FilenameAndPath],1)</onup>


Best regards.
Thanks senna99,

I see in the docs* that the "1" (isdir) indicates to play the contents of the folder, but I want to play the contents of the songs listed in the panel-container.
For playing an album it should actually work for me as I have it pretty organized, but sometimes I want to shuffle between all items from an artist/genre or similar.

Then PLayMedia will fail.

So the question still stands:
Are there any ways of playing the songs actually present in a list?

*Edit:I rushed. The docs actually says "1" is for playing in a video-container that isn't fullscreen and "isdir" is to play a folder.
Can you show your dynamic list here, because I'm not sure now do you use list for album or songs.
If I understand you have dynamic list for albums and when you open the album you can not play song,
or I missed the topic, because I'm not an expert but I'm trying to help you.
I think you understand just fine, and your help is appreciated, but here it is anyways Smile

The only thing that differs from a regular "list", is the content tag, and the fact that with a content tag, all of a sudden Kodi has zero idea what to do onclick:
Code:
<control type="panel" id="56">
     <onclick>what_loopholes_must_i_navigate_to_make_Kodi_do_what_it_normally_does_when_songs_are_listed_here_and_they_are_clicked?</onclick>
     <focusedlayout etc...
     ...
     <content>musicdb://albums/$INFO[Skin.String(AlbumDBID)]/</content>
     ...
</control>

I added this in MyMusicNav.xml btw. Oh, and here I use a skin.string AlbumDBID to determine the album to list. But in the future I'd like to maybe list more albums at once, or mixed lists of some kind.
I noticed that <onclick>play</onclick> is definitly not doing anything. Having NO onclick defined plays a single song. but still it does NOT enqueue the rest of the list - as it used to. So the question still stands.
Furthermore I noticed that the <visible>ListItem.IsPlaying</visible> is not working now!
Just a follow up:

For now I do this:
Code:
<content target="music">musicdb://albums/$INFO[Skin.String(AlbumDBID)]/</content>
With no onclick events.

That makes a single song play. The "isplaying" bool is however still quite the clueless little tw@t and does sh#tall..
Looking into python territory for the entire play item and control the playlist (since basic database information like album cover and dbid is unavailable from the player!!).. Stay tuned.
An event hook to the player begin/end was easy!
And I can get at the songs dbid from Kodi. So close.. :-)

I have travelled beyond the borders of skinning and into Mordor though.