mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 14:28:46 +01:00
reduce dlna chatter
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.Net;
|
||||
using System.Threading;
|
||||
|
||||
namespace MediaBrowser.Controller
|
||||
{
|
||||
@@ -19,7 +20,7 @@ namespace MediaBrowser.Controller
|
||||
/// Gets the system info.
|
||||
/// </summary>
|
||||
/// <returns>SystemInfo.</returns>
|
||||
Task<SystemInfo> GetSystemInfo();
|
||||
Task<SystemInfo> GetSystemInfo(CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether [supports automatic run at startup].
|
||||
@@ -61,13 +62,13 @@ namespace MediaBrowser.Controller
|
||||
/// Gets the local ip address.
|
||||
/// </summary>
|
||||
/// <value>The local ip address.</value>
|
||||
Task<List<IpAddressInfo>> GetLocalIpAddresses();
|
||||
Task<List<IpAddressInfo>> GetLocalIpAddresses(CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the local API URL.
|
||||
/// </summary>
|
||||
/// <value>The local API URL.</value>
|
||||
Task<string> GetLocalApiUrl();
|
||||
Task<string> GetLocalApiUrl(CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the local API URL.
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace MediaBrowser.Controller.Net
|
||||
/// </summary>
|
||||
/// <param name="state">The state.</param>
|
||||
/// <returns>Task{`1}.</returns>
|
||||
protected abstract Task<TReturnDataType> GetDataToSend(TStateType state);
|
||||
protected abstract Task<TReturnDataType> GetDataToSend(TStateType state, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// The logger
|
||||
@@ -209,7 +209,9 @@ namespace MediaBrowser.Controller.Net
|
||||
{
|
||||
var state = tuple.Item4;
|
||||
|
||||
var data = await GetDataToSend(state).ConfigureAwait(false);
|
||||
var cancellationToken = tuple.Item2.Token;
|
||||
|
||||
var data = await GetDataToSend(state, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (data != null)
|
||||
{
|
||||
@@ -218,7 +220,7 @@ namespace MediaBrowser.Controller.Net
|
||||
MessageType = Name,
|
||||
Data = data
|
||||
|
||||
}, tuple.Item2.Token).ConfigureAwait(false);
|
||||
}, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
state.DateLastSendUtc = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace MediaBrowser.Controller.Sync
|
||||
/// Gets the jobs.
|
||||
/// </summary>
|
||||
/// <returns>QueryResult<SyncJob>.</returns>
|
||||
Task<QueryResult<SyncJob>> GetJobs(SyncJobQuery query);
|
||||
QueryResult<SyncJob> GetJobs(SyncJobQuery query);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the job items.
|
||||
|
||||
Reference in New Issue
Block a user