31 lines
No EOL
869 B
C#
31 lines
No EOL
869 B
C#
using JellyGlass.Models.JellyfinApi;
|
|
|
|
namespace JellyGlass.Models;
|
|
|
|
public class ItemDTO
|
|
{
|
|
public ItemDTO() { }
|
|
|
|
public ItemDTO(Item item, string ServerUrl)
|
|
{
|
|
ID = item.Id;
|
|
Name = item.Name;
|
|
ServerID = item.ServerId;
|
|
this.ServerUrl = ServerUrl;
|
|
Type = item.Type;
|
|
Index = item.IndexNumber;
|
|
ParentId = item.ParentId;
|
|
ThumbnailUrl = $"{this.ServerUrl}/Items/{ID}/Images/Primary";
|
|
ProductionYear = item.ProductionYear.ToString();
|
|
}
|
|
|
|
public string ID { get; set; } = string.Empty;
|
|
public string Name { get; set; } = string.Empty;
|
|
public string ServerID { get; set; } = string.Empty;
|
|
public string ServerUrl { get; set; } = string.Empty;
|
|
public string Type { get; set; } = string.Empty;
|
|
public int? Index { get; set; }
|
|
public string? ParentId { get; set; }
|
|
public string? ThumbnailUrl { get; set; }
|
|
public string? ProductionYear { get; set; }
|
|
} |