aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Titorenkov <mark.titorenkov@outlook.com>2021-08-31 15:12:09 +0300
committerGitHub <noreply@github.com>2021-08-31 15:12:09 +0300
commita0ee16d38d79d385f967a3164e0f2b095ef5deaa (patch)
tree5ed33feccc97907886b8c165a20a355810c6e3e5
parente83d7a866750405f790cc261d1894dc51c088bf4 (diff)
Update M3U Channel Name Precedence
Sets the ExtInf display name to have a higher precedence than the `tvg-name` attribute for channel names. Usually `namInExtInf` is a more descriptive and human readable name if both it and `tvg-name` are available. `tvg-name` is more likely to be an internal identifier such as just the channel number with a prefix in my provider's case.
-rw-r--r--Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs
index 16ff98a7d..d28c39e21 100644
--- a/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs
+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs
@@ -295,11 +295,11 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
}
}
- attributes.TryGetValue("tvg-name", out string name);
+ string name = nameInExtInf;
if (string.IsNullOrWhiteSpace(name))
{
- name = nameInExtInf;
+ attributes.TryGetValue("tvg-name", out name);
}
if (string.IsNullOrWhiteSpace(name))