diff --git a/GanjooRazor/appsettings.json b/GanjooRazor/appsettings.json index 26ef2dbd..b1b54c37 100644 --- a/GanjooRazor/appsettings.json +++ b/GanjooRazor/appsettings.json @@ -8,8 +8,8 @@ }, "AllowedHosts": "*", "GoogleAnalyticsCode": "", - "APIRoot": "https://api.ganjoor.net", - "GlobalAPIRoot": "https://api.ganjoor.net", + "APIRoot": "http://localhost:3439", + "GlobalAPIRoot": "http://localhost:3439", "SiteUrl": "http://localhost:33081", "MockSpotify": "False", "Spotify": { diff --git a/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-TOC.cs b/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-TOC.cs index 770a574d..a19212a1 100644 --- a/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-TOC.cs +++ b/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-TOC.cs @@ -378,7 +378,15 @@ namespace RMuseum.Services.Implementation } } var fa = new CultureInfo("fa-IR"); - foundLastChars.Sort((a, b) => fa.CompareInfo.Compare(a, b)); + if (foundLastChars.Contains("و") && foundLastChars.Contains("ی") && foundLastChars.IndexOf("ه") == (foundLastChars.IndexOf("و") - 1)) + { + foundLastChars.Sort((a, b) => a == "ه" && b == "و" ? -1 : a == "و" && b == "ه" ? 1 : fa.CompareInfo.Compare(a, b)); + } + else + { + foundLastChars.Sort((a, b) => fa.CompareInfo.Compare(a, b)); + } + foreach (var poemLastChar in foundLastChars) { string rep = poemLastChar == "ا" ? "الف" : poemLastChar;