浏览代码

if (string.IsNullOrWhiteSpace(result))
{
attributes.TryGetValue("channel-id", out result);
}

Luke Pulverenti 8 年之前
父节点
当前提交
34171a7507
共有 2 个文件被更改,包括 10 次插入5 次删除
  1. 9 4
      Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs
  2. 1 1
      SharedVersion.cs

+ 9 - 4
Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs

@@ -298,15 +298,20 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
 
 
         private string GetTunerChannelId(Dictionary<string, string> attributes)
         private string GetTunerChannelId(Dictionary<string, string> attributes)
         {
         {
+            var values = new List<string>();
+
             string result;
             string result;
-            attributes.TryGetValue("tvg-id", out result);
+            if (attributes.TryGetValue("tvg-id", out result))
+            {
+                values.Add(result);
+            }
 
 
-            if (string.IsNullOrWhiteSpace(result))
+            if (attributes.TryGetValue("channel-id", out result))
             {
             {
-                attributes.TryGetValue("channel-id", out result);
+                values.Add(result);
             }
             }
 
 
-            return result;
+            return values.Count == 0 ? null : string.Join("-", values.ToArray());
         }
         }
 
 
         private Dictionary<string, string> ParseExtInf(string line, out string remaining)
         private Dictionary<string, string> ParseExtInf(string line, out string remaining)

+ 1 - 1
SharedVersion.cs

@@ -1,3 +1,3 @@
 using System.Reflection;
 using System.Reflection;
 
 
-[assembly: AssemblyVersion("3.2.1.114")]
+[assembly: AssemblyVersion("3.2.1.115")]