update text
This commit is contained in:
parent
2716315669
commit
ae2b6ddf39
|
@ -311,7 +311,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks
|
||||||
|
|
||||||
trigger.Triggered -= trigger_Triggered;
|
trigger.Triggered -= trigger_Triggered;
|
||||||
trigger.Triggered += trigger_Triggered;
|
trigger.Triggered += trigger_Triggered;
|
||||||
trigger.Start(LastExecutionResult, isApplicationStartup);
|
trigger.Start(LastExecutionResult, Logger, Name, isApplicationStartup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,7 +339,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks
|
||||||
|
|
||||||
await Task.Delay(1000).ConfigureAwait(false);
|
await Task.Delay(1000).ConfigureAwait(false);
|
||||||
|
|
||||||
trigger.Start(LastExecutionResult, false);
|
trigger.Start(LastExecutionResult, Logger, Name, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Task _currentTask;
|
private Task _currentTask;
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
using MediaBrowser.Model.Events;
|
using MediaBrowser.Model.Events;
|
||||||
using MediaBrowser.Model.Tasks;
|
using MediaBrowser.Model.Tasks;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using MediaBrowser.Model.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.Common.ScheduledTasks
|
namespace MediaBrowser.Common.ScheduledTasks
|
||||||
{
|
{
|
||||||
|
@ -35,7 +37,7 @@ namespace MediaBrowser.Common.ScheduledTasks
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="lastResult">The last result.</param>
|
/// <param name="lastResult">The last result.</param>
|
||||||
/// <param name="isApplicationStartup">if set to <c>true</c> [is application startup].</param>
|
/// <param name="isApplicationStartup">if set to <c>true</c> [is application startup].</param>
|
||||||
public void Start(TaskResult lastResult, bool isApplicationStartup)
|
public void Start(TaskResult lastResult, ILogger logger, string taskName, bool isApplicationStartup)
|
||||||
{
|
{
|
||||||
DisposeTimer();
|
DisposeTimer();
|
||||||
|
|
||||||
|
@ -44,7 +46,11 @@ namespace MediaBrowser.Common.ScheduledTasks
|
||||||
var triggerDate = now.TimeOfDay > TimeOfDay ? now.Date.AddDays(1) : now.Date;
|
var triggerDate = now.TimeOfDay > TimeOfDay ? now.Date.AddDays(1) : now.Date;
|
||||||
triggerDate = triggerDate.Add(TimeOfDay);
|
triggerDate = triggerDate.Add(TimeOfDay);
|
||||||
|
|
||||||
Timer = new Timer(state => OnTriggered(), null, triggerDate - now, TimeSpan.FromMilliseconds(-1));
|
var dueTime = triggerDate - now;
|
||||||
|
|
||||||
|
logger.Info("Daily trigger for {0} set to fire at {1}, which is {2} minutes from now.", taskName, triggerDate.ToString(), dueTime.TotalMinutes.ToString(CultureInfo.InvariantCulture));
|
||||||
|
|
||||||
|
Timer = new Timer(state => OnTriggered(), null, dueTime, TimeSpan.FromMilliseconds(-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
using MediaBrowser.Model.Events;
|
using MediaBrowser.Model.Events;
|
||||||
using MediaBrowser.Model.Tasks;
|
using MediaBrowser.Model.Tasks;
|
||||||
using System;
|
using System;
|
||||||
|
using MediaBrowser.Model.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.Common.ScheduledTasks
|
namespace MediaBrowser.Common.ScheduledTasks
|
||||||
{
|
{
|
||||||
|
@ -19,7 +20,7 @@ namespace MediaBrowser.Common.ScheduledTasks
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="lastResult">The last result.</param>
|
/// <param name="lastResult">The last result.</param>
|
||||||
/// <param name="isApplicationStartup">if set to <c>true</c> [is application startup].</param>
|
/// <param name="isApplicationStartup">if set to <c>true</c> [is application startup].</param>
|
||||||
void Start(TaskResult lastResult, bool isApplicationStartup);
|
void Start(TaskResult lastResult, ILogger logger, string taskName, bool isApplicationStartup);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stops waiting for the trigger action
|
/// Stops waiting for the trigger action
|
||||||
|
|
|
@ -3,6 +3,7 @@ using MediaBrowser.Model.Tasks;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using MediaBrowser.Model.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.Common.ScheduledTasks
|
namespace MediaBrowser.Common.ScheduledTasks
|
||||||
{
|
{
|
||||||
|
@ -38,7 +39,7 @@ namespace MediaBrowser.Common.ScheduledTasks
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="lastResult">The last result.</param>
|
/// <param name="lastResult">The last result.</param>
|
||||||
/// <param name="isApplicationStartup">if set to <c>true</c> [is application startup].</param>
|
/// <param name="isApplicationStartup">if set to <c>true</c> [is application startup].</param>
|
||||||
public void Start(TaskResult lastResult, bool isApplicationStartup)
|
public void Start(TaskResult lastResult, ILogger logger, string taskName, bool isApplicationStartup)
|
||||||
{
|
{
|
||||||
DisposeTimer();
|
DisposeTimer();
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
using MediaBrowser.Model.Tasks;
|
using MediaBrowser.Model.Tasks;
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using MediaBrowser.Model.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.Common.ScheduledTasks
|
namespace MediaBrowser.Common.ScheduledTasks
|
||||||
{
|
{
|
||||||
|
@ -30,7 +31,7 @@ namespace MediaBrowser.Common.ScheduledTasks
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="lastResult">The last result.</param>
|
/// <param name="lastResult">The last result.</param>
|
||||||
/// <param name="isApplicationStartup">if set to <c>true</c> [is application startup].</param>
|
/// <param name="isApplicationStartup">if set to <c>true</c> [is application startup].</param>
|
||||||
public async void Start(TaskResult lastResult, bool isApplicationStartup)
|
public async void Start(TaskResult lastResult, ILogger logger, string taskName, bool isApplicationStartup)
|
||||||
{
|
{
|
||||||
if (isApplicationStartup)
|
if (isApplicationStartup)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,6 +3,7 @@ using MediaBrowser.Model.Tasks;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using MediaBrowser.Model.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.Common.ScheduledTasks
|
namespace MediaBrowser.Common.ScheduledTasks
|
||||||
{
|
{
|
||||||
|
@ -30,7 +31,7 @@ namespace MediaBrowser.Common.ScheduledTasks
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="lastResult">The last result.</param>
|
/// <param name="lastResult">The last result.</param>
|
||||||
/// <param name="isApplicationStartup">if set to <c>true</c> [is application startup].</param>
|
/// <param name="isApplicationStartup">if set to <c>true</c> [is application startup].</param>
|
||||||
public void Start(TaskResult lastResult, bool isApplicationStartup)
|
public void Start(TaskResult lastResult, ILogger logger, string taskName, bool isApplicationStartup)
|
||||||
{
|
{
|
||||||
switch (SystemEvent)
|
switch (SystemEvent)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using MediaBrowser.Model.Events;
|
using MediaBrowser.Model.Events;
|
||||||
|
using MediaBrowser.Model.Logging;
|
||||||
using MediaBrowser.Model.Tasks;
|
using MediaBrowser.Model.Tasks;
|
||||||
|
|
||||||
namespace MediaBrowser.Common.ScheduledTasks
|
namespace MediaBrowser.Common.ScheduledTasks
|
||||||
|
@ -41,7 +42,7 @@ namespace MediaBrowser.Common.ScheduledTasks
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="lastResult">The last result.</param>
|
/// <param name="lastResult">The last result.</param>
|
||||||
/// <param name="isApplicationStartup">if set to <c>true</c> [is application startup].</param>
|
/// <param name="isApplicationStartup">if set to <c>true</c> [is application startup].</param>
|
||||||
public void Start(TaskResult lastResult, bool isApplicationStartup)
|
public void Start(TaskResult lastResult, ILogger logger, string taskName, bool isApplicationStartup)
|
||||||
{
|
{
|
||||||
DisposeTimer();
|
DisposeTimer();
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,14 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
public override string PresentationUniqueKey
|
public override string PresentationUniqueKey
|
||||||
{
|
{
|
||||||
get { return GetUserDataKeys().First(); }
|
get
|
||||||
|
{
|
||||||
|
if (EnablePooling())
|
||||||
|
{
|
||||||
|
return GetUserDataKeys().First();
|
||||||
|
}
|
||||||
|
return base.PresentationUniqueKey;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
using MediaBrowser.Common.Configuration;
|
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Entities.Audio;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Controller.Entities.Movies;
|
using MediaBrowser.Controller.Entities.Movies;
|
||||||
|
@ -85,7 +84,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||||
private IDbCommand _updateInheritedRatingCommand;
|
private IDbCommand _updateInheritedRatingCommand;
|
||||||
private IDbCommand _updateInheritedTagsCommand;
|
private IDbCommand _updateInheritedTagsCommand;
|
||||||
|
|
||||||
public const int LatestSchemaVersion = 77;
|
public const int LatestSchemaVersion = 78;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="SqliteItemRepository"/> class.
|
/// Initializes a new instance of the <see cref="SqliteItemRepository"/> class.
|
||||||
|
@ -356,7 +355,9 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||||
"OriginalTitle",
|
"OriginalTitle",
|
||||||
"PrimaryVersionId",
|
"PrimaryVersionId",
|
||||||
"DateLastMediaAdded",
|
"DateLastMediaAdded",
|
||||||
"Album"
|
"Album",
|
||||||
|
"CriticRating",
|
||||||
|
"CriticRatingSummary"
|
||||||
};
|
};
|
||||||
|
|
||||||
private readonly string[] _mediaStreamSaveColumns =
|
private readonly string[] _mediaStreamSaveColumns =
|
||||||
|
@ -1247,6 +1248,16 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||||
item.Album = reader.GetString(55);
|
item.Album = reader.GetString(55);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!reader.IsDBNull(56))
|
||||||
|
{
|
||||||
|
item.CriticRating = reader.GetFloat(56);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!reader.IsDBNull(57))
|
||||||
|
{
|
||||||
|
item.CriticRatingSummary = reader.GetString(57);
|
||||||
|
}
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -467,9 +467,6 @@
|
||||||
<Content Include="dashboard-ui\thirdparty\jquerymobile-1.4.5\jquery.mobile.custom.icons.css">
|
<Content Include="dashboard-ui\thirdparty\jquerymobile-1.4.5\jquery.mobile.custom.icons.css">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="dashboard-ui\thirdparty\jquerymobile-1.4.5\jquery.mobile.custom.js">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="dashboard-ui\thirdparty\jquerymobile-1.4.5\jquery.mobile.custom.theme.css">
|
<Content Include="dashboard-ui\thirdparty\jquerymobile-1.4.5\jquery.mobile.custom.theme.css">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
@ -1710,9 +1707,6 @@
|
||||||
<Content Include="dashboard-ui\thirdparty\jquerymobile-1.4.5\jqm.popup.js">
|
<Content Include="dashboard-ui\thirdparty\jquerymobile-1.4.5\jqm.popup.js">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<None Include="dashboard-ui\thirdparty\jquerymobile-1.4.5\jquery.mobile-1.4.5.min.map">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="dashboard-ui\voice\grammar\en-US.json">
|
<None Include="dashboard-ui\voice\grammar\en-US.json">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user