From 21de7b8640d3d45c5e5158554e6894cb07326c54 Mon Sep 17 00:00:00 2001 From: montellese Date: Thu, 13 Oct 2011 09:49:56 +0200 Subject: webinterface: fix playback of songs (fixes #12076) --- addons/webinterface.default/js/MediaLibrary.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/webinterface.default/js') diff --git a/addons/webinterface.default/js/MediaLibrary.js b/addons/webinterface.default/js/MediaLibrary.js index bed6cc53fa..4886efc44f 100755 --- a/addons/webinterface.default/js/MediaLibrary.js +++ b/addons/webinterface.default/js/MediaLibrary.js @@ -675,7 +675,7 @@ MediaLibrary.prototype = { //check that clear worked. jQuery.post(JSON_RPC + '?AddAlbumToPlaylist', '{"jsonrpc": "2.0", "method": "Playlist.Add", "params": { "playlistid": ' + this.playlists["audio"] + ', "item": { "albumid": ' + event.data.album.albumid + ' } }, "id": 1}', jQuery.proxy(function(data) { //play specific song in playlist - jQuery.post(JSON_RPC + '?PlaylistItemPlay', '{"jsonrpc": "2.0", "method": "Player.Open", "params": { "playlist": { "playlistid": ' + this.playlists["audio"] + ', "position": '+ event.data.itmnbr + ' } }, "id": 1}', function() {}, 'json'); + jQuery.post(JSON_RPC + '?PlaylistItemPlay', '{"jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "playlistid": ' + this.playlists["audio"] + ', "position": '+ event.data.itmnbr + ' } }, "id": 1}', function() {}, 'json'); }, this), 'json'); }, this), 'json'); }, @@ -782,7 +782,7 @@ MediaLibrary.prototype = { } }, startSlideshow: function(event) { - jQuery.post(JSON_RPC + '?StartSlideshow', '{"jsonrpc": "2.0", "method": "Player.Open", "params": { "slideshow": { "recursive" : "true", "random":"true", "directory" : "' + this.replaceAll(event.data.directory.file, "\\", "\\\\") + '" } }, "id": 1}', null, 'json'); + jQuery.post(JSON_RPC + '?StartSlideshow', '{"jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "recursive" : "true", "random":"true", "path" : "' + this.replaceAll(event.data.directory.file, "\\", "\\\\") + '" } }, "id": 1}', null, 'json'); }, showDirectory: function(event) { var directory = event.data.directory.file; -- cgit v1.2.3