xbmc: eep old repo content if update fails

should fix empty repos
This commit is contained in:
Stefan Saraev 2013-09-11 23:00:01 +03:00
parent d740a01d82
commit 89d4a4f9bc

View File

@ -0,0 +1,24 @@
From 6a4d9b842a29fa9b0c233517826baffe5caec0cb Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Wed, 11 Sep 2013 22:52:10 +0300
Subject: [PATCH] keep old repo content if update fails
---
xbmc/addons/Repository.cpp | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/xbmc/addons/Repository.cpp b/xbmc/addons/Repository.cpp
index 0958d47..77b1d9a 100644
--- a/xbmc/addons/Repository.cpp
+++ b/xbmc/addons/Repository.cpp
@@ -273,6 +273,7 @@ VECADDONS CRepositoryUpdateJob::GrabAddons(RepositoryPtr& repo)
{
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.GetRepository(repo->ID(),addons); // keep old addons
}
database.AddRepository(repo->ID(),addons,reposum);
}
--
1.7.2.5