Use place holders for channel titles
All checks were successful
🏗️ Build Plugin / build (push) Successful in 2m56s
🧪 Test Plugin / test (push) Successful in 1m25s
🚀 Release Plugin / build-and-release (push) Successful in 2m51s

This commit is contained in:
Duncan Tourolle 2026-01-17 21:23:50 +01:00
parent c282a98377
commit 5c898a98f5

View File

@ -200,7 +200,9 @@ public class SRFPlayChannel : IChannel, IHasCacheKey
continue;
}
items.Add(CreateFolder($"category_{topic.Id}", topic.Title ?? topic.Id!, topic.Lead));
// Generate placeholder image for topic
var placeholderUrl = CreatePlaceholderImageUrl(topic.Title ?? topic.Id!, _mediaSourceFactory.GetServerBaseUrl());
items.Add(CreateFolder($"category_{topic.Id}", topic.Title ?? topic.Id!, topic.Lead, placeholderUrl));
}
_logger.LogInformation("Added {Count} category folders", topics.Count);
@ -214,7 +216,7 @@ public class SRFPlayChannel : IChannel, IHasCacheKey
return items;
}
private static ChannelItemInfo CreateFolder(string id, string name, string? overview = null)
private static ChannelItemInfo CreateFolder(string id, string name, string? overview = null, string? imageUrl = null)
{
return new ChannelItemInfo
{
@ -222,7 +224,7 @@ public class SRFPlayChannel : IChannel, IHasCacheKey
Name = name,
Type = ChannelItemType.Folder,
FolderType = ChannelFolderType.Container,
ImageUrl = null,
ImageUrl = imageUrl,
Overview = overview
};
}