aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-10-13 01:44:40 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-10-13 01:44:40 -0400
commitd7bbfff23f7cec1f06c5ea9e99c7868e552256ec (patch)
treedff6acb39509c6bb6ec4ea7565fc70386bd754d2 /Emby.Server.Implementations/LiveTv/LiveTvManager.cs
parentbc656edf4ff5cc60b246b6d59f7483610677ce69 (diff)
preserve channel info from provider
Diffstat (limited to 'Emby.Server.Implementations/LiveTv/LiveTvManager.cs')
-rw-r--r--Emby.Server.Implementations/LiveTv/LiveTvManager.cs27
1 files changed, 11 insertions, 16 deletions
diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
index ec2704aa0..718620ab5 100644
--- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -527,18 +527,18 @@ namespace Emby.Server.Implementations.LiveTv
item.ChannelType = channelInfo.ChannelType;
item.ServiceName = serviceName;
+
+ if (!string.Equals(channelInfo.Number, item.Number, StringComparison.Ordinal))
+ {
+ forceUpdate = true;
+ }
item.Number = channelInfo.Number;
- //if (!string.Equals(item.ProviderImageUrl, channelInfo.ImageUrl, StringComparison.OrdinalIgnoreCase))
- //{
- // isNew = true;
- // replaceImages.Add(ImageType.Primary);
- //}
- //if (!string.Equals(item.ProviderImagePath, channelInfo.ImagePath, StringComparison.OrdinalIgnoreCase))
- //{
- // isNew = true;
- // replaceImages.Add(ImageType.Primary);
- //}
+ if (!string.Equals(channelInfo.Name, item.Name, StringComparison.Ordinal))
+ {
+ forceUpdate = true;
+ }
+ item.Name = channelInfo.Name;
if (!item.HasImage(ImageType.Primary))
{
@@ -554,11 +554,6 @@ namespace Emby.Server.Implementations.LiveTv
}
}
- if (string.IsNullOrEmpty(item.Name))
- {
- item.Name = channelInfo.Name;
- }
-
if (isNew)
{
_libraryManager.CreateItem(item, cancellationToken);
@@ -2923,7 +2918,7 @@ namespace Emby.Server.Implementations.LiveTv
public Folder GetInternalLiveTvFolder(CancellationToken cancellationToken)
{
- var name = _localization.GetLocalizedString("ViewTypeLiveTV");
+ var name = _localization.GetLocalizedString("HeaderLiveTV");
return _libraryManager.GetNamedView(name, CollectionType.LiveTv, name, cancellationToken);
}