Use place holders for channel titles
This commit is contained in:
parent
c282a98377
commit
5c898a98f5
@ -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
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user