Kodi Community Forum
Release script.playalbum - Play an Album from Album Info screen - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+---- Forum: Skin helper addons (https://forum.kodi.tv/forumdisplay.php?fid=300)
---- Thread: Release script.playalbum - Play an Album from Album Info screen (/showthread.php?tid=104189)

Pages: 1 2 3


script.playalbum - Play an Album from Album Info screen - Hitcher - 2011-06-24

In the same way you can play a Movie from the Movie Info screen I want to be able to play an Album from the Album Info screen but nothing I try works.

Surely this should do it?
PHP Code:
<onclick>PlayMedia($INFO[ListItem.FileNameAndPath])</onclick

Even adding ,isdir doesn't work.

Anyone know the answer?

Thanks.


- ronie - 2011-06-25

try Container.FolderPath


- Hitcher - 2011-06-25

That only uses - musicdb://3/


- mkortstiege - 2011-06-25

Tried ListItem.Path yet?


- Hitcher - 2011-06-25

Yes, everything I try throws this error -

ERROR: CDVDPlayer::OpenInputStream - error opening [G:\NZB\Download\Nirvana - Nevermind\]

Code:
Container.FolderPath - musicdb://3/

ListItem.FileNameAndPath - smb://HAL_NAS/Volume_1/Music/The Chemical Brothers - Further/

ListItem.Path - smb://HAL_NAS/Volume_1/Music/



- ronie - 2011-06-25

good practice, put quotes around the path:
Quote:<onclick>PlayMedia(&quot;$INFO[ListItem.FileNameAndPath]&quot; )</onclick>

no clue if it'll fix your issue, but it wouldn't hurt either.


- Hitcher - 2011-06-25

Thanks, but no joy.

Enabled full debugging and noticed this error -

Code:
ERROR: CWINFileSMB: Unable to open file '\' Error '123



- mkortstiege - 2011-06-25

I can't even get it to the point where it tries to play it Wink


- mkortstiege - 2011-06-25

Hm, from a brief look PlayMedia is pretty much build for video content. Mind creating a ticket so we do not forget about it?


- Hitcher - 2011-06-25

Thought I'd try using that for videos and Ronie is indeed right the &quot; tags are needed but trying to play an album always throws error 123 when trying to open the file.


- Hitcher - 2011-06-25

I suppose I could use a script to make a playlist like the RecentlyAdded script used.


- pieh - 2011-06-25

@Hitcher: Currently there is no other way - unfortunately PlayMedia(directory) will only find video files in given directory.

Plans for future: Part of my work on playlists will be unifying playback starting and this should take care of this inconvenience.


- Hitcher - 2011-06-25

Thanks for help and for clearing it up.


- Hitcher - 2011-06-25

Could someone give me a hand writing a script to play the album please as Python isn't my thing?

Thanks.


- ronie - 2011-07-03

Hitcher Wrote:Could someone give me a hand writing a script to play the album please as Python isn't my thing?

didn't have time to look into it, until today.

here's what i came up with:
script.playalbum-0.0.1.zip


add this to a button in DialogAlbumInfo.xml:
Quote:<onclick>RunScript(script.playalbum,artist=$INFO[ListItem.Artist]&amp;album=$INFO[ListItem.Album])</onclick>

lemme know if you encounter any issues :-)


edit:
xbmc pre-eden only!


This forum uses Lukasz Tkacz MyBB addons.