[streamSchedule] Fix: To not append game name if title contains it

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-12-07 01:24:28 +01:00
parent 2613068156
commit fcefe678ff
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

@ -113,7 +113,7 @@ func (m modStreamSchedule) cronUpdateSchedule() {
for _, seg := range data.Data.Segments { for _, seg := range data.Data.Segments {
title := seg.Title title := seg.Title
if seg.Category != nil && seg.Category.Name != seg.Title { if seg.Category != nil && !strings.Contains(seg.Title, seg.Category.Name) {
title = fmt.Sprintf("%s (%s)", seg.Title, seg.Category.Name) title = fmt.Sprintf("%s (%s)", seg.Title, seg.Category.Name)
} }