mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: don't use URL to indicate official repo plugins
This commit is contained in:
parent
4fd1f7a22f
commit
75885311f2
3 changed files with 9 additions and 4 deletions
|
|
@ -763,7 +763,7 @@ internal partial class PluginManager : IDisposable, IServiceType
|
|||
}
|
||||
|
||||
// Document the url the plugin was installed from
|
||||
manifest.InstalledFromUrl = repoManifest.SourceRepo.PluginMasterUrl;
|
||||
manifest.InstalledFromUrl = repoManifest.SourceRepo.IsThirdParty ? repoManifest.SourceRepo.PluginMasterUrl : LocalPluginManifest.FlagMainRepo;
|
||||
|
||||
manifest.Save(manifestFile);
|
||||
|
||||
|
|
|
|||
|
|
@ -217,8 +217,10 @@ internal class LocalPlugin : IDisposable
|
|||
/// <summary>
|
||||
/// Gets a value indicating whether or not this plugin is orphaned(belongs to a repo) or not.
|
||||
/// </summary>
|
||||
public bool IsOrphaned => !this.IsDev && !this.Manifest.InstalledFromUrl.IsNullOrEmpty() &&
|
||||
Service<PluginManager>.Get().Repos.All(x => x.PluginMasterUrl != this.Manifest.InstalledFromUrl);
|
||||
public bool IsOrphaned => !this.IsDev &&
|
||||
!this.Manifest.InstalledFromUrl.IsNullOrEmpty() && // TODO(api8): Remove this, all plugins will have a proper flag
|
||||
Service<PluginManager>.Get().Repos.All(x => x.PluginMasterUrl != this.Manifest.InstalledFromUrl) &&
|
||||
this.Manifest.InstalledFromUrl != LocalPluginManifest.FlagMainRepo;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this plugin has been banned.
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ namespace Dalamud.Plugin.Internal.Types;
|
|||
/// </summary>
|
||||
internal record LocalPluginManifest : PluginManifest
|
||||
{
|
||||
[JsonIgnore]
|
||||
public const string FlagMainRepo = "OFFICIAL";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the plugin is disabled and should not be loaded.
|
||||
/// This value supersedes the ".disabled" file functionality and should not be included in the plugin master.
|
||||
|
|
@ -40,7 +43,7 @@ internal record LocalPluginManifest : PluginManifest
|
|||
/// Gets a value indicating whether this manifest is associated with a plugin that was installed from a third party
|
||||
/// repo. Unless the manifest has been manually modified, this is determined by the InstalledFromUrl being null.
|
||||
/// </summary>
|
||||
public bool IsThirdParty => !this.InstalledFromUrl.IsNullOrEmpty() && this.InstalledFromUrl != PluginRepository.MainRepoUrl;
|
||||
public bool IsThirdParty => !this.InstalledFromUrl.IsNullOrEmpty() && this.InstalledFromUrl != FlagMainRepo;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the effective version of this plugin.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue