mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Convert functions and properties to expression bodies when able (#7312)
Convert functions and properties to expression bodies when able
This commit is contained in:
@@ -7,8 +7,8 @@ namespace Jackett.Common.Models
|
||||
{
|
||||
public class TorznabCapabilities
|
||||
{
|
||||
public int? LimitsMax { get; set; } = null;
|
||||
public int? LimitsDefault { get; set; } = null;
|
||||
public int? LimitsMax { get; set; }
|
||||
public int? LimitsDefault { get; set; }
|
||||
|
||||
public bool SearchAvailable { get; set; }
|
||||
|
||||
@@ -22,13 +22,7 @@ namespace Jackett.Common.Models
|
||||
|
||||
public bool SupportsImdbTVSearch { get; set; }
|
||||
|
||||
public bool MusicSearchAvailable
|
||||
{
|
||||
get
|
||||
{
|
||||
return (SupportedMusicSearchParamsList.Count > 0);
|
||||
}
|
||||
}
|
||||
public bool MusicSearchAvailable => (SupportedMusicSearchParamsList.Count > 0);
|
||||
|
||||
public List<string> SupportedMusicSearchParamsList;
|
||||
|
||||
@@ -83,13 +77,7 @@ namespace Jackett.Common.Models
|
||||
}
|
||||
}
|
||||
|
||||
private string SupportedMusicSearchParams
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Join(",", SupportedMusicSearchParamsList);
|
||||
}
|
||||
}
|
||||
private string SupportedMusicSearchParams => string.Join(",", SupportedMusicSearchParamsList);
|
||||
|
||||
public bool SupportsCategories(int[] categories)
|
||||
{
|
||||
@@ -153,12 +141,9 @@ namespace Jackett.Common.Models
|
||||
return xdoc;
|
||||
}
|
||||
|
||||
public string ToXml()
|
||||
{
|
||||
var xdoc = GetXDocument();
|
||||
public string ToXml() =>
|
||||
GetXDocument().Declaration + Environment.NewLine + GetXDocument();
|
||||
|
||||
return xdoc.Declaration.ToString() + Environment.NewLine + xdoc.ToString();
|
||||
}
|
||||
public static TorznabCapabilities Concat(TorznabCapabilities lhs, TorznabCapabilities rhs)
|
||||
{
|
||||
lhs.SearchAvailable = lhs.SearchAvailable || rhs.SearchAvailable;
|
||||
|
Reference in New Issue
Block a user