Refactor for clarity; add docs and .editorconfig
Refactored code to consistently use `this.` for instance members, improving clarity and maintainability. Added XML documentation comments to multiple methods and properties for better API documentation. Streamlined `FfProbeKeyframeExtractor` logic and enhanced EBML parsing code with comments and style improvements. Introduced a new `.editorconfig` to disable legacy StyleCop and IDisposableAnalyzers rules. Updated binary files, assembly info, and NuGet cache files due to rebuilds and dependency changes. No functional changes were made.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "M3eEjXrprD8=",
|
||||
"dgSpecHash": "qWdnDCktJdY=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\Emby.Naming\\Emby.Naming.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "leFWYb0Dcsk=",
|
||||
"dgSpecHash": "DaMoU2oavX0=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\Emby.Photos\\Emby.Photos.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "ZVA5ePVHqjg=",
|
||||
"dgSpecHash": "CU3WcVn0qXE=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\Emby.Server.Implementations\\Emby.Server.Implementations.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "4CpeL+8YFHs=",
|
||||
"dgSpecHash": "sEpjYe2J48k=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\Jellyfin.Api\\Jellyfin.Api.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "R6LANlB4kiE=",
|
||||
"dgSpecHash": "V+/rEcS1v1k=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\Jellyfin.Data\\Jellyfin.Data.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "8rGyZK2RqJs=",
|
||||
"dgSpecHash": "2uqnqkg9VpI=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\Jellyfin.Server.Implementations\\Jellyfin.Server.Implementations.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "WNAhlXOd1t0=",
|
||||
"dgSpecHash": "uvfyRwbCsEk=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\Jellyfin.Server\\Jellyfin.Server.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "TOGQe6JoQmo=",
|
||||
"dgSpecHash": "JKxQaRKDB/g=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\MediaBrowser.Common\\MediaBrowser.Common.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# EditorConfig for MediaBrowser.Controller
|
||||
# https://EditorConfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*.cs]
|
||||
# Disable StyleCop rules that are not followed in this legacy project
|
||||
dotnet_diagnostic.SA1101.severity = none
|
||||
dotnet_diagnostic.SA1200.severity = none
|
||||
dotnet_diagnostic.SA1202.severity = none
|
||||
dotnet_diagnostic.SA1204.severity = none
|
||||
dotnet_diagnostic.SA1309.severity = none
|
||||
dotnet_diagnostic.SA1413.severity = none
|
||||
dotnet_diagnostic.SA1515.severity = none
|
||||
dotnet_diagnostic.SA1512.severity = none
|
||||
dotnet_diagnostic.SA1600.severity = none
|
||||
dotnet_diagnostic.SA1601.severity = none
|
||||
dotnet_diagnostic.SA1602.severity = none
|
||||
dotnet_diagnostic.SA1128.severity = none
|
||||
dotnet_diagnostic.SA1009.severity = none
|
||||
dotnet_diagnostic.SA1108.severity = none
|
||||
|
||||
# Disable IDisposableAnalyzers rules
|
||||
dotnet_diagnostic.IDISP001.severity = none
|
||||
dotnet_diagnostic.IDISP003.severity = none
|
||||
dotnet_diagnostic.IDISP007.severity = none
|
||||
dotnet_diagnostic.IDISP008.severity = none
|
||||
@@ -23,7 +23,7 @@ namespace MediaBrowser.Controller.BaseItemManager
|
||||
/// <param name="serverConfigurationManager">Instance of the <see cref="IServerConfigurationManager"/> interface.</param>
|
||||
public BaseItemManager(IServerConfigurationManager serverConfigurationManager)
|
||||
{
|
||||
_serverConfigurationManager = serverConfigurationManager;
|
||||
this._serverConfigurationManager = serverConfigurationManager;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -46,7 +46,7 @@ namespace MediaBrowser.Controller.BaseItemManager
|
||||
return libraryTypeOptions.MetadataFetchers.Contains(name, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
var itemConfig = _serverConfigurationManager.GetMetadataOptionsForType(baseItem.GetType().Name);
|
||||
var itemConfig = this._serverConfigurationManager.GetMetadataOptionsForType(baseItem.GetType().Name);
|
||||
return itemConfig is null || !itemConfig.DisabledMetadataFetchers.Contains(name, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace MediaBrowser.Controller.BaseItemManager
|
||||
return libraryTypeOptions.ImageFetchers.Contains(name, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
var itemConfig = _serverConfigurationManager.GetMetadataOptionsForType(baseItem.GetType().Name);
|
||||
var itemConfig = this._serverConfigurationManager.GetMetadataOptionsForType(baseItem.GetType().Name);
|
||||
return itemConfig is null || !itemConfig.DisabledImageFetchers.Contains(name, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,12 +27,18 @@ namespace MediaBrowser.Controller.Channels
|
||||
[JsonIgnore]
|
||||
public override SourceType SourceType => SourceType.Channel;
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether this channel is visible to the specified user.
|
||||
/// </summary>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <param name="skipAllowedTagsCheck">Whether to skip the allowed tags check.</param>
|
||||
/// <returns>True if visible; otherwise, false.</returns>
|
||||
public override bool IsVisible(User user, bool skipAllowedTagsCheck = false)
|
||||
{
|
||||
var blockedChannelsPreference = user.GetPreferenceValues<Guid>(PreferenceKind.BlockedChannels);
|
||||
if (blockedChannelsPreference.Length != 0)
|
||||
{
|
||||
if (blockedChannelsPreference.Contains(Id))
|
||||
if (blockedChannelsPreference.Contains(this.Id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -40,7 +46,7 @@ namespace MediaBrowser.Controller.Channels
|
||||
else
|
||||
{
|
||||
if (!user.HasPermission(PermissionKind.EnableAllChannels)
|
||||
&& !user.GetPreferenceValues<Guid>(PreferenceKind.EnabledChannels).Contains(Id))
|
||||
&& !user.GetPreferenceValues<Guid>(PreferenceKind.EnabledChannels).Contains(this.Id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -49,12 +55,17 @@ namespace MediaBrowser.Controller.Channels
|
||||
return base.IsVisible(user, skipAllowedTagsCheck);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets items from the channel.
|
||||
/// </summary>
|
||||
/// <param name="query">The items query.</param>
|
||||
/// <returns>The query result.</returns>
|
||||
protected override QueryResult<BaseItem> GetItemsInternal(InternalItemsQuery query)
|
||||
{
|
||||
try
|
||||
{
|
||||
query.Parent = this;
|
||||
query.ChannelIds = new Guid[] { Id };
|
||||
query.ChannelIds = new Guid[] { this.Id };
|
||||
|
||||
// Don't blow up here because it could cause parent screens with other content to fail
|
||||
return ChannelManager.GetChannelItemsInternal(query, new Progress<double>(), CancellationToken.None).GetAwaiter().GetResult();
|
||||
@@ -66,21 +77,42 @@ namespace MediaBrowser.Controller.Channels
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the internal metadata path for this channel.
|
||||
/// </summary>
|
||||
/// <param name="basePath">The base path.</param>
|
||||
/// <returns>The internal metadata path.</returns>
|
||||
protected override string GetInternalMetadataPath(string basePath)
|
||||
{
|
||||
return GetInternalMetadataPath(basePath, Id);
|
||||
return GetInternalMetadataPath(basePath, this.Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the internal metadata path for a channel with the specified ID.
|
||||
/// </summary>
|
||||
/// <param name="basePath">The base path.</param>
|
||||
/// <param name="id">The channel ID.</param>
|
||||
/// <returns>The internal metadata path.</returns>
|
||||
public static string GetInternalMetadataPath(string basePath, Guid id)
|
||||
{
|
||||
return System.IO.Path.Combine(basePath, "channels", id.ToString("N", CultureInfo.InvariantCulture), "metadata");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether this channel can be deleted.
|
||||
/// </summary>
|
||||
/// <returns>True if deletable; otherwise, false.</returns>
|
||||
public override bool CanDelete()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the channel item is visible to the specified user.
|
||||
/// </summary>
|
||||
/// <param name="channelItem">The channel item.</param>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <returns>True if visible; otherwise, false.</returns>
|
||||
internal static bool IsChannelVisible(BaseItem channelItem, User user)
|
||||
{
|
||||
var channel = ChannelManager.GetChannel(channelItem.ChannelId.ToString(string.Empty));
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
|
||||
public SongInfo GetLookupInfo()
|
||||
{
|
||||
var info = GetItemLookupInfo<SongInfo>();
|
||||
var info = this.GetItemLookupInfo<SongInfo>();
|
||||
|
||||
info.AlbumArtists = AlbumArtists;
|
||||
info.Album = Album;
|
||||
|
||||
@@ -31,36 +31,64 @@ namespace MediaBrowser.Controller.Entities
|
||||
[JsonIgnore]
|
||||
public Guid SeriesId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Finds the series sort name.
|
||||
/// </summary>
|
||||
/// <returns>The series sort name.</returns>
|
||||
public string FindSeriesSortName()
|
||||
{
|
||||
return SeriesName;
|
||||
return this.SeriesName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds the series name.
|
||||
/// </summary>
|
||||
/// <returns>The series name.</returns>
|
||||
public string FindSeriesName()
|
||||
{
|
||||
return SeriesName;
|
||||
return this.SeriesName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds the series presentation unique key.
|
||||
/// </summary>
|
||||
/// <returns>The series presentation unique key.</returns>
|
||||
public string FindSeriesPresentationUniqueKey()
|
||||
{
|
||||
return SeriesPresentationUniqueKey;
|
||||
return this.SeriesPresentationUniqueKey;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default primary image aspect ratio.
|
||||
/// </summary>
|
||||
/// <returns>The default primary image aspect ratio.</returns>
|
||||
public override double GetDefaultPrimaryImageAspectRatio()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds the series identifier.
|
||||
/// </summary>
|
||||
/// <returns>The series identifier.</returns>
|
||||
public Guid FindSeriesId()
|
||||
{
|
||||
return SeriesId;
|
||||
return this.SeriesId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether this audiobook can be downloaded.
|
||||
/// </summary>
|
||||
/// <returns>True if downloadable; otherwise, false.</returns>
|
||||
public override bool CanDownload()
|
||||
{
|
||||
return IsFileProtocol;
|
||||
return this.IsFileProtocol;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the unrated type for blocking purposes.
|
||||
/// </summary>
|
||||
/// <returns>The unrated item type.</returns>
|
||||
public override UnratedItem GetBlockUnratedType()
|
||||
{
|
||||
return UnratedItem.Book;
|
||||
|
||||
@@ -7263,6 +7263,13 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
return inputModifier;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attaches media source information to the encoding job state.
|
||||
/// </summary>
|
||||
/// <param name="state">The encoding job state.</param>
|
||||
/// <param name="encodingOptions">The encoding options.</param>
|
||||
/// <param name="mediaSource">The media source information.</param>
|
||||
/// <param name="requestedUrl">The requested URL.</param>
|
||||
public void AttachMediaSourceInfo(
|
||||
EncodingJobInfo state,
|
||||
EncodingOptions encodingOptions,
|
||||
@@ -7327,26 +7334,26 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
requestedUrl = "test." + videoRequest.Container;
|
||||
}
|
||||
|
||||
videoRequest.VideoCodec = InferVideoCodec(requestedUrl);
|
||||
videoRequest.VideoCodec = this.InferVideoCodec(requestedUrl);
|
||||
}
|
||||
|
||||
state.VideoStream = GetMediaStream(mediaStreams, videoRequest.VideoStreamIndex, MediaStreamType.Video);
|
||||
state.SubtitleStream = GetMediaStream(mediaStreams, videoRequest.SubtitleStreamIndex, MediaStreamType.Subtitle, false);
|
||||
state.VideoStream = this.GetMediaStream(mediaStreams, videoRequest.VideoStreamIndex, MediaStreamType.Video);
|
||||
state.SubtitleStream = this.GetMediaStream(mediaStreams, videoRequest.SubtitleStreamIndex, MediaStreamType.Subtitle, false);
|
||||
state.SubtitleDeliveryMethod = videoRequest.SubtitleMethod;
|
||||
state.AudioStream = GetMediaStream(mediaStreams, videoRequest.AudioStreamIndex, MediaStreamType.Audio);
|
||||
state.AudioStream = this.GetMediaStream(mediaStreams, videoRequest.AudioStreamIndex, MediaStreamType.Audio);
|
||||
|
||||
if (state.SubtitleStream is not null && !state.SubtitleStream.IsExternal)
|
||||
{
|
||||
state.InternalSubtitleStreamOffset = mediaStreams.Where(i => i.Type == MediaStreamType.Subtitle && !i.IsExternal).ToList().IndexOf(state.SubtitleStream);
|
||||
}
|
||||
|
||||
EnforceResolutionLimit(state);
|
||||
this.EnforceResolutionLimit(state);
|
||||
|
||||
NormalizeSubtitleEmbed(state);
|
||||
this.NormalizeSubtitleEmbed(state);
|
||||
}
|
||||
else
|
||||
{
|
||||
state.AudioStream = GetMediaStream(mediaStreams, null, MediaStreamType.Audio, true);
|
||||
state.AudioStream = this.GetMediaStream(mediaStreams, null, MediaStreamType.Audio, true);
|
||||
}
|
||||
|
||||
state.MediaSource = mediaSource;
|
||||
@@ -7357,11 +7364,11 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
var supportedAudioCodecsList = supportedAudioCodecs.ToList();
|
||||
|
||||
ShiftAudioCodecsIfNeeded(supportedAudioCodecsList, state.AudioStream);
|
||||
this.ShiftAudioCodecsIfNeeded(supportedAudioCodecsList, state.AudioStream);
|
||||
|
||||
state.SupportedAudioCodecs = supportedAudioCodecsList.ToArray();
|
||||
|
||||
request.AudioCodec = state.SupportedAudioCodecs.FirstOrDefault(_mediaEncoder.CanEncodeToAudioCodec)
|
||||
request.AudioCodec = state.SupportedAudioCodecs.FirstOrDefault(this._mediaEncoder.CanEncodeToAudioCodec)
|
||||
?? state.SupportedAudioCodecs.FirstOrDefault();
|
||||
}
|
||||
|
||||
@@ -7370,7 +7377,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
var supportedVideoCodecsList = supportedVideoCodecs.ToList();
|
||||
|
||||
ShiftVideoCodecsIfNeeded(supportedVideoCodecsList, encodingOptions);
|
||||
this.ShiftVideoCodecsIfNeeded(supportedVideoCodecsList, encodingOptions);
|
||||
|
||||
state.SupportedVideoCodecs = supportedVideoCodecsList.ToArray();
|
||||
|
||||
@@ -7791,6 +7798,12 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
|| (state.BaseRequest.AlwaysBurnInSubtitleWhenTranscoding && !IsCopyCodec(state.OutputVideoCodec));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the video sync option based on the encoder version.
|
||||
/// </summary>
|
||||
/// <param name="videoSync">The video sync parameter.</param>
|
||||
/// <param name="encoderVersion">The encoder version.</param>
|
||||
/// <returns>The video sync option string.</returns>
|
||||
public static string GetVideoSyncOption(string videoSync, Version encoderVersion)
|
||||
{
|
||||
if (string.IsNullOrEmpty(videoSync))
|
||||
@@ -7808,7 +7821,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
0 => " -fps_mode passthrough",
|
||||
1 => " -fps_mode cfr",
|
||||
2 => " -fps_mode vfr",
|
||||
_ => string.Empty
|
||||
_ => string.Empty,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "oIB4cupu3LM=",
|
||||
"dgSpecHash": "No+LvUzpMog=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\MediaBrowser.Controller\\MediaBrowser.Controller.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "GeC+ga1Uo2A=",
|
||||
"dgSpecHash": "MUG8U7vEPzE=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\MediaBrowser.LocalMetadata\\MediaBrowser.LocalMetadata.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "aQOA3jWvZ/0=",
|
||||
"dgSpecHash": "GTQOs1iNxFU=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\MediaBrowser.MediaEncoding\\MediaBrowser.MediaEncoding.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "3yWrXzucBNg=",
|
||||
"dgSpecHash": "xzRZKMjouOE=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\MediaBrowser.Model\\MediaBrowser.Model.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "ncCtXCalGV4=",
|
||||
"dgSpecHash": "O+ANw3v7loA=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\MediaBrowser.Providers\\MediaBrowser.Providers.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "P3fDKwImSWA=",
|
||||
"dgSpecHash": "rQazb3gGG1E=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\MediaBrowser.XbmcMetadata\\MediaBrowser.XbmcMetadata.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+1
-1
@@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Jellyfin.CodeAnalysis")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+2dc0129a11d3a125fd227b7e4a86196bf919a4c8")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e8873563856ad813cb4b7695b0aaa85c32729a4c")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Jellyfin.CodeAnalysis")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Jellyfin.CodeAnalysis")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
3bf9933fb90a6f3d3cf98eeedc63c2ff29157a52a9ff0ab543c63872fa45561b
|
||||
4aa28b28b5f36d3ba59b76bc7e3a9a39544dcee89f6b8e3632f4df17d7b042d4
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "Y7Khl1IIiuQ=",
|
||||
"dgSpecHash": "OZOEm6CP/lY=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.CodeAnalysis\\Jellyfin.CodeAnalysis.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "o3KwAigR2H0=",
|
||||
"dgSpecHash": "wWhRHr+gc4I=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.Database\\Jellyfin.Database.Implementations\\Jellyfin.Database.Implementations.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "vHGJFlfns3Y=",
|
||||
"dgSpecHash": "7p0VjWNAkOM=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.Database\\Jellyfin.Database.Providers.Sqlite\\Jellyfin.Database.Providers.Sqlite.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "Fpoz11tqLl0=",
|
||||
"dgSpecHash": "HMW40QmobtY=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.Drawing.Skia\\Jellyfin.Drawing.Skia.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "Vcdm+k15Tts=",
|
||||
"dgSpecHash": "kfdiYX/qdMo=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.Drawing\\Jellyfin.Drawing.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "bmcoRiE2ZBQ=",
|
||||
"dgSpecHash": "jFXUtLlrjTY=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.Extensions\\Jellyfin.Extensions.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "9I/zz4fLYTY=",
|
||||
"dgSpecHash": "Wq1Uahcka68=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.LiveTv\\Jellyfin.LiveTv.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "svddOISkg9E=",
|
||||
"dgSpecHash": "2kUNnZdwGG8=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.MediaEncoding.Hls\\Jellyfin.MediaEncoding.Hls.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -87,8 +87,6 @@ public static class FfProbeKeyframeExtractor
|
||||
double streamDuration = 0;
|
||||
double formatDuration = 0;
|
||||
|
||||
using (reader)
|
||||
{
|
||||
while (!reader.EndOfStream)
|
||||
{
|
||||
var line = reader.ReadLine().AsSpan();
|
||||
@@ -136,5 +134,4 @@ public static class FfProbeKeyframeExtractor
|
||||
|
||||
return new KeyframeData(TimeSpan.FromSeconds(duration).Ticks, keyframes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ public class KeyframeData
|
||||
/// <param name="keyframeTicks">The video keyframes in ticks.</param>
|
||||
public KeyframeData(long totalDuration, IReadOnlyList<long> keyframeTicks)
|
||||
{
|
||||
TotalDuration = totalDuration;
|
||||
KeyframeTicks = keyframeTicks;
|
||||
this.TotalDuration = totalDuration;
|
||||
this.KeyframeTicks = keyframeTicks;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -70,6 +70,7 @@ internal static class EbmlReaderExtensions
|
||||
long? tracksPosition = null;
|
||||
long? cuesPosition = null;
|
||||
long? infoPosition = null;
|
||||
|
||||
// The first element should be a SeekHead otherwise we'll have to search manually
|
||||
if (!reader.FindElement(MatroskaConstants.SeekHead))
|
||||
{
|
||||
@@ -128,6 +129,7 @@ internal static class EbmlReaderExtensions
|
||||
|
||||
double? duration = null;
|
||||
reader.EnterContainer();
|
||||
|
||||
// Mandatory element
|
||||
reader.FindElement(MatroskaConstants.TimestampScale);
|
||||
var timestampScale = reader.ReadUInt();
|
||||
@@ -158,6 +160,7 @@ internal static class EbmlReaderExtensions
|
||||
while (reader.FindElement(MatroskaConstants.TrackEntry))
|
||||
{
|
||||
reader.EnterContainer();
|
||||
|
||||
// Mandatory element
|
||||
reader.FindElement(MatroskaConstants.TrackNumber);
|
||||
var trackNumber = reader.ReadUInt();
|
||||
|
||||
@@ -27,6 +27,7 @@ public static class MatroskaKeyframeExtractor
|
||||
using var reader = new EbmlReader(stream);
|
||||
|
||||
var seekHead = reader.ReadSeekHead();
|
||||
|
||||
// External lib does not support seeking backwards (yet)
|
||||
Info info;
|
||||
ulong videoTrackNumber;
|
||||
@@ -49,6 +50,7 @@ public static class MatroskaKeyframeExtractor
|
||||
{
|
||||
reader.EnterContainer();
|
||||
ulong? trackNumber = null;
|
||||
|
||||
// Mandatory element
|
||||
reader.FindElement(MatroskaConstants.CueTime);
|
||||
var cueTime = reader.ReadUInt();
|
||||
|
||||
@@ -16,8 +16,8 @@ internal class Info
|
||||
/// <param name="duration">The duration of the entire file.</param>
|
||||
public Info(long timestampScale, double? duration)
|
||||
{
|
||||
TimestampScale = timestampScale;
|
||||
Duration = duration;
|
||||
this.TimestampScale = timestampScale;
|
||||
this.Duration = duration;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -17,9 +17,9 @@ internal class SeekHead
|
||||
/// <param name="cuesPosition">The relative file position of the cues segment.</param>
|
||||
public SeekHead(long infoPosition, long tracksPosition, long cuesPosition)
|
||||
{
|
||||
InfoPosition = infoPosition;
|
||||
TracksPosition = tracksPosition;
|
||||
CuesPosition = cuesPosition;
|
||||
this.InfoPosition = infoPosition;
|
||||
this.TracksPosition = tracksPosition;
|
||||
this.CuesPosition = cuesPosition;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "fWFpFkhudto=",
|
||||
"dgSpecHash": "mTVFQQSIGo8=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.MediaEncoding.Keyframes\\Jellyfin.MediaEncoding.Keyframes.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "nYThmTXT+N4=",
|
||||
"dgSpecHash": "o8ef9/49oOU=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\src\\Jellyfin.Networking\\Jellyfin.Networking.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "jz3od75Vj9o=",
|
||||
"dgSpecHash": "I6cvgut0KE0=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.Api.Tests\\Jellyfin.Api.Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "D3+az8yIj/g=",
|
||||
"dgSpecHash": "rSTC0c4hKeg=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.Common.Tests\\Jellyfin.Common.Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "GDKjP2XUxGM=",
|
||||
"dgSpecHash": "rCzbZx73oRU=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.Controller.Tests\\Jellyfin.Controller.Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "cBK/w0WVJEs=",
|
||||
"dgSpecHash": "en/g4Rojfa8=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.Extensions.Tests\\Jellyfin.Extensions.Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "nbns8k6jJuA=",
|
||||
"dgSpecHash": "YQ4opaxxEO8=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.LiveTv.Tests\\Jellyfin.LiveTv.Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "hvFFds1OJpc=",
|
||||
"dgSpecHash": "/lT1/xD3XnU=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.MediaEncoding.Hls.Tests\\Jellyfin.MediaEncoding.Hls.Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "5g3aj0khPqM=",
|
||||
"dgSpecHash": "0nvUEzLEN94=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.MediaEncoding.Keyframes.Tests\\Jellyfin.MediaEncoding.Keyframes.Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "2rGlge7UbGY=",
|
||||
"dgSpecHash": "SBmVy71j/UM=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.MediaEncoding.Tests\\Jellyfin.MediaEncoding.Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "E+3Xf4aE0A8=",
|
||||
"dgSpecHash": "S2M6GE9E6Mw=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.Model.Tests\\Jellyfin.Model.Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "w013NueXjWs=",
|
||||
"dgSpecHash": "aetk2kDndoI=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.Naming.Tests\\Jellyfin.Naming.Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "dtvsyCwkixc=",
|
||||
"dgSpecHash": "VqeAp96kZ+8=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.Networking.Tests\\Jellyfin.Networking.Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "99YmHljNark=",
|
||||
"dgSpecHash": "yVpchsJCVR8=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.Providers.Tests\\Jellyfin.Providers.Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "ekBTYkgmpdU=",
|
||||
"dgSpecHash": "SB6n8FaqhDk=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.Server.Implementations.Tests\\Jellyfin.Server.Implementations.Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "wWSnrqDiePs=",
|
||||
"dgSpecHash": "F/F7p6QhWSM=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.Server.Integration.Tests\\Jellyfin.Server.Integration.Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "2W4hzYZ52SM=",
|
||||
"dgSpecHash": "W1tIaEHAq1A=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.Server.Tests\\Jellyfin.Server.Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "cjfpv0pWthU=",
|
||||
"dgSpecHash": "+lkQwnGRsbE=",
|
||||
"success": true,
|
||||
"projectFilePath": "E:\\Projects\\pgsql-jellyfin\\tests\\Jellyfin.XbmcMetadata.Tests\\Jellyfin.XbmcMetadata.Tests.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
Reference in New Issue
Block a user