mirror of
https://github.com/Crunchy-DL/Crunchy-Downloader.git
synced 2026-04-19 07:52:06 +00:00
Add - Added **completion sound** when downloads finish, allowing a specified sound to be played Add - Added **changelog** for easier tracking of changes and updates Add - Added **Retry button** to reset all failed downloads, allowing "Auto Download" to restart them Add - Added **dub/sub info** to the Upcoming tab Chg - Changed **history table view** to include missing features from the poster view Chg - Changed and **adjusted error messages** Chg - Changed **chapters formatting** for consistent output across locales Chg - Changed **Clear Queue** button to icon-only Chg - Changed **update button** behavior Chg - Changed some **error messages** for better debugging Chg - Changed **history series access**, now allowing it to open while others are refreshing Chg - Changed **device ID reuse** to fix continuous login emails Chg - Changed **authentication log** to write the full message for better debugging Chg - Updated **dependencies** Fix - Temporary fix for **authentication issues** Fix - Fixed **unable to download movies** [#237](https://github.com/Crunchy-DL/Crunchy-Downloader/issues/237) Fix - Fixed **buggy queue behavior** during active downloads Fix - Fixed **duplicate seasons in history** when adding multiple episodes from the calendar Fix - Fixed crash if **all** subtitles option is selected Fix - Fixed "**Cannot set download directory to Drive**" https://github.com/Crunchy-DL/Crunchy-Downloader/issues/220 Fix - Fixed missing **subtitles and none subs** for some series
159 lines
No EOL
4 KiB
C#
159 lines
No EOL
4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Avalonia.Media.Imaging;
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace CRD.Utils.Structs;
|
|
|
|
public partial class AnilistSeries : ObservableObject{
|
|
public int Id{ get; set; }
|
|
public int? IdMal{ get; set; }
|
|
public Title Title{ get; set; }
|
|
public Date? StartDate{ get; set; }
|
|
public Date EndDate{ get; set; }
|
|
public string Status{ get; set; }
|
|
public string Season{ get; set; }
|
|
public string Format{ get; set; }
|
|
public List<string> Genres{ get; set; }
|
|
public List<string> Synonyms{ get; set; }
|
|
public int? Duration{ get; set; }
|
|
public int Popularity{ get; set; }
|
|
public int? Episodes{ get; set; }
|
|
public string Source{ get; set; }
|
|
public string CountryOfOrigin{ get; set; }
|
|
public string Hashtag{ get; set; }
|
|
public int? AverageScore{ get; set; }
|
|
public string SiteUrl{ get; set; }
|
|
public string Description{ get; set; }
|
|
public string BannerImage{ get; set; }
|
|
public bool IsAdult{ get; set; }
|
|
public CoverImage CoverImage{ get; set; }
|
|
public Trailer Trailer{ get; set; }
|
|
public List<ExternalLink>? ExternalLinks{ get; set; }
|
|
public List<Ranking> Rankings{ get; set; }
|
|
public Studios Studios{ get; set; }
|
|
public Relations Relations{ get; set; }
|
|
public AiringSchedule AiringSchedule{ get; set; }
|
|
|
|
[JsonIgnore]
|
|
public Bitmap? ThumbnailImage{ get; set; }
|
|
|
|
[JsonIgnore]
|
|
public string StartDateForm{
|
|
get{
|
|
if (StartDate == null)
|
|
return string.Empty;
|
|
|
|
|
|
var cultureInfo = System.Globalization.CultureInfo.InvariantCulture;
|
|
string monthAbbreviation = cultureInfo.DateTimeFormat.GetAbbreviatedMonthName(StartDate.Month);
|
|
|
|
return string.Format("{0:00}.{1}.{2}", StartDate.Day, monthAbbreviation, StartDate.Year);
|
|
}
|
|
}
|
|
|
|
|
|
[JsonIgnore]
|
|
public string? CrunchyrollID;
|
|
|
|
[JsonIgnore]
|
|
[ObservableProperty]
|
|
public bool _hasCrID;
|
|
|
|
[JsonIgnore]
|
|
[ObservableProperty]
|
|
public bool _isInHistory;
|
|
|
|
[ObservableProperty]
|
|
public bool _isExpanded;
|
|
|
|
[JsonIgnore]
|
|
public List<string> AudioLocales{ get; set; } =[];
|
|
|
|
[JsonIgnore]
|
|
public List<string> SubtitleLocales{ get; set; } =[];
|
|
|
|
}
|
|
|
|
public class Title{
|
|
public string Romaji{ get; set; }
|
|
public string Native{ get; set; }
|
|
public string English{ get; set; }
|
|
}
|
|
|
|
public class Date{
|
|
public int Year{ get; set; }
|
|
public int Month{ get; set; }
|
|
public int Day{ get; set; }
|
|
|
|
public DateTime? ToDateTime(){
|
|
if (Year == 0 || Month == 0 || Day == 0)
|
|
return DateTime.MinValue;
|
|
|
|
try{
|
|
return new DateTime(Year, Month, Day);
|
|
} catch{
|
|
return DateTime.MinValue;;
|
|
}
|
|
}
|
|
}
|
|
|
|
public class CoverImage{
|
|
public string ExtraLarge{ get; set; }
|
|
public string Color{ get; set; }
|
|
}
|
|
|
|
public class Trailer{
|
|
public string Id{ get; set; }
|
|
public string Site{ get; set; }
|
|
public string Thumbnail{ get; set; }
|
|
}
|
|
|
|
public class ExternalLink{
|
|
public string Site{ get; set; }
|
|
public string Icon{ get; set; }
|
|
public string Color{ get; set; }
|
|
public string Url{ get; set; }
|
|
}
|
|
|
|
public class Ranking{
|
|
public int Rank{ get; set; }
|
|
public string Type{ get; set; }
|
|
public string Season{ get; set; }
|
|
public bool AllTime{ get; set; }
|
|
}
|
|
|
|
public class Studios{
|
|
public List<StudioNode> Nodes{ get; set; }
|
|
}
|
|
|
|
public class StudioNode{
|
|
public int Id{ get; set; }
|
|
public string Name{ get; set; }
|
|
public string SiteUrl{ get; set; }
|
|
}
|
|
|
|
public class Relations{
|
|
public List<RelationEdge> Edges{ get; set; }
|
|
}
|
|
|
|
public class RelationEdge{
|
|
public string RelationType{ get; set; }
|
|
public RelationNode Node{ get; set; }
|
|
}
|
|
|
|
public class RelationNode{
|
|
public int Id{ get; set; }
|
|
public Title Title{ get; set; }
|
|
public string SiteUrl{ get; set; }
|
|
}
|
|
|
|
public class AiringSchedule{
|
|
public List<AiringNode> Nodes{ get; set; }
|
|
}
|
|
|
|
public class AiringNode{
|
|
public int Episode{ get; set; }
|
|
public long AiringAt{ get; set; }
|
|
} |