fix optional getEpisodeLocator usage

This commit is contained in:
jhays 2021-09-21 23:16:14 -05:00
parent cfc5d0202c
commit 06e170d94b
2 changed files with 3 additions and 3 deletions

View File

@ -92,13 +92,13 @@ struct LandscapeItemElement: View {
.shadow(radius: focused ? 10.0 : 0, y: focused ? 10.0 : 0) .shadow(radius: focused ? 10.0 : 0, y: focused ? 10.0 : 0)
if focused { if focused {
if inSeasonView ?? false { if inSeasonView ?? false {
Text("\(item.getEpisodeLocator())\(item.name ?? "")") Text("\(item.getEpisodeLocator() ?? "")\(item.name ?? "")")
.font(.callout) .font(.callout)
.fontWeight(.semibold) .fontWeight(.semibold)
.lineLimit(1) .lineLimit(1)
.frame(width: 445) .frame(width: 445)
} else { } else {
Text(item.type == "Episode" ? "\(item.seriesName ?? "")\(item.getEpisodeLocator())" : item.name ?? "") Text(item.type == "Episode" ? "\(item.seriesName ?? "")\(item.getEpisodeLocator() ?? "")" : item.name ?? "")
.font(.callout) .font(.callout)
.fontWeight(.semibold) .fontWeight(.semibold)
.lineLimit(1) .lineLimit(1)

View File

@ -55,7 +55,7 @@ struct MediaInfoView: View {
Text(item.name ?? "Episode") Text(item.name ?? "Episode")
.foregroundColor(.secondary) .foregroundColor(.secondary)
Text(item.getEpisodeLocator()) Text(item.getEpisodeLocator() ?? "")
if let date = item.premiereDate { if let date = item.premiereDate {
Text(formatDate(date: date)) Text(formatDate(date: date))