diff --git a/GanjooRazor/Pages/Index.cshtml.cs b/GanjooRazor/Pages/Index.cshtml.cs index 1ab77232..d90e3ce6 100644 --- a/GanjooRazor/Pages/Index.cshtml.cs +++ b/GanjooRazor/Pages/Index.cshtml.cs @@ -707,20 +707,23 @@ namespace GanjooRazor.Pages break; case GanjoorPageType.CatPage: _prepareNextPre(); - { - var catTop1RecitationsQuery = await _httpClient.GetAsync($"{APIRoot.Url}/api/audio/cattop1/{GanjoorPage.PoetOrCat.Cat.Id}?includePoemText=false"); - - if (!catTop1RecitationsQuery.IsSuccessStatusCode) - { - LastError = JsonConvert.DeserializeObject(await catTop1RecitationsQuery.Content.ReadAsStringAsync()); - return Page(); - } - CategoryTop1Recitations = JsonConvert.DeserializeObject(await catTop1RecitationsQuery.Content.ReadAsStringAsync()); - } + IsCatPage = true; break; } + if(IsPoetPage || IsCatPage) + { + var catTop1RecitationsQuery = await _httpClient.GetAsync($"{APIRoot.Url}/api/audio/cattop1/{GanjoorPage.PoetOrCat.Cat.Id}?includePoemText=false"); + + if (!catTop1RecitationsQuery.IsSuccessStatusCode) + { + LastError = JsonConvert.DeserializeObject(await catTop1RecitationsQuery.Content.ReadAsStringAsync()); + return Page(); + } + CategoryTop1Recitations = JsonConvert.DeserializeObject(await catTop1RecitationsQuery.Content.ReadAsStringAsync()); + } + if (IsPoemPage) { HtmlLanguage = string.IsNullOrEmpty(GanjoorPage.Poem.Language) ? "fa-IR" : GanjoorPage.Poem.Language; diff --git a/GanjooRazor/Pages/_GanjoorPagePartial.cshtml b/GanjooRazor/Pages/_GanjoorPagePartial.cshtml index c0cbb592..66a40d41 100644 --- a/GanjooRazor/Pages/_GanjoorPagePartial.cshtml +++ b/GanjooRazor/Pages/_GanjoorPagePartial.cshtml @@ -214,7 +214,7 @@ (Model.IsPoemPage && Model.GanjoorPage.Poem.GeoDateTags.Length > 0) ) { -
+
@if (!string.IsNullOrEmpty(Model.GanjoorPage.PoetOrCat.Cat.MapName)) {
@@ -375,15 +375,17 @@
- @if (Model.CategoryTop1Recitations.Length > 0) - { -
 
-