From: <do...@us...> - 2010-11-28 12:47:47
|
Revision: 3984 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3984&view=rev Author: dot-i Date: 2010-11-28 12:47:40 +0000 (Sun, 28 Nov 2010) Log Message: ----------- Updated to 1.5.0.3 release. Modified Paths: -------------- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/RecordingThread.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/GuideBase.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/Guide/GuideController.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/Guide/GuideModel.cs trunk/plugins/ForTheRecord/ReferencedAssemblies/Core.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/Databases.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/Dialogs.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/ForTheRecord.Client.Common.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/ForTheRecord.Entities.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/ForTheRecord.RecorderTuners.Common.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/ForTheRecord.ServiceAgents.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/ForTheRecord.ServiceContracts.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/PluginBase.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/SetupControls.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/TVDatabase.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/TvBusinessLayer.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/TvControl.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/TvLibrary.Interfaces.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/Utils.dll Modified: trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/RecordingThread.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/RecordingThread.cs 2010-11-27 16:22:51 UTC (rev 3983) +++ trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/RecordingThread.cs 2010-11-28 12:47:40 UTC (rev 3984) @@ -25,6 +25,7 @@ using System.Threading; using System.Diagnostics; using System.Globalization; +using System.Runtime.InteropServices; using TvLibrary.Interfaces; using TvEngine.Events; @@ -54,6 +55,7 @@ _suggestedBaseFileName = suggestedBaseFileName; _recordOnCard = recordOnCard; _channel = channel; + SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS | EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_AWAYMODE_REQUIRED); } #region Overrides @@ -69,6 +71,12 @@ private User _tve3User; private string _tve3RecordingFileName; + protected override void OnThreadEnding() + { + base.OnThreadEnding(); + SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS); + } + protected override bool OnPrepareRecording(RecorderTunerCallbackServiceAgent callbackAgent, ref string errorMessage) { DeleteAllMediaPortalSchedules(); @@ -291,5 +299,21 @@ } #endregion + + #region P/Invoke + + [FlagsAttribute] + private enum EXECUTION_STATE : uint + { + ES_SYSTEM_REQUIRED = 0x00000001, + ES_DISPLAY_REQUIRED = 0x00000002, + ES_AWAYMODE_REQUIRED = 0x00000040, + ES_CONTINUOUS = 0x80000000 + } + + [DllImport("Kernel32.DLL", CharSet = CharSet.Auto, SetLastError = true)] + private extern static EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE state); + + #endregion } } Modified: trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/GuideBase.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/GuideBase.cs 2010-11-27 16:22:51 UTC (rev 3983) +++ trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/GuideBase.cs 2010-11-28 12:47:40 UTC (rev 3984) @@ -88,8 +88,7 @@ HORZ_SCROLLBAR = 28, VERT_SCROLLBAR = 29, LABEL_TIME1 = 40, // first and template - IMG_CHAN1 = 50, - IMG_CHAN1_LABEL = 70, + IMG_CHAN1 = 70, IMG_TIME1 = 90, // first and template IMG_REC_PIN = 31, SINGLE_CHANNEL_LABEL = 32, Modified: trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/Guide/GuideController.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/Guide/GuideController.cs 2010-11-27 16:22:51 UTC (rev 3983) +++ trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/Guide/GuideController.cs 2010-11-28 12:47:40 UTC (rev 3984) @@ -39,7 +39,13 @@ public void Initialize(ITvSchedulerService tvSchedulerAgent, ChannelType channelType, int epgHours, string allChannelsGroupName) { + Initialize(tvSchedulerAgent, channelType, epgHours, 0, allChannelsGroupName); + } + + public void Initialize(ITvSchedulerService tvSchedulerAgent, ChannelType channelType, int epgHours, int epgHoursOffset, string allChannelsGroupName) + { _model.EpgHours = epgHours; + _model.EpgHoursOffset = epgHoursOffset; _model.AllChannelsGroupName = allChannelsGroupName; ChangeChannelType(tvSchedulerAgent, channelType); } @@ -86,6 +92,10 @@ DateTime guideDate = DateTime.Now; int hours = (int)Math.Floor((decimal)guideDate.TimeOfDay.TotalHours); _model.GuideDateTime = guideDate.Date.Add(new TimeSpan(hours - hours % _model.EpgHours, 0, 0)); + if (_model.GuideDateTime.TimeOfDay.TotalHours < _model.EpgHoursOffset) + { + _model.GuideDateTime = _model.GuideDateTime.AddDays(-1).AddHours(_model.EpgHoursOffset); + } } public delegate bool CancellationPendingDelegate(); Modified: trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/Guide/GuideModel.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/Guide/GuideModel.cs 2010-11-27 16:22:51 UTC (rev 3983) +++ trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/Guide/GuideModel.cs 2010-11-28 12:47:40 UTC (rev 3984) @@ -35,6 +35,8 @@ public int EpgHours { get; internal set; } + public int EpgHoursOffset { get; internal set; } + public string AllChannelsGroupName { get; internal set; } private List<ChannelGroup> _channelGroups = new List<ChannelGroup>(); Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/Core.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/Databases.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/Dialogs.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/ForTheRecord.Client.Common.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/ForTheRecord.Entities.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/ForTheRecord.RecorderTuners.Common.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/ForTheRecord.ServiceAgents.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/ForTheRecord.ServiceContracts.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/PluginBase.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/SetupControls.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/TVDatabase.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/TvBusinessLayer.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/TvControl.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/TvLibrary.Interfaces.dll =================================================================== (Binary files differ) Modified: trunk/plugins/ForTheRecord/ReferencedAssemblies/Utils.dll =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |