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

Modlist dosen't update if new AD mods are detected #2761

Closed
DasSkelett opened this issue May 14, 2019 · 1 comment · Fixed by #2762
Closed

Modlist dosen't update if new AD mods are detected #2761

DasSkelett opened this issue May 14, 2019 · 1 comment · Fixed by #2762
Assignees
Labels
GUI Issues affecting the interactive GUI Registry Issues affecting the registry

Comments

@DasSkelett
Copy link
Member

Background

CKAN Version:
v1.26.3

Have you made any manual changes to your GameData folder (i.e., not via CKAN)?
Yes!

Problem

What steps did you take in CKAN?

  1. Open CKAN GUI
  2. Install mod manually in the GameData folder
  3. Click Refresh

What did you expect to happen?
CKAN recognizes the newly installed mod and marks it as AD.

What happened instead?
CKAN doesn't recognize the mod. It doesn't scan for autoinstalled if it doesn't fetch from the metadata repo, that points towards #2682 being the cause of this.
After a restart of CKAN the AD mods show up.

Possible solutions

  1. Don't skip the GameData scan if the the download is skipped.
  2. Add a way to force a refresh of the modlist / to scan the KSP directory for AD mods in the GUI, similar to the console command scan.
@DasSkelett DasSkelett added Enhancement GUI Issues affecting the interactive GUI Registry Issues affecting the registry Bug and removed Enhancement labels May 14, 2019
@HebaruSan
Copy link
Member

The scan does happen, in the foreground:

CKAN/GUI/MainRepo.cs

Lines 29 to 46 in e5b1097

public void UpdateRepo()
{
tabController.RenameTab("WaitTabPage", "Updating repositories");
CurrentInstance.ScanGameData();
try
{
m_UpdateRepoWorker.RunWorkerAsync();
}
catch { }
Util.Invoke(this, SwitchEnabledState);
SetDescription("Contacting repository..");
ClearLog();
ShowWaitDialog();
}

... but if the repo isn't changed, we don't call UpdateModsList. So the AD mods are in your registry, just not in the mod list. Ideas:

  • Make KSP.ScanGameData return an indication of whether it made changes
  • Move it to the background worker
  • Update the background worker's return value to indicate a refresh is needed if the scan finds something

@DasSkelett DasSkelett changed the title Ability to force a modlist update / scanning AD mods in GUI Modlist dosen't update if new AD mods are detected May 14, 2019
@Olympic1 Olympic1 removed the Bug label May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI Issues affecting the interactive GUI Registry Issues affecting the registry
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants