Remove dead code
This commit is contained in:
parent
a937a854f2
commit
9b8eb1ba53
|
@ -1,85 +0,0 @@
|
|||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Profiler.
|
||||
/// </summary>
|
||||
public class Profiler : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// The name.
|
||||
/// </summary>
|
||||
private readonly string _name;
|
||||
|
||||
/// <summary>
|
||||
/// The stopwatch.
|
||||
/// </summary>
|
||||
private readonly Stopwatch _stopwatch;
|
||||
|
||||
/// <summary>
|
||||
/// The _logger.
|
||||
/// </summary>
|
||||
private readonly ILogger<Profiler> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Profiler" /> class.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="logger">The logger.</param>
|
||||
public Profiler(string name, ILogger<Profiler> logger)
|
||||
{
|
||||
this._name = name;
|
||||
|
||||
_logger = logger;
|
||||
|
||||
_stopwatch = new Stopwatch();
|
||||
_stopwatch.Start();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Releases unmanaged and - optionally - managed resources.
|
||||
/// </summary>
|
||||
/// <param name="dispose"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
|
||||
protected virtual void Dispose(bool dispose)
|
||||
{
|
||||
if (dispose)
|
||||
{
|
||||
_stopwatch.Stop();
|
||||
string message;
|
||||
if (_stopwatch.ElapsedMilliseconds > 300000)
|
||||
{
|
||||
message = string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} took {1} minutes.",
|
||||
_name,
|
||||
((float)_stopwatch.ElapsedMilliseconds / 60000).ToString("F", CultureInfo.InvariantCulture));
|
||||
}
|
||||
else
|
||||
{
|
||||
message = string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} took {1} seconds.",
|
||||
_name,
|
||||
((float)_stopwatch.ElapsedMilliseconds / 1000).ToString("#0.000", CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
_logger.LogInformation(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,75 +0,0 @@
|
|||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Querying
|
||||
{
|
||||
public class EpisodeQuery
|
||||
{
|
||||
public EpisodeQuery()
|
||||
{
|
||||
Fields = Array.Empty<ItemFields>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user identifier.
|
||||
/// </summary>
|
||||
/// <value>The user identifier.</value>
|
||||
public string UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the season identifier.
|
||||
/// </summary>
|
||||
/// <value>The season identifier.</value>
|
||||
public string SeasonId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the series identifier.
|
||||
/// </summary>
|
||||
/// <value>The series identifier.</value>
|
||||
public string SeriesId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is missing.
|
||||
/// </summary>
|
||||
/// <value><c>null</c> if [is missing] contains no value, <c>true</c> if [is missing]; otherwise, <c>false</c>.</value>
|
||||
public bool? IsMissing { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is virtual unaired.
|
||||
/// </summary>
|
||||
/// <value><c>null</c> if [is virtual unaired] contains no value, <c>true</c> if [is virtual unaired]; otherwise, <c>false</c>.</value>
|
||||
public bool? IsVirtualUnaired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the season number.
|
||||
/// </summary>
|
||||
/// <value>The season number.</value>
|
||||
public int? SeasonNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the fields.
|
||||
/// </summary>
|
||||
/// <value>The fields.</value>
|
||||
public ItemFields[] Fields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the start index.
|
||||
/// </summary>
|
||||
/// <value>The start index.</value>
|
||||
public int? StartIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the limit.
|
||||
/// </summary>
|
||||
/// <value>The limit.</value>
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the start item identifier.
|
||||
/// </summary>
|
||||
/// <value>The start item identifier.</value>
|
||||
public string StartItemId { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Querying
|
||||
{
|
||||
public class MovieRecommendationQuery
|
||||
{
|
||||
public MovieRecommendationQuery()
|
||||
{
|
||||
ItemLimit = 10;
|
||||
CategoryLimit = 6;
|
||||
Fields = Array.Empty<ItemFields>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user identifier.
|
||||
/// </summary>
|
||||
/// <value>The user identifier.</value>
|
||||
public string UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the parent identifier.
|
||||
/// </summary>
|
||||
/// <value>The parent identifier.</value>
|
||||
public string ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the item limit.
|
||||
/// </summary>
|
||||
/// <value>The item limit.</value>
|
||||
public int ItemLimit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the category limit.
|
||||
/// </summary>
|
||||
/// <value>The category limit.</value>
|
||||
public int CategoryLimit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the fields.
|
||||
/// </summary>
|
||||
/// <value>The fields.</value>
|
||||
public ItemFields[] Fields { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Model.Querying
|
||||
{
|
||||
public class UpcomingEpisodesQuery
|
||||
{
|
||||
public UpcomingEpisodesQuery()
|
||||
{
|
||||
EnableImageTypes = Array.Empty<ImageType>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user id.
|
||||
/// </summary>
|
||||
/// <value>The user id.</value>
|
||||
public string UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the parent identifier.
|
||||
/// </summary>
|
||||
/// <value>The parent identifier.</value>
|
||||
public string ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the start index. Use for paging.
|
||||
/// </summary>
|
||||
/// <value>The start index.</value>
|
||||
public int? StartIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum number of items to return.
|
||||
/// </summary>
|
||||
/// <value>The limit.</value>
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the fields to return within the items, in addition to basic information.
|
||||
/// </summary>
|
||||
/// <value>The fields.</value>
|
||||
public ItemFields[] Fields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [enable images].
|
||||
/// </summary>
|
||||
/// <value><c>null</c> if [enable images] contains no value, <c>true</c> if [enable images]; otherwise, <c>false</c>.</value>
|
||||
public bool? EnableImages { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the image type limit.
|
||||
/// </summary>
|
||||
/// <value>The image type limit.</value>
|
||||
public int? ImageTypeLimit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the enable image types.
|
||||
/// </summary>
|
||||
/// <value>The enable image types.</value>
|
||||
public ImageType[] EnableImageTypes { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Sync
|
||||
{
|
||||
public enum SyncCategory
|
||||
{
|
||||
/// <summary>
|
||||
/// The latest.
|
||||
/// </summary>
|
||||
Latest = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The next up.
|
||||
/// </summary>
|
||||
NextUp = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The resume.
|
||||
/// </summary>
|
||||
Resume = 2
|
||||
}
|
||||
}
|
|
@ -1,135 +0,0 @@
|
|||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Sync
|
||||
{
|
||||
public class SyncJob
|
||||
{
|
||||
public SyncJob()
|
||||
{
|
||||
RequestedItemIds = Array.Empty<Guid>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier.
|
||||
/// </summary>
|
||||
/// <value>The identifier.</value>
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the device identifier.
|
||||
/// </summary>
|
||||
/// <value>The device identifier.</value>
|
||||
public string TargetId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the target.
|
||||
/// </summary>
|
||||
/// <value>The name of the target.</value>
|
||||
public string TargetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the quality.
|
||||
/// </summary>
|
||||
/// <value>The quality.</value>
|
||||
public string Quality { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the bitrate.
|
||||
/// </summary>
|
||||
/// <value>The bitrate.</value>
|
||||
public int? Bitrate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the profile.
|
||||
/// </summary>
|
||||
/// <value>The profile.</value>
|
||||
public string Profile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the category.
|
||||
/// </summary>
|
||||
/// <value>The category.</value>
|
||||
public SyncCategory? Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the parent identifier.
|
||||
/// </summary>
|
||||
/// <value>The parent identifier.</value>
|
||||
public string ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the current progress.
|
||||
/// </summary>
|
||||
/// <value>The current progress.</value>
|
||||
public double? Progress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the status.
|
||||
/// </summary>
|
||||
/// <value>The status.</value>
|
||||
public SyncJobStatus Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user identifier.
|
||||
/// </summary>
|
||||
/// <value>The user identifier.</value>
|
||||
public string UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [unwatched only].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [unwatched only]; otherwise, <c>false</c>.</value>
|
||||
public bool UnwatchedOnly { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [synchronize new content].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [synchronize new content]; otherwise, <c>false</c>.</value>
|
||||
public bool SyncNewContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the item limit.
|
||||
/// </summary>
|
||||
/// <value>The item limit.</value>
|
||||
public int? ItemLimit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the requested item ids.
|
||||
/// </summary>
|
||||
/// <value>The requested item ids.</value>
|
||||
public Guid[] RequestedItemIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the date created.
|
||||
/// </summary>
|
||||
/// <value>The date created.</value>
|
||||
public DateTime DateCreated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the date last modified.
|
||||
/// </summary>
|
||||
/// <value>The date last modified.</value>
|
||||
public DateTime DateLastModified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the item count.
|
||||
/// </summary>
|
||||
/// <value>The item count.</value>
|
||||
public int ItemCount { get; set; }
|
||||
|
||||
public string ParentName { get; set; }
|
||||
|
||||
public string PrimaryImageItemId { get; set; }
|
||||
|
||||
public string PrimaryImageTag { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Sync
|
||||
{
|
||||
public enum SyncJobStatus
|
||||
{
|
||||
Queued = 0,
|
||||
Converting = 1,
|
||||
ReadyToTransfer = 2,
|
||||
Transferring = 3,
|
||||
Completed = 4,
|
||||
CompletedWithError = 5,
|
||||
Failed = 6
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Sync
|
||||
{
|
||||
public class SyncTarget
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier.
|
||||
/// </summary>
|
||||
/// <value>The identifier.</value>
|
||||
public string Id { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Users
|
||||
{
|
||||
public class UserAction
|
||||
{
|
||||
public string Id { get; set; }
|
||||
|
||||
public string ServerId { get; set; }
|
||||
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
public Guid ItemId { get; set; }
|
||||
|
||||
public UserActionType Type { get; set; }
|
||||
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
public long? PositionTicks { get; set; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user