Crunchy-Downloader/CRD/Utils/Structs/Crunchyroll/CrProfile.cs
Elwador 985fd9c00f Added **tray icon** [#393](https://github.com/Crunchy-DL/Crunchy-Downloader/issues/393).
Added **ability to switch between account profiles** [#372](https://github.com/Crunchy-DL/Crunchy-Downloader/issues/372).
Added option to **execute a file when the download queue finishes** [#392](https://github.com/Crunchy-DL/Crunchy-Downloader/issues/392).
Added **auto history refresh / auto add to queue** [#394](https://github.com/Crunchy-DL/Crunchy-Downloader/issues/394).
Changed **font loading** to also include fonts from the local fonts folder that are not available on Crunchyroll [#371](https://github.com/Crunchy-DL/Crunchy-Downloader/issues/371).
Updated packages to latest versions
Fixed **history not being saved** after it was updated via the calendar
Fixed **Downloaded toggle in history** being slow for large seasons
2026-03-04 18:17:28 +01:00

124 lines
No EOL
3.9 KiB
C#

using System;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace CRD.Utils.Structs.Crunchyroll;
public class CrMultiProfile{
[JsonProperty("tier_max_profiles")]
public int? TierMaxProfiles{ get; set; }
[JsonProperty("max_profiles")]
public int? MaxProfiles{ get; set; }
[JsonProperty("profiles")]
public List<CrProfile> Profiles{ get; set; } = [];
}
public class CrProfile{
public string? Avatar{ get; set; }
public string? Email{ get; set; }
public string? Username{ get; set; }
[JsonProperty("profile_name")]
public string? ProfileName{ get; set; }
[JsonProperty("profile_id")]
public string? ProfileId{ get; set; }
[JsonProperty("preferred_content_audio_language")]
public string? PreferredContentAudioLanguage{ get; set; }
[JsonProperty("preferred_content_subtitle_language")]
public string? PreferredContentSubtitleLanguage{ get; set; }
[JsonProperty("can_switch")]
public bool CanSwitch{ get; set; }
[JsonProperty("is_selected")]
public bool IsSelected{ get; set; }
[JsonProperty("is_pin_protected")]
public bool IsPinProtected{ get; set; }
[JsonIgnore]
public bool HasPremium{ get; set; }
}
public class Subscription{
[JsonProperty("account_id")]
public int AccountId{ get; set; }
[JsonProperty("ctp_account_id")]
public string? CtpAccountId{ get; set; }
[JsonProperty("cycle_duration")]
public string? CycleDuration{ get; set; }
[JsonProperty("next_renewal_date")]
public DateTime NextRenewalDate{ get; set; }
[JsonProperty("currency_code")]
public string? CurrencyCode{ get; set; }
[JsonProperty("is_active")]
public bool IsActive{ get; set; }
[JsonProperty("tax_included")]
public bool TaxIncluded{ get; set; }
[JsonProperty("subscription_products")]
public List<SubscriptionProduct>? SubscriptionProducts{ get; set; }
[JsonProperty("third_party_subscription_products")]
public List<ThirdPartySubscriptionProduct>? ThirdPartySubscriptionProducts{ get; set; }
[JsonProperty("nonrecurring_subscription_products")]
public List<NonRecurringSubscriptionProduct>? NonrecurringSubscriptionProducts{ get; set; }
[JsonProperty("funimation_subscriptions")]
public List<object>? FunimationSubscriptions{ get; set; }
}
public class NonRecurringSubscriptionProduct{
[JsonProperty("start_date")]
public DateTime StartDate{ get; set; }
[JsonProperty("end_date")]
public DateTime EndDate{ get; set; }
public string? Sku{ get; set; }
public string? Tier{ get; set; }
}
public class SubscriptionProduct{
[JsonProperty("currency_code")]
public string? CurrencyCode{ get; set; }
public string? Amount{ get; set; }
[JsonProperty("is_cancelled")]
public bool IsCancelled{ get; set; }
[JsonProperty("effective_date")]
public DateTime EffectiveDate{ get; set; }
public string? Sku{ get; set; }
public string? Tier{ get; set; }
[JsonProperty("active_free_trial")]
public bool ActiveFreeTrial{ get; set; }
}
public class ThirdPartySubscriptionProduct{
[JsonProperty("effective_date")]
public DateTime EffectiveDate{ get; set; }
public string? Source{ get; set; }
[JsonProperty("source_reference")]
public string? SourceReference{ get; set; }
public string? Sku{ get; set; }
public string? Tier{ get; set; }
[JsonProperty("active_free_trial")]
public bool ActiveFreeTrial{ get; set; }
[JsonProperty("in_grace")]
public bool InGrace{ get; set; }
[JsonProperty("on_hold")]
public bool OnHold{ get; set; }
[JsonProperty("auto_renew")]
public bool AutoRenew{ get; set; }
[JsonProperty("expiration_date")]
public DateTime ExpirationDate{ get; set; }
[JsonProperty("in_grace_expiration_date")]
public DateTime InGraceExpirationDate{ get; set; }
}