aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/Audio/Audio.cs
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2021-06-06 09:16:41 -0600
committerGitHub <noreply@github.com>2021-06-06 17:16:41 +0200
commitd461e3912a1dfb59a22234e434497b72834de66b (patch)
treef55962cf8426c05f4daf4eacc6922fba353970d1 /MediaBrowser.Controller/Entities/Audio/Audio.cs
parent9154f20b3404fb818b8c2e74af038547d2c16c40 (diff)
Remove warninigs from MediaBrowser.Controller (Part 3) (#6078)
Co-authored-by: Bond-009 <bond.009@outlook.com>
Diffstat (limited to 'MediaBrowser.Controller/Entities/Audio/Audio.cs')
-rw-r--r--MediaBrowser.Controller/Entities/Audio/Audio.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/Entities/Audio/Audio.cs b/MediaBrowser.Controller/Entities/Audio/Audio.cs
index 4c2b7cb7c..576ab67a2 100644
--- a/MediaBrowser.Controller/Entities/Audio/Audio.cs
+++ b/MediaBrowser.Controller/Entities/Audio/Audio.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
+using System.Globalization;
using System.Linq;
using System.Text.Json.Serialization;
using Jellyfin.Data.Enums;
@@ -82,19 +83,19 @@ namespace MediaBrowser.Controller.Entities.Audio
/// <returns>System.String.</returns>
protected override string CreateSortName()
{
- return (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("0000 - ") : "")
- + (IndexNumber != null ? IndexNumber.Value.ToString("0000 - ") : "") + Name;
+ return (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("0000 - ", CultureInfo.InvariantCulture) : string.Empty)
+ + (IndexNumber != null ? IndexNumber.Value.ToString("0000 - ", CultureInfo.InvariantCulture) : string.Empty) + Name;
}
public override List<string> GetUserDataKeys()
{
var list = base.GetUserDataKeys();
- var songKey = IndexNumber.HasValue ? IndexNumber.Value.ToString("0000") : string.Empty;
+ var songKey = IndexNumber.HasValue ? IndexNumber.Value.ToString("0000", CultureInfo.InvariantCulture) : string.Empty;
if (ParentIndexNumber.HasValue)
{
- songKey = ParentIndexNumber.Value.ToString("0000") + "-" + songKey;
+ songKey = ParentIndexNumber.Value.ToString("0000", CultureInfo.InvariantCulture) + "-" + songKey;
}
songKey += Name;