ReSharper Reformat: Properties to expression bodied form.

This commit is contained in:
Erwin de Haan 2019-01-13 21:31:14 +01:00
parent 9fa60ec934
commit a36658f6f0
185 changed files with 782 additions and 3786 deletions

View File

@ -3,103 +3,31 @@ namespace BDInfo
{
class BDInfoSettings
{
public static bool GenerateStreamDiagnostics
{
get
{
return true;
}
}
public static bool GenerateStreamDiagnostics => true;
public static bool EnableSSIF
{
get
{
return true;
}
}
public static bool EnableSSIF => true;
public static bool AutosaveReport
{
get
{
return false;
}
}
public static bool AutosaveReport => false;
public static bool GenerateFrameDataFile
{
get
{
return false;
}
}
public static bool GenerateFrameDataFile => false;
public static bool FilterLoopingPlaylists
{
get
{
return true;
}
}
public static bool FilterLoopingPlaylists => true;
public static bool FilterShortPlaylists
{
get
{
return false;
}
}
public static bool FilterShortPlaylists => false;
public static int FilterShortPlaylistsValue
{
get
{
return 0;
}
}
public static int FilterShortPlaylistsValue => 0;
public static bool UseImagePrefix
{
get
{
return false;
}
}
public static bool UseImagePrefix => false;
public static string UseImagePrefixValue
{
get
{
return null;
}
}
public static string UseImagePrefixValue => null;
/// <summary>
/// Setting this to false throws an IComparer error on some discs.
/// </summary>
public static bool KeepStreamOrder
{
get
{
return true;
}
}
public static bool KeepStreamOrder => true;
public static bool GenerateTextSummary
{
get
{
return false;
}
}
public static bool GenerateTextSummary => false;
public static string LastPath
{
get
{
return string.Empty;
}
}
public static string LastPath => string.Empty;
}
}

View File

@ -142,21 +142,12 @@ namespace BDInfo
public double PacketSeconds = 0;
public int AngleIndex = 0;
public ulong PacketSize
{
get
{
return PacketCount * 192;
}
}
public ulong PacketSize => PacketCount * 192;
private string _LanguageCode;
public string LanguageCode
{
get
{
return _LanguageCode;
}
get => _LanguageCode;
set
{
_LanguageCode = value;
@ -398,13 +389,7 @@ namespace BDInfo
}
}
public virtual string Description
{
get
{
return "";
}
}
public virtual string Description => "";
public abstract TSStream Clone();
@ -444,10 +429,7 @@ namespace BDInfo
private TSVideoFormat _VideoFormat;
public TSVideoFormat VideoFormat
{
get
{
return _VideoFormat;
}
get => _VideoFormat;
set
{
_VideoFormat = value;
@ -488,10 +470,7 @@ namespace BDInfo
private TSFrameRate _FrameRate;
public TSFrameRate FrameRate
{
get
{
return _FrameRate;
}
get => _FrameRate;
set
{
_FrameRate = value;

View File

@ -37,21 +37,9 @@ namespace BDInfo
Stream = new MemoryStream(Buffer);
}
public long Length
{
get
{
return (long)BufferLength;
}
}
public long Length => (long)BufferLength;
public long Position
{
get
{
return Stream.Position;
}
}
public long Position => Stream.Position;
public void Add(
byte[] buffer,

View File

@ -74,13 +74,7 @@ namespace BDInfo
}
}
public ulong PacketSize
{
get
{
return PacketCount * 192;
}
}
public ulong PacketSize => PacketCount * 192;
public ulong PacketBitRate
{

View File

@ -115,29 +115,11 @@ namespace Emby.Dlna.Api
public IRequest Request { get; set; }
private IHttpResultFactory _resultFactory;
private IContentDirectory ContentDirectory
{
get
{
return DlnaEntryPoint.Current.ContentDirectory;
}
}
private IContentDirectory ContentDirectory => DlnaEntryPoint.Current.ContentDirectory;
private IConnectionManager ConnectionManager
{
get
{
return DlnaEntryPoint.Current.ConnectionManager;
}
}
private IConnectionManager ConnectionManager => DlnaEntryPoint.Current.ConnectionManager;
private IMediaReceiverRegistrar MediaReceiverRegistrar
{
get
{
return DlnaEntryPoint.Current.MediaReceiverRegistrar;
}
}
private IMediaReceiverRegistrar MediaReceiverRegistrar => DlnaEntryPoint.Current.MediaReceiverRegistrar;
public DlnaServerService(IDlnaManager dlnaManager, IHttpResultFactory httpResultFactory)
{

View File

@ -51,9 +51,6 @@ namespace Emby.Dlna.Didl
_encoding = encoding;
}
public override Encoding Encoding
{
get { return (null == _encoding) ? base.Encoding : _encoding; }
}
public override Encoding Encoding => (null == _encoding) ? base.Encoding : _encoding;
}
}

View File

@ -261,21 +261,9 @@ namespace Emby.Dlna
return false;
}
private string UserProfilesPath
{
get
{
return Path.Combine(_appPaths.ConfigurationDirectoryPath, "dlna", "user");
}
}
private string UserProfilesPath => Path.Combine(_appPaths.ConfigurationDirectoryPath, "dlna", "user");
private string SystemProfilesPath
{
get
{
return Path.Combine(_appPaths.ConfigurationDirectoryPath, "dlna", "system");
}
}
private string SystemProfilesPath => Path.Combine(_appPaths.ConfigurationDirectoryPath, "dlna", "system");
private IEnumerable<DeviceProfile> GetProfiles(string path, DeviceProfileType type)
{

View File

@ -23,12 +23,6 @@ namespace Emby.Dlna.Eventing
TriggerCount++;
}
public bool IsExpired
{
get
{
return SubscriptionTime.AddSeconds(TimeoutSeconds) >= DateTime.UtcNow;
}
}
public bool IsExpired => SubscriptionTime.AddSeconds(TimeoutSeconds) >= DateTime.UtcNow;
}
}

View File

@ -35,10 +35,7 @@ namespace Emby.Dlna.PlayTo
RefreshVolumeIfNeeded();
return _volume;
}
set
{
_volume = value;
}
set => _volume = value;
}
public TimeSpan? Duration { get; set; }
@ -46,41 +43,17 @@ namespace Emby.Dlna.PlayTo
private TimeSpan _position = TimeSpan.FromSeconds(0);
public TimeSpan Position
{
get
{
return _position;
}
set
{
_position = value;
}
get => _position;
set => _position = value;
}
public TRANSPORTSTATE TransportState { get; private set; }
public bool IsPlaying
{
get
{
return TransportState == TRANSPORTSTATE.PLAYING;
}
}
public bool IsPlaying => TransportState == TRANSPORTSTATE.PLAYING;
public bool IsPaused
{
get
{
return TransportState == TRANSPORTSTATE.PAUSED || TransportState == TRANSPORTSTATE.PAUSED_PLAYBACK;
}
}
public bool IsPaused => TransportState == TRANSPORTSTATE.PAUSED || TransportState == TRANSPORTSTATE.PAUSED_PLAYBACK;
public bool IsStopped
{
get
{
return TransportState == TRANSPORTSTATE.STOPPED;
}
}
public bool IsStopped => TransportState == TRANSPORTSTATE.STOPPED;
#endregion

View File

@ -34,26 +34,14 @@ namespace Emby.Dlna.PlayTo
private string _baseUrl = string.Empty;
public string BaseUrl
{
get
{
return _baseUrl;
}
set
{
_baseUrl = value;
}
get => _baseUrl;
set => _baseUrl = value;
}
public DeviceIcon Icon { get; set; }
private readonly List<DeviceService> _services = new List<DeviceService>();
public List<DeviceService> Services
{
get
{
return _services;
}
}
public List<DeviceService> Services => _services;
public DeviceIdentification ToDeviceIdentification()
{

View File

@ -44,18 +44,9 @@ namespace Emby.Dlna.PlayTo
private readonly string _accessToken;
private readonly DateTime _creationTime;
public bool IsSessionActive
{
get
{
return !_disposed && _device != null;
}
}
public bool IsSessionActive => !_disposed && _device != null;
public bool SupportsMediaControl
{
get { return IsSessionActive; }
}
public bool SupportsMediaControl => IsSessionActive;
public PlayToController(SessionInfo session, ISessionManager sessionManager, ILibraryManager libraryManager, ILogger logger, IDlnaManager dlnaManager, IUserManager userManager, IImageProcessor imageProcessor, string serverAddress, string accessToken, IDeviceDiscovery deviceDiscovery, IUserDataManager userDataManager, ILocalizationManager localization, IMediaSourceManager mediaSourceManager, IConfigurationManager config, IMediaEncoder mediaEncoder)
{
@ -436,13 +427,7 @@ namespace Emby.Dlna.PlayTo
private int _currentPlaylistIndex;
private readonly List<PlaylistItem> _playlist = new List<PlaylistItem>();
private List<PlaylistItem> Playlist
{
get
{
return _playlist;
}
}
private List<PlaylistItem> Playlist => _playlist;
private void AddItemFromId(Guid id, List<BaseItem> list)
{

View File

@ -12,27 +12,15 @@ namespace Emby.Dlna.PlayTo
private List<StateVariable> _stateVariables = new List<StateVariable>();
public List<StateVariable> StateVariables
{
get
{
return _stateVariables;
}
set
{
_stateVariables = value;
}
get => _stateVariables;
set => _stateVariables = value;
}
private List<ServiceAction> _serviceActions = new List<ServiceAction>();
public List<ServiceAction> ServiceActions
{
get
{
return _serviceActions;
}
set
{
_serviceActions = value;
}
get => _serviceActions;
set => _serviceActions = value;
}
public static TransportCommands Create(XDocument document)

View File

@ -34,46 +34,34 @@ namespace Emby.Drawing.Skia
LogVersion();
}
public string[] SupportedInputFormats
{
get
public string[] SupportedInputFormats =>
new[]
{
// Some common file name extensions for RAW picture files include: .cr2, .crw, .dng, .nef, .orf, .rw2, .pef, .arw, .sr2, .srf, and .tif.
return new[]
{
"jpeg",
"jpg",
"png",
"jpeg",
"jpg",
"png",
"dng",
"dng",
"webp",
"gif",
"bmp",
"ico",
"astc",
"ktx",
"pkm",
"wbmp",
"webp",
"gif",
"bmp",
"ico",
"astc",
"ktx",
"pkm",
"wbmp",
// TODO
// Are all of these supported? https://github.com/google/skia/blob/master/infra/bots/recipes/test.py#L454
// TODO
// Are all of these supported? https://github.com/google/skia/blob/master/infra/bots/recipes/test.py#L454
// working on windows at least
"cr2",
"nef",
"arw"
};
}
}
// working on windows at least
"cr2",
"nef",
"arw"
};
public ImageFormat[] SupportedOutputFormats
{
get
{
return new[] { ImageFormat.Webp, ImageFormat.Jpg, ImageFormat.Png };
}
}
public ImageFormat[] SupportedOutputFormats => new[] { ImageFormat.Webp, ImageFormat.Jpg, ImageFormat.Png };
private void LogVersion()
{
@ -666,19 +654,10 @@ namespace Emby.Drawing.Skia
}
}
public string Name
{
get { return "Skia"; }
}
public string Name => "Skia";
public bool SupportsImageCollageCreation
{
get { return true; }
}
public bool SupportsImageCollageCreation => true;
public bool SupportsImageEncoding
{
get { return true; }
}
public bool SupportsImageEncoding => true;
}
}

