Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

merged: r33346, r33351 from trunk.

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
  • Loading branch information...
commit 7d4054e9a7efc807ac15c4f9f9eb33efd029a33b 1 parent d761705
jmarshallnz authored
View
12 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);
View
2  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);
View
16 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();
Please sign in to comment.
Something went wrong with that request. Please try again.