commit
143ef71528
@ -1,37 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA1003
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Common.Progress
|
||||
{
|
||||
/// <summary>
|
||||
/// Class ActionableProgress.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type for the action parameter.</typeparam>
|
||||
public class ActionableProgress<T> : IProgress<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// The _actions.
|
||||
/// </summary>
|
||||
private Action<T>? _action;
|
||||
|
||||
public event EventHandler<T>? ProgressChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Registers the action.
|
||||
/// </summary>
|
||||
/// <param name="action">The action.</param>
|
||||
public void RegisterAction(Action<T> action)
|
||||
{
|
||||
_action = action;
|
||||
}
|
||||
|
||||
public void Report(T value)
|
||||
{
|
||||
ProgressChanged?.Invoke(this, value);
|
||||
|
||||
_action?.Invoke(value);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA1003
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Common.Progress
|
||||
{
|
||||
public class SimpleProgress<T> : IProgress<T>
|
||||
{
|
||||
public event EventHandler<T>? ProgressChanged;
|
||||
|
||||
public void Report(T value)
|
||||
{
|
||||
ProgressChanged?.Invoke(this, value);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
#pragma warning disable CA1711, CS1591
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using MediaBrowser.Model.Drawing;
|
||||
|
||||
namespace MediaBrowser.Controller.Drawing
|
||||
{
|
||||
public class ImageStream : IDisposable
|
||||
{
|
||||
public ImageStream(Stream stream)
|
||||
{
|
||||
Stream = stream;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the stream.
|
||||
/// </summary>
|
||||
/// <value>The stream.</value>
|
||||
public Stream Stream { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the format.
|
||||
/// </summary>
|
||||
/// <value>The format.</value>
|
||||
public ImageFormat Format { get; set; }
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
Stream?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
public class ImageEncodingOptions
|
||||
{
|
||||
public string InputPath { get; set; }
|
||||
|
||||
public int? Width { get; set; }
|
||||
|
||||
public int? Height { get; set; }
|
||||
|
||||
public int? MaxWidth { get; set; }
|
||||
|
||||
public int? MaxHeight { get; set; }
|
||||
|
||||
public int? Quality { get; set; }
|
||||
|
||||
public string Format { get; set; }
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
/// <summary>
|
||||
/// Class MediaEncoderHelpers.
|
||||
/// </summary>
|
||||
public static class MediaEncoderHelpers
|
||||
{
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Dto
|
||||
{
|
||||
public class ImageByNameInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the theme.
|
||||
/// </summary>
|
||||
/// <value>The theme.</value>
|
||||
public string Theme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the context.
|
||||
/// </summary>
|
||||
/// <value>The context.</value>
|
||||
public string Context { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the length of the file.
|
||||
/// </summary>
|
||||
/// <value>The length of the file.</value>
|
||||
public long FileLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the format.
|
||||
/// </summary>
|
||||
/// <value>The format.</value>
|
||||
public string Format { get; set; }
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
public static class SpecialFolder
|
||||
{
|
||||
public const string TvShowSeries = "TvShowSeries";
|
||||
public const string TvGenres = "TvGenres";
|
||||
public const string TvGenre = "TvGenre";
|
||||
public const string TvLatest = "TvLatest";
|
||||
public const string TvNextUp = "TvNextUp";
|
||||
public const string TvResume = "TvResume";
|
||||
public const string TvFavoriteSeries = "TvFavoriteSeries";
|
||||
public const string TvFavoriteEpisodes = "TvFavoriteEpisodes";
|
||||
|
||||
public const string MovieLatest = "MovieLatest";
|
||||
public const string MovieResume = "MovieResume";
|
||||
public const string MovieMovies = "MovieMovies";
|
||||
public const string MovieCollections = "MovieCollections";
|
||||
public const string MovieFavorites = "MovieFavorites";
|
||||
public const string MovieGenres = "MovieGenres";
|
||||
public const string MovieGenre = "MovieGenre";
|
||||
|
||||
public const string MusicArtists = "MusicArtists";
|
||||
public const string MusicAlbumArtists = "MusicAlbumArtists";
|
||||
public const string MusicAlbums = "MusicAlbums";
|
||||
public const string MusicGenres = "MusicGenres";
|
||||
public const string MusicLatest = "MusicLatest";
|
||||
public const string MusicPlaylists = "MusicPlaylists";
|
||||
public const string MusicSongs = "MusicSongs";
|
||||
public const string MusicFavorites = "MusicFavorites";
|
||||
public const string MusicFavoriteArtists = "MusicFavoriteArtists";
|
||||
public const string MusicFavoriteAlbums = "MusicFavoriteAlbums";
|
||||
public const string MusicFavoriteSongs = "MusicFavoriteSongs";
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
#nullable disable
|
||||
|
||||
using System.Net;
|
||||
|
||||
namespace MediaBrowser.Model.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Used by the sockets wrapper to hold raw data received from a UDP socket.
|
||||
/// </summary>
|
||||
public sealed class SocketReceiveResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the buffer to place received data into.
|
||||
/// </summary>
|
||||
public byte[] Buffer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of bytes received.
|
||||
/// </summary>
|
||||
public int ReceivedBytes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the <see cref="IPEndPoint"/> the data was received from.
|
||||
/// </summary>
|
||||
public IPEndPoint RemoteEndPoint { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the local <see cref="IPAddress"/>.
|
||||
/// </summary>
|
||||
public IPAddress LocalIPAddress { get; set; }
|
||||
}
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
using System.Globalization;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace Jellyfin.Drawing.Skia;
|
||||
|
||||
/// <summary>
|
||||
/// Represents errors that occur during interaction with Skia codecs.
|
||||
/// </summary>
|
||||
public class SkiaCodecException : SkiaException
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SkiaCodecException" /> class.
|
||||
/// </summary>
|
||||
/// <param name="result">The non-successful codec result returned by Skia.</param>
|
||||
public SkiaCodecException(SKCodecResult result)
|
||||
{
|
||||
CodecResult = result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SkiaCodecException" /> class
|
||||
/// with a specified error message.
|
||||
/// </summary>
|
||||
/// <param name="result">The non-successful codec result returned by Skia.</param>
|
||||
/// <param name="message">The message that describes the error.</param>
|
||||
public SkiaCodecException(SKCodecResult result, string message)
|
||||
: base(message)
|
||||
{
|
||||
CodecResult = result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the non-successful codec result returned by Skia.
|
||||
/// </summary>
|
||||
public SKCodecResult CodecResult { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString()
|
||||
=> string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"Non-success codec result: {0}\n{1}",
|
||||
CodecResult,
|
||||
base.ToString());
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Jellyfin.Drawing.Skia;
|
||||
|
||||
/// <summary>
|
||||
/// Represents errors that occur during interaction with Skia.
|
||||
/// </summary>
|
||||
public class SkiaException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SkiaException"/> class.
|
||||
/// </summary>
|
||||
public SkiaException()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SkiaException"/> class with a specified error message.
|
||||
/// </summary>
|
||||
/// <param name="message">The message that describes the error.</param>
|
||||
public SkiaException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SkiaException"/> class with a specified error message and a
|
||||
/// reference to the inner exception that is the cause of this exception.
|
||||
/// </summary>
|
||||
/// <param name="message">The error message that explains the reason for the exception.</param>
|
||||
/// <param name="innerException">
|
||||
/// The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if
|
||||
/// no inner exception is specified.
|
||||
/// </param>
|
||||
public SkiaException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
Loading…
Reference in new issue