Skip to content
This repository has been archived by the owner on Apr 13, 2024. It is now read-only.

Commit

Permalink
Fix IsDubbed
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcos Cordeiro committed Apr 11, 2023
1 parent 6a2ad64 commit a70c095
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Wasari.Crunchyroll/ApiEpisode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ namespace Wasari.Crunchyroll
{
public record ApiEpisode
{
private readonly bool _isDubbed;

[JsonPropertyName("__href__")]
public string Href { get; init; }

Expand Down Expand Up @@ -49,10 +51,14 @@ public record ApiEpisode

[JsonPropertyName("is_clip")]
public bool IsClip { get; init; }

[JsonPropertyName("is_dubbed")]
public bool IsDubbed { get; init; }

public bool IsDubbed
{
get => _isDubbed && Locale != "ja-JP";
init => _isDubbed = value;
}

[JsonPropertyName("is_subbed")]
public bool IsSubbed { get; init; }

Expand Down

0 comments on commit a70c095

Please sign in to comment.