Skip to content

Commit

Permalink
Add native title as Original Title to series if Japanese is not set a…
Browse files Browse the repository at this point in the history
…s preferred language

Signed-off-by: ayyu <ayyu@uwaterloo.ca>
  • Loading branch information
ayyu committed Apr 11, 2021
1 parent b276db7 commit b4922df
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Jellyfin.Plugin.AniList/Providers/AniList/ApiModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,7 @@ public Series ToSeries()
{
var result = new Series {
Name = this.GetPreferredTitle("en"),
if (config.TitlePreference != TitlePreferenceType.Japanese)
{
OriginalTitle = this.title.native;
}
OriginalTitle = this.title.native,
Overview = this.description,
ProductionYear = this.startDate.year,
PremiereDate = this.GetStartDate(),
Expand All @@ -244,7 +241,7 @@ public Series ToSeries()
Studios = this.GetStudioNames().ToArray(),
ProviderIds = new Dictionary<string, string>() {{ProviderNames.AniList, this.id.ToString()}}
};

if (this.status == "FINISHED" || this.status == "CANCELLED")
{
result.Status = SeriesStatus.Ended;
Expand All @@ -265,10 +262,7 @@ public Movie ToMovie()
{
return new Movie {
Name = this.GetPreferredTitle("en"),
if (config.TitlePreference != TitlePreferenceType.Japanese)
{
OriginalTitle = this.title.native;
}
OriginalTitle = this.title.native,
Overview = this.description,
ProductionYear = this.startDate.year,
PremiereDate = this.GetStartDate(),
Expand Down

0 comments on commit b4922df

Please sign in to comment.