mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 18:14:42 +01:00
ReSharper Reformat: Properties to expression bodied form.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,13 +38,7 @@ namespace MediaBrowser.Model.Entities
|
||||
|
||||
public string[] CollectionFolders { get; set; }
|
||||
|
||||
public bool IsEmpty
|
||||
{
|
||||
get
|
||||
{
|
||||
return FoldersAddedTo.Length == 0 && FoldersRemovedFrom.Length == 0 && ItemsAdded.Length == 0 && ItemsRemoved.Length == 0 && ItemsUpdated.Length == 0 && CollectionFolders.Length == 0;
|
||||
}
|
||||
}
|
||||
public bool IsEmpty => FoldersAddedTo.Length == 0 && FoldersRemovedFrom.Length == 0 && ItemsAdded.Length == 0 && ItemsRemoved.Length == 0 && ItemsUpdated.Length == 0 && CollectionFolders.Length == 0;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LibraryUpdateInfo"/> class.
|
||||
|
||||
@@ -177,40 +177,8 @@ namespace MediaBrowser.Model.Services
|
||||
/// <returns>The query parameter value or array of values</returns>
|
||||
public string this[string name]
|
||||
{
|
||||
get { return Get(name); }
|
||||
set
|
||||
{
|
||||
Set(name, value);
|
||||
//var parameters = this.Where(p => p.Name == name).ToArray();
|
||||
//var values = new[] { value };
|
||||
|
||||
//for (int i = 0; ; i++)
|
||||
//{
|
||||
// if (i < parameters.Length && i < values.Length)
|
||||
// {
|
||||
// if (values[i] == null)
|
||||
// Remove(parameters[i]);
|
||||
// else if (values[i] is NameValuePair)
|
||||
// this[IndexOf(parameters[i])] = (NameValuePair)values[i];
|
||||
// else
|
||||
// parameters[i].Value = values[i];
|
||||
// }
|
||||
// else if (i < parameters.Length)
|
||||
// Remove(parameters[i]);
|
||||
// else if (i < values.Length)
|
||||
// {
|
||||
// if (values[i] != null)
|
||||
// {
|
||||
// if (values[i] is NameValuePair)
|
||||
// Add((NameValuePair)values[i]);
|
||||
// else
|
||||
// Add(name, values[i]);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// break;
|
||||
//}
|
||||
}
|
||||
get => Get(name);
|
||||
set => Set(name, value);
|
||||
}
|
||||
|
||||
private string GetQueryStringValue(NameValuePair pair)
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace MediaBrowser.Model.Updates
|
||||
/// <value>The available version.</value>
|
||||
public string AvailableVersion
|
||||
{
|
||||
get { return Package != null ? Package.versionStr : "0.0.0.1"; }
|
||||
get => Package != null ? Package.versionStr : "0.0.0.1";
|
||||
set { } // need this for the serializer
|
||||
}
|
||||
|
||||
|
||||
@@ -36,10 +36,7 @@ namespace MediaBrowser.Model.Updates
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
[IgnoreDataMember]
|
||||
public Version version
|
||||
{
|
||||
get { return _version ?? (_version = new Version(ValueOrDefault(versionStr, "0.0.0.1"))); }
|
||||
}
|
||||
public Version version => _version ?? (_version = new Version(ValueOrDefault(versionStr, "0.0.0.1")));
|
||||
|
||||
/// <summary>
|
||||
/// Values the or default.
|
||||
|
||||
Reference in New Issue
Block a user