aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormontellese <montellese@xbmc.org>2011-12-06 16:19:24 +0100
committermontellese <montellese@xbmc.org>2011-12-06 16:19:24 +0100
commitaeb4dec8923813cbf9d454ac89fcbe6d94b57fc4 (patch)
tree96fea1e8722c2656c3da6980d6a4e9832a089601
parent6ee21e01397d30c4408bcb0e9992d9af05b45652 (diff)
jsonrpc: get valid "thumbnail" path for pictures in a slideshow (fixes #12258)
-rw-r--r--xbmc/interfaces/json-rpc/FileItemHandler.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/xbmc/interfaces/json-rpc/FileItemHandler.cpp b/xbmc/interfaces/json-rpc/FileItemHandler.cpp
index 281e411a63..79abe440f7 100644
--- a/xbmc/interfaces/json-rpc/FileItemHandler.cpp
+++ b/xbmc/interfaces/json-rpc/FileItemHandler.cpp
@@ -34,6 +34,7 @@
#include "video/VideoDatabase.h"
#include "filesystem/Directory.h"
#include "filesystem/File.h"
+#include "TextureCache.h"
using namespace MUSIC_INFO;
using namespace JSONRPC;
@@ -196,6 +197,12 @@ void CFileItemHandler::HandleFileItem(const char *ID, bool allowFile, const char
if (CFile::Exists(cachedThumb))
object["thumbnail"] = cachedThumb;
}
+ else if (item->HasPictureInfoTag())
+ {
+ CStdString thumb = CTextureCache::Get().CheckAndCacheImage(CTextureCache::GetWrappedThumbURL(item->GetPath()));
+ if (!thumb.empty())
+ object["thumbnail"] = thumb;
+ }
if (!object.isMember("thumbnail"))
object["thumbnail"] = "";