Skip to content
This repository
Browse code

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
authored September 14, 2010
12  xbmc/VideoInfoScanner.cpp
@@ -221,7 +221,7 @@ namespace VIDEO
221 221
       CStdString fastHash = GetFastHash(strDirectory);
222 222
       if (m_database.GetPathHash(strDirectory, dbHash) && !fastHash.IsEmpty() && fastHash == dbHash)
223 223
       { // fast hashes match - no need to process anything
224  
-        CLog::Log(LOGDEBUG, "VideoInfoScanner: Skipping dir '%s' due to no change", strDirectory.c_str());
  224
+        CLog::Log(LOGDEBUG, "VideoInfoScanner: Skipping dir '%s' due to no change (fasthash)", strDirectory.c_str());
225 225
         hash = fastHash;
226 226
         bSkip = true;
227 227
       }
@@ -240,8 +240,14 @@ namespace VIDEO
240 240
             CLog::Log(LOGDEBUG, "VideoInfoScanner: Rescanning dir '%s' due to change (%s != %s)", strDirectory.c_str(), dbHash.c_str(), hash.c_str());
241 241
         }
242 242
         else
243  
-        { // they're the same
244  
-          CLog::Log(LOGDEBUG, "VideoInfoScanner: Skipping dir '%s' due to no change", strDirectory.c_str());
  243
+        { // they're the same or the hash is empty (dir empty/dir not retrievable)
  244
+          if (hash.IsEmpty() && !dbHash.IsEmpty())
  245
+          {
  246
+            CLog::Log(LOGDEBUG, "VideoInfoScanner: Skipping dir '%s' as it's empty or doesn't exist - adding to clean list", strDirectory.c_str());
  247
+            m_pathsToClean.push_back(m_database.GetPathId(strDirectory));
  248
+          }
  249
+          else
  250
+            CLog::Log(LOGDEBUG, "VideoInfoScanner: Skipping dir '%s' due to no change", strDirectory.c_str());
245 251
           bSkip = true;
246 252
           if (m_pObserver)
247 253
             m_pObserver->OnDirectoryScanned(strDirectory);
2  xbmc/lib/libjsonrpc/FileItemHandler.cpp
@@ -174,6 +174,8 @@ void CFileItemHandler::HandleFileItemList(const char *id, bool allowFile, const
174 174
 
175 175
     if (!item->GetThumbnailImage().IsEmpty())
176 176
       object["thumbnail"] = item->GetThumbnailImage().c_str();
  177
+    if (!item->GetCachedFanart().IsEmpty())
  178
+      object["fanart"] = item->GetCachedFanart().c_str();
177 179
 
178 180
     const Json::Value fields = parameterObject.isMember("fields") && parameterObject["fields"].isArray() ? parameterObject["fields"] : Value(arrayValue);
179 181
 
16  xbmc/lib/libjsonrpc/VideoLibrary.cpp
@@ -40,7 +40,7 @@ JSON_STATUS CVideoLibrary::GetMovies(const CStdString &method, ITransportLayer *
40 40
 //  int genreID = parameterObject.get("genreid", -1).asInt();
41 41
 
42 42
   CFileItemList items;
43  
-  if (videodatabase.GetMoviesNav("", items))
  43
+  if (videodatabase.GetMoviesNav("videodb://", items))
44 44
     HandleFileItemList("movieid", true, "movies", items, parameterObject, result);
45 45
 
46 46
   videodatabase.Close();
@@ -59,7 +59,7 @@ JSON_STATUS CVideoLibrary::GetTVShows(const CStdString &method, ITransportLayer
59 59
 //  int genreID = parameterObject.get("genreid", -1).asInt();
60 60
 
61 61
   CFileItemList items;
62  
-  if (videodatabase.GetTvShowsNav("", items))
  62
+  if (videodatabase.GetTvShowsNav("videodb://", items))
63 63
     HandleFileItemList("tvshowid", false, "tvshows", items, parameterObject, result);
64 64
 
65 65
   videodatabase.Close();
@@ -82,7 +82,7 @@ JSON_STATUS CVideoLibrary::GetSeasons(const CStdString &method, ITransportLayer
82 82
     return InternalError;
83 83
 
84 84
   CFileItemList items;
85  
-  if (videodatabase.GetSeasonsNav("", items, -1, -1, -1, -1, tvshowID))
  85
+  if (videodatabase.GetSeasonsNav("videodb://", items, -1, -1, -1, -1, tvshowID))
86 86
     HandleFileItemList(NULL, false, "seasons", items, param, result);
87 87
 
88 88
   videodatabase.Close();
@@ -106,7 +106,7 @@ JSON_STATUS CVideoLibrary::GetEpisodes(const CStdString &method, ITransportLayer
106 106
     return InternalError;
107 107
 
108 108
   CFileItemList items;
109  
-  if (videodatabase.GetEpisodesNav("", items, -1, -1, -1, -1, tvshowID, season))
  109
+  if (videodatabase.GetEpisodesNav("videodb://", items, -1, -1, -1, -1, tvshowID, season))
110 110
     HandleFileItemList("episodeid", true, "episodes", items, param, result);
111 111
 
112 112
   videodatabase.Close();
@@ -130,7 +130,7 @@ JSON_STATUS CVideoLibrary::GetMusicVideos(const CStdString &method, ITransportLa
130 130
     return InternalError;
131 131
 
132 132
   CFileItemList items;
133  
-  if (videodatabase.GetMusicVideosNav("", items, -1, -1, artistID, -1, -1, albumID))
  133
+  if (videodatabase.GetMusicVideosNav("videodb://", items, -1, -1, artistID, -1, -1, albumID))
134 134
     HandleFileItemList("musicvideoid", true, "musicvideos", items, param, result);
135 135
 
136 136
   videodatabase.Close();
@@ -144,7 +144,7 @@ JSON_STATUS CVideoLibrary::GetRecentlyAddedMovies(const CStdString &method, ITra
144 144
     return InternalError;
145 145
 
146 146
   CFileItemList items;
147  
-  if (videodatabase.GetRecentlyAddedMoviesNav("", items))
  147
+  if (videodatabase.GetRecentlyAddedMoviesNav("videodb://", items))
148 148
     HandleFileItemList("movieid", true, "movies", items, parameterObject, result);
149 149
 
150 150
   videodatabase.Close();
@@ -158,7 +158,7 @@ JSON_STATUS CVideoLibrary::GetRecentlyAddedEpisodes(const CStdString &method, IT
158 158
     return InternalError;
159 159
 
160 160
   CFileItemList items;
161  
-  if (videodatabase.GetRecentlyAddedEpisodesNav("", items))
  161
+  if (videodatabase.GetRecentlyAddedEpisodesNav("videodb://", items))
162 162
     HandleFileItemList("episodeid", true, "episodes", items, parameterObject, result);
163 163
 
164 164
   videodatabase.Close();
@@ -172,7 +172,7 @@ JSON_STATUS CVideoLibrary::GetRecentlyAddedMusicVideos(const CStdString &method,
172 172
     return InternalError;
173 173
 
174 174
   CFileItemList items;
175  
-  if (videodatabase.GetRecentlyAddedMusicVideosNav("", items))
  175
+  if (videodatabase.GetRecentlyAddedMusicVideosNav("videodb://", items))
176 176
     HandleFileItemList("musicvideoid", true, "musicvideos", items, parameterObject, result);
177 177
 
178 178
   videodatabase.Close();

0 notes on commit 7d4054e

Please sign in to comment.
Something went wrong with that request. Please try again.