mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Merge branch 'fix_update'
This commit is contained in:
commit
ea9ce0d776
1 changed files with 1 additions and 12 deletions
|
|
@ -800,24 +800,15 @@ namespace Dalamud.Plugin.Internal
|
||||||
{
|
{
|
||||||
var updatablePlugins = new List<AvailablePluginUpdate>();
|
var updatablePlugins = new List<AvailablePluginUpdate>();
|
||||||
|
|
||||||
if (!this.ReposReady)
|
|
||||||
throw new Exception("Plugin updates can only be detected when repos are available.");
|
|
||||||
|
|
||||||
// Collect all outdated and current plugin manifests
|
|
||||||
var remoteManifests =
|
|
||||||
this.Repos.SelectMany(x => x.PluginMaster).Where(x => x.DalamudApiLevel <= DalamudApiLevel).ToList();
|
|
||||||
|
|
||||||
for (var i = 0; i < this.installedPlugins.Count; i++)
|
for (var i = 0; i < this.installedPlugins.Count; i++)
|
||||||
{
|
{
|
||||||
var plugin = this.installedPlugins[i];
|
var plugin = this.installedPlugins[i];
|
||||||
|
|
||||||
Log.Debug($"Checking plugin updates for {plugin.Manifest.InternalName}");
|
|
||||||
|
|
||||||
var installedVersion = plugin.IsTesting
|
var installedVersion = plugin.IsTesting
|
||||||
? plugin.Manifest.TestingAssemblyVersion
|
? plugin.Manifest.TestingAssemblyVersion
|
||||||
: plugin.Manifest.AssemblyVersion;
|
: plugin.Manifest.AssemblyVersion;
|
||||||
|
|
||||||
var updates = remoteManifests
|
var updates = this.availablePlugins
|
||||||
.Where(remoteManifest => plugin.Manifest.InternalName == remoteManifest.InternalName)
|
.Where(remoteManifest => plugin.Manifest.InternalName == remoteManifest.InternalName)
|
||||||
.Select(remoteManifest =>
|
.Select(remoteManifest =>
|
||||||
{
|
{
|
||||||
|
|
@ -827,8 +818,6 @@ namespace Dalamud.Plugin.Internal
|
||||||
: remoteManifest.AssemblyVersion;
|
: remoteManifest.AssemblyVersion;
|
||||||
var isUpdate = candidateVersion > installedVersion;
|
var isUpdate = candidateVersion > installedVersion;
|
||||||
|
|
||||||
Log.Debug($" => {remoteManifest.InternalName} from {remoteManifest.SourceRepo.PluginMasterUrl} - candidate: {candidateVersion} installed: {installedVersion}");
|
|
||||||
|
|
||||||
return (isUpdate, useTesting, candidateVersion, remoteManifest);
|
return (isUpdate, useTesting, candidateVersion, remoteManifest);
|
||||||
})
|
})
|
||||||
.Where(tpl => tpl.isUpdate)
|
.Where(tpl => tpl.isUpdate)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue