inzomnyac / xbmc-addons

Automatically exported from code.google.com/p/xbmc-addons
0 stars 1 forks source link

[cinema.experience] Trivia Music playback from folder #69

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the XBMC forums SlaveUnit asks:

Is here any way we can have the music trivia part just play a random mp3 from a 
folder just like it does with choosing videos for all the other sections. That 
way when we add/take away mp3s we dont have to make a new playlist each time.

http://forum.xbmc.org/showpost.php?p=666012&postcount=58

Original issue reported on code.google.com by brian.wa...@gmail.com on 27 Dec 2010 at 9:06

GoogleCodeExporter commented 9 years ago
I think this might be the better way than a playlist.  We could offer the 
option of folder or playlist, then parse the playlist to fit the playback form 
being used for the folder.

Original comment by giftie61@gmail.com on 28 Dec 2010 at 6:58

GoogleCodeExporter commented 9 years ago
Also should loop the music if it's found to be less than the length of the 
slideshow.

Original comment by giftie61@gmail.com on 28 Dec 2010 at 10:48

GoogleCodeExporter commented 9 years ago
Because of the change in how XBMC handles playlists, we need to resolve #67 
(https://code.google.com/p/xbmc-addons/issues/detail?id=67&colspec=ID%20Type%20S
tatus%20Owner%20Summary) before we can tackle this one.

Original comment by brian.wa...@gmail.com on 29 Dec 2010 at 1:04

GoogleCodeExporter commented 9 years ago
Impementation landed in r1936, needs further testing with windows file paths 
(local drives and network mapped drives) - smb based file paths (i.e. 
smb://<VOLUME>/<SHARE>/<Path>/) work fine.

Original comment by brian.wa...@gmail.com on 2 Jan 2011 at 1:17

GoogleCodeExporter commented 9 years ago
Local and mapped drives fail on Windows. The log looks like the following:

{{{
07:31:39 T:5932 M:4294967295  NOTICE: [script.cinemaexperience] - Building 
Music Playlist
07:31:39 T:5932 M:4294967295   ERROR: JSONRPC: Failed to parse '{"jsonrpc": 
"2.0", "method": "Files.GetDirectory", "params": {"directory": 
"C:\Temp\Music\", "media": "music", "recursive": "True"}, "id": 1}'
07:31:40 T:5932 M:4294967295  NOTICE: [script.cinemaexperience] - ## Intro ##
07:31:40 T:5932 M:4294967295  NOTICE: ## Starting Trivia Music
07:31:40 T:5932 M:4294967295  NOTICE: trivia music: 2
07:31:40 T:5932 M:4294967295  NOTICE: Adjusting Volume
07:31:40 T:5932 M:4294967295  NOTICE: [script.cinemaexperience] - Building 
Music Playlist
07:31:40 T:5932 M:4294967295   ERROR: JSONRPC: Failed to parse '{"jsonrpc": 
"2.0", "method": "Files.GetDirectory", "params": {"directory": 
"C:\Temp\Music\", "media": "music", "recursive": "True"}, "id": 1}'
}}}

Original comment by brian.wa...@gmail.com on 2 Jan 2011 at 1:33

GoogleCodeExporter commented 9 years ago
it looks like the \ character needs to be escaped for the Files.GetDirectory 
call to work.

I've attached a patch (from latest svn) that escapes the \ character when given 
a windows folder path.

Original comment by brian.wa...@gmail.com on 2 Jan 2011 at 2:01

Attachments:

GoogleCodeExporter commented 9 years ago
Ignore the patch, I've submitted to SVN with a different function name 
escapeDirJSON

Original comment by brian.wa...@gmail.com on 2 Jan 2011 at 3:07

GoogleCodeExporter commented 9 years ago
Looks good...  

Original comment by giftie61@gmail.com on 2 Jan 2011 at 5:21