View File

@ -74,7 +74,7 @@ namespace Emby.Drawing
public IImageEncoder ImageEncoder
{
get { return _imageEncoder; }
get => _imageEncoder;
set
{
if (value == null)
@ -86,67 +86,44 @@ namespace Emby.Drawing
}
}
public string[] SupportedInputFormats
{
get
public string[] SupportedInputFormats =>
new string[]
{
return new string[]
{
"tiff",
"tif",
"jpeg",
"jpg",
"png",
"aiff",
"cr2",
"crw",
"tiff",
"tif",
"jpeg",
"jpg",
"png",
"aiff",
"cr2",
"crw",
// Remove until supported
//"nef",
"orf",
"pef",
"arw",
"webp",
"gif",
"bmp",
"erf",
"raf",
"rw2",
"nrw",
"dng",
"ico",
"astc",
"ktx",
"pkm",
"wbmp"
};
}
}
// Remove until supported
//"nef",
"orf",
"pef",
"arw",
"webp",
"gif",
"bmp",
"erf",
"raf",
"rw2",
"nrw",
"dng",
"ico",
"astc",
"ktx",
"pkm",
"wbmp"
};
public bool SupportsImageCollageCreation
{
get
{
return _imageEncoder.SupportsImageCollageCreation;
}
}
public bool SupportsImageCollageCreation => _imageEncoder.SupportsImageCollageCreation;
private string ResizedImageCachePath
{
get
{
return Path.Combine(_appPaths.ImageCachePath, "resized-images");
}
}
private string ResizedImageCachePath => Path.Combine(_appPaths.ImageCachePath, "resized-images");
private string EnhancedImageCachePath
{
get
{
return Path.Combine(_appPaths.ImageCachePath, "enhanced-images");
}
}
private string EnhancedImageCachePath => Path.Combine(_appPaths.ImageCachePath, "enhanced-images");
public void AddParts(IEnumerable<IImageEnhancer> enhancers)
{

View File

@ -6,26 +6,15 @@ namespace Emby.Drawing
{
public class NullImageEncoder : IImageEncoder
{
public string[] SupportedInputFormats
{
get
public string[] SupportedInputFormats =>
new[]
{
return new[]
{
"png",
"jpeg",
"jpg"
};
}
}
"png",
"jpeg",
"jpg"
};
public ImageFormat[] SupportedOutputFormats
{
get
{
return new[] { ImageFormat.Jpg, ImageFormat.Png };
}
}
public ImageFormat[] SupportedOutputFormats => new[] { ImageFormat.Jpg, ImageFormat.Png };
public void CropWhiteSpace(string inputPath, string outputPath)
{
@ -42,20 +31,11 @@ namespace Emby.Drawing
throw new NotImplementedException();
}
public string Name
{
get { return "Null Image Encoder"; }
}
public string Name => "Null Image Encoder";
public bool SupportsImageCollageCreation
{
get { return false; }
}
public bool SupportsImageCollageCreation => false;
public bool SupportsImageEncoding
{
get { return false; }
}
public bool SupportsImageEncoding => false;
public ImageSize GetImageSize(string path)
{

View File

@ -13,7 +13,7 @@ namespace IsoMounter
public class LinuxIsoManager : IIsoMounter
{
[DllImport("libc", SetLastError = true)]
public static extern uint getuid();
static extern uint getuid();
#region Private Fields
@ -102,26 +102,11 @@ namespace IsoMounter
#region Interface Implementation for IIsoMounter
public bool IsInstalled
{
get
{
return true;
}
}
public bool IsInstalled => true;
public string Name
{
get { return "LinuxMount"; }
}
public string Name => "LinuxMount";
public bool RequiresInstallation
{
get
{
return false;
}
}
public bool RequiresInstallation => false;
public bool CanMount(string path)
{

View File

@ -13,30 +13,18 @@ namespace IsoMounter
}
private Guid _id = new Guid("4682DD4C-A675-4F1B-8E7C-79ADF137A8F8");
public override Guid Id
{
get { return _id; }
}
public override Guid Id => _id;
/// <summary>
/// Gets the name of the plugin
/// </summary>
/// <value>The name.</value>
public override string Name
{
get { return "Iso Mounter"; }
}
public override string Name => "Iso Mounter";
/// <summary>
/// Gets the description.
/// </summary>
/// <value>The description.</value>
public override string Description
{
get
{
return "Mount and stream ISO contents";
}
}
public override string Description => "Mount and stream ISO contents";
}
}

View File

@ -6,7 +6,8 @@ namespace Emby.Naming.Common
public class EpisodeExpression
{
private string _expression;
public string Expression { get { return _expression; } set { _expression = value; _regex = null; } }
public string Expression { get => _expression;
set { _expression = value; _regex = null; } }
public bool IsByDate { get; set; }
public bool IsOptimistic { get; set; }
@ -16,13 +17,7 @@ namespace Emby.Naming.Common
public string[] DateTimeFormats { get; set; }
private Regex _regex;
public Regex Regex
{
get
{
return _regex ?? (_regex = new Regex(Expression, RegexOptions.IgnoreCase | RegexOptions.Compiled));
}
}
public Regex Regex => _regex ?? (_regex = new Regex(Expression, RegexOptions.IgnoreCase | RegexOptions.Compiled));
public EpisodeExpression(string expression, bool byDate)
{

View File

@ -65,10 +65,7 @@ namespace Emby.Naming.Video
/// Gets the file name without extension.
/// </summary>
/// <value>The file name without extension.</value>
public string FileNameWithoutExtension
{
get { return !IsDirectory ? System.IO.Path.GetFileNameWithoutExtension(Path) : System.IO.Path.GetFileName(Path); }
}
public string FileNameWithoutExtension => !IsDirectory ? System.IO.Path.GetFileNameWithoutExtension(Path) : System.IO.Path.GetFileName(Path);
public override string ToString()
{

View File

@ -199,9 +199,6 @@ namespace Emby.Photos
return Task.FromResult(result);
}
public string Name
{
get { return "Embedded Information"; }
}
public string Name => "Embedded Information";
}
}

View File

@ -45,13 +45,7 @@ namespace Emby.Server.Implementations.Data
/// Gets the name of the repository
/// </summary>
/// <value>The name.</value>
public string Name
{
get
{
return "SQLite";
}
}
public string Name => "SQLite";
/// <summary>
/// Gets the json serializer.
@ -97,21 +91,9 @@ namespace Emby.Server.Implementations.Data
private const string ChaptersTableName = "Chapters2";
protected override int? CacheSize
{
get
{
return 20000;
}
}
protected override int? CacheSize => 20000;
protected override bool EnableTempStoreMemory
{
get
{
return true;
}
}
protected override bool EnableTempStoreMemory => true;
/// <summary>
/// Opens the connection to the database

View File

@ -16,14 +16,7 @@ namespace Jellyfin.Server
{
}
public override bool CanSelfRestart
{
get
{
// A restart script must be provided
return StartupOptions.ContainsOption("-restartpath");
}
}
public override bool CanSelfRestart => StartupOptions.ContainsOption("-restartpath");
protected override void RestartInternal() => Program.Restart();
@ -32,13 +25,7 @@ namespace Jellyfin.Server
protected override void ShutdownInternal() => Program.Shutdown();
protected override bool SupportsDualModeSockets
{
get
{
return true;
}
}
protected override bool SupportsDualModeSockets => true;
protected override IHttpListener CreateHttpListener()
=> new WebSocketSharpListener(

View File

@ -113,21 +113,9 @@ namespace Jellyfin.SocketSharp
return form;
}
public string Accept
{
get
{
return string.IsNullOrEmpty(request.Headers["Accept"]) ? null : request.Headers["Accept"];
}
}
public string Accept => string.IsNullOrEmpty(request.Headers["Accept"]) ? null : request.Headers["Accept"];
public string Authorization
{
get
{
return string.IsNullOrEmpty(request.Headers["Authorization"]) ? null : request.Headers["Authorization"];
}
}
public string Authorization => string.IsNullOrEmpty(request.Headers["Authorization"]) ? null : request.Headers["Authorization"];
protected bool validate_cookies, validate_query_string, validate_form;
protected bool checked_cookies, checked_query_string, checked_form;
@ -410,30 +398,17 @@ namespace Jellyfin.SocketSharp
throw new NotSupportedException();
}
public override bool CanRead
{
get { return true; }
}
public override bool CanSeek
{
get { return true; }
}
public override bool CanWrite
{
get { return false; }
}
public override bool CanRead => true;
public override long Length
{
get { return end - offset; }
}
public override bool CanSeek => true;
public override bool CanWrite => false;
public override long Length => end - offset;
public override long Position
{
get
{
return position - offset;
}
get => position - offset;
set
{
if (value > Length)
@ -451,37 +426,13 @@ namespace Jellyfin.SocketSharp
this.stream = new ReadSubStream(base_stream, offset, length);
}
public string ContentType
{
get
{
return content_type;
}
}
public string ContentType => content_type;
public int ContentLength
{
get
{
return (int)stream.Length;
}
}
public int ContentLength => (int)stream.Length;
public string FileName
{
get
{
return name;
}
}
public string FileName => name;
public Stream InputStream
{
get
{
return stream;
}
}
public Stream InputStream => stream;
}
class Helpers

View File

@ -85,13 +85,7 @@ namespace Jellyfin.SocketSharp
/// Gets or sets the state.
/// </summary>
/// <value>The state.</value>
public WebSocketState State
{
get
{
return WebSocket.ReadyState;
}
}
public WebSocketState State => WebSocket.ReadyState;
/// <summary>
/// Sends the async.

View File

@ -39,88 +39,38 @@ namespace Jellyfin.SocketSharp
return string.IsNullOrEmpty(endHostUrl) ? null : endHostUrl.TrimEnd('/');
}
public HttpListenerRequest HttpRequest
{
get { return request; }
}
public HttpListenerRequest HttpRequest => request;
public object OriginalRequest
{
get { return request; }
}
public object OriginalRequest => request;
public IResponse Response
{
get { return response; }
}
public IResponse Response => response;
public IHttpResponse HttpResponse
{
get { return response; }
}
public IHttpResponse HttpResponse => response;
public string OperationName { get; set; }
public object Dto { get; set; }
public string RawUrl
{
get { return request.RawUrl; }
}
public string RawUrl => request.RawUrl;
public string AbsoluteUri
{
get { return request.Url.AbsoluteUri.TrimEnd('/'); }
}
public string AbsoluteUri => request.Url.AbsoluteUri.TrimEnd('/');
public string UserHostAddress
{
get { return request.UserHostAddress; }
}
public string UserHostAddress => request.UserHostAddress;
public string XForwardedFor
{
get
{
return string.IsNullOrEmpty(request.Headers["X-Forwarded-For"]) ? null : request.Headers["X-Forwarded-For"];
}
}
public string XForwardedFor => string.IsNullOrEmpty(request.Headers["X-Forwarded-For"]) ? null : request.Headers["X-Forwarded-For"];
public int? XForwardedPort
{
get
{
return string.IsNullOrEmpty(request.Headers["X-Forwarded-Port"]) ? (int?)null : int.Parse(request.Headers["X-Forwarded-Port"]);
}
}
public int? XForwardedPort => string.IsNullOrEmpty(request.Headers["X-Forwarded-Port"]) ? (int?)null : int.Parse(request.Headers["X-Forwarded-Port"]);
public string XForwardedProtocol
{
get
{
return string.IsNullOrEmpty(request.Headers["X-Forwarded-Proto"]) ? null : request.Headers["X-Forwarded-Proto"];
}
}
public string XForwardedProtocol => string.IsNullOrEmpty(request.Headers["X-Forwarded-Proto"]) ? null : request.Headers["X-Forwarded-Proto"];
public string XRealIp
{
get
{
return string.IsNullOrEmpty(request.Headers["X-Real-IP"]) ? null : request.Headers["X-Real-IP"];
}
}
public string XRealIp => string.IsNullOrEmpty(request.Headers["X-Real-IP"]) ? null : request.Headers["X-Real-IP"];
private string remoteIp;
public string RemoteIp
{
get
{
return remoteIp ??
(remoteIp = (CheckBadChars(XForwardedFor)) ??
(NormalizeIp(CheckBadChars(XRealIp)) ??
(request.RemoteEndPoint != null ? NormalizeIp(request.RemoteEndPoint.Address.ToString()) : null)));
}
}
public string RemoteIp =>
remoteIp ??
(remoteIp = (CheckBadChars(XForwardedFor)) ??
(NormalizeIp(CheckBadChars(XRealIp)) ??
(request.RemoteEndPoint != null ? NormalizeIp(request.RemoteEndPoint.Address.ToString()) : null)));
private static readonly char[] HttpTrimCharacters = new char[] { (char)0x09, (char)0xA, (char)0xB, (char)0xC, (char)0xD, (char)0x20 };
@ -215,34 +165,20 @@ namespace Jellyfin.SocketSharp
return ip;
}
public bool IsSecureConnection
{
get { return request.IsSecureConnection || XForwardedProtocol == "https"; }
}
public bool IsSecureConnection => request.IsSecureConnection || XForwardedProtocol == "https";
public string[] AcceptTypes
{
get { return request.AcceptTypes; }
}
public string[] AcceptTypes => request.AcceptTypes;
private Dictionary<string, object> items;
public Dictionary<string, object> Items
{
get { return items ?? (items = new Dictionary<string, object>()); }
}
public Dictionary<string, object> Items => items ?? (items = new Dictionary<string, object>());
private string responseContentType;
public string ResponseContentType
{
get
{
return responseContentType
?? (responseContentType = GetResponseContentType(this));
}
set
{
this.responseContentType = value;
}
get =>
responseContentType
?? (responseContentType = GetResponseContentType(this));
set => this.responseContentType = value;
}
public const string FormUrlEncoded = "application/x-www-form-urlencoded";
@ -434,58 +370,32 @@ namespace Jellyfin.SocketSharp
}
}
public string UserAgent
{
get { return request.UserAgent; }
}
public string UserAgent => request.UserAgent;
public QueryParamCollection Headers
{
get { return request.Headers; }
}
public QueryParamCollection Headers => request.Headers;
private QueryParamCollection queryString;
public QueryParamCollection QueryString
{
get { return queryString ?? (queryString = MyHttpUtility.ParseQueryString(request.Url.Query)); }
}
public QueryParamCollection QueryString => queryString ?? (queryString = MyHttpUtility.ParseQueryString(request.Url.Query));
public bool IsLocal
{
get { return request.IsLocal; }
}
public bool IsLocal => request.IsLocal;
private string httpMethod;
public string HttpMethod
{
get
{
return httpMethod
?? (httpMethod = request.HttpMethod);
}
}
public string HttpMethod =>
httpMethod
?? (httpMethod = request.HttpMethod);
public string Verb
{
get { return HttpMethod; }
}
public string Verb => HttpMethod;
public string ContentType
{
get { return request.ContentType; }
}
public string ContentType => request.ContentType;
public Encoding contentEncoding;
public Encoding ContentEncoding
{
get { return contentEncoding ?? request.ContentEncoding; }
set { contentEncoding = value; }
get => contentEncoding ?? request.ContentEncoding;
set => contentEncoding = value;
}
public Uri UrlReferrer
{
get { return request.UrlReferrer; }
}
public Uri UrlReferrer => request.UrlReferrer;
public static Encoding GetEncoding(string contentTypeHeader)
{
@ -501,15 +411,9 @@ namespace Jellyfin.SocketSharp
}
}
public Stream InputStream
{
get { return request.InputStream; }
}
public Stream InputStream => request.InputStream;
public long ContentLength
{
get { return request.ContentLength64; }
}
public long ContentLength => request.ContentLength64;
private IHttpFile[] httpFiles;
public IHttpFile[] Files

