aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2018-12-30 18:30:29 +0100
committerBond_009 <bond.009@outlook.com>2018-12-30 18:30:29 +0100
commit9ff45cf9690621612a9f58e6abdf1c6cde3ddcda (patch)
tree62d287b97209fd3ffabd1aa589000e60339a83ab
parent589aa2416aca71d6e487c46b2a464537a0c8392c (diff)
Some voodoo magic to stop a crash
-rw-r--r--Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs3
-rw-r--r--Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs2
-rw-r--r--Emby.Server.Implementations/LiveTv/LiveTvManager.cs6
3 files changed, 6 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs b/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs
index 020818361..9d1b751d7 100644
--- a/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs
+++ b/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs
@@ -3,6 +3,7 @@ using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Logging;
using System;
using System.Collections.Generic;
+using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Common.Progress;
using MediaBrowser.Model.Tasks;
@@ -54,7 +55,7 @@ namespace Emby.Server.Implementations.Channels
get { return true; }
}
- public async Task Execute(System.Threading.CancellationToken cancellationToken, IProgress<double> progress)
+ public async Task Execute(CancellationToken cancellationToken, IProgress<double> progress)
{
var manager = (ChannelManager)_channelManager;
diff --git a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
index 9021666a3..2d0eaf25b 100644
--- a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
+++ b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
@@ -1298,4 +1298,4 @@ namespace Emby.Server.Implementations.LiveTv.Listings
}
}
-} \ No newline at end of file
+}
diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
index d57f7e8cc..7f2a5ad29 100644
--- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -2392,8 +2392,8 @@ namespace Emby.Server.Implementations.LiveTv
public async Task<ListingsProviderInfo> SaveListingProvider(ListingsProviderInfo info, bool validateLogin, bool validateListings)
{
- // Let's try something
- //info = _jsonSerializer.DeserializeFromString<ListingsProviderInfo>(_jsonSerializer.SerializeToString(info));
+ // Voodoo
+ info = _jsonSerializer.DeserializeFromString<ListingsProviderInfo>(_jsonSerializer.SerializeToString(info));
IListingsProvider provider = _listingProviders.FirstOrDefault(i => string.Equals(info.Type, i.Type, StringComparison.OrdinalIgnoreCase));
@@ -2406,7 +2406,7 @@ namespace Emby.Server.Implementations.LiveTv
await provider.Validate(info, validateLogin, validateListings).ConfigureAwait(false);
- var config = GetConfiguration();
+ LiveTvOptions config = GetConfiguration();
var list = config.ListingProviders.ToList();
var index = list.FindIndex(i => string.Equals(i.Id, info.Id, StringComparison.OrdinalIgnoreCase));