Skip to content

Commit

Permalink
force empty repository refresh on browse
Browse files Browse the repository at this point in the history
  • Loading branch information
mkortstiege authored and popcornmix committed Jun 23, 2015
1 parent 30bd8d2 commit 9fdc179
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xbmc/filesystem/AddonsDirectory.cpp
Expand Up @@ -332,10 +332,12 @@ static bool Browse(const CURL& path, CFileItemList &items)
AddonPtr addon;
if (!CAddonMgr::Get().GetAddon(repo, addon, ADDON_REPOSITORY))
return false;
//Wait for runnig update to complete
CAddonInstaller::Get().UpdateRepos(false, true);
CAddonDatabase database;
database.Open();
// force update in case the repository timestamp is empty or invalid.
// wait for runnig update to complete otherwise.
CDateTime lastUpdate = database.GetRepoTimestamp(addon->ID());
CAddonInstaller::Get().UpdateRepos(!lastUpdate.IsValid(), true);
if (!database.GetRepository(addon->ID(), addons))
return false;
items.SetProperty("reponame", addon->Name());
Expand Down

0 comments on commit 9fdc179

Please sign in to comment.