From 94732f3ead30f0c36b8d89338cb0ad2e08fbb057 Mon Sep 17 00:00:00 2001 From: feos Date: Sun, 7 Jan 2024 15:34:51 +0300 Subject: [PATCH 1/2] better way to display video downloads switching back to HQ MKV/Compat MP4 like old site had, except new pubs only have the latter fix #1704 --- TASVideos/Pages/Shared/_MovieModule.cshtml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/TASVideos/Pages/Shared/_MovieModule.cshtml b/TASVideos/Pages/Shared/_MovieModule.cshtml index 077ae0e4d..35426816c 100644 --- a/TASVideos/Pages/Shared/_MovieModule.cshtml +++ b/TASVideos/Pages/Shared/_MovieModule.cshtml @@ -221,14 +221,24 @@
- A/V files:
+ Video Downloads:
@foreach (var url in Model.MirrorSiteUrls) { - - @(string.IsNullOrWhiteSpace(url.DisplayName) ? "A/V file" : url.DisplayName) via Mirror -
-
+ string text = System.IO.Path.GetExtension(url.Url!).Replace(".", "").ToUpper(); + if (text == "MKV") + { + text = "High Quality " + text; + } + else if (text == "MP4") + { + text = "Compatibility " + text; + } + if (!string.IsNullOrEmpty(url.DisplayName)) + { + text = text + $" ({url.DisplayName})"; + } + @text
}
From 6abc0b7ec356487ac47765822e1ddd6babd7f9ab Mon Sep 17 00:00:00 2001 From: feos Date: Sun, 7 Jan 2024 15:36:10 +0300 Subject: [PATCH 2/2] var --- TASVideos/Pages/Shared/_MovieModule.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TASVideos/Pages/Shared/_MovieModule.cshtml b/TASVideos/Pages/Shared/_MovieModule.cshtml index 35426816c..c9e5f8de8 100644 --- a/TASVideos/Pages/Shared/_MovieModule.cshtml +++ b/TASVideos/Pages/Shared/_MovieModule.cshtml @@ -225,7 +225,7 @@ @foreach (var url in Model.MirrorSiteUrls) { - string text = System.IO.Path.GetExtension(url.Url!).Replace(".", "").ToUpper(); + var text = System.IO.Path.GetExtension(url.Url!).Replace(".", "").ToUpper(); if (text == "MKV") { text = "High Quality " + text;