aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/BaseItem.cs
diff options
context:
space:
mode:
authorBaronGreenback <jimcartlidge@yahoo.co.uk>2021-05-05 23:22:54 +0100
committerGitHub <noreply@github.com>2021-05-05 23:22:54 +0100
commite682c230bd978a47ffd42d0cb8013ef8705b66ba (patch)
tree828852da0cb735df015cd937e03e0a3b37f3bce2 /MediaBrowser.Controller/Entities/BaseItem.cs
parent107412f2f2ae5b4b282ff533636661071b2d215d (diff)
parent95b1cf532b577aa744d5301af4eeb78d08da3ba8 (diff)
Merge branch 'master' into comparisons
Diffstat (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs')
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs28
1 files changed, 9 insertions, 19 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index 53d45261e..32ae15498 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -106,15 +106,10 @@ namespace MediaBrowser.Controller.Entities
{
get
{
- if (_themeSongIds == null)
- {
- _themeSongIds = GetExtras()
- .Where(extra => extra.ExtraType == Model.Entities.ExtraType.ThemeSong)
- .Select(song => song.Id)
- .ToArray();
- }
-
- return _themeSongIds;
+ return _themeSongIds ??= GetExtras()
+ .Where(extra => extra.ExtraType == Model.Entities.ExtraType.ThemeSong)
+ .Select(song => song.Id)
+ .ToArray();
}
private set
@@ -128,15 +123,10 @@ namespace MediaBrowser.Controller.Entities
{
get
{
- if (_themeVideoIds == null)
- {
- _themeVideoIds = GetExtras()
- .Where(extra => extra.ExtraType == Model.Entities.ExtraType.ThemeVideo)
- .Select(song => song.Id)
- .ToArray();
- }
-
- return _themeVideoIds;
+ return _themeVideoIds ??= GetExtras()
+ .Where(extra => extra.ExtraType == Model.Entities.ExtraType.ThemeVideo)
+ .Select(song => song.Id)
+ .ToArray();
}
private set
@@ -2324,7 +2314,7 @@ namespace MediaBrowser.Controller.Entities
.Where(i => i.IsLocalFile)
.Select(i => System.IO.Path.GetDirectoryName(i.Path))
.Distinct(StringComparer.OrdinalIgnoreCase)
- .SelectMany(i => directoryService.GetFilePaths(i))
+ .SelectMany(directoryService.GetFilePaths)
.ToList();
var deletedImages = ImageInfos