more guide templates; new song metadata library (#1603)

* refactor template processing

* use template for song xmltv entries

* use template for other video xmltv entries

* update changelog
This commit is contained in:
Jason Dove
2024-02-09 11:27:44 -06:00
committed by GitHub
parent c743d07425
commit a15854d0ad
32 changed files with 20504 additions and 437 deletions
@@ -45,23 +45,6 @@ internal class ChronologicalMediaComparer : IComparer<MediaItem>
return date1.CompareTo(date2);
}
string songDate1 = x switch
{
Song s => s.SongMetadata.HeadOrNone().Match(sm => sm.Date ?? string.Empty, () => string.Empty),
_ => string.Empty
};
string songDate2 = y switch
{
Song s => s.SongMetadata.HeadOrNone().Match(sm => sm.Date ?? string.Empty, () => string.Empty),
_ => string.Empty
};
if (songDate1 != songDate2)
{
return string.Compare(songDate1, songDate2, StringComparison.Ordinal);
}
int season1 = x switch
{
Episode e => e.Season?.SeasonNumber ?? int.MaxValue,