mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 14:03:03 +03:00
Remove unnecessary JSON roundtrip in SaveListingProvider
This commit is contained in:
@@ -3,7 +3,6 @@ using System.Collections.Concurrent;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.Json;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Jellyfin.LiveTv.Configuration;
|
using Jellyfin.LiveTv.Configuration;
|
||||||
@@ -56,10 +55,6 @@ public class ListingsManager : IListingsManager
|
|||||||
{
|
{
|
||||||
ArgumentNullException.ThrowIfNull(info);
|
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);
|
var provider = GetProvider(info.Type);
|
||||||
await provider.Validate(info, validateLogin, validateListings).ConfigureAwait(false);
|
await provider.Validate(info, validateLogin, validateListings).ConfigureAwait(false);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user