update text

This commit is contained in:
Luke Pulverenti 2016-05-12 15:21:43 -04:00
parent 2716315669
commit ae2b6ddf39
10 changed files with 42 additions and 19 deletions

View File

@ -311,7 +311,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks
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);
trigger.Start(LastExecutionResult, false);
trigger.Start(LastExecutionResult, Logger, Name, false);
}
private Task _currentTask;

View File

@ -1,7 +1,9 @@
using MediaBrowser.Model.Events;
using MediaBrowser.Model.Tasks;
using System;
using System.Globalization;
using System.Threading;
using MediaBrowser.Model.Logging;
namespace MediaBrowser.Common.ScheduledTasks
{
@ -35,7 +37,7 @@ namespace MediaBrowser.Common.ScheduledTasks
/// </summary>
/// <param name="lastResult">The last result.</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();
@ -44,7 +46,11 @@ namespace MediaBrowser.Common.ScheduledTasks
var triggerDate = now.TimeOfDay > TimeOfDay ? now.Date.AddDays(1) : now.Date;
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>

View File

@ -1,6 +1,7 @@
using MediaBrowser.Model.Events;
using MediaBrowser.Model.Tasks;
using System;
using MediaBrowser.Model.Logging;
namespace MediaBrowser.Common.ScheduledTasks
{
@ -19,7 +20,7 @@ namespace MediaBrowser.Common.ScheduledTasks
/// </summary>
/// <param name="lastResult">The last result.</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>
/// Stops waiting for the trigger action

View File

@ -3,6 +3,7 @@ using MediaBrowser.Model.Tasks;
using System;
using System.Linq;
using System.Threading;
using MediaBrowser.Model.Logging;
namespace MediaBrowser.Common.ScheduledTasks
{
@ -38,7 +39,7 @@ namespace MediaBrowser.Common.ScheduledTasks
/// </summary>
/// <param name="lastResult">The last result.</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();

View File

@ -2,6 +2,7 @@
using MediaBrowser.Model.Tasks;
using System;
using System.Threading.Tasks;
using MediaBrowser.Model.Logging;
namespace MediaBrowser.Common.ScheduledTasks
{
@ -30,7 +31,7 @@ namespace MediaBrowser.Common.ScheduledTasks
/// </summary>
/// <param name="lastResult">The last result.</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)
{

View File

@ -3,6 +3,7 @@ using MediaBrowser.Model.Tasks;
using Microsoft.Win32;
using System;
using System.Threading.Tasks;
using MediaBrowser.Model.Logging;
namespace MediaBrowser.Common.ScheduledTasks
{
@ -30,7 +31,7 @@ namespace MediaBrowser.Common.ScheduledTasks
/// </summary>
/// <param name="lastResult">The last result.</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)
{

View File

@ -1,6 +1,7 @@
using System;
using System.Threading;
using MediaBrowser.Model.Events;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Tasks;
namespace MediaBrowser.Common.ScheduledTasks
@ -41,7 +42,7 @@ namespace MediaBrowser.Common.ScheduledTasks
/// </summary>
/// <param name="lastResult">The last result.</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();

View File

@ -104,7 +104,14 @@ namespace MediaBrowser.Controller.Entities.TV
[IgnoreDataMember]
public override string PresentationUniqueKey
{
get { return GetUserDataKeys().First(); }
get
{
if (EnablePooling())
{
return GetUserDataKeys().First();
}
return base.PresentationUniqueKey;
}
}
/// <summary>

View File

@ -1,4 +1,3 @@
using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Entities.Movies;
@ -85,7 +84,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
private IDbCommand _updateInheritedRatingCommand;
private IDbCommand _updateInheritedTagsCommand;
public const int LatestSchemaVersion = 77;
public const int LatestSchemaVersion = 78;
/// <summary>
/// Initializes a new instance of the <see cref="SqliteItemRepository"/> class.
@ -356,7 +355,9 @@ namespace MediaBrowser.Server.Implementations.Persistence
"OriginalTitle",
"PrimaryVersionId",
"DateLastMediaAdded",
"Album"
"Album",
"CriticRating",
"CriticRatingSummary"
};
private readonly string[] _mediaStreamSaveColumns =
@ -1247,6 +1248,16 @@ namespace MediaBrowser.Server.Implementations.Persistence
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;
}

View File

@ -467,9 +467,6 @@
<Content Include="dashboard-ui\thirdparty\jquerymobile-1.4.5\jquery.mobile.custom.icons.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</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">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@ -1710,9 +1707,6 @@
<Content Include="dashboard-ui\thirdparty\jquerymobile-1.4.5\jqm.popup.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</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">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>