list = @this.ToList();
+ return list.Any() ? list.Max(selector) : null;
+ }
}
diff --git a/TVRename/Utility/Helper/ShowHtmlHelper.cs b/TVRename/Utility/Helper/ShowHtmlHelper.cs
index 9f900de2..d5ee356b 100644
--- a/TVRename/Utility/Helper/ShowHtmlHelper.cs
+++ b/TVRename/Utility/Helper/ShowHtmlHelper.cs
@@ -1072,7 +1072,7 @@ private static string SeasonSummaryTableRow(ProcessedEpisode ep, bool includeDir
}
string airedText = ep.HasAired() ? " (Aired)" : string.Empty;
- DateTime? airDateDt = ep.GetAirDateDt(true);
+ DateTime? airDateDt = ep.GetAirDateDt();
string airDateString = airDateDt.HasValue && airDateDt > DateTime.MinValue
? airDateDt.Value.ToString("d", DateTimeFormatInfo.CurrentInfo)
: string.Empty;
@@ -1350,7 +1350,7 @@ private static string DateDetailsHtml(this ProcessedEpisode ei)
{
try
{
- DateTime? dt = ei.GetAirDateDt(true);
+ DateTime? dt = ei.GetAirDateDt();
if (dt != null && dt.Value.CompareTo(DateTime.MaxValue) != 0)
{
return $"{dt.Value.ToShortDateString()}
({ei.HowLong()})";
@@ -1703,7 +1703,7 @@ public static string GetSeasonHtmlOverviewOffline(this ShowConfiguration si, Pro
body += " Search";
}
- DateTime? dt = ei.GetAirDateDt(true);
+ DateTime? dt = ei.GetAirDateDt();
if (dt != null && dt.Value.CompareTo(DateTime.MaxValue) != 0)
{
body += "" + dt.Value.ToShortDateString() + " (" + ei.HowLong() + ")";
diff --git a/TVRename/Utility/PossibleMergedEpisode.cs b/TVRename/Utility/PossibleMergedEpisode.cs
index 0c4d6592..00948ece 100644
--- a/TVRename/Utility/PossibleMergedEpisode.cs
+++ b/TVRename/Utility/PossibleMergedEpisode.cs
@@ -1,4 +1,4 @@
-//
+ //
// Main website for TVRename is http://tvrename.com
//
// Source code available at https://github.com/TV-Rename/tvrename
@@ -43,7 +43,7 @@ public ListViewItem PresentationView
lvi.SubItems.Add(episodeOne.AppropriateSeasonNumber.ToString());
lvi.SubItems.Add(episodeOne.EpisodeNumbersAsText + " & " + episodeTwo.EpisodeNumbersAsText);
- lvi.SubItems.Add(episodeOne.GetAirDateDt(true).PrettyPrint());
+ lvi.SubItems.Add(episodeOne.GetAirDateDt().PrettyPrint());
lvi.SubItems.Add(episodeOne.Name + " & " + episodeTwo.Name);
List names = new() { episodeOne.Name, episodeTwo.Name };
diff --git a/TVRename/Utility/Sorters/DateSorterWTW.cs b/TVRename/Utility/Sorters/DateSorterWTW.cs
index 1c187edd..eee9f2d6 100644
--- a/TVRename/Utility/Sorters/DateSorterWTW.cs
+++ b/TVRename/Utility/Sorters/DateSorterWTW.cs
@@ -21,7 +21,7 @@ public DateSorterWtw(int column) : base(column)
{
try
{
- return ((ProcessedEpisode)lvi.Tag).GetAirDateDt(true);
+ return ((ProcessedEpisode)lvi.Tag).GetAirDateDt();
}
catch
{