mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-05-07 04:00:32 +02:00
Fix BjShare title formatting
This commit is contained in:
parent
719d281ad7
commit
2000d0c768
1 changed files with 8 additions and 2 deletions
|
|
@ -448,7 +448,7 @@ private static string BuildReleaseTitle(string title, int? year, string seasonEp
|
|||
cleanInfo = cleanInfo.Replace("Full HD", "1080p");
|
||||
cleanInfo = cleanInfo.Replace("4K", "2160p");
|
||||
cleanInfo = cleanInfo.Replace("SD", "480p");
|
||||
cleanInfo = Regex.Replace(cleanInfo, @"(^|/\s*)HD(?=\s*/|$)", "$1720p", RegexOptions.IgnoreCase);
|
||||
cleanInfo = Regex.Replace(cleanInfo, @"(^|/\s*)HD(?=\s*/|$)", "${1}720p", RegexOptions.IgnoreCase);
|
||||
cleanInfo = cleanInfo.Replace(" / Free", "");
|
||||
cleanInfo = Regex.Replace(cleanInfo, @"\s+", " ").Trim();
|
||||
|
||||
|
|
@ -462,7 +462,13 @@ private static string BuildReleaseTitle(string title, int? year, string seasonEp
|
|||
seasonEpisode = string.Empty;
|
||||
}
|
||||
|
||||
return $"{title} {(year.HasValue ? year.Value.ToString(CultureInfo.InvariantCulture) : string.Empty)} {seasonEpisode} {cleanInfo}".Trim();
|
||||
return string.Join(" ", new[]
|
||||
{
|
||||
title,
|
||||
year?.ToString(CultureInfo.InvariantCulture),
|
||||
seasonEpisode,
|
||||
cleanInfo
|
||||
}.Where(x => !string.IsNullOrWhiteSpace(x)));
|
||||
}
|
||||
|
||||
private static (int Seeders, int Peers) ParsePeerStats(IElement row)
|
||||
|
|
|
|||
Loading…
Reference in a new issue