Skip to content
This repository
Browse code

always add the repository to the add-ons database even if it returns …

…no add-ons. fixes constant (every 10 minutes) hitting of add-on repos that have no add-ons
  • Loading branch information...
commit 626fb2208545d51cf9789c322c918d64b2ee2963 1 parent 60b0ee0
authored January 08, 2013

Showing 1 changed file with 6 additions and 4 deletions. Show diff stats Hide diff stats

  1. 10  xbmc/addons/Repository.cpp
10  xbmc/addons/Repository.cpp
@@ -266,13 +266,15 @@ VECADDONS CRepositoryUpdateJob::GrabAddons(RepositoryPtr& repo)
266 266
   int idRepo = database.GetRepoChecksum(repo->ID(),checksum);
267 267
   CStdString reposum = repo->Checksum();
268 268
   VECADDONS addons;
269  
-  if (idRepo == -1 || !checksum.Equals(reposum))
  269
+  if (!checksum.Equals(reposum) || checksum.empty())
270 270
   {
271 271
     addons = repo->Parse();
272  
-    if (!addons.empty())
273  
-      database.AddRepository(repo->ID(),addons,reposum);
274  
-    else
  272
+    if (addons.empty())
  273
+    {
275 274
       CLog::Log(LOGERROR,"Repository %s returned no add-ons, listing may have failed",repo->Name().c_str());
  275
+      reposum = checksum; // don't update the checksum
  276
+    }
  277
+    database.AddRepository(repo->ID(),addons,reposum);
276 278
   }
277 279
   else
278 280
     database.GetRepository(repo->ID(),addons);

0 notes on commit 626fb22

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