Skip to content
Permalink
Browse files

Fix an i18n issue reported from Horcon on discord.

Another instance of European usage of comma instead of a period.
  • Loading branch information...
Cazzar committed Jul 24, 2019
1 parent fc2c744 commit 63cc5bf68746cf362ca110b32b4460a321960a37
Showing with 2 additions and 2 deletions.
  1. +2 −2 Shoko.Server/FileHelper/MediaInfo/Convert.cs
@@ -273,7 +273,7 @@ private static Stream TranslateVideoStream(MediaInfoLib.MediaInfo m, int num)
s.PA = m.GetFloat(StreamKind.Video, num, "PixelAspectRatio");
string sp2 = m.Get(StreamKind.Video, num, "PixelAspectRatio_Original");
if (!string.IsNullOrEmpty(sp2))
s.PA = System.Convert.ToSingle(sp2);
s.PA = System.Convert.ToSingle(sp2, CultureInfo.InvariantCulture);
if ((s.PA != 1.0) && s.Width != 0)
{
if (s.Width != 0)
@@ -538,7 +538,7 @@ public static Media Convert(string filename, IFile file)
}
if (s.FrameRate != 0)
{
float fr = System.Convert.ToSingle(s.FrameRate);
float fr = System.Convert.ToSingle(s.FrameRate, CultureInfo.InvariantCulture);

This comment has been minimized.

Copy link
@Rand-Random

Rand-Random Jul 24, 2019

Seems unnecessary since s.FrameRate already is a float/single.

This comment has been minimized.

Copy link
@Cazzar

Cazzar Jul 24, 2019

Author Member

I just did a search for any usage, safest that we ensure invariant culture on any conversions, (as the original already has the conversion)

string frs = ((int) Math.Round(fr)).ToString(CultureInfo.InvariantCulture);
if (!string.IsNullOrEmpty(s.ScanType))
{

0 comments on commit 63cc5bf

Please sign in to comment.
You can’t perform that action at this time.