Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
Jonathan Marshall authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 xbmc/addons/Repository.cpp
View
10 xbmc/addons/Repository.cpp
@@ -266,13 +266,15 @@ VECADDONS CRepositoryUpdateJob::GrabAddons(RepositoryPtr& repo)
int idRepo = database.GetRepoChecksum(repo->ID(),checksum);
CStdString reposum = repo->Checksum();
VECADDONS addons;
- if (idRepo == -1 || !checksum.Equals(reposum))
+ if (!checksum.Equals(reposum) || checksum.empty())
{
addons = repo->Parse();
- if (!addons.empty())
- database.AddRepository(repo->ID(),addons,reposum);
- else
+ if (addons.empty())
+ {
CLog::Log(LOGERROR,"Repository %s returned no add-ons, listing may have failed",repo->Name().c_str());
+ reposum = checksum; // don't update the checksum
+ }
+ database.AddRepository(repo->ID(),addons,reposum);
}
else
database.GetRepository(repo->ID(),addons);
Please sign in to comment.
Something went wrong with that request. Please try again.