From ca7885057c762ff1cbeb3c9e12db44b35eaedfe4 Mon Sep 17 00:00:00 2001 From: Laurence0x03 Date: Sat, 18 Nov 2023 12:34:19 +1000 Subject: [PATCH] Show displayname for offline youtube channels Partially fixes #65 --- GlobalAssemblyInfo.cs | 4 ++-- Livestream.Monitor/Model/ApiClients/YoutubeApiClient.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/GlobalAssemblyInfo.cs b/GlobalAssemblyInfo.cs index 5f3bfa3..fd4d761 100644 --- a/GlobalAssemblyInfo.cs +++ b/GlobalAssemblyInfo.cs @@ -22,5 +22,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.13.7.0")] -[assembly: AssemblyFileVersion("2.13.7.0")] \ No newline at end of file +[assembly: AssemblyVersion("2.13.8.0")] +[assembly: AssemblyFileVersion("2.13.8.0")] \ No newline at end of file diff --git a/Livestream.Monitor/Model/ApiClients/YoutubeApiClient.cs b/Livestream.Monitor/Model/ApiClients/YoutubeApiClient.cs index 64d4093..fb9f3b4 100644 --- a/Livestream.Monitor/Model/ApiClients/YoutubeApiClient.cs +++ b/Livestream.Monitor/Model/ApiClients/YoutubeApiClient.cs @@ -150,14 +150,14 @@ private async Task> QueryChannels( // video ids are only returned for online streams, we need to show something to the user // so create a placeholder livestream model object for the offline channel. - // TODO - query the channel to get their display name information rather than using the actual channel name + // TODO - query the channel to get their display name information rather than using the recorded displayname/channelid if (!livestreamModels.Any()) { queryResults.Add(new LivestreamQueryResult(channelIdentifier) { LivestreamModel = new LivestreamModel("offline-" + channelIdentifier.ChannelId, channelIdentifier) { - DisplayName = channelIdentifier.ChannelId, + DisplayName = channelIdentifier.DisplayName ?? channelIdentifier.ChannelId, Description = "[Offline youtube stream]", } });