Merge remote-tracking branch 'upstream/master' into client-logger

This commit is contained in:
Cody Robibero
2021-10-26 17:43:36 -06:00
1165 changed files with 24439 additions and 15715 deletions

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Jellyfin.Data.Enums;
using MediaBrowser.Common.Json.Converters;
using Jellyfin.Extensions.Json.Converters;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Querying;

View File

@@ -11,7 +11,7 @@ namespace Jellyfin.Api.Models.PlaybackDtos
/// <summary>
/// Class TranscodingJob.
/// </summary>
public class TranscodingJobDto
public class TranscodingJobDto : IDisposable
{
/// <summary>
/// The process lock.
@@ -106,6 +106,11 @@ namespace Jellyfin.Api.Models.PlaybackDtos
/// </summary>
public bool HasExited { get; set; }
/// <summary>
/// Gets or sets exit code.
/// </summary>
public int ExitCode { get; set; }
/// <summary>
/// Gets or sets a value indicating whether is user paused.
/// </summary>
@@ -249,5 +254,31 @@ namespace Jellyfin.Api.Models.PlaybackDtos
}
}
}
/// <inheritdoc />
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>
/// Dispose all resources.
/// </summary>
/// <param name="disposing">Whether to dispose all resources.</param>
protected virtual void Dispose(bool disposing)
{
if (disposing)
{
Process?.Dispose();
Process = null;
KillTimer?.Dispose();
KillTimer = null;
CancellationTokenSource?.Dispose();
CancellationTokenSource = null;
TranscodingThrottler?.Dispose();
TranscodingThrottler = null;
}
}
}
}

View File

@@ -145,7 +145,8 @@ namespace Jellyfin.Api.Models.PlaybackDtos
var transcodingPositionTicks = job.TranscodingPositionTicks ?? 0;
var downloadPositionTicks = job.DownloadPositionTicks ?? 0;
var path = job.Path;
var path = job.Path ?? throw new ArgumentException("Path can't be null.");
var gapLengthInTicks = TimeSpan.FromSeconds(thresholdSeconds).Ticks;
if (downloadPositionTicks > 0 && transcodingPositionTicks > 0)

View File

@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using MediaBrowser.Common.Json.Converters;
using Jellyfin.Extensions.Json.Converters;
namespace Jellyfin.Api.Models.PlaylistDtos
{

View File

@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using MediaBrowser.Common.Json.Converters;
using Jellyfin.Extensions.Json.Converters;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Session;
@@ -85,4 +85,4 @@ namespace Jellyfin.Api.Models.SessionDtos
};
}
}
}
}

View File

@@ -55,11 +55,14 @@ namespace Jellyfin.Api.Models.StreamingDtos
/// <summary>
/// Gets the video request.
/// </summary>
public VideoRequestDto? VideoRequest => Request! as VideoRequestDto;
public VideoRequestDto? VideoRequest => Request as VideoRequestDto;
/// <summary>
/// Gets or sets the direct stream provicer.
/// </summary>
/// <remarks>
/// Deprecated.
/// </remarks>
public IDirectStreamProvider? DirectStreamProvider { get; set; }
/// <summary>

View File

@@ -17,9 +17,21 @@ namespace Jellyfin.Api.Models.SyncPlayDtos
}
/// <summary>
/// Gets or sets the playlist identifiers ot the items.
/// Gets or sets the playlist identifiers ot the items. Ignored when clearing the playlist.
/// </summary>
/// <value>The playlist identifiers ot the items.</value>
public IReadOnlyList<Guid> PlaylistItemIds { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the entire playlist should be cleared.
/// </summary>
/// <value>Whether the entire playlist should be cleared.</value>
public bool ClearPlaylist { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the playing item should be removed as well. Used only when clearing the playlist.
/// </summary>
/// <value>Whether the playing item should be removed as well.</value>
public bool ClearPlayingItem { get; set; }
}
}

View File

@@ -8,9 +8,9 @@ namespace Jellyfin.Api.Models.UserDtos
public class QuickConnectDto
{
/// <summary>
/// Gets or sets the quick connect token.
/// Gets or sets the quick connect secret.
/// </summary>
[Required]
public string? Token { get; set; }
public string Secret { get; set; } = null!;
}
}