mirror of
https://github.com/Crunchy-DL/Crunchy-Downloader.git
synced 2026-01-11 20:10:26 +00:00
Add - Added **Sonarr season/episode numbers** to the history view Add - Added option to **match episodes to Sonarr episodes** to correct mismatches Add - Added **button to rematch all Sonarr episodes** Add - Added an **optional secondary endpoint** Chg - Changed **changelog heading sizes** Chg - Changed Sonarr matching to only process **new or unmatched episodes** Chg - Changed logic to **request audio license keys only when needed** Fix - Fixed **Sonarr series manual matching dialog**
89 lines
2.3 KiB
C#
89 lines
2.3 KiB
C#
using System.Collections.Generic;
|
|
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<string?> 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 StreamDetailsPop{
|
|
public Locale? HardsubLocale{ get; set; }
|
|
public List<string?> 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; }
|
|
}
|
|
|