wabbajack/Wabbajack.DTOs/DownloadStates/Nexus.cs

35 lines
999 B
C#
Raw Permalink Normal View History

2021-09-27 12:42:46 +00:00
using System;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using Wabbajack.DTOs.JsonConverters;
2021-10-23 16:51:17 +00:00
namespace Wabbajack.DTOs.DownloadStates;
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
[JsonAlias("Nexus")]
[JsonName("NexusDownloader, Wabbajack.Lib")]
public class Nexus : ADownloadState, IMetaState
{
[JsonPropertyName("GameName")] public Game Game { get; set; }
public long ModID { get; set; }
public long FileID { get; set; }
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
public override string TypeName => "NexusDownloader+State";
public override object[] PrimaryKey => new object[] {Game, ModID, FileID};
public string? Name { get; set; }
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
public string? Author { get; set; }
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
public string? Version { get; set; }
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
public Uri? ImageURL { get; set; }
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
public bool IsNSFW { get; set; }
2021-09-27 12:42:46 +00:00
2021-10-23 16:51:17 +00:00
public string? Description { get; set; }
2021-12-27 05:53:39 +00:00
public Uri? LinkUrl => new($"https://www.nexusmods.com/{Game.MetaData().NexusName}/mods/{ModID}");
2021-09-27 12:42:46 +00:00
2022-10-07 20:41:45 +00:00
public Task<bool> LoadMetaData()
2021-10-23 16:51:17 +00:00
{
2022-10-07 20:41:45 +00:00
return Task.FromResult(false);
2021-09-27 12:42:46 +00:00
}
}