diff options
author | jmarshallnz <jmarshallnz@svn> | 2010-09-14 03:28:16 +0000 |
---|---|---|
committer | jmarshallnz <jmarshallnz@svn> | 2010-09-14 03:28:16 +0000 |
commit | 7d4054e9a7efc807ac15c4f9f9eb33efd029a33b (patch) | |
tree | 99177e9c5b49f48f2cb89254cffd02acbe5fb378 | |
parent | d761705126c0db5bc94b8995b08cecc37ba50026 (diff) |
merged: r33346, r33351 from trunk.Dharma_beta2
fixed: Ability to retrieve fanart from JSON-RPC was broken. Part of #9517, thanks to Nuka1195.
fixed: Removed folder wasn't detected during scan, causing cleanonupdate to not pick it up.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@33776 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r-- | xbmc/VideoInfoScanner.cpp | 12 | ||||
-rw-r--r-- | xbmc/lib/libjsonrpc/FileItemHandler.cpp | 2 | ||||
-rw-r--r-- | xbmc/lib/libjsonrpc/VideoLibrary.cpp | 16 |
3 files changed, 19 insertions, 11 deletions
diff --git a/xbmc/VideoInfoScanner.cpp b/xbmc/VideoInfoScanner.cpp index 155cde3521..74bea1bf71 100644 --- a/xbmc/VideoInfoScanner.cpp +++ b/xbmc/VideoInfoScanner.cpp @@ -221,7 +221,7 @@ namespace VIDEO CStdString fastHash = GetFastHash(strDirectory); if (m_database.GetPathHash(strDirectory, dbHash) && !fastHash.IsEmpty() && fastHash == dbHash) { // fast hashes match - no need to process anything - CLog::Log(LOGDEBUG, "VideoInfoScanner: Skipping dir '%s' due to no change", strDirectory.c_str()); + CLog::Log(LOGDEBUG, "VideoInfoScanner: Skipping dir '%s' due to no change (fasthash)", strDirectory.c_str()); hash = fastHash; bSkip = true; } @@ -240,8 +240,14 @@ namespace VIDEO CLog::Log(LOGDEBUG, "VideoInfoScanner: Rescanning dir '%s' due to change (%s != %s)", strDirectory.c_str(), dbHash.c_str(), hash.c_str()); } else - { // they're the same - CLog::Log(LOGDEBUG, "VideoInfoScanner: Skipping dir '%s' due to no change", strDirectory.c_str()); + { // they're the same or the hash is empty (dir empty/dir not retrievable) + if (hash.IsEmpty() && !dbHash.IsEmpty()) + { + CLog::Log(LOGDEBUG, "VideoInfoScanner: Skipping dir '%s' as it's empty or doesn't exist - adding to clean list", strDirectory.c_str()); + m_pathsToClean.push_back(m_database.GetPathId(strDirectory)); + } + else + CLog::Log(LOGDEBUG, "VideoInfoScanner: Skipping dir '%s' due to no change", strDirectory.c_str()); bSkip = true; if (m_pObserver) m_pObserver->OnDirectoryScanned(strDirectory); diff --git a/xbmc/lib/libjsonrpc/FileItemHandler.cpp b/xbmc/lib/libjsonrpc/FileItemHandler.cpp index a8badaa69a..ccb5bf7968 100644 --- a/xbmc/lib/libjsonrpc/FileItemHandler.cpp +++ b/xbmc/lib/libjsonrpc/FileItemHandler.cpp @@ -174,6 +174,8 @@ void CFileItemHandler::HandleFileItemList(const char *id, bool allowFile, const if (!item->GetThumbnailImage().IsEmpty()) object["thumbnail"] = item->GetThumbnailImage().c_str(); + if (!item->GetCachedFanart().IsEmpty()) + object["fanart"] = item->GetCachedFanart().c_str(); const Json::Value fields = parameterObject.isMember("fields") && parameterObject["fields"].isArray() ? parameterObject["fields"] : Value(arrayValue); diff --git a/xbmc/lib/libjsonrpc/VideoLibrary.cpp b/xbmc/lib/libjsonrpc/VideoLibrary.cpp index 21e97dbdaa..54033e4508 100644 --- a/xbmc/lib/libjsonrpc/VideoLibrary.cpp +++ b/xbmc/lib/libjsonrpc/VideoLibrary.cpp @@ -40,7 +40,7 @@ JSON_STATUS CVideoLibrary::GetMovies(const CStdString &method, ITransportLayer * // int genreID = parameterObject.get("genreid", -1).asInt(); CFileItemList items; - if (videodatabase.GetMoviesNav("", items)) + if (videodatabase.GetMoviesNav("videodb://", items)) HandleFileItemList("movieid", true, "movies", items, parameterObject, result); videodatabase.Close(); @@ -59,7 +59,7 @@ JSON_STATUS CVideoLibrary::GetTVShows(const CStdString &method, ITransportLayer // int genreID = parameterObject.get("genreid", -1).asInt(); CFileItemList items; - if (videodatabase.GetTvShowsNav("", items)) + if (videodatabase.GetTvShowsNav("videodb://", items)) HandleFileItemList("tvshowid", false, "tvshows", items, parameterObject, result); videodatabase.Close(); @@ -82,7 +82,7 @@ JSON_STATUS CVideoLibrary::GetSeasons(const CStdString &method, ITransportLayer return InternalError; CFileItemList items; - if (videodatabase.GetSeasonsNav("", items, -1, -1, -1, -1, tvshowID)) + if (videodatabase.GetSeasonsNav("videodb://", items, -1, -1, -1, -1, tvshowID)) HandleFileItemList(NULL, false, "seasons", items, param, result); videodatabase.Close(); @@ -106,7 +106,7 @@ JSON_STATUS CVideoLibrary::GetEpisodes(const CStdString &method, ITransportLayer return InternalError; CFileItemList items; - if (videodatabase.GetEpisodesNav("", items, -1, -1, -1, -1, tvshowID, season)) + if (videodatabase.GetEpisodesNav("videodb://", items, -1, -1, -1, -1, tvshowID, season)) HandleFileItemList("episodeid", true, "episodes", items, param, result); videodatabase.Close(); @@ -130,7 +130,7 @@ JSON_STATUS CVideoLibrary::GetMusicVideos(const CStdString &method, ITransportLa return InternalError; CFileItemList items; - if (videodatabase.GetMusicVideosNav("", items, -1, -1, artistID, -1, -1, albumID)) + if (videodatabase.GetMusicVideosNav("videodb://", items, -1, -1, artistID, -1, -1, albumID)) HandleFileItemList("musicvideoid", true, "musicvideos", items, param, result); videodatabase.Close(); @@ -144,7 +144,7 @@ JSON_STATUS CVideoLibrary::GetRecentlyAddedMovies(const CStdString &method, ITra return InternalError; CFileItemList items; - if (videodatabase.GetRecentlyAddedMoviesNav("", items)) + if (videodatabase.GetRecentlyAddedMoviesNav("videodb://", items)) HandleFileItemList("movieid", true, "movies", items, parameterObject, result); videodatabase.Close(); @@ -158,7 +158,7 @@ JSON_STATUS CVideoLibrary::GetRecentlyAddedEpisodes(const CStdString &method, IT return InternalError; CFileItemList items; - if (videodatabase.GetRecentlyAddedEpisodesNav("", items)) + if (videodatabase.GetRecentlyAddedEpisodesNav("videodb://", items)) HandleFileItemList("episodeid", true, "episodes", items, parameterObject, result); videodatabase.Close(); @@ -172,7 +172,7 @@ JSON_STATUS CVideoLibrary::GetRecentlyAddedMusicVideos(const CStdString &method, return InternalError; CFileItemList items; - if (videodatabase.GetRecentlyAddedMusicVideosNav("", items)) + if (videodatabase.GetRecentlyAddedMusicVideosNav("videodb://", items)) HandleFileItemList("musicvideoid", true, "musicvideos", items, parameterObject, result); videodatabase.Close(); |