aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs13
1 files changed, 9 insertions, 4 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<string, string> attributes)
{
+ var values = new List<string>();
+
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)