Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed: all add-ons got duplicated in the addon table #6652

Merged
merged 2 commits into from
Mar 8, 2015

Conversation

opdenkamp
Copy link
Member

PR #6568 deleted all repo entries from the db, but didn't delete the add-ons. This leads to a dupe of each add-on when upgrading from an older version, as the repo gets inserted another time, including all it's add-ons.

Fixed by defaulting to version 0.0.0, which just triggers an update.

ping @tamland @mkortstiege @MartijnKaijser

@opdenkamp
Copy link
Member Author

this won't fix the issue for anyone who upgraded in the meantime by running a nightly or compiling from source. those will have to delete ~/.kodi/userdata/Database/Addons17.db

@opdenkamp opdenkamp added Type: Fix non-breaking change which fixes an issue v15 Isengard labels Mar 8, 2015
@tamland
Copy link
Member

tamland commented Mar 8, 2015

I don't think it certainly create duplicates though. I haven't been able to reproduce it so far, I'm not sure what the exact conditions are, but I guess that line is still wrong.

Can't you rather bump version and add a special case for v17 that clears the addons table though? So people don't have to delete it manually.

@opdenkamp
Copy link
Member Author

sure, will add the bump.
The conditions are starting Helix, do a refresh of the add-ons if it doesn't happen automatically, then close it. Then start current master and do the same thing, and go to "Get add-ons" and pick a category. This resulted in a dupe of each add-on here, and afaict this will happen always and for everyone.

@opdenkamp
Copy link
Member Author

updated the PR to remove the dupes, but only if the user was running db version 17.
fixed the local add-ons showing up in the get add-ons one.

jenkins build this please

@@ -324,7 +328,7 @@ bool CAddonDatabase::GetAddons(VECADDONS& addons, const ADDON::TYPE &type /* = A
if (NULL == m_pDB.get()) return false;
if (NULL == m_pDS2.get()) return false;

std::string sql = PrepareSQL("select distinct addonID from addon");
std::string sql = PrepareSQL("SELECT DISTINCT a.addonID FROM addon a, addonlinkrepo b WHERE b.idRepo > 0 AND a.id = b.idAddon");

This comment was marked as spam.

This comment was marked as spam.

@opdenkamp
Copy link
Member Author

build failure unrelated

opdenkamp pushed a commit that referenced this pull request Mar 8, 2015
fixed: all add-ons got duplicated in the addon table
@opdenkamp opdenkamp merged commit 498f5e7 into xbmc:master Mar 8, 2015
@opdenkamp opdenkamp deleted the fixdupeaddons branch March 8, 2015 23:10
@MartijnKaijser MartijnKaijser modified the milestone: I******* 15.0-alpha2 Mar 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Fix non-breaking change which fixes an issue v15 Isengard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants