diff options
author | montellese <montellese@xbmc.org> | 2011-09-18 23:37:28 +0200 |
---|---|---|
committer | montellese <montellese@xbmc.org> | 2011-09-20 20:46:06 +0200 |
commit | 29c582563409ed89be598fe3d82f32e94869b056 (patch) | |
tree | f5c2ee520b8304b7b1e3f997dfd7e9124b39371c /addons | |
parent | 481a6007e899bdba21f2b500ef4ad90ddd6b62eb (diff) |
webinterface: adjust to latest jsonrpc changes
Diffstat (limited to 'addons')
-rwxr-xr-x | addons/webinterface.default/js/MediaLibrary.js | 12 | ||||
-rwxr-xr-x | addons/webinterface.default/js/NowPlayingManager.js | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/addons/webinterface.default/js/MediaLibrary.js b/addons/webinterface.default/js/MediaLibrary.js index 1a7ffe1740..18befec115 100755 --- a/addons/webinterface.default/js/MediaLibrary.js +++ b/addons/webinterface.default/js/MediaLibrary.js @@ -265,7 +265,7 @@ MediaLibrary.prototype = { libraryContainer.attr('id', 'libraryContainer') .addClass('contentContainer'); $('#content').append(libraryContainer); - jQuery.post(JSON_RPC + '?GetAlbums', '{"jsonrpc": "2.0", "method": "AudioLibrary.GetAlbums", "params": { "limits": { "start": 0 }, "fields": ["description", "theme", "mood", "style", "type", "label", "artist", "genre", "rating", "title", "year", "thumbnail"], "sort": { "method": "artist" } }, "id": 1}', jQuery.proxy(function(data) { + jQuery.post(JSON_RPC + '?GetAlbums', '{"jsonrpc": "2.0", "method": "AudioLibrary.GetAlbums", "params": { "limits": { "start": 0 }, "properties": ["description", "theme", "mood", "style", "type", "label", "artist", "genre", "rating", "title", "year", "thumbnail"], "sort": { "method": "artist" } }, "id": 1}', jQuery.proxy(function(data) { if (data && data.result && data.result.albums) { this.albumList = data.result.albums; $.each($(this.albumList), jQuery.proxy(function(i, item) { @@ -370,7 +370,7 @@ MediaLibrary.prototype = { $('#topScrollFade').hide(); if (!albumDetailsContainer || albumDetailsContainer.length == 0) { $('#spinner').show(); - jQuery.post(JSON_RPC + '?GetSongs', '{"jsonrpc": "2.0", "method": "AudioLibrary.GetSongs", "params": { "fields": ["title", "artist", "genre", "track", "duration", "year", "rating", "playcount"], "albumid" : ' + event.data.album.albumid + ' }, "id": 1}', jQuery.proxy(function(data) { + jQuery.post(JSON_RPC + '?GetSongs', '{"jsonrpc": "2.0", "method": "AudioLibrary.GetSongs", "params": { "properties": ["title", "artist", "genre", "track", "duration", "year", "rating", "playcount"], "albumid" : ' + event.data.album.albumid + ' }, "id": 1}', jQuery.proxy(function(data) { albumDetailsContainer = $('<div>'); albumDetailsContainer.attr('id', 'albumDetails' + event.data.album.albumid) .addClass('contentContainer') @@ -480,7 +480,7 @@ MediaLibrary.prototype = { toggle=this.toggle.detach(); if (!tvshowDetailsContainer || tvshowDetailsContainer.length == 0) { $('#spinner').show(); - jQuery.post(JSON_RPC + '?GetTVShowSeasons', '{"jsonrpc": "2.0", "method": "VideoLibrary.GetSeasons", "params": { "fields": [ "season", "showtitle", "playcount", "episode", "thumbnail","fanart" ], "tvshowid" : ' + event.data.tvshow.tvshowid + ' }, "id": 1}', jQuery.proxy(function(data) { + jQuery.post(JSON_RPC + '?GetTVShowSeasons', '{"jsonrpc": "2.0", "method": "VideoLibrary.GetSeasons", "params": { "properties": [ "season", "showtitle", "playcount", "episode", "thumbnail","fanart" ], "tvshowid" : ' + event.data.tvshow.tvshowid + ' }, "id": 1}', jQuery.proxy(function(data) { tvshowDetailsContainer = $('<div>'); tvshowDetailsContainer.attr('id', 'tvShowDetails' + event.data.tvshow.tvshowid) .css('display', 'none') @@ -547,7 +547,7 @@ MediaLibrary.prototype = { //Update ActiveSeason this.tvActiveSeason = selectedVal; //Populate new listings - jQuery.post(JSON_RPC + '?GetTVSeasonEpisodes', '{"jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodes", "params": { "fields": [ "title", "thumbnail","episode","plot","season"], "season" : ' + seasons[selectedVal].season + ', "tvshowid" : ' + event.data.tvshow + ' }, "id": 1}', jQuery.proxy(function(data) { + jQuery.post(JSON_RPC + '?GetTVSeasonEpisodes', '{"jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodes", "params": { "properties": [ "title", "thumbnail","episode","plot","season"], "season" : ' + seasons[selectedVal].season + ', "tvshowid" : ' + event.data.tvshow + ' }, "id": 1}', jQuery.proxy(function(data) { var episodeListingsContainer = $('<div>').addClass('episodeListingsContainer'); var episodeTable= $('<table>').addClass('seasonView').html('<thead><tr class="headerRow"><th class="thumbHeader">N°</th><th>Title</th><th class="thumbHeader">Thumb</th><th class="thumbHeader">Details</th></tr></thead><tbody class="resultSet"></tbody>'); $.each($(data.result.episodes), jQuery.proxy(function(i, item) { @@ -686,7 +686,7 @@ MediaLibrary.prototype = { var libraryContainer = $('#movieLibraryContainer'); if (!libraryContainer || libraryContainer.length == 0) { $('#spinner').show(); - jQuery.post(JSON_RPC + '?GetMovies', '{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": { "limits": { "start": 0 }, "fields": [ "genre", "director", "trailer", "tagline", "plot", "plotoutline", "title", "originaltitle", "lastplayed", "runtime", "year", "playcount", "rating", "thumbnail", "file" ], "sort": { "method": "sorttitle", "ignorearticle": true } }, "id": 1}', jQuery.proxy(function(data) { + jQuery.post(JSON_RPC + '?GetMovies', '{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": { "limits": { "start": 0 }, "properties": [ "genre", "director", "trailer", "tagline", "plot", "plotoutline", "title", "originaltitle", "lastplayed", "runtime", "year", "playcount", "rating", "thumbnail", "file" ], "sort": { "method": "sorttitle", "ignorearticle": true } }, "id": 1}', jQuery.proxy(function(data) { if (data && data.result && data.result.movies) { libraryContainer = $('<div>'); libraryContainer.attr('id', 'movieLibraryContainer') @@ -736,7 +736,7 @@ MediaLibrary.prototype = { .bind('click',{mode: 'landscape'},jQuery.proxy(this.togglePosterView,this)); toggle.append(toggleBanner).append(' | ').append(togglePoster).append(' | ').append(toggleLandscape); this.toggle=toggle; - jQuery.post(JSON_RPC + '?GetTVShows', '{"jsonrpc": "2.0", "method": "VideoLibrary.GetTVShows", "params": { "fields": ["genre", "plot", "title", "lastplayed", "episode", "year", "playcount", "rating", "thumbnail", "studio", "mpaa", "premiered"] }, "id": 1}', jQuery.proxy(function(data) { + jQuery.post(JSON_RPC + '?GetTVShows', '{"jsonrpc": "2.0", "method": "VideoLibrary.GetTVShows", "params": { "properties": ["genre", "plot", "title", "lastplayed", "episode", "year", "playcount", "rating", "thumbnail", "studio", "mpaa", "premiered"] }, "id": 1}', jQuery.proxy(function(data) { if (data && data.result && data.result.tvshows) { libraryContainer = $('<div>'); libraryContainer.append(toggle); diff --git a/addons/webinterface.default/js/NowPlayingManager.js b/addons/webinterface.default/js/NowPlayingManager.js index 2269c0b989..6ebc1782ca 100755 --- a/addons/webinterface.default/js/NowPlayingManager.js +++ b/addons/webinterface.default/js/NowPlayingManager.js @@ -246,7 +246,7 @@ NowPlayingManager.prototype = { jQuery.ajax({ type: 'POST', url: JSON_RPC + '?updateAudioPlaylist', - data: '{"jsonrpc": "2.0", "method": "Playlist.GetItems", "params": { "playlistid": ' + this.playlistid + ', "fields": [ "title", "album", "artist", "duration", "thumbnail" ] }, "id": 1}', + data: '{"jsonrpc": "2.0", "method": "Playlist.GetItems", "params": { "playlistid": ' + this.playlistid + ', "properties": [ "title", "album", "artist", "duration", "thumbnail" ] }, "id": 1}', success: jQuery.proxy(function(data) { if (data && data.result && data.result.items && data.result.items.length > 0 && data.result.limits.total > 0) { //Compare new playlist to active playlist, only redraw if a change is noticed @@ -453,7 +453,7 @@ NowPlayingManager.prototype = { jQuery.ajax({ type: 'POST', url: JSON_RPC + '?updateVideoPlaylist', - data: '{"jsonrpc": "2.0", "method": "Playlist.GetItems", "params": { "playlistid": ' + this.playlistid + ', "fields": ["title", "season", "episode", "plot", "runtime", "showtitle","thumbnail"] }, "id": 1}', + data: '{"jsonrpc": "2.0", "method": "Playlist.GetItems", "params": { "playlistid": ' + this.playlistid + ', "properties": ["title", "season", "episode", "plot", "runtime", "showtitle","thumbnail"] }, "id": 1}', success: jQuery.proxy(function(data) { if (data && data.result && data.result.items && data.result.items.length > 0 && data.result.limits.total > 0) { //Compare new playlist to active playlist, only redraw if a change is noticed. |