Remove unnecessary JSON roundtrip in SaveListingProvider
This commit is contained in:
parent
1c11c460b9
commit
3bdaf640ec
|
@ -3,7 +3,6 @@ using System.Collections.Concurrent;
|
|||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Jellyfin.LiveTv.Configuration;
|
||||
|
@ -56,10 +55,6 @@ public class ListingsManager : IListingsManager
|
|||
{
|
||||
ArgumentNullException.ThrowIfNull(info);
|
||||
|
||||
// Hack to make the object a pure ListingsProviderInfo instead of an AddListingProvider
|
||||
// ServerConfiguration.SaveConfiguration crashes during xml serialization for AddListingProvider
|
||||
info = JsonSerializer.Deserialize<ListingsProviderInfo>(JsonSerializer.SerializeToUtf8Bytes(info))!;
|
||||
|
||||
var provider = GetProvider(info.Type);
|
||||
await provider.Validate(info, validateLogin, validateListings).ConfigureAwait(false);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user