Skip to content

Commit

Permalink
force repository update in post-install/uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
mkortstiege authored and popcornmix committed Jun 26, 2015
1 parent 99620b8 commit c8af77f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions xbmc/addons/Repository.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,20 @@ bool CRepository::Parse(const DirInfo& dir, VECADDONS &result)
return false;
}

void CRepository::OnPostInstall(bool update, bool modal)
{
// force refresh of addon repositories
CAddonInstaller::Get().UpdateRepos(true, false, true);
}

void CRepository::OnPostUnInstall()
{
CAddonDatabase database;
database.Open();
database.DeleteRepository(ID());

// force refresh of addon repositories
CAddonInstaller::Get().UpdateRepos(true, false, true);
}

CRepositoryUpdateJob::CRepositoryUpdateJob(const VECADDONS &repos)
Expand Down
1 change: 1 addition & 0 deletions xbmc/addons/Repository.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ namespace ADDON
static bool Parse(const DirInfo& dir, VECADDONS& addons);
static std::string FetchChecksum(const std::string& url);

virtual void OnPostInstall(bool update, bool modal);
virtual void OnPostUnInstall();

private:
Expand Down

0 comments on commit c8af77f

Please sign in to comment.