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

Commit

Permalink
Makes AudioLocale null if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcos Cordeiro committed Sep 26, 2022
1 parent 2fbd39b commit e198b37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Wasari.Crunchyroll/ApiEpisode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ public record ApiEpisode
public string[] Subtitles { get; init; }

[JsonPropertyName("audio_locale")]
[JsonConverter(typeof(NullIfEmptyConverter))]
public string AudioLocale { get; set; }

public string Locale => string.IsNullOrEmpty(AudioLocale) ? ApiEpisodeStreams?.AudioLocale : AudioLocale;
public string Locale => ApiEpisodeStreams?.AudioLocale ?? AudioLocale;

public ApiEpisodeStreams ApiEpisodeStreams { get; private set; }

Expand Down

0 comments on commit e198b37

Please sign in to comment.