Merge branch 'dev' into code-cleanup

This commit is contained in:
Erwin de Haan
2019-01-11 12:50:36 +01:00
345 changed files with 2991 additions and 3236 deletions
@@ -228,7 +228,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
}
var firstMedia = resolvedItem.Files.First();
var libraryItem = new T
{
Path = firstMedia.Path,
@@ -48,7 +48,7 @@ namespace Emby.Server.Implementations.Library.Resolvers
where TVideoType : Video, new()
{
var namingOptions = ((LibraryManager)LibraryManager).GetNamingOptions();
// If the path is a file check for a matching extensions
var parser = new Emby.Naming.Video.VideoResolver(namingOptions);
@@ -120,7 +120,7 @@ namespace Emby.Server.Implementations.Library.Resolvers
if (video != null)
{
video.Name = parseName ?
video.Name = parseName ?
videoInfo.Name :
Path.GetFileName(args.Path);
@@ -150,7 +150,7 @@ namespace Emby.Server.Implementations.Library.Resolvers
};
SetVideoType(video, videoInfo);
video.Name = parseName ?
videoInfo.Name :
Path.GetFileNameWithoutExtension(args.Path);
@@ -281,7 +281,7 @@ namespace Emby.Server.Implementations.Library.Resolvers
{
return string.Equals(name, "video_ts.ifo", StringComparison.OrdinalIgnoreCase);
}
/// <summary>
/// Determines whether [is blu ray directory] [the specified directory name].
/// </summary>
@@ -8,14 +8,14 @@ using MediaBrowser.Model.Entities;
namespace Emby.Server.Implementations.Library.Resolvers.Books
{
/// <summary>
///
///
/// </summary>
public class BookResolver : MediaBrowser.Controller.Resolvers.ItemResolver<Book>
{
private readonly string[] _validExtensions = { ".pdf", ".epub", ".mobi", ".cbr", ".cbz", ".azw3" };
/// <summary>
///
///
/// </summary>
/// <param name="args"></param>
/// <returns></returns>
@@ -48,7 +48,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Books
}
/// <summary>
///
///
/// </summary>
/// <param name="args"></param>
/// <returns></returns>
@@ -27,7 +27,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV
}
var season = parent as Season;
// Just in case the user decided to nest episodes.
// Just in case the user decided to nest episodes.
// Not officially supported but in some cases we can handle it.
if (season == null)
{
@@ -36,8 +36,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV
// If the parent is a Season or Series, then this is an Episode if the VideoResolver returns something
// Also handle flat tv folders
if (season != null ||
string.Equals(args.GetCollectionType(), CollectionType.TvShows, StringComparison.OrdinalIgnoreCase) ||
if (season != null ||
string.Equals(args.GetCollectionType(), CollectionType.TvShows, StringComparison.OrdinalIgnoreCase) ||
args.HasParent<Series>())
{
var episode = ResolveVideo<Episode>(args, false);