Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
This commit is contained in:
commit
cff5cd9503
|
@ -3,6 +3,7 @@ using MediaBrowser.Controller.IO;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Localization;
|
using MediaBrowser.Controller.Localization;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
using System;
|
using System;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
using MediaBrowser.Controller.IO;
|
using MediaBrowser.Controller.IO;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Localization;
|
using MediaBrowser.Controller.Localization;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
using MediaBrowser.Controller.Sorting;
|
using MediaBrowser.Controller.Sorting;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using System;
|
using System;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.IO;
|
using MediaBrowser.Controller.IO;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -3,6 +3,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Library
|
namespace MediaBrowser.Controller.Library
|
||||||
{
|
{
|
||||||
|
|
|
@ -110,7 +110,9 @@
|
||||||
<Compile Include="IServerApplicationPaths.cs" />
|
<Compile Include="IServerApplicationPaths.cs" />
|
||||||
<Compile Include="Library\ChildrenChangedEventArgs.cs" />
|
<Compile Include="Library\ChildrenChangedEventArgs.cs" />
|
||||||
<Compile Include="Library\DtoBuilder.cs" />
|
<Compile Include="Library\DtoBuilder.cs" />
|
||||||
<Compile Include="Library\IItemResolver.cs" />
|
<Compile Include="Resolvers\BaseItemResolver.cs" />
|
||||||
|
<Compile Include="Resolvers\BaseVideoResolver.cs" />
|
||||||
|
<Compile Include="Resolvers\IItemResolver.cs" />
|
||||||
<Compile Include="Library\ILibraryManager.cs" />
|
<Compile Include="Library\ILibraryManager.cs" />
|
||||||
<Compile Include="Library\IUserManager.cs" />
|
<Compile Include="Library\IUserManager.cs" />
|
||||||
<Compile Include="Library\Profiler.cs" />
|
<Compile Include="Library\Profiler.cs" />
|
||||||
|
@ -165,9 +167,9 @@
|
||||||
<Compile Include="Providers\TV\SeriesProviderFromXml.cs" />
|
<Compile Include="Providers\TV\SeriesProviderFromXml.cs" />
|
||||||
<Compile Include="Providers\TV\SeriesXmlParser.cs" />
|
<Compile Include="Providers\TV\SeriesXmlParser.cs" />
|
||||||
<Compile Include="Providers\MediaInfo\FFMpegVideoImageProvider.cs" />
|
<Compile Include="Providers\MediaInfo\FFMpegVideoImageProvider.cs" />
|
||||||
<Compile Include="Library\IResolverIgnoreRule.cs" />
|
<Compile Include="Resolvers\IResolverIgnoreRule.cs" />
|
||||||
<Compile Include="Library\EntityResolutionHelper.cs" />
|
<Compile Include="Resolvers\EntityResolutionHelper.cs" />
|
||||||
<Compile Include="Library\ResolverPriority.cs" />
|
<Compile Include="Resolvers\ResolverPriority.cs" />
|
||||||
<Compile Include="Library\TVUtils.cs" />
|
<Compile Include="Library\TVUtils.cs" />
|
||||||
<Compile Include="ScheduledTasks\PeopleValidationTask.cs" />
|
<Compile Include="ScheduledTasks\PeopleValidationTask.cs" />
|
||||||
<Compile Include="ScheduledTasks\RefreshMediaLibraryTask.cs" />
|
<Compile Include="ScheduledTasks\RefreshMediaLibraryTask.cs" />
|
||||||
|
|
61
MediaBrowser.Controller/Resolvers/BaseItemResolver.cs
Normal file
61
MediaBrowser.Controller/Resolvers/BaseItemResolver.cs
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
using MediaBrowser.Controller.Entities;
|
||||||
|
using MediaBrowser.Controller.Library;
|
||||||
|
|
||||||
|
namespace MediaBrowser.Controller.Resolvers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class ItemResolver
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T"></typeparam>
|
||||||
|
public abstract class ItemResolver<T> : IItemResolver
|
||||||
|
where T : BaseItem, new()
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Resolves the specified args.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="args">The args.</param>
|
||||||
|
/// <returns>`0.</returns>
|
||||||
|
protected virtual T Resolve(ItemResolveArgs args)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the priority.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The priority.</value>
|
||||||
|
public virtual ResolverPriority Priority
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ResolverPriority.First;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets initial values on the newly resolved item
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="item">The item.</param>
|
||||||
|
/// <param name="args">The args.</param>
|
||||||
|
protected virtual void SetInitialItemValues(T item, ItemResolveArgs args)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Resolves the path.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="args">The args.</param>
|
||||||
|
/// <returns>BaseItem.</returns>
|
||||||
|
BaseItem IItemResolver.ResolvePath(ItemResolveArgs args)
|
||||||
|
{
|
||||||
|
var item = Resolve(args);
|
||||||
|
|
||||||
|
if (item != null)
|
||||||
|
{
|
||||||
|
SetInitialItemValues(item, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
56
MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs
Normal file
56
MediaBrowser.Controller/Resolvers/BaseVideoResolver.cs
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
using MediaBrowser.Controller.Entities;
|
||||||
|
using MediaBrowser.Controller.Library;
|
||||||
|
using MediaBrowser.Model.Entities;
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace MediaBrowser.Controller.Resolvers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Resolves a Path into a Video or Video subclass
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T"></typeparam>
|
||||||
|
public abstract class BaseVideoResolver<T> : ItemResolver<T>
|
||||||
|
where T : Video, new()
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Resolves the specified args.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="args">The args.</param>
|
||||||
|
/// <returns>`0.</returns>
|
||||||
|
protected override T Resolve(ItemResolveArgs args)
|
||||||
|
{
|
||||||
|
// If the path is a file check for a matching extensions
|
||||||
|
if (!args.IsDirectory)
|
||||||
|
{
|
||||||
|
if (EntityResolutionHelper.IsVideoFile(args.Path))
|
||||||
|
{
|
||||||
|
var extension = Path.GetExtension(args.Path);
|
||||||
|
|
||||||
|
var type = string.Equals(extension, ".iso", StringComparison.OrdinalIgnoreCase) || string.Equals(extension, ".img", StringComparison.OrdinalIgnoreCase) ?
|
||||||
|
VideoType.Iso : VideoType.VideoFile;
|
||||||
|
|
||||||
|
return new T
|
||||||
|
{
|
||||||
|
VideoType = type,
|
||||||
|
Path = args.Path
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the initial item values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="item">The item.</param>
|
||||||
|
/// <param name="args">The args.</param>
|
||||||
|
protected override void SetInitialItemValues(T item, ItemResolveArgs args)
|
||||||
|
{
|
||||||
|
base.SetInitialItemValues(item, args);
|
||||||
|
|
||||||
|
item.VideoFormat = item.Path.IndexOf("[3d]", StringComparison.OrdinalIgnoreCase) != -1 ? VideoFormat.Digital3D : item.Path.IndexOf("[sbs3d]", StringComparison.OrdinalIgnoreCase) != -1 ? VideoFormat.Sbs3D : VideoFormat.Standard;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,8 +4,9 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using MediaBrowser.Controller.Library;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Library
|
namespace MediaBrowser.Controller.Resolvers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class EntityResolutionHelper
|
/// Class EntityResolutionHelper
|
|
@ -1,6 +1,7 @@
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
|
using MediaBrowser.Controller.Library;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Library
|
namespace MediaBrowser.Controller.Resolvers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interface IItemResolver
|
/// Interface IItemResolver
|
|
@ -1,4 +1,6 @@
|
||||||
namespace MediaBrowser.Controller.Library
|
using MediaBrowser.Controller.Library;
|
||||||
|
|
||||||
|
namespace MediaBrowser.Controller.Resolvers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides a base "rule" that anyone can use to have paths ignored by the resolver
|
/// Provides a base "rule" that anyone can use to have paths ignored by the resolver
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Library
|
namespace MediaBrowser.Controller.Resolvers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enum ResolverPriority
|
/// Enum ResolverPriority
|
|
@ -2,6 +2,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Library
|
namespace MediaBrowser.Server.Implementations.Library
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,6 +6,7 @@ using MediaBrowser.Controller;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.IO;
|
using MediaBrowser.Controller.IO;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
using MediaBrowser.Controller.ScheduledTasks;
|
using MediaBrowser.Controller.ScheduledTasks;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
|
|
|
@ -3,6 +3,7 @@ using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Library
|
namespace MediaBrowser.Server.Implementations.Library
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,6 +3,7 @@ using MediaBrowser.Controller.Library;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio
|
namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
using MediaBrowser.Controller.Entities.Audio;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Controller.IO;
|
using MediaBrowser.Controller.IO;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio
|
namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
using MediaBrowser.Controller.Entities.Audio;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio
|
namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Library.Resolvers
|
namespace MediaBrowser.Server.Implementations.Library.Resolvers
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Library.Resolvers
|
namespace MediaBrowser.Server.Implementations.Library.Resolvers
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,13 +2,14 @@
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Library.Resolvers
|
namespace MediaBrowser.Server.Implementations.Library.Resolvers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class LocalTrailerResolver
|
/// Class LocalTrailerResolver
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class LocalTrailerResolver : VideoResolver<Trailer>
|
public class LocalTrailerResolver : BaseVideoResolver<Trailer>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resolves the specified args.
|
/// Resolves the specified args.
|
||||||
|
|
|
@ -3,6 +3,7 @@ using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Entities.Movies;
|
using MediaBrowser.Controller.Entities.Movies;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Providers.Movies;
|
using MediaBrowser.Controller.Providers.Movies;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -13,7 +14,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class MovieResolver
|
/// Class MovieResolver
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class MovieResolver : VideoResolver<Movie>
|
public class MovieResolver : BaseVideoResolver<Movie>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the priority.
|
/// Gets the priority.
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using MediaBrowser.Controller.Entities.TV;
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
@ -8,7 +9,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class EpisodeResolver
|
/// Class EpisodeResolver
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EpisodeResolver : VideoResolver<Episode>
|
public class EpisodeResolver : BaseVideoResolver<Episode>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resolves the specified args.
|
/// Resolves the specified args.
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
using MediaBrowser.Common.Extensions;
|
using MediaBrowser.Common.Extensions;
|
||||||
using MediaBrowser.Controller.Entities.TV;
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Resolvers;
|
||||||
using MediaBrowser.Model.Entities;
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Library.Resolvers
|
namespace MediaBrowser.Server.Implementations.Library.Resolvers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resolves a Path into a Video
|
/// Resolves a Path into a Video
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class VideoResolver : VideoResolver<Video>
|
public class VideoResolver : BaseVideoResolver<Video>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the priority.
|
/// Gets the priority.
|
||||||
|
@ -21,51 +18,5 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Resolves a Path into a Video or Video subclass
|
|
||||||
/// </summary>
|
|
||||||
/// <typeparam name="T"></typeparam>
|
|
||||||
public abstract class VideoResolver<T> : ItemResolver<T>
|
|
||||||
where T : Video, new()
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Resolves the specified args.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="args">The args.</param>
|
|
||||||
/// <returns>`0.</returns>
|
|
||||||
protected override T Resolve(ItemResolveArgs args)
|
|
||||||
{
|
|
||||||
// If the path is a file check for a matching extensions
|
|
||||||
if (!args.IsDirectory)
|
|
||||||
{
|
|
||||||
if (EntityResolutionHelper.IsVideoFile(args.Path))
|
|
||||||
{
|
|
||||||
var extension = Path.GetExtension(args.Path);
|
|
||||||
|
|
||||||
var type = string.Equals(extension, ".iso", StringComparison.OrdinalIgnoreCase) || string.Equals(extension, ".img", StringComparison.OrdinalIgnoreCase) ?
|
|
||||||
VideoType.Iso : VideoType.VideoFile;
|
|
||||||
|
|
||||||
return new T
|
|
||||||
{
|
|
||||||
VideoType = type,
|
|
||||||
Path = args.Path
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Sets the initial item values.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="item">The item.</param>
|
|
||||||
/// <param name="args">The args.</param>
|
|
||||||
protected override void SetInitialItemValues(T item, ItemResolveArgs args)
|
|
||||||
{
|
|
||||||
base.SetInitialItemValues(item, args);
|
|
||||||
|
|
||||||
item.VideoFormat = item.Path.IndexOf("[3d]", StringComparison.OrdinalIgnoreCase) != -1 ? VideoFormat.Digital3D : item.Path.IndexOf("[sbs3d]", StringComparison.OrdinalIgnoreCase) != -1 ? VideoFormat.Sbs3D : VideoFormat.Standard;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ using MediaBrowser.Common.Updates;
|
||||||
using MediaBrowser.Controller;
|
using MediaBrowser.Controller;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
using MediaBrowser.Controller.Updates;
|
using MediaBrowser.Controller.Updates;
|
||||||
using MediaBrowser.IsoMounter;
|
using MediaBrowser.IsoMounter;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using MediaBrowser.Controller.Entities;
|
using System.Windows;
|
||||||
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Plugins;
|
using MediaBrowser.Controller.Plugins;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
|
@ -110,23 +111,29 @@ namespace MediaBrowser.ServerApplication
|
||||||
// Show the notification
|
// Show the notification
|
||||||
if (newItems.Count == 1)
|
if (newItems.Count == 1)
|
||||||
{
|
{
|
||||||
var window = (MainWindow) App.Current.MainWindow;
|
Application.Current.Dispatcher.InvokeAsync(() =>
|
||||||
|
{
|
||||||
|
var window = (MainWindow)Application.Current.MainWindow;
|
||||||
|
|
||||||
window.Dispatcher.InvokeAsync(() => window.MbTaskbarIcon.ShowCustomBalloon(new ItemUpdateNotification(_logger)
|
window.Dispatcher.InvokeAsync(() => window.MbTaskbarIcon.ShowCustomBalloon(new ItemUpdateNotification(_logger)
|
||||||
{
|
{
|
||||||
DataContext = newItems[0]
|
DataContext = newItems[0]
|
||||||
|
|
||||||
}, PopupAnimation.Slide, 6000));
|
}, PopupAnimation.Slide, 6000));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else if (newItems.Count > 1)
|
else if (newItems.Count > 1)
|
||||||
{
|
{
|
||||||
var window = (MainWindow)App.Current.MainWindow;
|
Application.Current.Dispatcher.InvokeAsync(() =>
|
||||||
|
{
|
||||||
|
var window = (MainWindow)Application.Current.MainWindow;
|
||||||
|
|
||||||
window.Dispatcher.InvokeAsync(() => window.MbTaskbarIcon.ShowCustomBalloon(new MultiItemUpdateNotification(_logger)
|
window.Dispatcher.InvokeAsync(() => window.MbTaskbarIcon.ShowCustomBalloon(new MultiItemUpdateNotification(_logger)
|
||||||
{
|
{
|
||||||
DataContext = newItems
|
DataContext = newItems
|
||||||
|
|
||||||
}, PopupAnimation.Slide, 6000));
|
}, PopupAnimation.Slide, 6000));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common.Internal</id>
|
<id>MediaBrowser.Common.Internal</id>
|
||||||
<version>3.0.25</version>
|
<version>3.0.26</version>
|
||||||
<title>MediaBrowser.Common.Internal</title>
|
<title>MediaBrowser.Common.Internal</title>
|
||||||
<authors>Luke</authors>
|
<authors>Luke</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<description>Contains common components shared by Media Browser Theatre and Media Browser Server. Not intended for plugin developer consumption.</description>
|
<description>Contains common components shared by Media Browser Theatre and Media Browser Server. Not intended for plugin developer consumption.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.25" />
|
<dependency id="MediaBrowser.Common" version="3.0.26" />
|
||||||
<dependency id="NLog" version="2.0.0.2000" />
|
<dependency id="NLog" version="2.0.0.2000" />
|
||||||
<dependency id="ServiceStack" version="3.9.37" />
|
<dependency id="ServiceStack" version="3.9.37" />
|
||||||
<dependency id="ServiceStack.Api.Swagger" version="3.9.35" />
|
<dependency id="ServiceStack.Api.Swagger" version="3.9.35" />
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common</id>
|
<id>MediaBrowser.Common</id>
|
||||||
<version>3.0.25</version>
|
<version>3.0.26</version>
|
||||||
<title>MediaBrowser.Common</title>
|
<title>MediaBrowser.Common</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Server.Core</id>
|
<id>MediaBrowser.Server.Core</id>
|
||||||
<version>3.0.25</version>
|
<version>3.0.26</version>
|
||||||
<title>Media Browser.Server.Core</title>
|
<title>Media Browser.Server.Core</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.25" />
|
<dependency id="MediaBrowser.Common" version="3.0.26" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user