restore config settings for now
This commit is contained in:
parent
64b5600528
commit
8deb423883
|
@ -2627,6 +2627,18 @@ namespace Emby.Server.Implementations.Library
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (var map in ConfigurationManager.Configuration.PathSubstitutions)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(map.From))
|
||||||
|
{
|
||||||
|
var substitutionResult = SubstitutePathInternal(path, map.From, map.To);
|
||||||
|
if (substitutionResult.Item2)
|
||||||
|
{
|
||||||
|
return substitutionResult.Item1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,21 +74,20 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
|
||||||
return new MusicArtist();
|
return new MusicArtist();
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
if (_config.Configuration.EnableSimpleArtistDetection)
|
||||||
//if (_config.Configuration.EnableSimpleArtistDetection)
|
{
|
||||||
//{
|
return null;
|
||||||
// return null;
|
}
|
||||||
//}
|
|
||||||
|
|
||||||
//// Avoid mis-identifying top folders
|
// Avoid mis-identifying top folders
|
||||||
//if (args.Parent.IsRoot) return null;
|
if (args.Parent.IsRoot) return null;
|
||||||
|
|
||||||
//var directoryService = args.DirectoryService;
|
var directoryService = args.DirectoryService;
|
||||||
|
|
||||||
//var albumResolver = new MusicAlbumResolver(_logger, _fileSystem, _libraryManager);
|
var albumResolver = new MusicAlbumResolver(_logger, _fileSystem, _libraryManager);
|
||||||
|
|
||||||
//// If we contain an album assume we are an artist folder
|
// If we contain an album assume we are an artist folder
|
||||||
//return args.FileSystemChildren.Where(i => i.IsDirectory).Any(i => albumResolver.IsMusicAlbum(i.FullName, directoryService, args.GetLibraryOptions())) ? new MusicArtist() : null;
|
return args.FileSystemChildren.Where(i => i.IsDirectory).Any(i => albumResolver.IsMusicAlbum(i.FullName, directoryService, args.GetLibraryOptions())) ? new MusicArtist() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,6 +100,7 @@ namespace MediaBrowser.Common.Net
|
||||||
|
|
||||||
public int TimeoutMs { get; set; }
|
public int TimeoutMs { get; set; }
|
||||||
public bool PreferIpv4 { get; set; }
|
public bool PreferIpv4 { get; set; }
|
||||||
|
public bool EnableDefaultUserAgent { get; set; }
|
||||||
|
|
||||||
private string GetHeaderValue(string name)
|
private string GetHeaderValue(string name)
|
||||||
{
|
{
|
||||||
|
|
|
@ -725,11 +725,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
|
|
||||||
if (video.Protocol != MediaProtocol.File)
|
if (video.Protocol != MediaProtocol.File)
|
||||||
{
|
{
|
||||||
// If it's mpeg based, assume true
|
|
||||||
if ((videoStream.Codec ?? string.Empty).IndexOf("mpeg", StringComparison.OrdinalIgnoreCase) != -1)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -192,6 +192,10 @@ namespace MediaBrowser.Model.Configuration
|
||||||
public bool EnableExternalContentInSuggestions { get; set; }
|
public bool EnableExternalContentInSuggestions { get; set; }
|
||||||
|
|
||||||
public int ImageExtractionTimeoutMs { get; set; }
|
public int ImageExtractionTimeoutMs { get; set; }
|
||||||
|
|
||||||
|
public PathSubstitution[] PathSubstitutions { get; set; }
|
||||||
|
public bool EnableSimpleArtistDetection { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
|
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -202,6 +206,8 @@ namespace MediaBrowser.Model.Configuration
|
||||||
Migrations = new string[] { };
|
Migrations = new string[] { };
|
||||||
ImageExtractionTimeoutMs = 0;
|
ImageExtractionTimeoutMs = 0;
|
||||||
EnableLocalizedGuids = true;
|
EnableLocalizedGuids = true;
|
||||||
|
PathSubstitutions = new PathSubstitution[] { };
|
||||||
|
EnableSimpleArtistDetection = true;
|
||||||
|
|
||||||
DisplaySpecialsWithinSeasons = true;
|
DisplaySpecialsWithinSeasons = true;
|
||||||
EnableExternalContentInSuggestions = true;
|
EnableExternalContentInSuggestions = true;
|
||||||
|
@ -563,4 +569,10 @@ namespace MediaBrowser.Model.Configuration
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class PathSubstitution
|
||||||
|
{
|
||||||
|
public string From { get; set; }
|
||||||
|
public string To { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user