Skip to content

Commit

Permalink
Fix regression where it would do integer divisions, giving wrong result
Browse files Browse the repository at this point in the history
  • Loading branch information
hawken93 committed Jan 7, 2019
1 parent c986340 commit 8808255
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion MediaBrowser.Controller/Entities/Movies/BoxSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected override bool GetBlockUnratedValue(UserPolicy config)
}

public override double GetDefaultPrimaryImageAspectRatio()
=> 2 / 3;
=> 2.0 / 3;

public override UnratedItem GetBlockUnratedType()
{
Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser.Controller/Entities/Movies/Movie.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public override double GetDefaultPrimaryImageAspectRatio()
return 0;
}

return 2 / 3;
return 2.0 / 3;
}

protected override async Task<bool> RefreshedOwnedItems(MetadataRefreshOptions options, List<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken)
Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser.Controller/Entities/TV/Episode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public override double GetDefaultPrimaryImageAspectRatio()
return 0;
}

return 16 / 9;
return 16.0 / 9;
}

public override List<string> GetUserDataKeys()
Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser.Controller/Entities/Trailer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public Trailer()
public TrailerType[] TrailerTypes { get; set; }

public override double GetDefaultPrimaryImageAspectRatio()
=> 2 / 3;
=> 2.0 / 3;

public override UnratedItem GetBlockUnratedType()
{
Expand Down
4 changes: 2 additions & 2 deletions MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ public override double GetDefaultPrimaryImageAspectRatio()

if (string.Equals(serviceName, EmbyServiceName, StringComparison.OrdinalIgnoreCase) || string.Equals(serviceName, "Next Pvr", StringComparison.OrdinalIgnoreCase))
{
return 2 / 3;
return 2.0 / 3;
}
else
{
return 16 / 9;
return 16.0 / 9;
}
}

Expand Down

0 comments on commit 8808255

Please sign in to comment.