mirror of
https://github.com/Crunchy-DL/Crunchy-Downloader.git
synced 2026-01-11 20:10:26 +00:00
- Added basic **poster (tall and wide) download** for history series - Changed **download list** so that episode titles are highlighted if possibly all dubs/subs are available
98 lines
2.4 KiB
C#
98 lines
2.4 KiB
C#
using System.Collections.Generic;
|
|
using CRD.Downloader.Crunchyroll;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace CRD.Utils.Structs.Crunchyroll;
|
|
|
|
public class PlaybackData{
|
|
public int Total{ get; set; }
|
|
public Dictionary<string, StreamDetails>? Data{ get; set; }
|
|
public PlaybackMeta? Meta{ get; set; }
|
|
}
|
|
|
|
public class StreamDetails{
|
|
[JsonProperty("hardsub_locale")]
|
|
public Locale? HardsubLocale{ get; set; }
|
|
|
|
public List<UrlWithAuth> Url{ get; set; }
|
|
|
|
[JsonProperty("hardsub_lang")]
|
|
public required LanguageItem HardsubLang{ get; set; }
|
|
|
|
public bool IsHardsubbed{ get; set; }
|
|
|
|
[JsonProperty("audio_lang")]
|
|
public string? AudioLang{ get; set; }
|
|
|
|
public string? Type{ get; set; }
|
|
}
|
|
|
|
public class UrlWithAuth{
|
|
|
|
public CrAuth? CrAuth{ get; set; }
|
|
|
|
public string? Url{ get; set; }
|
|
|
|
}
|
|
|
|
public class StreamDetailsPop{
|
|
public Locale? HardsubLocale{ get; set; }
|
|
public List<UrlWithAuth> Url{ get; set; }
|
|
public required LanguageItem HardsubLang{ get; set; }
|
|
|
|
public bool IsHardsubbed{ get; set; }
|
|
|
|
public required LanguageItem AudioLang{ get; set; }
|
|
public string? Type{ get; set; }
|
|
public string? Format{ get; set; }
|
|
}
|
|
|
|
public class PlaybackMeta{
|
|
[JsonProperty("media_id")]
|
|
public string? MediaId{ get; set; }
|
|
|
|
public Subtitles? Subtitles{ get; set; }
|
|
public List<string>? Bifs{ get; set; }
|
|
public List<PlaybackVersion>? Versions{ get; set; }
|
|
|
|
[JsonProperty("audio_locale")]
|
|
public LanguageItem AudioLocale{ get; set; }
|
|
|
|
[JsonProperty("closed_captions")]
|
|
public Subtitles? ClosedCaptions{ get; set; }
|
|
|
|
public Dictionary<string, Caption>? Captions{ get; set; }
|
|
|
|
public string? Token{ get; set; }
|
|
}
|
|
|
|
public class SubtitleInfo{
|
|
public string? Format{ get; set; }
|
|
public Locale? Locale{ get; set; }
|
|
public string? Url{ get; set; }
|
|
}
|
|
|
|
public class CrunchyStreams : Dictionary<string, StreamDetails>;
|
|
|
|
public class Subtitles : Dictionary<string, SubtitleInfo>;
|
|
|
|
public class PlaybackVersion{
|
|
[JsonProperty("audio_locale")]
|
|
public Locale AudioLocale{ get; set; } // Assuming Locale is defined elsewhere
|
|
|
|
public string? Guid{ get; set; }
|
|
|
|
[JsonProperty("is_premium_only")]
|
|
public bool IsPremiumOnly{ get; set; }
|
|
|
|
[JsonProperty("media_guid")]
|
|
public string? MediaGuid{ get; set; }
|
|
|
|
public bool Original{ get; set; }
|
|
|
|
[JsonProperty("season_guid")]
|
|
public string? SeasonGuid{ get; set; }
|
|
|
|
public string? Variant{ get; set; }
|
|
}
|
|
|