Merge pull request #2787 from MediaBrowser/dev

update themes
This commit is contained in:
Luke 2017-07-31 01:16:41 -04:00 committed by GitHub
commit 923dd52444
14 changed files with 22 additions and 77 deletions

View File

@ -2593,7 +2593,7 @@ namespace Emby.Server.Implementations.Library
{
var namingOptions = GetNamingOptions();
var files = owner.DetectIsInMixedFolder() ? new List<FileSystemMetadata>() : fileSystemChildren.Where(i => i.IsDirectory)
var files = owner.IsInMixedFolder ? new List<FileSystemMetadata>() : fileSystemChildren.Where(i => i.IsDirectory)
.Where(i => string.Equals(i.Name, BaseItem.TrailerFolderName, StringComparison.OrdinalIgnoreCase))
.SelectMany(i => _fileSystem.GetFiles(i.FullName, _videoFileExtensions, false, false))
.ToList();

View File

@ -128,12 +128,6 @@ namespace MediaBrowser.Controller.Entities
[IgnoreDataMember]
public bool IsInMixedFolder { get; set; }
[IgnoreDataMember]
protected virtual bool SupportsIsInMixedFolderDetection
{
get { return false; }
}
[IgnoreDataMember]
public virtual bool SupportsPlayedStatus
{
@ -152,16 +146,6 @@ namespace MediaBrowser.Controller.Entities
}
}
public bool DetectIsInMixedFolder()
{
if (SupportsIsInMixedFolderDetection)
{
}
return IsInMixedFolder;
}
[IgnoreDataMember]
public virtual bool SupportsRemoteImageDownloading
{
@ -1156,7 +1140,7 @@ namespace MediaBrowser.Controller.Entities
{
if (SupportsThemeMedia)
{
if (!DetectIsInMixedFolder())
if (!IsInMixedFolder)
{
themeSongsChanged = await RefreshThemeSongs(this, options, fileSystemChildren, cancellationToken).ConfigureAwait(false);
@ -1311,13 +1295,10 @@ namespace MediaBrowser.Controller.Entities
{
var current = this;
if (!SupportsIsInMixedFolderDetection)
{
if (current.IsInMixedFolder != newItem.IsInMixedFolder)
{
return false;
}
}
return true;
}

View File

@ -100,7 +100,7 @@ namespace MediaBrowser.Controller.Entities
public override IEnumerable<FileSystemMetadata> GetDeletePaths()
{
if (!DetectIsInMixedFolder())
if (!IsInMixedFolder)
{
return new[] {
new FileSystemMetadata

View File

@ -152,7 +152,7 @@ namespace MediaBrowser.Controller.Entities
/// <value><c>true</c> if [supports local metadata]; otherwise, <c>false</c>.</value>
bool SupportsLocalMetadata { get; }
bool DetectIsInMixedFolder();
bool IsInMixedFolder { get; }
/// <summary>
/// Gets a value indicating whether this instance is locked.

View File

@ -55,22 +55,13 @@ namespace MediaBrowser.Controller.Entities.Movies
return value;
}
[IgnoreDataMember]
protected override bool SupportsIsInMixedFolderDetection
{
get
{
return false;
}
}
protected override async Task<bool> RefreshedOwnedItems(MetadataRefreshOptions options, List<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken)
{
var hasChanges = await base.RefreshedOwnedItems(options, fileSystemChildren, cancellationToken).ConfigureAwait(false);
// Must have a parent to have special features
// In other words, it must be part of the Parent/Child tree
if (LocationType == LocationType.FileSystem && GetParent() != null && !DetectIsInMixedFolder())
if (LocationType == LocationType.FileSystem && GetParent() != null && !IsInMixedFolder)
{
var specialFeaturesChanged = await RefreshSpecialFeatures(options, fileSystemChildren, cancellationToken).ConfigureAwait(false);
@ -108,7 +99,7 @@ namespace MediaBrowser.Controller.Entities.Movies
{
var info = GetItemLookupInfo<MovieInfo>();
if (!DetectIsInMixedFolder())
if (!IsInMixedFolder)
{
var name = System.IO.Path.GetFileName(ContainingFolderPath);
@ -145,7 +136,7 @@ namespace MediaBrowser.Controller.Entities.Movies
else
{
// Try to get the year from the folder name
if (!DetectIsInMixedFolder())
if (!IsInMixedFolder)
{
info = LibraryManager.ParseName(System.IO.Path.GetFileName(ContainingFolderPath));

View File

@ -24,15 +24,6 @@ namespace MediaBrowser.Controller.Entities
}
}
[IgnoreDataMember]
protected override bool SupportsIsInMixedFolderDetection
{
get
{
return false;
}
}
public override UnratedItem GetBlockUnratedType()
{
return UnratedItem.Music;
@ -61,7 +52,7 @@ namespace MediaBrowser.Controller.Entities
else
{
// Try to get the year from the folder name
if (!DetectIsInMixedFolder())
if (!IsInMixedFolder)
{
info = LibraryManager.ParseName(System.IO.Path.GetFileName(ContainingFolderPath));

View File

@ -47,7 +47,7 @@ namespace MediaBrowser.Controller.Entities
info.IsLocalTrailer = TrailerTypes.Contains(TrailerType.LocalTrailer);
if (!DetectIsInMixedFolder() && LocationType == LocationType.FileSystem)
if (!IsInMixedFolder && LocationType == LocationType.FileSystem)
{
info.Name = System.IO.Path.GetFileName(ContainingFolderPath);
}
@ -73,7 +73,7 @@ namespace MediaBrowser.Controller.Entities
else
{
// Try to get the year from the folder name
if (!DetectIsInMixedFolder())
if (!IsInMixedFolder)
{
info = LibraryManager.ParseName(System.IO.Path.GetFileName(ContainingFolderPath));

View File

@ -77,15 +77,6 @@ namespace MediaBrowser.Controller.Entities
}
}
[IgnoreDataMember]
protected override bool SupportsIsInMixedFolderDetection
{
get
{
return true;
}
}
public override string CreatePresentationUniqueKey()
{
if (!string.IsNullOrWhiteSpace(PrimaryVersionId))
@ -500,7 +491,7 @@ namespace MediaBrowser.Controller.Entities
public override IEnumerable<FileSystemMetadata> GetDeletePaths()
{
if (!DetectIsInMixedFolder())
if (!IsInMixedFolder)
{
return new[] {
new FileSystemMetadata

View File

@ -53,15 +53,6 @@ namespace MediaBrowser.Controller.LiveTv
}
}
[IgnoreDataMember]
protected override bool SupportsIsInMixedFolderDetection
{
get
{
return false;
}
}
[IgnoreDataMember]
public override bool SupportsPlayedStatus
{

View File

@ -10,7 +10,7 @@ namespace MediaBrowser.Controller.Providers
{
Path = item.Path;
ContainingFolderPath = item.ContainingFolderPath;
IsInMixedFolder = item.DetectIsInMixedFolder();
IsInMixedFolder = item.IsInMixedFolder;
var video = item as Video;
if (video != null)

View File

@ -144,7 +144,7 @@ namespace MediaBrowser.LocalMetadata.Images
}
var imagePrefix = item.FileNameWithoutExtension + "-";
var isInMixedFolder = item.DetectIsInMixedFolder();
var isInMixedFolder = item.IsInMixedFolder;
PopulatePrimaryImages(item, images, files, imagePrefix, isInMixedFolder);

View File

@ -65,7 +65,7 @@ namespace MediaBrowser.LocalMetadata.Savers
public static string GetGameSavePath(Game item)
{
if (item.DetectIsInMixedFolder())
if (item.IsInMixedFolder)
{
return Path.ChangeExtension(item.Path, ".xml");
}

View File

@ -355,7 +355,7 @@ namespace MediaBrowser.Providers.Manager
return Path.Combine(seriesFolder, imageFilename);
}
if (item.DetectIsInMixedFolder())
if (item.IsInMixedFolder)
{
return GetSavePathForItemInMixedFolder(item, type, "landscape", extension);
}
@ -432,7 +432,7 @@ namespace MediaBrowser.Providers.Manager
path = Path.Combine(_fileSystem.GetDirectoryName(item.Path), "metadata", filename + extension);
}
else if (item.DetectIsInMixedFolder())
else if (item.IsInMixedFolder)
{
path = GetSavePathForItemInMixedFolder(item, type, filename, extension);
}
@ -499,7 +499,7 @@ namespace MediaBrowser.Providers.Manager
if (imageIndex.Value == 0)
{
if (item.DetectIsInMixedFolder())
if (item.IsInMixedFolder)
{
return new[] { GetSavePathForItemInMixedFolder(item, type, "fanart", extension) };
}
@ -525,7 +525,7 @@ namespace MediaBrowser.Providers.Manager
var outputIndex = imageIndex.Value;
if (item.DetectIsInMixedFolder())
if (item.IsInMixedFolder)
{
return new[] { GetSavePathForItemInMixedFolder(item, type, "fanart" + outputIndex.ToString(UsCulture), extension) };
}
@ -568,7 +568,7 @@ namespace MediaBrowser.Providers.Manager
return new[] { Path.Combine(seasonFolder, imageFilename) };
}
if (item.DetectIsInMixedFolder() || item is MusicVideo)
if (item.IsInMixedFolder || item is MusicVideo)
{
return new[] { GetSavePathForItemInMixedFolder(item, type, string.Empty, extension) };
}

View File

@ -1,3 +1,3 @@
using System.Reflection;
[assembly: AssemblyVersion("3.2.26.8")]
[assembly: AssemblyVersion("3.2.26.9")]