Primary key string

This commit is contained in:
Timothy Baldridge 2020-01-10 06:25:01 -07:00
parent a1258b5ea9
commit bac5e958bf
2 changed files with 13 additions and 2 deletions

View File

@ -19,7 +19,7 @@ namespace Wabbajack.BuildServer.Models.Jobs
public class IndexJob : AJobPayload
{
public Archive Archive { get; set; }
public override string Description => $"Index ${Archive.State.PrimaryKey} and save the download/file state";
public override string Description => $"Index ${Archive.State.PrimaryKeyString} and save the download/file state";
public override bool UsesNexus { get => Archive.State is NexusDownloader.State; }
public override async Task<JobResult> Execute(DBContext db, AppSettings settings)
{

View File

@ -35,7 +35,18 @@ namespace Wabbajack.Lib.Downloaders
}
public abstract object[] PrimaryKey { get; }
public string PrimaryKeyString
{
get
{
var pk = new List<object>();
pk.Add(AbstractDownloadState.TypeToName[GetType()]);
pk.AddRange(PrimaryKey);
var pk_str = string.Join("|",pk.Select(p => p.ToString()));
return pk_str;
}
}
/// <summary>