aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/BaseItem.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2020-06-20 16:48:48 +0200
committerGitHub <noreply@github.com>2020-06-20 16:48:48 +0200
commitbeb3896d7fba09e038b45c784273dbea1e48013c (patch)
tree55e9c9102f67e11ac0225c25166c2e4caaf012eb /MediaBrowser.Controller/Entities/BaseItem.cs
parente8e5208fbd9484a1b37eed5dece524f108886fe0 (diff)
parent6556bec646a28d08267f30640125865cf42240d0 (diff)
Merge pull request #3390 from telans/fixes
Multiple warning fixes
Diffstat (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs')
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index d76409afc..bf87c0336 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -690,7 +690,10 @@ namespace MediaBrowser.Controller.Entities
/// <returns>System.String.</returns>
protected virtual string CreateSortName()
{
- if (Name == null) return null; // some items may not have name filled in properly
+ if (Name == null)
+ {
+ return null; // some items may not have name filled in properly
+ }
if (!EnableAlphaNumericSorting)
{
@@ -1371,7 +1374,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <param name="options">The options.</param>
/// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>true if a provider reports we changed</returns>
+ /// <returns>true if a provider reports we changed.</returns>
public async Task<ItemUpdateType> RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken)
{
TriggerOnRefreshStart();
@@ -2948,9 +2951,13 @@ namespace MediaBrowser.Controller.Entities
public IEnumerable<BaseItem> GetTrailers()
{
if (this is IHasTrailers)
+ {
return ((IHasTrailers)this).LocalTrailerIds.Select(LibraryManager.GetItemById).Where(i => i != null).OrderBy(i => i.SortName);
+ }
else
+ {
return Array.Empty<BaseItem>();
+ }
}
public virtual bool IsHD => Height >= 720;