Merge pull request #4513 from BaronGreenback/LatestPluginSelected

Multi-repository plugins
This commit is contained in:
Joshua M. Boniface
2020-11-21 17:18:19 -05:00
committed by GitHub
7 changed files with 128 additions and 31 deletions

View File

@@ -50,17 +50,7 @@ namespace MediaBrowser.Model.Updates
/// Gets or sets the versions.
/// </summary>
/// <value>The versions.</value>
public IReadOnlyList<VersionInfo> versions { get; set; }
/// <summary>
/// Gets or sets the repository name.
/// </summary>
public string repositoryName { get; set; }
/// <summary>
/// Gets or sets the repository url.
/// </summary>
public string repositoryUrl { get; set; }
public IList<VersionInfo> versions { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="PackageInfo"/> class.

View File

@@ -16,5 +16,11 @@ namespace MediaBrowser.Model.Updates
/// </summary>
/// <value>The URL.</value>
public string? Url { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the repository is enabled.
/// </summary>
/// <value><c>true</c> if enabled.</value>
public bool Enabled { get; set; } = true;
}
}

View File

@@ -9,11 +9,29 @@ namespace MediaBrowser.Model.Updates
/// </summary>
public class VersionInfo
{
private Version _version;
/// <summary>
/// Gets or sets the version.
/// </summary>
/// <value>The version.</value>
public string version { get; set; }
public string version
{
get
{
return _version == null ? string.Empty : _version.ToString();
}
set
{
_version = Version.Parse(value);
}
}
/// <summary>
/// Gets the version as a <see cref="Version"/>.
/// </summary>
public Version VersionNumber => _version;
/// <summary>
/// Gets or sets the changelog for this version.
@@ -44,5 +62,15 @@ namespace MediaBrowser.Model.Updates
/// </summary>
/// <value>The timestamp.</value>
public string timestamp { get; set; }
/// <summary>
/// Gets or sets the repository name.
/// </summary>
public string repositoryName { get; set; }
/// <summary>
/// Gets or sets the repository url.
/// </summary>
public string repositoryUrl { get; set; }
}
}