aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Models
diff options
context:
space:
mode:
authorcvium <clausvium@gmail.com>2022-01-07 10:23:22 +0100
committercvium <clausvium@gmail.com>2022-01-07 10:23:22 +0100
commitc658a883a2bc84b46ed73d209d2983e8a324cdce (patch)
treedabdbb5ac224e202d5433e7062e0c1b6872d1af7 /Jellyfin.Api/Models
parent2899b77cd58456470b8dd4d01d3a8c525a9b5911 (diff)
parent6b4f5a86631e5bde93dae88553380c7ffd99b8e4 (diff)
Merge branch 'master' into keyframe_extraction_v1
# Conflicts: # Jellyfin.Api/Controllers/DynamicHlsController.cs # MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs # MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
Diffstat (limited to 'Jellyfin.Api/Models')
-rw-r--r--Jellyfin.Api/Models/ClientLogDtos/ClientLogDocumentResponseDto.cs22
-rw-r--r--Jellyfin.Api/Models/DisplayPreferencesDtos/DisplayPreferencesDto.cs106
-rw-r--r--Jellyfin.Api/Models/LibraryStructureDto/MediaPathDto.cs2
-rw-r--r--Jellyfin.Api/Models/LiveTvDtos/SetChannelMappingDto.cs2
-rw-r--r--Jellyfin.Api/Models/MediaInfoDtos/PlaybackInfoDto.cs2
-rw-r--r--Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs7
-rw-r--r--Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs4
-rw-r--r--Jellyfin.Api/Models/StreamingDtos/StreamState.cs2
-rw-r--r--Jellyfin.Api/Models/SubtitleDtos/UploadSubtitleDto.cs2
9 files changed, 35 insertions, 114 deletions
diff --git a/Jellyfin.Api/Models/ClientLogDtos/ClientLogDocumentResponseDto.cs b/Jellyfin.Api/Models/ClientLogDtos/ClientLogDocumentResponseDto.cs
new file mode 100644
index 000000000..44509a9c0
--- /dev/null
+++ b/Jellyfin.Api/Models/ClientLogDtos/ClientLogDocumentResponseDto.cs
@@ -0,0 +1,22 @@
+namespace Jellyfin.Api.Models.ClientLogDtos
+{
+ /// <summary>
+ /// Client log document response dto.
+ /// </summary>
+ public class ClientLogDocumentResponseDto
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ClientLogDocumentResponseDto"/> class.
+ /// </summary>
+ /// <param name="fileName">The file name.</param>
+ public ClientLogDocumentResponseDto(string fileName)
+ {
+ FileName = fileName;
+ }
+
+ /// <summary>
+ /// Gets the resulting filename.
+ /// </summary>
+ public string FileName { get; }
+ }
+}
diff --git a/Jellyfin.Api/Models/DisplayPreferencesDtos/DisplayPreferencesDto.cs b/Jellyfin.Api/Models/DisplayPreferencesDtos/DisplayPreferencesDto.cs
deleted file mode 100644
index 249d828d3..000000000
--- a/Jellyfin.Api/Models/DisplayPreferencesDtos/DisplayPreferencesDto.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-using System.Collections.Generic;
-using Jellyfin.Data.Enums;
-
-namespace Jellyfin.Api.Models.DisplayPreferencesDtos
-{
- /// <summary>
- /// Defines the display preferences for any item that supports them (usually Folders).
- /// </summary>
- public class DisplayPreferencesDto
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="DisplayPreferencesDto" /> class.
- /// </summary>
- public DisplayPreferencesDto()
- {
- RememberIndexing = false;
- PrimaryImageHeight = 250;
- PrimaryImageWidth = 250;
- ShowBackdrop = true;
- CustomPrefs = new Dictionary<string, string>();
- }
-
- /// <summary>
- /// Gets or sets the user id.
- /// </summary>
- /// <value>The user id.</value>
- public string? Id { get; set; }
-
- /// <summary>
- /// Gets or sets the type of the view.
- /// </summary>
- /// <value>The type of the view.</value>
- public string? ViewType { get; set; }
-
- /// <summary>
- /// Gets or sets the sort by.
- /// </summary>
- /// <value>The sort by.</value>
- public string? SortBy { get; set; }
-
- /// <summary>
- /// Gets or sets the index by.
- /// </summary>
- /// <value>The index by.</value>
- public string? IndexBy { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether [remember indexing].
- /// </summary>
- /// <value><c>true</c> if [remember indexing]; otherwise, <c>false</c>.</value>
- public bool RememberIndexing { get; set; }
-
- /// <summary>
- /// Gets or sets the height of the primary image.
- /// </summary>
- /// <value>The height of the primary image.</value>
- public int PrimaryImageHeight { get; set; }
-
- /// <summary>
- /// Gets or sets the width of the primary image.
- /// </summary>
- /// <value>The width of the primary image.</value>
- public int PrimaryImageWidth { get; set; }
-
- /// <summary>
- /// Gets the custom prefs.
- /// </summary>
- /// <value>The custom prefs.</value>
- public Dictionary<string, string> CustomPrefs { get; }
-
- /// <summary>
- /// Gets or sets the scroll direction.
- /// </summary>
- /// <value>The scroll direction.</value>
- public ScrollDirection ScrollDirection { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether to show backdrops on this item.
- /// </summary>
- /// <value><c>true</c> if showing backdrops; otherwise, <c>false</c>.</value>
- public bool ShowBackdrop { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether [remember sorting].
- /// </summary>
- /// <value><c>true</c> if [remember sorting]; otherwise, <c>false</c>.</value>
- public bool RememberSorting { get; set; }
-
- /// <summary>
- /// Gets or sets the sort order.
- /// </summary>
- /// <value>The sort order.</value>
- public SortOrder SortOrder { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether [show sidebar].
- /// </summary>
- /// <value><c>true</c> if [show sidebar]; otherwise, <c>false</c>.</value>
- public bool ShowSidebar { get; set; }
-
- /// <summary>
- /// Gets or sets the client.
- /// </summary>
- public string? Client { get; set; }
- }
-}
diff --git a/Jellyfin.Api/Models/LibraryStructureDto/MediaPathDto.cs b/Jellyfin.Api/Models/LibraryStructureDto/MediaPathDto.cs
index f65988259..8b26ec317 100644
--- a/Jellyfin.Api/Models/LibraryStructureDto/MediaPathDto.cs
+++ b/Jellyfin.Api/Models/LibraryStructureDto/MediaPathDto.cs
@@ -24,4 +24,4 @@ namespace Jellyfin.Api.Models.LibraryStructureDto
/// </summary>
public MediaPathInfo? PathInfo { get; set; }
}
-} \ No newline at end of file
+}
diff --git a/Jellyfin.Api/Models/LiveTvDtos/SetChannelMappingDto.cs b/Jellyfin.Api/Models/LiveTvDtos/SetChannelMappingDto.cs
index 2ddaa89e8..e7501bd9f 100644
--- a/Jellyfin.Api/Models/LiveTvDtos/SetChannelMappingDto.cs
+++ b/Jellyfin.Api/Models/LiveTvDtos/SetChannelMappingDto.cs
@@ -25,4 +25,4 @@ namespace Jellyfin.Api.Models.LiveTvDtos
[Required]
public string ProviderChannelId { get; set; } = string.Empty;
}
-} \ No newline at end of file
+}
diff --git a/Jellyfin.Api/Models/MediaInfoDtos/PlaybackInfoDto.cs b/Jellyfin.Api/Models/MediaInfoDtos/PlaybackInfoDto.cs
index 2cfdba507..c6bd5e56e 100644
--- a/Jellyfin.Api/Models/MediaInfoDtos/PlaybackInfoDto.cs
+++ b/Jellyfin.Api/Models/MediaInfoDtos/PlaybackInfoDto.cs
@@ -83,4 +83,4 @@ namespace Jellyfin.Api.Models.MediaInfoDtos
/// </summary>
public bool? AutoOpenLiveStream { get; set; }
}
-} \ No newline at end of file
+}
diff --git a/Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs b/Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs
index 291e571dc..ab67c8732 100644
--- a/Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs
+++ b/Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs
@@ -107,6 +107,11 @@ namespace Jellyfin.Api.Models.PlaybackDtos
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>
public bool IsUserPaused { get; set; }
@@ -129,7 +134,7 @@ namespace Jellyfin.Api.Models.PlaybackDtos
/// <summary>
/// Gets or sets bytes downloaded.
/// </summary>
- public long? BytesDownloaded { get; set; }
+ public long BytesDownloaded { get; set; }
/// <summary>
/// Gets or sets bytes transcoded.
diff --git a/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs b/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
index 7b32d76ba..7a1ca252c 100644
--- a/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
+++ b/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
@@ -141,7 +141,7 @@ namespace Jellyfin.Api.Models.PlaybackDtos
private bool IsThrottleAllowed(TranscodingJobDto job, int thresholdSeconds)
{
- var bytesDownloaded = job.BytesDownloaded ?? 0;
+ var bytesDownloaded = job.BytesDownloaded;
var transcodingPositionTicks = job.TranscodingPositionTicks ?? 0;
var downloadPositionTicks = job.DownloadPositionTicks ?? 0;
@@ -197,7 +197,7 @@ namespace Jellyfin.Api.Models.PlaybackDtos
}
}
- _logger.LogDebug("No throttle data for " + path);
+ _logger.LogDebug("No throttle data for {Path}", path);
return false;
}
diff --git a/Jellyfin.Api/Models/StreamingDtos/StreamState.cs b/Jellyfin.Api/Models/StreamingDtos/StreamState.cs
index 0f84faeaf..cbabf087b 100644
--- a/Jellyfin.Api/Models/StreamingDtos/StreamState.cs
+++ b/Jellyfin.Api/Models/StreamingDtos/StreamState.cs
@@ -55,7 +55,7 @@ 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.
diff --git a/Jellyfin.Api/Models/SubtitleDtos/UploadSubtitleDto.cs b/Jellyfin.Api/Models/SubtitleDtos/UploadSubtitleDto.cs
index 30473255e..be0595798 100644
--- a/Jellyfin.Api/Models/SubtitleDtos/UploadSubtitleDto.cs
+++ b/Jellyfin.Api/Models/SubtitleDtos/UploadSubtitleDto.cs
@@ -31,4 +31,4 @@ namespace Jellyfin.Api.Models.SubtitleDtos
[Required]
public string Data { get; set; } = string.Empty;
}
-} \ No newline at end of file
+}