diff options
author | montellese <montellese@xbmc.org> | 2012-05-12 16:21:35 +0200 |
---|---|---|
committer | Jonathan Marshall <jmarshall@never.you.mind> | 2012-05-13 22:22:10 +1200 |
commit | 805ab67a2d9c50c61e225ecb7a765ea820c0d8d8 (patch) | |
tree | bd2858c5b97abad1d78e64df0ba703d06338625e | |
parent | a50296812b7b34cfc5fe8fa6c78b6c390dd2dc55 (diff) |
[webinterface.default] make sure to URL-encode any image-paths returned by JSON-RPC when calling http://<ip>:<port>/vfs/
-rwxr-xr-x | addons/webinterface.default/js/MediaLibrary.js | 2 | ||||
-rwxr-xr-x | addons/webinterface.default/js/NowPlayingManager.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/webinterface.default/js/MediaLibrary.js b/addons/webinterface.default/js/MediaLibrary.js index 1033cc71bc..64b0a40e2e 100755 --- a/addons/webinterface.default/js/MediaLibrary.js +++ b/addons/webinterface.default/js/MediaLibrary.js @@ -454,7 +454,7 @@ MediaLibrary.prototype = { } }, getThumbnailPath: function(thumbnail) { - return thumbnail ? ('/vfs/' + thumbnail) : DEFAULT_ALBUM_COVER; + return thumbnail ? ('/image/' + encodeURI(thumbnail)) : DEFAULT_ALBUM_COVER; }, generateThumb: function(type, thumbnail, title, artist) { var floatableAlbum = $('<div>'); diff --git a/addons/webinterface.default/js/NowPlayingManager.js b/addons/webinterface.default/js/NowPlayingManager.js index 43ecdd230f..59192cbd20 100755 --- a/addons/webinterface.default/js/NowPlayingManager.js +++ b/addons/webinterface.default/js/NowPlayingManager.js @@ -382,7 +382,7 @@ NowPlayingManager.prototype = { this.lastPlaylistItem = this.activePlaylistItem; var imgPath = DEFAULT_ALBUM_COVER; if (this.activePlaylistItem.thumbnail) { - imgPath = (this.activePlaylistItem.thumbnail.startsWith('special://') ? '/vfs/' : 'images/') + this.activePlaylistItem.thumbnail; + imgPath = this.activePlaylistItem.thumbnail.startsWith('special://') ? ('/image/' + encodeURI(this.activePlaylistItem.thumbnail)) : ('images/' + this.activePlaylistItem.thumbnail); } $('#audioCoverArt').html('<img src="' + imgPath + '" alt="' + this.activePlaylistItem.album + ' cover art">'); $('#audioTrackTitle').html('<span title="' + this.activePlaylistItem.title + '">' + this.activePlaylistItem.title + '</span>'); @@ -430,7 +430,7 @@ NowPlayingManager.prototype = { this.lastPlaylistItem = this.activePlaylistItem; var imgPath = DEFAULT_VIDEO_COVER; if (this.activePlaylistItem.thumbnail) { - imgPath = (this.activePlaylistItem.thumbnail.startsWith('special://') ? '/vfs/' : 'images/') + this.activePlaylistItem.thumbnail; + imgPath = this.activePlaylistItem.thumbnail.startsWith('special://') ? ('/image/' + encodeURI(this.activePlaylistItem.thumbnail)) : ('images/' + this.activePlaylistItem.thumbnail); } $('#videoCoverArt').html('<img src="' + imgPath + '" alt="' + this.activePlaylistItem.title + ' cover art">'); $('#videoShowTitle').html(this.activePlaylistItem.showtitle||' '); |