View File

@ -31,27 +31,24 @@ namespace Jellyfin.SocketSharp
public IRequest Request { get; private set; }
public Dictionary<string, object> Items { get; private set; }
public object OriginalResponse
{
get { return _response; }
}
public object OriginalResponse => _response;
public int StatusCode
{
get { return this._response.StatusCode; }
set { this._response.StatusCode = value; }
get => this._response.StatusCode;
set => this._response.StatusCode = value;
}
public string StatusDescription
{
get { return this._response.StatusDescription; }
set { this._response.StatusDescription = value; }
get => this._response.StatusDescription;
set => this._response.StatusDescription = value;
}
public string ContentType
{
get { return _response.ContentType; }
set { _response.ContentType = value; }
get => _response.ContentType;
set => _response.ContentType = value;
}
//public ICookies Cookies { get; set; }
@ -67,13 +64,7 @@ namespace Jellyfin.SocketSharp
_response.AddHeader(name, value);
}
public QueryParamCollection Headers
{
get
{
return _response.Headers;
}
}
public QueryParamCollection Headers => _response.Headers;
public string GetHeader(string name)
{
@ -85,10 +76,7 @@ namespace Jellyfin.SocketSharp
_response.Redirect(url);
}
public Stream OutputStream
{
get { return _response.OutputStream; }
}
public Stream OutputStream => _response.OutputStream;
public void Close()
{
@ -179,8 +167,8 @@ namespace Jellyfin.SocketSharp
public bool SendChunked
{
get { return _response.SendChunked; }
set { _response.SendChunked = value; }
get => _response.SendChunked;
set => _response.SendChunked = value;
}
public bool KeepAlive { get; set; }

View File

@ -22,25 +22,13 @@ namespace MediaBrowser.Api
/// Gets or sets the logger.
/// </summary>
/// <value>The logger.</value>
public ILogger Logger
{
get
{
return ApiEntryPoint.Instance.Logger;
}
}
public ILogger Logger => ApiEntryPoint.Instance.Logger;
/// <summary>
/// Gets or sets the HTTP result factory.
/// </summary>
/// <value>The HTTP result factory.</value>
public IHttpResultFactory ResultFactory
{
get
{
return ApiEntryPoint.Instance.ResultFactory;
}
}
public IHttpResultFactory ResultFactory => ApiEntryPoint.Instance.ResultFactory;
/// <summary>
/// Gets or sets the request context.

View File

@ -45,13 +45,7 @@ namespace MediaBrowser.Api.LiveTv
_streamHelper = streamHelper;
}
public IDictionary<string, string> Headers
{
get
{
return _outputHeaders;
}
}
public IDictionary<string, string> Headers => _outputHeaders;
private Stream GetInputStream(bool allowAsyncFileRead)
{

View File

@ -141,10 +141,7 @@ namespace MediaBrowser.Api.Playback
return Path.Combine(folder, dataHash + (outputFileExtension ?? string.Empty).ToLower());
}
protected virtual bool EnableOutputInSubFolder
{
get { return false; }
}
protected virtual bool EnableOutputInSubFolder => false;
protected readonly CultureInfo UsCulture = new CultureInfo("en-US");

View File

@ -52,10 +52,7 @@ namespace MediaBrowser.Api.Playback.Hls
/// Gets the type of the transcoding job.
/// </summary>
/// <value>The type of the transcoding job.</value>
protected override TranscodingJobType TranscodingJobType
{
get { return TranscodingJobType.Hls; }
}
protected override TranscodingJobType TranscodingJobType => TranscodingJobType.Hls;
/// <summary>
/// Processes the request.

View File

@ -102,10 +102,7 @@ namespace MediaBrowser.Api.Playback.Progressive
/// Gets the type of the transcoding job.
/// </summary>
/// <value>The type of the transcoding job.</value>
protected override TranscodingJobType TranscodingJobType
{
get { return TranscodingJobType.Progressive; }
}
protected override TranscodingJobType TranscodingJobType => TranscodingJobType.Progressive;
/// <summary>
/// Processes the request.

View File

