song fixes (#506)

* fix song page links

* show song artist in playout detail

* show more song details in channel guide
This commit is contained in:
Jason Dove
2021-11-26 08:49:04 -06:00
committed by GitHub
parent dfc4c7a284
commit 9195ef7878
5 changed files with 42 additions and 9 deletions
+4 -1
View File
@@ -49,8 +49,11 @@ namespace ErsatzTV.Application.Playouts
.Map(s => string.IsNullOrWhiteSpace(playoutItem.ChapterTitle) ? s : $"{s} ({playoutItem.ChapterTitle})")
.IfNone("[unknown video]");
case Song s:
string songArtist = s.SongMetadata.HeadOrNone()
.Map(sm => string.IsNullOrWhiteSpace(sm.Artist) ? string.Empty : $"{sm.Artist} - ")
.IfNone(string.Empty);
return s.SongMetadata.HeadOrNone()
.Map(sm => sm.Title ?? string.Empty)
.Map(sm => $"{songArtist}{sm.Title ?? string.Empty}")
.Map(t => string.IsNullOrWhiteSpace(playoutItem.ChapterTitle) ? t : $"{s} ({playoutItem.ChapterTitle})")
.IfNone("[unknown song]");
default: