From 805ab67a2d9c50c61e225ecb7a765ea820c0d8d8 Mon Sep 17 00:00:00 2001 From: montellese Date: Sat, 12 May 2012 16:21:35 +0200 Subject: [webinterface.default] make sure to URL-encode any image-paths returned by JSON-RPC when calling http://:/vfs/ --- addons/webinterface.default/js/MediaLibrary.js | 2 +- addons/webinterface.default/js/NowPlayingManager.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'addons/webinterface.default/js') 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 = $('
'); 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('' + this.activePlaylistItem.album + ' cover art'); $('#audioTrackTitle').html('' + this.activePlaylistItem.title + ''); @@ -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('' + this.activePlaylistItem.title + ' cover art'); $('#videoShowTitle').html(this.activePlaylistItem.showtitle||' '); -- cgit v1.2.3