@ -50,13 +50,7 @@ namespace MediaBrowser.Api.Playback.Progressive
_environment = environment;
}
public IDictionary<string, string> Headers
{
get
{
return _outputHeaders;
}
}
public IDictionary<string, string> Headers => _outputHeaders;
private Stream GetInputStream(bool allowAsyncFileRead)
{

View File

@ -31,10 +31,7 @@ namespace MediaBrowser.Api.Playback
/// Gets the options.
/// </summary>
/// <value>The options.</value>
public IDictionary<string, string> Headers
{
get { return _options; }
}
public IDictionary<string, string> Headers => _options;
public async Task WriteToAsync(Stream responseStream, CancellationToken cancellationToken)
{

View File

@ -50,13 +50,7 @@ namespace MediaBrowser.Api.Playback
/// Gets a value indicating whether this instance has fixed resolution.
/// </summary>
/// <value><c>true</c> if this instance has fixed resolution; otherwise, <c>false</c>.</value>
public bool HasFixedResolution
{
get
{
return Width.HasValue || Height.HasValue;
}
}
public bool HasFixedResolution => Width.HasValue || Height.HasValue;
public bool EnableSubtitlesInManifest { get; set; }
}

View File

@ -17,7 +17,7 @@ namespace MediaBrowser.Api.Playback
public StreamRequest Request
{
get { return (StreamRequest)BaseRequest; }
get => (StreamRequest)BaseRequest;
set
{
BaseRequest = value;
@ -28,10 +28,7 @@ namespace MediaBrowser.Api.Playback
public TranscodingThrottler TranscodingThrottler { get; set; }
public VideoStreamRequest VideoRequest
{
get { return Request as VideoStreamRequest; }
}
public VideoStreamRequest VideoRequest => Request as VideoStreamRequest;
/// <summary>
/// Gets or sets the log file stream.
@ -42,10 +39,7 @@ namespace MediaBrowser.Api.Playback
public string WaitForPath { get; set; }
public bool IsOutputVideo
{
get { return Request is VideoStreamRequest; }
}
public bool IsOutputVideo => Request is VideoStreamRequest;
public int SegmentLength
{
@ -98,13 +92,7 @@ namespace MediaBrowser.Api.Playback
}
}
public int HlsListSize
{
get
{
return 0;
}
}
public int HlsListSize => 0;
public string UserAgent { get; set; }

View File

@ -24,10 +24,7 @@ namespace MediaBrowser.Api.ScheduledTasks
/// Gets the name.
/// </summary>
/// <value>The name.</value>
protected override string Name
{
get { return "ScheduledTasksInfo"; }
}
protected override string Name => "ScheduledTasksInfo";
/// <summary>
/// Initializes a new instance of the <see cref="ScheduledTasksWebSocketListener" /> class.

View File

@ -17,10 +17,7 @@ namespace MediaBrowser.Api.Session
/// Gets the name.
/// </summary>
/// <value>The name.</value>
protected override string Name
{
get { return "Sessions"; }
}
protected override string Name => "Sessions";
/// <summary>
/// The _kernel

View File

@ -17,10 +17,7 @@ namespace MediaBrowser.Api.System
/// Gets the name.
/// </summary>
/// <value>The name.</value>
protected override string Name
{
get { return "ActivityLogEntry"; }
}
protected override string Name => "ActivityLogEntry";
/// <summary>
/// The _kernel

View File

@ -24,11 +24,8 @@ namespace MediaBrowser.Common.Net
/// <value>The accept header.</value>
public string AcceptHeader
{
get { return GetHeaderValue("Accept"); }
set
{
RequestHeaders["Accept"] = value;
}
get => GetHeaderValue("Accept");
set => RequestHeaders["Accept"] = value;
}
/// <summary>
/// Gets or sets the cancellation token.
@ -48,11 +45,8 @@ namespace MediaBrowser.Common.Net
/// <value>The user agent.</value>
public string UserAgent
{
get { return GetHeaderValue("User-Agent"); }
set
{
RequestHeaders["User-Agent"] = value;
}
get => GetHeaderValue("User-Agent");
set => RequestHeaders["User-Agent"] = value;
}
/// <summary>

View File

@ -18,10 +18,7 @@ namespace MediaBrowser.Common.Plugins
/// Gets the description.
/// </summary>
/// <value>The description.</value>
public virtual string Description
{
get { return string.Empty; }
}
public virtual string Description => string.Empty;
/// <summary>
/// Gets the unique id.
@ -108,10 +105,7 @@ namespace MediaBrowser.Common.Plugins
/// Gets the type of configuration this plugin uses
/// </summary>
/// <value>The type of the configuration.</value>
public Type ConfigurationType
{
get { return typeof(TConfigurationType); }
}
public Type ConfigurationType => typeof(TConfigurationType);
private Action<string> _directoryCreateFn;
public void SetStartupInfo(Action<string> directoryCreateFn)
@ -124,13 +118,7 @@ namespace MediaBrowser.Common.Plugins
/// Gets the name the assembly file
/// </summary>
/// <value>The name of the assembly file.</value>
protected string AssemblyFileName
{
get
{
return Path.GetFileName(AssemblyFilePath);
}
}
protected string AssemblyFileName => Path.GetFileName(AssemblyFilePath);
/// <summary>
/// The _configuration sync lock
@ -161,10 +149,7 @@ namespace MediaBrowser.Common.Plugins
}
return _configuration;
}
protected set
{
_configuration = value;
}
protected set => _configuration = value;
}
private TConfigurationType LoadConfiguration()
@ -185,22 +170,13 @@ namespace MediaBrowser.Common.Plugins
/// Gets the name of the configuration file. Subclasses should override
/// </summary>
/// <value>The name of the configuration file.</value>
public virtual string ConfigurationFileName
{
get { return Path.ChangeExtension(AssemblyFileName, ".xml"); }
}
public virtual string ConfigurationFileName => Path.ChangeExtension(AssemblyFileName, ".xml");
/// <summary>
/// Gets the full path to the configuration file
/// </summary>
/// <value>The configuration file path.</value>
public string ConfigurationFilePath
{
get
{
return Path.Combine(ApplicationPaths.PluginConfigurationsPath, ConfigurationFileName);
}
}
public string ConfigurationFilePath => Path.Combine(ApplicationPaths.PluginConfigurationsPath, ConfigurationFileName);
/// <summary>
/// Initializes a new instance of the <see cref="BasePlugin{TConfigurationType}" /> class.
@ -253,10 +229,7 @@ namespace MediaBrowser.Common.Plugins
/// Gets the plugin's configuration
/// </summary>
/// <value>The configuration.</value>
BasePluginConfiguration IHasPluginConfiguration.Configuration
{
get { return Configuration; }
}
BasePluginConfiguration IHasPluginConfiguration.Configuration => Configuration;
public override PluginInfo GetPluginInfo()
{

View File

@ -31,19 +31,10 @@ namespace MediaBrowser.Controller.Channels
}
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
[IgnoreDataMember]
public override SourceType SourceType
{
get { return SourceType.Channel; }
}
public override SourceType SourceType => SourceType.Channel;
protected override QueryResult<BaseItem> GetItemsInternal(InternalItemsQuery query)
{

View File

@ -24,10 +24,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool IsPhysicalRoot
{
get { return true; }
}
public override bool IsPhysicalRoot => true;
public override bool CanDelete()
{
@ -35,13 +32,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return false;
}
}
public override bool SupportsPlayedStatus => false;
/// <summary>
/// The _virtual children
@ -52,19 +43,10 @@ namespace MediaBrowser.Controller.Entities
/// Gets the virtual children.
/// </summary>
/// <value>The virtual children.</value>
public ConcurrentBag<BaseItem> VirtualChildren
{
get { return _virtualChildren; }
}
public ConcurrentBag<BaseItem> VirtualChildren => _virtualChildren;
[IgnoreDataMember]
public override string[] PhysicalLocations
{
get
{
return PhysicalLocationsList;
}
}
public override string[] PhysicalLocations => PhysicalLocationsList;
public string[] PhysicalLocationsList { get; set; }

View File

