From 34171a7507d393d2afbe0f4dd2719f9067441e8a Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 22 Feb 2017 16:13:27 -0500 Subject: [PATCH] if (string.IsNullOrWhiteSpace(result)) { attributes.TryGetValue("channel-id", out result); } --- .../LiveTv/TunerHosts/M3uParser.cs | 15 ++++++++++----- SharedVersion.cs | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs index 34d0dd8535..073da48a02 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs @@ -298,15 +298,20 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts private string GetTunerChannelId(Dictionary attributes) { - string result; - attributes.TryGetValue("tvg-id", out result); + var values = new List(); - if (string.IsNullOrWhiteSpace(result)) + string result; + if (attributes.TryGetValue("tvg-id", out result)) { - attributes.TryGetValue("channel-id", out result); + values.Add(result); } - return result; + if (attributes.TryGetValue("channel-id", out result)) + { + values.Add(result); + } + + return values.Count == 0 ? null : string.Join("-", values.ToArray()); } private Dictionary ParseExtInf(string line, out string remaining) diff --git a/SharedVersion.cs b/SharedVersion.cs index 68d9dc4d46..76ebc08527 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.1.114")] +[assembly: AssemblyVersion("3.2.1.115")]