Skip to content

Commit

Permalink
Drop support for 0.9.0 and lower
Browse files Browse the repository at this point in the history
Add summary support
Add tank api provider
Add suggestion tags feature
Reorganize archive's special tags
  • Loading branch information
Guerra24 committed Jul 26, 2024
1 parent 9bd4e23 commit 941a265
Show file tree
Hide file tree
Showing 26 changed files with 446 additions and 218 deletions.
12 changes: 6 additions & 6 deletions LRReader.Shared/Models/Main/Archive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ public class Archive : IEquatable<Archive>
public string title { get; set; } = null!;
public int pagecount { get; set; }
public int progress { get; set; }
public long? lastreadtime { get; set; } // 0.9.0
public long lastreadtime { get; set; }

[JsonIgnore]
public string LastReadTimeString => lastreadtime == null ? "" : DateTimeOffset.FromUnixTimeSeconds((long)lastreadtime).ToLocalTime().ToString();
public string LastReadTimeString => DateTimeOffset.FromUnixTimeSeconds(lastreadtime).ToLocalTime().ToString();

public long? size { get; set; } // 0.9.10
public long size { get; set; }

[JsonIgnore]
public string SizeString => size == null ? "" : string.Format("{0:n2} MB", size / 1024f / 1024f);
public string SizeString => string.Format("{0:n2} MB", size / 1024f / 1024f);

public string? filename { get; set; } // 0.9.10
public string filename { get; set; } = null!;

public string? summary { get; set; } // 0.9.10
public string summary { get; set; } = null!;

[JsonIgnore]
public string TagsClean { get; set; } = null!;
Expand Down
19 changes: 7 additions & 12 deletions LRReader.Shared/Models/Main/Tags.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@

namespace LRReader.Shared.Models.Main
namespace LRReader.Shared.Models.Main;

public class TagStats
{
public class TagStats
{
public string @namespace { get; set; } = null!;
public string text { get; set; } = null!;
public int weight { get; set; }
public string @namespace { get; set; } = null!;
public string text { get; set; } = null!;
public int weight { get; set; }

public string GetNamespacedTag()
{
return string.IsNullOrEmpty(@namespace) ? text : @namespace + ":" + text;
}
}
public string GetNamespacedTag() => string.IsNullOrEmpty(@namespace) ? text : @namespace + ":" + text;
}
31 changes: 31 additions & 0 deletions LRReader.Shared/Models/Main/Tankoubons.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System.Collections.Generic;

namespace LRReader.Shared.Models.Main
{
public class Tankoubons
{
public List<string> archives { get; set; } = null!;
public string id { get; set; } = null!;
public string name { get; set; } = null!;
public List<Archive>? full_data { get; set; }
}

public class TankoubonsList
{
public List<Tankoubons> result { get; set; } = null!;
public int filtered { get; set; }
public int total { get; set; }
}

public class TankoubonsItem
{
public Tankoubons result { get; set; } = null!;
public int filtered { get; set; }
public int total { get; set; }
}

public class ArchiveTankoubons : GenericApiResult
{
public List<string> tankoubons { get; set; } = null!;
}
}
Loading

0 comments on commit 941a265

Please sign in to comment.