@ -41,49 +41,22 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return true;
}
}
public override bool SupportsPlayedStatus => true;
[IgnoreDataMember]
public override bool SupportsPeople
{
get { return false; }
}
public override bool SupportsPeople => false;
[IgnoreDataMember]
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
public override bool SupportsAddingToPlaylist => true;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get { return true; }
}
public override bool SupportsInheritedParentImages => true;
[IgnoreDataMember]
protected override bool SupportsOwnedItems
{
get
{
return false;
}
}
protected override bool SupportsOwnedItems => false;
[IgnoreDataMember]
public override Folder LatestItemsIndexContainer
{
get
{
return AlbumEntity;
}
}
public override Folder LatestItemsIndexContainer => AlbumEntity;
public override bool CanDownload()
{
@ -115,23 +88,14 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
public MusicAlbum AlbumEntity
{
get { return FindParent<MusicAlbum>(); }
}
public MusicAlbum AlbumEntity => FindParent<MusicAlbum>();
/// <summary>
/// Gets the type of the media.
/// </summary>
/// <value>The type of the media.</value>
[IgnoreDataMember]
public override string MediaType
{
get
{
return Model.Entities.MediaType.Audio;
}
}
public override string MediaType => Model.Entities.MediaType.Audio;
/// <summary>
/// Creates the name of the sort.

View File

@ -28,22 +28,13 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
public override bool SupportsAddingToPlaylist => true;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get { return true; }
}
public override bool SupportsInheritedParentImages => true;
[IgnoreDataMember]
public MusicArtist MusicArtist
{
get { return GetMusicArtist(new DtoOptions(true)); }
}
public MusicArtist MusicArtist => GetMusicArtist(new DtoOptions(true));
public MusicArtist GetMusicArtist(DtoOptions options)
{
@ -66,22 +57,10 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return false;
}
}
public override bool SupportsPlayedStatus => false;
[IgnoreDataMember]
public override bool SupportsCumulativeRunTimeTicks
{
get
{
return true;
}
}
public override bool SupportsCumulativeRunTimeTicks => true;
[IgnoreDataMember]
public string[] AllArtists
@ -107,29 +86,17 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
public string AlbumArtist
{
get { return AlbumArtists.Length == 0 ? null : AlbumArtists[0]; }
}
public string AlbumArtist => AlbumArtists.Length == 0 ? null : AlbumArtists[0];
[IgnoreDataMember]
public override bool SupportsPeople
{
get { return false; }
}
public override bool SupportsPeople => false;
/// <summary>
/// Gets the tracks.
/// </summary>
/// <value>The tracks.</value>
[IgnoreDataMember]
public IEnumerable<BaseItem> Tracks
{
get
{
return GetRecursiveChildren(i => i is Audio);
}
}
public IEnumerable<BaseItem> Tracks => GetRecursiveChildren(i => i is Audio);
protected override IEnumerable<BaseItem> GetEligibleChildrenForRecursiveChildren(User user)
{

View File

@ -19,61 +19,25 @@ namespace MediaBrowser.Controller.Entities.Audio
public class MusicArtist : Folder, IItemByName, IHasMusicGenres, IHasDualAccess, IHasLookupInfo<ArtistInfo>
{
[IgnoreDataMember]
public bool IsAccessedByName
{
get { return ParentId.Equals(Guid.Empty); }
}
public bool IsAccessedByName => ParentId.Equals(Guid.Empty);
[IgnoreDataMember]
public override bool IsFolder
{
get
{
return !IsAccessedByName;
}
}
public override bool IsFolder => !IsAccessedByName;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
[IgnoreDataMember]
public override bool SupportsCumulativeRunTimeTicks
{
get
{
return true;
}
}
public override bool SupportsCumulativeRunTimeTicks => true;
[IgnoreDataMember]
public override bool IsDisplayedAsFolder
{
get
{
return true;
}
}
public override bool IsDisplayedAsFolder => true;
[IgnoreDataMember]
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
public override bool SupportsAddingToPlaylist => true;
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return false;
}
}
public override bool SupportsPlayedStatus => false;
public override double GetDefaultPrimaryImageAspectRatio()
{
@ -154,13 +118,7 @@ namespace MediaBrowser.Controller.Entities.Audio
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
/// <summary>
/// Gets the user data key.
@ -207,13 +165,7 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
public static string GetPath(string name)
{

View File

@ -24,28 +24,13 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
public override bool SupportsAddingToPlaylist => true;
[IgnoreDataMember]
public override bool SupportsAncestors
{
get
{
return false;
}
}
public override bool SupportsAncestors => false;
[IgnoreDataMember]
public override bool IsDisplayedAsFolder
{
get
{
return true;
}
}
public override bool IsDisplayedAsFolder => true;
/// <summary>
/// Returns the folder containing the item.
@ -53,13 +38,7 @@ namespace MediaBrowser.Controller.Entities.Audio
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
public override double GetDefaultPrimaryImageAspectRatio()
{
@ -77,13 +56,7 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
public IList<BaseItem> GetTaggedItems(InternalItemsQuery query)
{

View File

@ -8,22 +8,10 @@ namespace MediaBrowser.Controller.Entities
public class AudioBook : Audio.Audio, IHasSeries, IHasLookupInfo<SongInfo>
{
[IgnoreDataMember]
public override bool SupportsPositionTicksResume
{
get
{
return true;
}
}
public override bool SupportsPositionTicksResume => true;
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return true;
}
}
public override bool SupportsPlayedStatus => true;
[IgnoreDataMember]
public string SeriesPresentationUniqueKey { get; set; }

View File

@ -108,19 +108,10 @@ namespace MediaBrowser.Controller.Entities
public Guid ChannelId { get; set; }
[IgnoreDataMember]
public virtual bool SupportsAddingToPlaylist
{
get
{
return false;
}
}
public virtual bool SupportsAddingToPlaylist => false;
[IgnoreDataMember]
public virtual bool AlwaysScanInternalMetadataPath
{
get { return false; }
}
public virtual bool AlwaysScanInternalMetadataPath => false;
/// <summary>
/// Gets a value indicating whether this instance is in mixed folder.
@ -130,31 +121,13 @@ namespace MediaBrowser.Controller.Entities
public bool IsInMixedFolder { get; set; }
[IgnoreDataMember]
public virtual bool SupportsPlayedStatus
{
get
{
return false;
}
}
public virtual bool SupportsPlayedStatus => false;
[IgnoreDataMember]
public virtual bool SupportsPositionTicksResume
{
get
{
return false;
}
}
public virtual bool SupportsPositionTicksResume => false;
[IgnoreDataMember]
public virtual bool SupportsRemoteImageDownloading
{
get
{
return true;
}
}
public virtual bool SupportsRemoteImageDownloading => true;
private string _name;
/// <summary>
@ -164,10 +137,7 @@ namespace MediaBrowser.Controller.Entities
[IgnoreDataMember]
public virtual string Name
{
get
{
return _name;
}
get => _name;
set
{
_name = value;
@ -178,10 +148,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public bool IsUnaired
{
get { return PremiereDate.HasValue && PremiereDate.Value.ToLocalTime().Date >= DateTime.Now.Date; }
}
public bool IsUnaired => PremiereDate.HasValue && PremiereDate.Value.ToLocalTime().Date >= DateTime.Now.Date;
[IgnoreDataMember]
public int? TotalBitrate { get; set; }
@ -189,13 +156,7 @@ namespace MediaBrowser.Controller.Entities
public ExtraType? ExtraType { get; set; }
[IgnoreDataMember]
public bool IsThemeMedia
{
get
{
return ExtraType.HasValue && (ExtraType.Value == Model.Entities.ExtraType.ThemeSong || ExtraType.Value == Model.Entities.ExtraType.ThemeVideo);
}
}
public bool IsThemeMedia => ExtraType.HasValue && (ExtraType.Value == Model.Entities.ExtraType.ThemeSong || ExtraType.Value == Model.Entities.ExtraType.ThemeVideo);
[IgnoreDataMember]
public string OriginalTitle { get; set; }
@ -295,13 +256,7 @@ namespace MediaBrowser.Controller.Entities
public string ExternalEtag { get; set; }
[IgnoreDataMember]
public virtual bool IsHidden
{
get
{
return false;
}
}
public virtual bool IsHidden => false;
public BaseItem GetOwner()
{
@ -362,22 +317,10 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public bool IsFileProtocol
{
get
{
return IsPathProtocol(MediaProtocol.File);
}
}
public bool IsFileProtocol => IsPathProtocol(MediaProtocol.File);
[IgnoreDataMember]
public bool HasPathProtocol
{
get
{
return PathProtocol.HasValue;
}
}
public bool HasPathProtocol => PathProtocol.HasValue;
[IgnoreDataMember]
public virtual bool SupportsLocalMetadata
@ -408,13 +351,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public virtual bool EnableAlphaNumericSorting
{
get
{
return true;
}
}
public virtual bool EnableAlphaNumericSorting => true;
private List<Tuple<StringBuilder, bool>> GetSortChunks(string s1)
{
@ -455,10 +392,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The primary image path.</value>
[IgnoreDataMember]
public string PrimaryImagePath
{
get { return this.GetImagePath(ImageType.Primary); }
}
public string PrimaryImagePath => this.GetImagePath(ImageType.Primary);
public bool IsMetadataFetcherEnabled(LibraryOptions libraryOptions, string name)
{
@ -637,13 +571,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The type of the media.</value>
[IgnoreDataMember]
public virtual string MediaType
{
get
{
return null;
}
}
public virtual string MediaType => null;
[IgnoreDataMember]
public virtual string[] PhysicalLocations
@ -667,7 +595,7 @@ namespace MediaBrowser.Controller.Entities
[IgnoreDataMember]
public string ForcedSortName
{
get { return _forcedSortName; }
get => _forcedSortName;
set { _forcedSortName = value; _sortName = null; }
}
@ -695,10 +623,7 @@ namespace MediaBrowser.Controller.Entities
}
return _sortName;
}
set
{
_sortName = value;
}
set => _sortName = value;
}
public string GetInternalMetadataPath()
@ -816,7 +741,7 @@ namespace MediaBrowser.Controller.Entities
[IgnoreDataMember]
public Folder Parent
{
get { return GetParent() as Folder; }
get => GetParent() as Folder;
set
{
@ -1007,10 +932,7 @@ namespace MediaBrowser.Controller.Entities
public int? ParentIndexNumber { get; set; }
[IgnoreDataMember]
public virtual bool HasLocalAlternateVersions
{
get { return false; }
}
public virtual bool HasLocalAlternateVersions => false;
[IgnoreDataMember]
public string OfficialRatingForComparison
@ -1426,22 +1348,13 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
protected virtual bool SupportsOwnedItems
{
get { return !ParentId.Equals(Guid.Empty) && IsFileProtocol; }
}
protected virtual bool SupportsOwnedItems => !ParentId.Equals(Guid.Empty) && IsFileProtocol;
[IgnoreDataMember]
public virtual bool SupportsPeople
{
get { return false; }
}
public virtual bool SupportsPeople => false;
[IgnoreDataMember]
public virtual bool SupportsThemeMedia
{
get { return false; }
}
public virtual bool SupportsThemeMedia => false;
/// <summary>
/// Refreshes owned items such as trailers, theme videos, special features, etc.
@ -1602,10 +1515,7 @@ namespace MediaBrowser.Controller.Entities
public Dictionary<string, string> ProviderIds { get; set; }
[IgnoreDataMember]
public virtual Folder LatestItemsIndexContainer
{
get { return null; }
}
public virtual Folder LatestItemsIndexContainer => null;
public virtual double GetDefaultPrimaryImageAspectRatio()
{
@ -1923,10 +1833,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public virtual bool SupportsInheritedParentImages
{
get { return false; }
}
public virtual bool SupportsInheritedParentImages => false;
protected bool IsVisibleStandaloneInternal(User user, bool checkFolders)
{
@ -1969,22 +1876,10 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value><c>true</c> if this instance is folder; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public virtual bool IsFolder
{
get
{
return false;
}
}
public virtual bool IsFolder => false;
[IgnoreDataMember]
public virtual bool IsDisplayedAsFolder
{
get
{
return false;
}
}
public virtual bool IsDisplayedAsFolder => false;
public virtual string GetClientTypeName()
{
@ -2070,13 +1965,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public virtual bool EnableRememberingTrackSelections
{
get
{
return true;
}
}
public virtual bool EnableRememberingTrackSelections => true;
/// <summary>
/// Adds a studio to the item
@ -2813,22 +2702,10 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public virtual bool SupportsAncestors
{
get
{
return true;
}
}
public virtual bool SupportsAncestors => true;
[IgnoreDataMember]
public virtual bool StopRefreshIfLocalMetadataFound
{
get
{
return true;
}
}
public virtual bool StopRefreshIfLocalMetadataFound => true;
public virtual IEnumerable<Guid> GetIdsForAncestorQuery()
{
@ -2915,13 +2792,7 @@ namespace MediaBrowser.Controller.Entities
return GetExtras();
}
public virtual bool IsHD
{
get
{
return Height >= 720;
}
}
public virtual bool IsHD => Height >= 720;
public bool IsShortcut { get; set; }
public string ShortcutPath { get; set; }
public int Width { get; set; }
@ -2933,12 +2804,6 @@ namespace MediaBrowser.Controller.Entities
}
// what does this do?
public static ExtraType[] DisplayExtraTypes = new[] { Model.Entities.ExtraType.ThemeSong, Model.Entities.ExtraType.ThemeVideo };
public virtual bool SupportsExternalTransfer
{
get
{
return false;
}
}
public virtual bool SupportsExternalTransfer => false;
}
}

View File

@ -10,10 +10,7 @@ namespace MediaBrowser.Controller.Entities
public abstract class BasePluginFolder : Folder, ICollectionFolder
{
[IgnoreDataMember]
public virtual string CollectionType
{
get { return null; }
}
public virtual string CollectionType => null;
public override bool CanDelete()
{
@ -26,22 +23,10 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
//public override double? GetDefaultPrimaryImageAspectRatio()
//{

View File

@ -9,13 +9,7 @@ namespace MediaBrowser.Controller.Entities
public class Book : BaseItem, IHasLookupInfo<BookInfo>, IHasSeries
{
[IgnoreDataMember]
public override string MediaType
{
get
{
return Model.Entities.MediaType.Book;
}
}
public override string MediaType => Model.Entities.MediaType.Book;
[IgnoreDataMember]
public string SeriesPresentationUniqueKey { get; set; }

View File

@ -34,22 +34,10 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return false;
}
}
public override bool SupportsPlayedStatus => false;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
public override bool CanDelete()
{
@ -158,22 +146,10 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The display prefs id.</value>
[IgnoreDataMember]
public override Guid DisplayPreferencesId
{
get
{
return Id;
}
}
public override Guid DisplayPreferencesId => Id;
[IgnoreDataMember]
public override string[] PhysicalLocations
{
get
{
return PhysicalLocationsList;
}
}
public override string[] PhysicalLocations => PhysicalLocationsList;
public override bool IsSaveLocalMetadataEnabled()
{
@ -337,10 +313,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The actual children.</value>
[IgnoreDataMember]
public override IEnumerable<BaseItem> Children
{
get { return GetActualChildren(); }
}
public override IEnumerable<BaseItem> Children => GetActualChildren();
public IEnumerable<BaseItem> GetActualChildren()
{
@ -386,12 +359,6 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
}
}

View File

@ -47,80 +47,35 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsThemeMedia
{
get { return true; }
}
public override bool SupportsThemeMedia => true;
[IgnoreDataMember]
public virtual bool IsPreSorted
{
get { return false; }
}
public virtual bool IsPreSorted => false;
[IgnoreDataMember]
public virtual bool IsPhysicalRoot
{
get { return false; }
}
public virtual bool IsPhysicalRoot => false;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return true;
}
}
public override bool SupportsInheritedParentImages => true;
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return true;
}
}
public override bool SupportsPlayedStatus => true;
/// <summary>
/// Gets a value indicating whether this instance is folder.
/// </summary>
/// <value><c>true</c> if this instance is folder; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public override bool IsFolder
{
get
{
return true;
}
}
public override bool IsFolder => true;
[IgnoreDataMember]
public override bool IsDisplayedAsFolder
{
get
{
return true;
}
}
public override bool IsDisplayedAsFolder => true;
[IgnoreDataMember]
public virtual bool SupportsCumulativeRunTimeTicks
{
get
{
return false;
}
}
public virtual bool SupportsCumulativeRunTimeTicks => false;
[IgnoreDataMember]
public virtual bool SupportsDateLastMediaAdded
{
get
{
return false;
}
}
public virtual bool SupportsDateLastMediaAdded => false;
public override bool CanDelete()
{
@ -172,10 +127,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
protected virtual bool SupportsShortcutChildren
{
get { return false; }
}
protected virtual bool SupportsShortcutChildren => false;
/// <summary>
/// Adds the child.
@ -210,23 +162,14 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The actual children.</value>
[IgnoreDataMember]
public virtual IEnumerable<BaseItem> Children
{
get
{
return LoadChildren();
}
}
public virtual IEnumerable<BaseItem> Children => LoadChildren();
/// <summary>
/// thread-safe access to all recursive children of this folder - without regard to user
/// </summary>
/// <value>The recursive children.</value>
[IgnoreDataMember]
public IEnumerable<BaseItem> RecursiveChildren
{
get { return GetRecursiveChildren(); }
}
public IEnumerable<BaseItem> RecursiveChildren => GetRecursiveChildren();
public override bool IsVisible(User user)
{
@ -1421,13 +1364,7 @@ namespace MediaBrowser.Controller.Entities
return list;
}
protected virtual bool FilterLinkedChildrenPerUser
{
get
{
return false;
}
}
protected virtual bool FilterLinkedChildrenPerUser => false;
public bool ContainsLinkedChildByItemId(Guid itemId)
{
@ -1524,13 +1461,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
protected override bool SupportsOwnedItems
{
get
{
return base.SupportsOwnedItems || SupportsShortcutChildren;
}
}
protected override bool SupportsOwnedItems => base.SupportsOwnedItems || SupportsShortcutChildren;
protected override async Task<bool> RefreshedOwnedItems(MetadataRefreshOptions options, List<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken)
{

View File

@ -27,26 +27,17 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsThemeMedia
{
get { return true; }
}
public override bool SupportsThemeMedia => true;
[IgnoreDataMember]
public override bool SupportsPeople
{
get { return false; }
}
public override bool SupportsPeople => false;
/// <summary>
/// Gets the type of the media.
/// </summary>
/// <value>The type of the media.</value>
[IgnoreDataMember]
public override string MediaType
{
get { return Model.Entities.MediaType.Game; }
}
public override string MediaType => Model.Entities.MediaType.Game;
/// <summary>
/// Gets or sets the players supported.

View File

@ -32,22 +32,10 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
[IgnoreDataMember]
public override bool SupportsAncestors
{
get
{
return false;
}
}
public override bool SupportsAncestors => false;
public override bool IsSaveLocalMetadataEnabled()
{
@ -68,13 +56,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
public static string GetPath(string name)
{

View File

@ -18,31 +18,13 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The display prefs id.</value>
[IgnoreDataMember]
public override Guid DisplayPreferencesId
{
get
{
return Id;
}
}
public override Guid DisplayPreferencesId => Id;
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return false;
}
}
public override bool SupportsPlayedStatus => false;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
public override double GetDefaultPrimaryImageAspectRatio()
{
@ -90,12 +72,6 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
}
}

View File

@ -35,31 +35,13 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
[IgnoreDataMember]
public override bool IsDisplayedAsFolder
{
get
{
return true;
}
}
public override bool IsDisplayedAsFolder => true;
[IgnoreDataMember]
public override bool SupportsAncestors
{
get
{
return false;
}
}
public override bool SupportsAncestors => false;
public override bool IsSaveLocalMetadataEnabled()
{
@ -80,13 +62,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
public static string GetPath(string name)
{

View File

@ -25,28 +25,13 @@ namespace MediaBrowser.Controller.Entities.Movies
}
[IgnoreDataMember]
protected override bool FilterLinkedChildrenPerUser
{
get
{
return true;
}
}
protected override bool FilterLinkedChildrenPerUser => true;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
[IgnoreDataMember]
public override bool SupportsPeople
{
get { return true; }
}
public override bool SupportsPeople => true;
public Guid[] LocalTrailerIds { get; set; }
public Guid[] RemoteTrailerIds { get; set; }
@ -110,13 +95,7 @@ namespace MediaBrowser.Controller.Entities.Movies
}
[IgnoreDataMember]
public override bool IsPreSorted
{
get
{
return true;
}
}
public override bool IsPreSorted => true;
public override bool IsAuthorizedToDelete(User user, List<Folder> allCollectionFolders)
{

View File

@ -39,8 +39,8 @@ namespace MediaBrowser.Controller.Entities.Movies
[IgnoreDataMember]
public string CollectionName
{
get { return TmdbCollectionName; }
set { TmdbCollectionName = value; }
get => TmdbCollectionName;
set => TmdbCollectionName = value;
}
public override double GetDefaultPrimaryImageAspectRatio()
@ -184,13 +184,6 @@ namespace MediaBrowser.Controller.Entities.Movies
}
[IgnoreDataMember]
public override bool StopRefreshIfLocalMetadataFound
{
get
{
// Need people id's from internet metadata
return false;
}
}
public override bool StopRefreshIfLocalMetadataFound => false;
}
}

View File

@ -17,13 +17,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public string[] AllArtists
{
get
{
return Artists;
}
}
public string[] AllArtists => Artists;
public override UnratedItem GetBlockUnratedType()
{

View File

@ -51,13 +51,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
public override bool CanDelete()
{
@ -70,31 +64,13 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool EnableAlphaNumericSorting
{
get
{
return false;
}
}
public override bool EnableAlphaNumericSorting => false;
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
[IgnoreDataMember]
public override bool SupportsAncestors
{
get
{
return false;
}
}
public override bool SupportsAncestors => false;
public static string GetPath(string name)
{

View File

@ -6,31 +6,13 @@ namespace MediaBrowser.Controller.Entities
public class Photo : BaseItem
{
[IgnoreDataMember]
public override bool SupportsLocalMetadata
{
get
{
return false;
}
}
public override bool SupportsLocalMetadata => false;
[IgnoreDataMember]
public override string MediaType
{
get
{
return Model.Entities.MediaType.Photo;
}
}
public override string MediaType => Model.Entities.MediaType.Photo;
[IgnoreDataMember]
public override Folder LatestItemsIndexContainer
{
get
{
return AlbumEntity;
}
}
public override Folder LatestItemsIndexContainer => AlbumEntity;
[IgnoreDataMember]

View File

@ -5,30 +5,12 @@ namespace MediaBrowser.Controller.Entities
public class PhotoAlbum : Folder
{
[IgnoreDataMember]
public override bool AlwaysScanInternalMetadataPath
{
get
{
return true;
}
}
public override bool AlwaysScanInternalMetadataPath => true;
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return false;
}
}
public override bool SupportsPlayedStatus => false;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
}
}

View File

@ -29,31 +29,13 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
[IgnoreDataMember]
public override bool IsDisplayedAsFolder
{
get
{
return true;
}
}
public override bool IsDisplayedAsFolder => true;
[IgnoreDataMember]
public override bool SupportsAncestors
{
get
{
return false;
}
}
public override bool SupportsAncestors => false;
public override double GetDefaultPrimaryImageAspectRatio()
{
@ -81,13 +63,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
public static string GetPath(string name)
{

View File

@ -47,61 +47,25 @@ namespace MediaBrowser.Controller.Entities.TV
}
[IgnoreDataMember]
protected override bool SupportsOwnedItems
{
get
{
return IsStacked || MediaSourceCount > 1;
}
}
protected override bool SupportsOwnedItems => IsStacked || MediaSourceCount > 1;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get { return true; }
}
public override bool SupportsInheritedParentImages => true;
[IgnoreDataMember]
public override bool SupportsPeople
{
get { return true; }
}
public override bool SupportsPeople => true;
[IgnoreDataMember]
public int? AiredSeasonNumber
{
get
{
return AirsAfterSeasonNumber ?? AirsBeforeSeasonNumber ?? ParentIndexNumber;
}
}
public int? AiredSeasonNumber => AirsAfterSeasonNumber ?? AirsBeforeSeasonNumber ?? ParentIndexNumber;
[IgnoreDataMember]
public override Folder LatestItemsIndexContainer
{
get
{
return Series;
}
}
public override Folder LatestItemsIndexContainer => Series;
[IgnoreDataMember]
public override Guid DisplayParentId
{
get
{
return SeasonId;
}
}
public override Guid DisplayParentId => SeasonId;
[IgnoreDataMember]
protected override bool EnableDefaultVideoUserDataKeys
{
get
{
return false;
}
}
protected override bool EnableDefaultVideoUserDataKeys => false;
public override double GetDefaultPrimaryImageAspectRatio()
{
@ -166,13 +130,7 @@ namespace MediaBrowser.Controller.Entities.TV
}
[IgnoreDataMember]
public bool IsInSeasonFolder
{
get
{
return FindParent<Season>() != null;
}
}
public bool IsInSeasonFolder => FindParent<Season>() != null;
[IgnoreDataMember]
public string SeriesPresentationUniqueKey { get; set; }
@ -278,13 +236,7 @@ namespace MediaBrowser.Controller.Entities.TV
}
[IgnoreDataMember]
public bool IsMissingEpisode
{
get
{
return LocationType == LocationType.Virtual;
}
}
public bool IsMissingEpisode => LocationType == LocationType.Virtual;
[IgnoreDataMember]
public Guid SeasonId { get; set; }

View File

@ -16,46 +16,22 @@ namespace MediaBrowser.Controller.Entities.TV
public class Season : Folder, IHasSeries, IHasLookupInfo<SeasonInfo>
{
[IgnoreDataMember]
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
public override bool SupportsAddingToPlaylist => true;
[IgnoreDataMember]
public override bool IsPreSorted
{
get
{
return true;
}
}
public override bool IsPreSorted => true;
[IgnoreDataMember]
public override bool SupportsDateLastMediaAdded
{
get
{
return false;
}
}
public override bool SupportsDateLastMediaAdded => false;
[IgnoreDataMember]
public override bool SupportsPeople
{
get { return true; }
}
public override bool SupportsPeople => true;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get { return true; }
}
public override bool SupportsInheritedParentImages => true;
[IgnoreDataMember]
public override Guid DisplayParentId
{
get { return SeriesId; }
}
public override Guid DisplayParentId => SeriesId;
public override double GetDefaultPrimaryImageAspectRatio()
{

View File

@ -32,43 +32,19 @@ namespace MediaBrowser.Controller.Entities.TV
public string AirTime { get; set; }
[IgnoreDataMember]
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
public override bool SupportsAddingToPlaylist => true;
[IgnoreDataMember]
public override bool IsPreSorted
{
get
{
return true;
}
}
public override bool IsPreSorted => true;
[IgnoreDataMember]
public override bool SupportsDateLastMediaAdded
{
get
{
return true;
}
}
public override bool SupportsDateLastMediaAdded => true;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
[IgnoreDataMember]
public override bool SupportsPeople
{
get { return true; }
}
public override bool SupportsPeople => true;
public Guid[] LocalTrailerIds { get; set; }
public Guid[] RemoteTrailerIds { get; set; }
@ -526,13 +502,6 @@ namespace MediaBrowser.Controller.Entities.TV
}
[IgnoreDataMember]
public override bool StopRefreshIfLocalMetadataFound
{
get
{
// Need people id's from internet metadata
return false;
}
}
public override bool StopRefreshIfLocalMetadataFound => false;
}
}

View File

@ -94,13 +94,6 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool StopRefreshIfLocalMetadataFound
{
get
{
// Need people id's from internet metadata
return false;
}
}
public override bool StopRefreshIfLocalMetadataFound => false;
}
}

View File

@ -40,14 +40,8 @@ namespace MediaBrowser.Controller.Entities
// Strictly to remove IgnoreDataMember
public override ItemImageInfo[] ImageInfos
{
get
{
return base.ImageInfos;
}
set
{
base.ImageInfos = value;
}
get => base.ImageInfos;
set => base.ImageInfos = value;
}
/// <summary>
@ -57,15 +51,8 @@ namespace MediaBrowser.Controller.Entities
[IgnoreDataMember]
public override string Path
{
get
{
// Return this so that metadata providers will look in here
return ConfigurationDirectoryPath;
}
set
{
base.Path = value;
}
get => ConfigurationDirectoryPath;
set => base.Path = value;
}
private string _name;
@ -75,10 +62,7 @@ namespace MediaBrowser.Controller.Entities
/// <value>The name.</value>
public override string Name
{
get
{
return _name;
}
get => _name;
set
{
_name = value;
@ -94,26 +78,14 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
/// <summary>
/// Gets the root folder.
/// </summary>
/// <value>The root folder.</value>
[IgnoreDataMember]
public Folder RootFolder
{
get
{
return LibraryManager.GetUserRootFolder();
}
}
public Folder RootFolder => LibraryManager.GetUserRootFolder();
/// <summary>
/// Gets or sets the last login date.
@ -146,7 +118,7 @@ namespace MediaBrowser.Controller.Entities
return _config;
}
set { _config = value; }
set => _config = value;
}
private volatile UserPolicy _policy;
@ -169,7 +141,7 @@ namespace MediaBrowser.Controller.Entities
return _policy;
}
set { _policy = value; }
set => _policy = value;
}
/// <summary>
@ -232,13 +204,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The configuration directory path.</value>
[IgnoreDataMember]
public string ConfigurationDirectoryPath
{
get
{
return GetConfigurationDirectoryPath(Name);
}
}
public string ConfigurationDirectoryPath => GetConfigurationDirectoryPath(Name);
public override double GetDefaultPrimaryImageAspectRatio()
{
@ -327,13 +293,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
public long InternalId { get; set; }

View File

@ -31,10 +31,7 @@ namespace MediaBrowser.Controller.Entities
/// <exception cref="System.ArgumentOutOfRangeException">Rating;A 0 to 10 rating is required for UserItemData.</exception>
public double? Rating
{
get
{
return _rating;
}
get => _rating;
set
{
if (value.HasValue)

View File

@ -34,22 +34,10 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return false;
}
}
public override bool SupportsPlayedStatus => false;
private void ClearCache()
{
@ -88,22 +76,10 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
protected override bool SupportsShortcutChildren
{
get
{
return true;
}
}
protected override bool SupportsShortcutChildren => true;
[IgnoreDataMember]
public override bool IsPreSorted
{
get
{
return true;
}
}
public override bool IsPreSorted => true;
protected override IEnumerable<BaseItem> GetEligibleChildrenForRecursiveChildren(User user)
{

View File

@ -20,13 +20,7 @@ namespace MediaBrowser.Controller.Entities
public static IPlaylistManager PlaylistManager;
[IgnoreDataMember]
public string CollectionType
{
get
{
return ViewType;
}
}
public string CollectionType => ViewType;
public override IEnumerable<Guid> GetIdsForAncestorQuery()
{
@ -48,22 +42,10 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return false;
}
}
public override bool SupportsPlayedStatus => false;
public override int GetChildCount(User user)
{
@ -188,12 +170,6 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
}
}

View File

@ -33,28 +33,13 @@ namespace MediaBrowser.Controller.Entities
public LinkedChild[] LinkedAlternateVersions { get; set; }
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return true;
}
}
public override bool SupportsPlayedStatus => true;
[IgnoreDataMember]
public override bool SupportsPeople
{
get { return true; }
}
public override bool SupportsPeople => true;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return true;
}
}
public override bool SupportsInheritedParentImages => true;
[IgnoreDataMember]
public override bool SupportsPositionTicksResume
@ -106,10 +91,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsThemeMedia
{
get { return true; }
}
public override bool SupportsThemeMedia => true;
/// <summary>
/// Gets or sets the timestamp.
@ -199,10 +181,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
public override bool SupportsAddingToPlaylist => true;
[IgnoreDataMember]
public int MediaSourceCount
@ -222,16 +201,10 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public bool IsStacked
{
get { return AdditionalParts.Length > 0; }
}
public bool IsStacked => AdditionalParts.Length > 0;
[IgnoreDataMember]
public override bool HasLocalAlternateVersions
{
get { return LocalAlternateVersions.Length > 0; }
}
public override bool HasLocalAlternateVersions => LocalAlternateVersions.Length > 0;
public IEnumerable<Guid> GetAdditionalPartIds()
{
@ -289,13 +262,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
protected virtual bool EnableDefaultVideoUserDataKeys
{
get
{
return true;
}
}
protected virtual bool EnableDefaultVideoUserDataKeys => true;
public override List<string> GetUserDataKeys()
{
@ -466,23 +433,14 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value><c>true</c> if [is3 D]; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool Is3D
{
get { return Video3DFormat.HasValue; }
}
public bool Is3D => Video3DFormat.HasValue;
/// <summary>
/// Gets the type of the media.
/// </summary>
/// <value>The type of the media.</value>
[IgnoreDataMember]
public override string MediaType
{
get
{
return Model.Entities.MediaType.Video;
}
}
public override string MediaType => Model.Entities.MediaType.Video;
protected override async Task<bool> RefreshedOwnedItems(MetadataRefreshOptions options, List<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken)
{

View File

@ -25,13 +25,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
public override double GetDefaultPrimaryImageAspectRatio()
{
@ -42,13 +36,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsAncestors
{
get
{
return false;
}
}
public override bool SupportsAncestors => false;
public override bool CanDelete()
{
@ -89,13 +77,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
public override bool SupportsPeople
{
get
{
return false;
}
}
public override bool SupportsPeople => false;
public static string GetPath(string name)
{

View File

@ -67,13 +67,7 @@ namespace MediaBrowser.Controller.Library
/// Gets a value indicating whether this instance is directory.
/// </summary>
/// <value><c>true</c> if this instance is directory; otherwise, <c>false</c>.</value>
public bool IsDirectory
{
get
{
return FileInfo.IsDirectory;
}
}
public bool IsDirectory => FileInfo.IsDirectory;
/// <summary>
/// Gets a value indicating whether this instance is vf.
@ -103,13 +97,7 @@ namespace MediaBrowser.Controller.Library
/// Gets a value indicating whether this instance is physical root.
/// </summary>
/// <value><c>true</c> if this instance is physical root; otherwise, <c>false</c>.</value>
public bool IsPhysicalRoot
{
get
{
return IsDirectory && BaseItem.FileSystem.AreEqual(Path, _appPaths.RootFolderPath);
}
}
public bool IsPhysicalRoot => IsDirectory && BaseItem.FileSystem.AreEqual(Path, _appPaths.RootFolderPath);
/// <summary>
/// Gets or sets the additional locations.

View File

@ -32,28 +32,13 @@ namespace MediaBrowser.Controller.LiveTv
}
[IgnoreDataMember]
public override bool SupportsPositionTicksResume
{
get
{
return false;
}
}
public override bool SupportsPositionTicksResume => false;
[IgnoreDataMember]
public override SourceType SourceType
{
get { return SourceType.LiveTV; }
}
public override SourceType SourceType => SourceType.LiveTV;
[IgnoreDataMember]
public override bool EnableRememberingTrackSelections
{
get
{
return false;
}
}
public override bool EnableRememberingTrackSelections => false;
/// <summary>
/// Gets or sets the number.
@ -68,14 +53,7 @@ namespace MediaBrowser.Controller.LiveTv
public ChannelType ChannelType { get; set; }
[IgnoreDataMember]
public override LocationType LocationType
{
get
{
// TODO: This should be removed
return LocationType.Remote;
}
}
public override LocationType LocationType => LocationType.Remote;
protected override string CreateSortName()
{
@ -93,13 +71,7 @@ namespace MediaBrowser.Controller.LiveTv
}
[IgnoreDataMember]
public override string MediaType
{
get
{
return ChannelType == ChannelType.Radio ? Model.Entities.MediaType.Audio : Model.Entities.MediaType.Video;
}
}
public override string MediaType => ChannelType == ChannelType.Radio ? Model.Entities.MediaType.Audio : Model.Entities.MediaType.Video;
public override string GetClientTypeName()
{
@ -176,13 +148,7 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsKids
{
get
{
return Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
[IgnoreDataMember]
public bool IsRepeat { get; set; }

View File

@ -63,10 +63,7 @@ namespace MediaBrowser.Controller.LiveTv
}
[IgnoreDataMember]
public override SourceType SourceType
{
get { return SourceType.LiveTV; }
}
public override SourceType SourceType => SourceType.LiveTV;
/// <summary>
/// The start date of the program, in UTC.
@ -103,13 +100,7 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <value><c>true</c> if this instance is sports; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsSports
{
get
{
return Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsSports => Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase);
/// <summary>
/// Gets or sets a value indicating whether this instance is series.
@ -123,52 +114,28 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsLive
{
get
{
return Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
/// <summary>
/// Gets or sets a value indicating whether this instance is news.
/// </summary>
/// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsNews
{
get
{
return Tags.Contains("News", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsNews => Tags.Contains("News", StringComparer.OrdinalIgnoreCase);
/// <summary>
/// Gets or sets a value indicating whether this instance is kids.
/// </summary>
/// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsKids
{
get
{
return Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
/// <summary>
/// Gets or sets a value indicating whether this instance is premiere.
/// </summary>
/// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsPremiere
{
get
{
return Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
/// <summary>
/// Returns the folder containing the item.
@ -176,13 +143,7 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
public override string ContainingFolderPath
{
get
{
return Path;
}
}
public override string ContainingFolderPath => Path;
//[IgnoreDataMember]
//public override string MediaType
@ -251,13 +212,7 @@ namespace MediaBrowser.Controller.LiveTv
}
[IgnoreDataMember]
public override bool SupportsAncestors
{
get
{
return false;
}
}
public override bool SupportsAncestors => false;
private LiveTvOptions GetConfiguration()
{

View File

@ -115,27 +115,11 @@ namespace MediaBrowser.Controller.LiveTv
/// <value>The episode number.</value>
public int? EpisodeNumber { get; set; }
public bool IsMovie { get; set; }
public bool IsKids
{
get
{
return Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsSports
{
get
{
return Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsNews
{
get
{
return Tags.Contains("News", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
public bool IsSports => Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase);
public bool IsNews => Tags.Contains("News", StringComparer.OrdinalIgnoreCase);
public bool IsSeries { get; set; }
/// <summary>
@ -143,22 +127,10 @@ namespace MediaBrowser.Controller.LiveTv
/// </summary>
/// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool IsLive
{
get
{
return Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
[IgnoreDataMember]
public bool IsPremiere
{
get
{
return Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
}
}
public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
public int? ProductionYear { get; set; }
public string EpisodeTitle { get; set; }

View File

@ -61,53 +61,17 @@ namespace MediaBrowser.Controller.MediaEncoding
}
}
public bool IgnoreInputDts
{
get
{
return MediaSource.IgnoreDts;
}
}
public bool IgnoreInputDts => MediaSource.IgnoreDts;
public bool IgnoreInputIndex
{
get
{
return MediaSource.IgnoreIndex;
}
}
public bool IgnoreInputIndex => MediaSource.IgnoreIndex;
public bool GenPtsInput
{
get
{
return MediaSource.GenPtsInput;
}
}
public bool GenPtsInput => MediaSource.GenPtsInput;
public bool DiscardCorruptFramesInput
{
get
{
return false;
}
}
public bool DiscardCorruptFramesInput => false;
public bool EnableFastSeekInput
{
get
{
return false;
}
}
public bool EnableFastSeekInput => false;
public bool GenPtsOutput
{
get
{
return false;
}
}
public bool GenPtsOutput => false;
public string OutputContainer { get; set; }
@ -142,15 +106,9 @@ namespace MediaBrowser.Controller.MediaEncoding
public BaseEncodingJobOptions BaseRequest { get; set; }
public long? StartTimeTicks
{
get { return BaseRequest.StartTimeTicks; }
}
public long? StartTimeTicks => BaseRequest.StartTimeTicks;
public bool CopyTimestamps
{
get { return BaseRequest.CopyTimestamps; }
}
public bool CopyTimestamps => BaseRequest.CopyTimestamps;
public int? OutputAudioBitrate;
public int? OutputAudioChannels;
@ -323,13 +281,7 @@ namespace MediaBrowser.Controller.MediaEncoding
SupportedSubtitleCodecs = Array.Empty<string>();
}
public bool IsSegmentedLiveStream
{
get
{
return TranscodingType != TranscodingJobType.Progressive && !RunTimeTicks.HasValue;
}
}
public bool IsSegmentedLiveStream => TranscodingType != TranscodingJobType.Progressive && !RunTimeTicks.HasValue;
public bool EnableBreakOnNonKeyFrames(string videoCodec)
{
@ -346,13 +298,7 @@ namespace MediaBrowser.Controller.MediaEncoding
return false;
}
public int? TotalOutputBitrate
{
get
{
return (OutputAudioBitrate ?? 0) + (OutputVideoBitrate ?? 0);
}
}
public int? TotalOutputBitrate => (OutputAudioBitrate ?? 0) + (OutputVideoBitrate ?? 0);
public int? OutputWidth
{

View File

@ -20,13 +20,7 @@ namespace MediaBrowser.Controller.MediaEncoding
/// Gets a value indicating whether this instance has fixed resolution.
/// </summary>
/// <value><c>true</c> if this instance has fixed resolution; otherwise, <c>false</c>.</value>
public bool HasFixedResolution
{
get
{
return Width.HasValue || Height.HasValue;
}
}
public bool HasFixedResolution => Width.HasValue || Height.HasValue;
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
public EncodingJobOptions(StreamInfo info, DeviceProfile deviceProfile)

View File

@ -44,10 +44,7 @@ namespace MediaBrowser.Controller.Net
/// &gt;0 Executed after global request filters
/// </summary>
/// <value>The priority.</value>
public int Priority
{
get { return 0; }
}
public int Priority => 0;
public string[] GetRoles()
{

View File

@ -9,13 +9,7 @@ namespace MediaBrowser.Controller.Net
/// Gets or sets the user identifier.
/// </summary>
/// <value>The user identifier.</value>
public Guid UserId
{
get
{
return User == null ? Guid.Empty : User.Id;
}
}
public Guid UserId => User == null ? Guid.Empty : User.Id;
/// <summary>
/// Gets or sets the device identifier.

View File

@ -83,13 +83,7 @@ namespace MediaBrowser.Controller.Net
protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
protected virtual bool SendOnTimer
{
get
{
return false;
}
}
protected virtual bool SendOnTimer => false;
protected virtual void ParseMessageParams(string[] values)
{

View File

@ -34,13 +34,7 @@ namespace MediaBrowser.Controller.Playlists
}
[IgnoreDataMember]
public bool IsFile
{
get
{
return IsPlaylistFile(Path);
}
}
public bool IsFile => IsPlaylistFile(Path);
public static bool IsPlaylistFile(string path)
{
@ -64,49 +58,19 @@ namespace MediaBrowser.Controller.Playlists
}
[IgnoreDataMember]
protected override bool FilterLinkedChildrenPerUser
{
get
{
return true;
}
}
protected override bool FilterLinkedChildrenPerUser => true;
[IgnoreDataMember]
public override bool SupportsInheritedParentImages
{
get
{
return false;
}
}
public override bool SupportsInheritedParentImages => false;
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{
get
{
return string.Equals(MediaType, "Video", StringComparison.OrdinalIgnoreCase);
}
}
public override bool SupportsPlayedStatus => string.Equals(MediaType, "Video", StringComparison.OrdinalIgnoreCase);
[IgnoreDataMember]
public override bool AlwaysScanInternalMetadataPath
{
get
{
return true;
}
}
public override bool AlwaysScanInternalMetadataPath => true;
[IgnoreDataMember]
public override bool SupportsCumulativeRunTimeTicks
{
get
{
return true;
}
}
public override bool SupportsCumulativeRunTimeTicks => true;
public override double GetDefaultPrimaryImageAspectRatio()
{
@ -229,24 +193,12 @@ namespace MediaBrowser.Controller.Playlists
}
[IgnoreDataMember]
public override bool IsPreSorted
{
get
{
return true;
}
}
public override bool IsPreSorted => true;
public string PlaylistMediaType { get; set; }
[IgnoreDataMember]
public override string MediaType
{
get
{
return PlaylistMediaType;
}
}
public override string MediaType => PlaylistMediaType;
public void SetMediaType(string value)
{

View File

@ -24,13 +24,7 @@ namespace MediaBrowser.Controller.Resolvers
/// Gets the priority.
/// </summary>
/// <value>The priority.</value>
public virtual ResolverPriority Priority
{
get
{
return ResolverPriority.First;
}
}
public virtual ResolverPriority Priority => ResolverPriority.First;
/// <summary>
/// Sets initial values on the newly resolved item

View File

@ -67,32 +67,13 @@ namespace MediaBrowser.LocalMetadata
return file.Exists && FileSystem.GetLastWriteTimeUtc(file) > item.DateLastSaved;
}
public string Name
{
get
{
return XmlProviderUtils.Name;
}
}
public string Name => XmlProviderUtils.Name;
public virtual int Order
{
get
{
// After Nfo
return 1;
}
}
public virtual int Order => 1;
}
static class XmlProviderUtils
{
public static string Name
{
get
{
return "Emby Xml";
}
}
public static string Name => "Emby Xml";
}
}

View File

@ -14,24 +14,14 @@ namespace MediaBrowser.LocalMetadata.Images
_fileSystem = fileSystem;
}
public string Name
{
get { return "Collection Folder Images"; }
}
public string Name => "Collection Folder Images";
public bool Supports(BaseItem item)
{
return item is CollectionFolder && item.SupportsLocalMetadata;
}
public int Order
{
get
{
// Run after LocalImageProvider
return 1;
}
}
public int Order => 1;
public List<LocalImageInfo> GetImages(BaseItem item, IDirectoryService directoryService)
{

View File

@ -18,15 +18,9 @@ namespace MediaBrowser.LocalMetadata.Images
_fileSystem = fileSystem;
}
public string Name
{
get { return "Local Images"; }
}
public string Name => "Local Images";
public int Order
{
get { return 0; }
}
public int Order => 0;
public bool Supports(BaseItem item)
{

View File

@ -19,10 +19,7 @@ namespace MediaBrowser.LocalMetadata.Images
_fileSystem = fileSystem;
}
public string Name
{
get { return "Internal Images"; }
}
public string Name => "Internal Images";
public bool Supports(BaseItem item)
{
@ -50,14 +47,7 @@ namespace MediaBrowser.LocalMetadata.Images
return true;
}
public int Order
{
get
{
// Make sure this is last so that all other locations are scanned first
return 1000;
}
}
public int Order => 1000;
public List<LocalImageInfo> GetImages(BaseItem item, IDirectoryService directoryService)
{

View File

@ -21,15 +21,9 @@ namespace MediaBrowser.LocalMetadata.Images
_fileSystem = fileSystem;
}
public string Name
{
get { return "Local Images"; }
}
public string Name => "Local Images";
public int Order
{
get { return 0; }
}
public int Order => 0;
public bool Supports(BaseItem item)
{

View File

@ -42,21 +42,9 @@ namespace MediaBrowser.LocalMetadata.Savers
protected ILogger Logger { get; private set; }
protected IXmlReaderSettingsFactory XmlReaderSettingsFactory { get; private set; }
protected ItemUpdateType MinimumUpdateType
{
get
{
return ItemUpdateType.MetadataDownload;
}
}
protected ItemUpdateType MinimumUpdateType => ItemUpdateType.MetadataDownload;
public string Name
{
get
{
return XmlProviderUtils.Name;
}
}
public string Name => XmlProviderUtils.Name;
public string GetSavePath(BaseItem item)
{

View File

@ -53,10 +53,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
return null;
}
protected override bool IsVideoEncoder
{
get { return false; }
}
protected override bool IsVideoEncoder => false;
}
}

View File

@ -20,8 +20,8 @@ namespace MediaBrowser.MediaEncoding.Encoder
public EncodingJobOptions Options
{
get { return (EncodingJobOptions)BaseRequest; }
set { BaseRequest = value; }
get => (EncodingJobOptions)BaseRequest;
set => BaseRequest = value;
}
public string Id { get; set; }

View File

@ -415,10 +415,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
/// Gets the encoder path.
/// </summary>
/// <value>The encoder path.</value>
public string EncoderPath
{
get { return FFMpegPath; }
}
public string EncoderPath => FFMpegPath;
/// <summary>
/// Gets the media info.

View File

@ -54,10 +54,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
return null;
}
protected override bool IsVideoEncoder
{
get { return true; }
}
protected override bool IsVideoEncoder => true;
}
}

View File

@ -83,10 +83,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
return _encryption.DecryptString(password.Substring(2));
}
public string Name
{
get { return "Open Subtitles"; }
}
public string Name => "Open Subtitles";
private SubtitleOptions GetOptions()
{

View File

@ -60,13 +60,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
_textEncoding = textEncoding;
}
private string SubtitleCachePath
{
get
{
return Path.Combine(_appPaths.DataPath, "subtitles");
}
}
private string SubtitleCachePath => Path.Combine(_appPaths.DataPath, "subtitles");
private Stream ConvertSubtitles(Stream stream,
string inputFormat,

View File

@ -4,10 +4,7 @@ namespace MediaBrowser.Model.Dlna
{
public class SortCriteria
{
public SortOrder SortOrder
{
get { return SortOrder.Ascending; }
}
public SortOrder SortOrder => SortOrder.Ascending;
public SortCriteria(string value)
{

View File

@ -127,22 +127,11 @@ namespace MediaBrowser.Model.Dlna
public Dictionary<string, string> StreamOptions { get; private set; }
public string MediaSourceId
{
get
{
return MediaSource == null ? null : MediaSource.Id;
}
}
public string MediaSourceId => MediaSource == null ? null : MediaSource.Id;
public bool IsDirectStream
{
get
{
return PlayMethod == PlayMethod.DirectStream ||
PlayMethod == PlayMethod.DirectPlay;
}
}
public bool IsDirectStream =>
PlayMethod == PlayMethod.DirectStream ||
PlayMethod == PlayMethod.DirectPlay;
public string ToUrl(string baseUrl, string accessToken)
{
@ -911,13 +900,7 @@ namespace MediaBrowser.Model.Dlna
}
}
public int? TargetTotalBitrate
{
get
{
return (TargetAudioBitrate ?? 0) + (TargetVideoBitrate ?? 0);
}
}
public int? TargetTotalBitrate => (TargetAudioBitrate ?? 0) + (TargetVideoBitrate ?? 0);
public bool? IsTargetAnamorphic
{

View File

@ -16,14 +16,8 @@ namespace MediaBrowser.Model.Drawing
/// <value>The height.</value>
public double Height
{
get
{
return _height;
}
set
{
_height = value;
}
get => _height;
set => _height = value;
}
/// <summary>
@ -32,8 +26,8 @@ namespace MediaBrowser.Model.Drawing
/// <value>The width.</value>
public double Width
{
get { return _width; }
set { _width = value; }
get => _width;
set => _width = value;
}
public bool Equals(ImageSize size)

View File

@ -42,12 +42,6 @@ namespace MediaBrowser.Model.Dto
/// </summary>
/// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool HasPrimaryImage
{
get
{
return PrimaryImageTag != null;
}
}
public bool HasPrimaryImage => PrimaryImageTag != null;
}
}

Some files were not shown because too many files have changed in this diff Show More