tvdburgt / subtle

Unobtrusive subtitle downloader
MIT License
68 stars 8 forks source link

cli fails with "Input string was not in a correct format." #7

Closed sniper-developer closed 8 years ago

sniper-developer commented 8 years ago

In different countries, decimal point format differs. Please change code, for example like this:

    private static SubtitleSearchResult SelectSubtitle(IEnumerable<SubtitleSearchResult> subs)
    {
        return subs
            .OrderByDescending(s => int.Parse(s.IsFeatured))
            .ThenByDescending(s => decimal.Parse(s.Rating, System.Globalization.CultureInfo.InvariantCulture))

--- .ThenByDescending(s => int.Parse(s.DownloadCount)) +++ .ThenByDescending(s => decimal.Parse(s.Rating, System.Globalization.CultureInfo.InvariantCulture))

            .FirstOrDefault();
    }
tvdburgt commented 8 years ago

This should be fixed in 0.4.1. Please verify and close this issue. Thanks!

sniper-developer commented 8 years ago

Fixed, thank you!