diff --git a/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs b/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs
index dcd3a3025e..ab2aa761b5 100644
--- a/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs
+++ b/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs
@@ -429,17 +429,6 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks
GC.Collect(2, GCCollectionMode.Forced, true);
}
- ///
- /// Executes the task.
- ///
- /// The cancellation token.
- /// The progress.
- /// Task.
- private Task ExecuteTask(CancellationToken cancellationToken, IProgress progress)
- {
- return Task.Run(async () => await ScheduledTask.Execute(cancellationToken, progress).ConfigureAwait(false), cancellationToken);
- }
-
///
/// Progress_s the progress changed.
///
diff --git a/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs b/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs
index 38b90647c1..5c3814f669 100644
--- a/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs
+++ b/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationNotifier.cs
@@ -1,14 +1,11 @@
-using MediaBrowser.Controller.FileOrganization;
+using MediaBrowser.Common.ScheduledTasks;
+using MediaBrowser.Controller.FileOrganization;
using MediaBrowser.Controller.Plugins;
-using MediaBrowser.Model.Logging;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using MediaBrowser.Controller.Session;
using MediaBrowser.Model.Events;
using MediaBrowser.Model.FileOrganization;
-using MediaBrowser.Controller.Session;
+using MediaBrowser.Model.Logging;
+using System;
using System.Threading;
namespace MediaBrowser.Server.Implementations.FileOrganization
@@ -20,11 +17,13 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
{
private readonly IFileOrganizationService _organizationService;
private readonly ISessionManager _sessionManager;
+ private readonly ITaskManager _taskManager;
- public FileOrganizationNotifier(ILogger logger, IFileOrganizationService organizationService, ISessionManager sessionManager)
+ public FileOrganizationNotifier(ILogger logger, IFileOrganizationService organizationService, ISessionManager sessionManager, ITaskManager taskManager)
{
_organizationService = organizationService;
_sessionManager = sessionManager;
+ _taskManager = taskManager;
}
public void Run()
@@ -33,34 +32,47 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
_organizationService.ItemRemoved += _organizationService_ItemRemoved;
_organizationService.ItemUpdated += _organizationService_ItemUpdated;
_organizationService.LogReset += _organizationService_LogReset;
+
+ //_taskManager.TaskCompleted += _taskManager_TaskCompleted;
}
private void _organizationService_LogReset(object sender, EventArgs e)
{
- _sessionManager.SendMessageToAdminSessions("AutoOrganizeUpdate", (FileOrganizationResult)null, CancellationToken.None);
+ _sessionManager.SendMessageToAdminSessions("AutoOrganize_LogReset", (FileOrganizationResult)null, CancellationToken.None);
}
private void _organizationService_ItemUpdated(object sender, GenericEventArgs e)
{
- _sessionManager.SendMessageToAdminSessions("AutoOrganizeUpdate", e.Argument, CancellationToken.None);
+ _sessionManager.SendMessageToAdminSessions("AutoOrganize_ItemUpdated", e.Argument, CancellationToken.None);
}
private void _organizationService_ItemRemoved(object sender, GenericEventArgs e)
{
- _sessionManager.SendMessageToAdminSessions("AutoOrganizeUpdate", (FileOrganizationResult)null, CancellationToken.None);
+ _sessionManager.SendMessageToAdminSessions("AutoOrganize_ItemRemoved", e.Argument, CancellationToken.None);
}
private void _organizationService_ItemAdded(object sender, GenericEventArgs e)
{
- _sessionManager.SendMessageToAdminSessions("AutoOrganizeUpdate", (FileOrganizationResult)null, CancellationToken.None);
+ _sessionManager.SendMessageToAdminSessions("AutoOrganize_ItemAdded", e.Argument, CancellationToken.None);
}
+ //private void _taskManager_TaskCompleted(object sender, TaskCompletionEventArgs e)
+ //{
+ // var taskWithKey = e.Task.ScheduledTask as IHasKey;
+ // if (taskWithKey != null && taskWithKey.Key == "AutoOrganize")
+ // {
+ // _sessionManager.SendMessageToAdminSessions("AutoOrganize_TaskCompleted", (FileOrganizationResult)null, CancellationToken.None);
+ // }
+ //}
+
public void Dispose()
{
_organizationService.ItemAdded -= _organizationService_ItemAdded;
_organizationService.ItemRemoved -= _organizationService_ItemRemoved;
_organizationService.ItemUpdated -= _organizationService_ItemUpdated;
_organizationService.LogReset -= _organizationService_LogReset;
+
+ //_taskManager.TaskCompleted -= _taskManager_TaskCompleted;
}
diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs
index 1e44877572..ba5c604ed0 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/SatIpDiscovery.cs
@@ -284,19 +284,19 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.SatIp
var capabilitiesElement = deviceElement.Element(n1 + "X_SATIPCAP");
if (capabilitiesElement != null)
{
- _capabilities = capabilitiesElement.Value;
- if (capabilitiesElement.Value.Contains(','))
- {
- string[] capabilities = capabilitiesElement.Value.Split(',');
- foreach (var capability in capabilities)
- {
- ReadCapability(capability);
- }
- }
- else
- {
- ReadCapability(capabilitiesElement.Value);
- }
+ //_capabilities = capabilitiesElement.Value;
+ //if (capabilitiesElement.Value.Contains(','))
+ //{
+ // string[] capabilities = capabilitiesElement.Value.Split(',');
+ // foreach (var capability in capabilities)
+ // {
+ // ReadCapability(capability);
+ // }
+ //}
+ //else
+ //{
+ // ReadCapability(capabilitiesElement.Value);
+ //}
}
else
{
diff --git a/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs b/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs
index 46ba7d2e74..67ddcc5cc0 100644
--- a/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs
+++ b/MediaBrowser.Server.Implementations/MediaEncoder/EncodingManager.cs
@@ -123,10 +123,17 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
{
if (extractImages)
{
- if (video.VideoType == VideoType.HdDvd || video.VideoType == VideoType.Iso || video.VideoType == VideoType.BluRay || video.VideoType == VideoType.Dvd)
+ if (video.VideoType == VideoType.HdDvd || video.VideoType == VideoType.Iso)
{
continue;
}
+ if (video.VideoType == VideoType.BluRay || video.VideoType == VideoType.Dvd)
+ {
+ if (video.PlayableStreamFileNames.Count != 1)
+ {
+ continue;
+ }
+ }
// Add some time for the first chapter to make sure we don't end up with a black image
var time = chapter.StartPositionTicks == 0 ? TimeSpan.FromTicks(Math.Min(FirstChapterTicks, video.RunTimeTicks ?? 0)) : TimeSpan.FromTicks(chapter.StartPositionTicks);
diff --git a/MediaBrowser.XbmcMetadata/Savers/EpisodeNfoSaver.cs b/MediaBrowser.XbmcMetadata/Savers/EpisodeNfoSaver.cs
index bf6df2347f..d57d22d5c4 100644
--- a/MediaBrowser.XbmcMetadata/Savers/EpisodeNfoSaver.cs
+++ b/MediaBrowser.XbmcMetadata/Savers/EpisodeNfoSaver.cs
@@ -72,19 +72,23 @@ namespace MediaBrowser.XbmcMetadata.Savers
{
writer.WriteElementString("airsbefore_episode", episode.AirsBeforeEpisodeNumber.Value.ToString(UsCulture));
}
- if (episode.AirsBeforeEpisodeNumber.HasValue && episode.AirsBeforeEpisodeNumber.Value != -1)
- {
- writer.WriteElementString("displayepisode", episode.AirsBeforeEpisodeNumber.Value.ToString(UsCulture));
- }
if (episode.AirsBeforeSeasonNumber.HasValue && episode.AirsBeforeSeasonNumber.Value != -1)
{
writer.WriteElementString("airsbefore_season", episode.AirsBeforeSeasonNumber.Value.ToString(UsCulture));
}
- var season = episode.AiredSeasonNumber;
- if (season.HasValue && season.Value != -1)
+ if (episode.ParentIndexNumber.HasValue && episode.ParentIndexNumber.Value == 0)
{
- writer.WriteElementString("displayseason", season.Value.ToString(UsCulture));
+ if (episode.AirsBeforeEpisodeNumber.HasValue && episode.AirsBeforeEpisodeNumber.Value != -1)
+ {
+ writer.WriteElementString("displayepisode", episode.AirsBeforeEpisodeNumber.Value.ToString(UsCulture));
+ }
+
+ var specialSeason = episode.AiredSeasonNumber;
+ if (specialSeason.HasValue && specialSeason.Value != -1)
+ {
+ writer.WriteElementString("displayseason", specialSeason.Value.ToString(UsCulture));
+ }
}
if (episode.DvdEpisodeNumber.HasValue)
diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec
index d1c4c0b449..cfdfc7ef0b 100644
--- a/Nuget/MediaBrowser.Common.Internal.nuspec
+++ b/Nuget/MediaBrowser.Common.Internal.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Common.Internal
- 3.0.655
+ 3.0.656
MediaBrowser.Common.Internal
Luke
ebr,Luke,scottisafool
@@ -12,7 +12,7 @@
Contains common components shared by Emby Theater and Emby Server. Not intended for plugin developer consumption.
Copyright © Emby 2013
-
+
diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec
index ffee84de2e..1ebf4d0529 100644
--- a/Nuget/MediaBrowser.Common.nuspec
+++ b/Nuget/MediaBrowser.Common.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Common
- 3.0.655
+ 3.0.656
MediaBrowser.Common
Emby Team
ebr,Luke,scottisafool
diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec
index 73c51ca355..630ff8fd2b 100644
--- a/Nuget/MediaBrowser.Server.Core.nuspec
+++ b/Nuget/MediaBrowser.Server.Core.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Server.Core
- 3.0.655
+ 3.0.656
Media Browser.Server.Core
Emby Team
ebr,Luke,scottisafool
@@ -12,7 +12,7 @@
Contains core components required to build plugins for Emby Server.
Copyright © Emby 2013
-
+