From: <do...@us...> - 2012-04-02 12:04:43
|
Revision: 4469 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4469&view=rev Author: dot-i Date: 2012-04-02 12:04:32 +0000 (Mon, 02 Apr 2012) Log Message: ----------- Updated source to 1.6.0.2 version. Modified Paths: -------------- trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/ChannelNavigator.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/RecordedBase.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvCropManager.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvHome.cs 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 Modified: trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/ChannelNavigator.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/ChannelNavigator.cs 2012-03-29 20:37:48 UTC (rev 4468) +++ trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/ChannelNavigator.cs 2012-04-02 12:04:32 UTC (rev 4469) @@ -486,6 +486,17 @@ if (zappingTo != null) { + if ((this.IsLiveStreamOn + && _currentChannel != null + && zappingTo.ChannelType != _currentChannel.ChannelType) + || (g_Player.Playing && !this.IsLiveStreamOn)) + { + //g_Player needs a comlete stop when the ChannelType changes + g_Player.Stop(true); + this.StopLiveStream(); + Thread.Sleep(250); + } + Channel prevChannel = _currentChannel; ChannelGroup prevGroup = _currentChannelGroup; TuneLiveStream(zappingTo); Modified: trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/RecordedBase.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/RecordedBase.cs 2012-03-29 20:37:48 UTC (rev 4468) +++ trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/RecordedBase.cs 2012-04-02 12:04:32 UTC (rev 4469) @@ -92,6 +92,7 @@ private RecordingGroupMode _currentGroupByMode = RecordingGroupMode.GroupByProgramTitle; private SortMethod _currentSortMethod = SortMethod.Date; private bool _sortAscending = true; + private bool _enableThumbs = true; private int _selectedItemIndex; private int _selectedParentItemIndex; @@ -234,6 +235,10 @@ { jumpToTime = rec.LastWatchedPosition.Value; } + else + { + return false; + } } } if (jumpToTime == 0) @@ -272,7 +277,7 @@ } if (g_Player.Play(fileName, - rec.ChannelType == ChannelType.Television ? g_Player.MediaType.Recording : g_Player.MediaType.Radio)) + rec.ChannelType == ChannelType.Television ? g_Player.MediaType.TV : g_Player.MediaType.Radio)) { if (Utils.IsVideo(fileName)) { @@ -325,6 +330,7 @@ else if (strTmp == "name") _currentSortMethod = SortMethod.Name; _sortAscending = xmlreader.GetValueAsBool(this.SettingsSection, "sortascending", true); + _enableThumbs = xmlreader.GetValueAsBool(this.SettingsSection, "userecordingthumbs", true); strTmp = xmlreader.GetValueAsString(this.SettingsSection, "group", "title"); if (strTmp == "channel") _currentGroupByMode = RecordingGroupMode.GroupByChannel; @@ -776,9 +782,6 @@ item.Label = rec.CreateProgramTitle(); item.TVTag = rec; - // Set a default logo indicating the watched status - string previewThumb = rec.ThumbnailFileName; - // Get the channel logo for the small icons string logo = Utility.GetLogoImage(rec.ChannelId, rec.ChannelDisplayName, TvSchedulerAgent); if (!System.IO.File.Exists(logo)) @@ -786,11 +789,18 @@ logo = rec.LastWatchedTime.HasValue ? strDefaultSeenIcon : strDefaultUnseenIcon; } - if (!File.Exists(previewThumb) - || new FileInfo(previewThumb).Length == 0) + string previewThumb = logo; + if (_enableThumbs) { - // Fallback to Logo/Default icon - previewThumb = logo; + // Set a default logo indicating the watched status + previewThumb = rec.ThumbnailFileName; + + if (!File.Exists(previewThumb) + || new FileInfo(previewThumb).Length == 0) + { + // Fallback to Logo/Default icon + previewThumb = logo; + } } if (ForTheRecordMain.IsRecordingStillActive(rec.RecordingId)) @@ -1535,22 +1545,24 @@ private void OnPlayRecordingBackStarted(global::MediaPortal.Player.g_Player.MediaType type, string filename) { - if (type == g_Player.MediaType.Recording - && _playingRecording != null) + if (filename == _playingRecordingFileName) { - // set audio track based on user prefs. - int prefLangIdx = HomeBase.GetPreferedAudioStreamIndex(); - g_Player.CurrentAudioStream = prefLangIdx; + if (g_Player.IsTVRecording || g_Player.IsVideo) + { + // set audio track based on user prefs. + int prefLangIdx = HomeBase.GetPreferedAudioStreamIndex(); + g_Player.CurrentAudioStream = prefLangIdx; + } + else if (g_Player.IsRadio && _playingRecording != null) + { + RadioHome.UpdateMusicProperties(); + } } - else if (type != g_Player.MediaType.Recording && _playingRecording != null) + else { _playingRecordingFileName = null; _playingRecording = null; } - if (type == g_Player.MediaType.Radio) - { - RadioHome.UpdateMusicProperties(); - } } private static void StopCurrentPlayback(TvControlServiceAgent tvControlAgent) Modified: trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvCropManager.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvCropManager.cs 2012-03-29 20:37:48 UTC (rev 4468) +++ trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvCropManager.cs 2012-04-02 12:04:32 UTC (rev 4469) @@ -92,7 +92,7 @@ /// <param name="filename"></param> void g_Player_PlayBackStarted(g_Player.MediaType type, string filename) { - if (type == g_Player.MediaType.TV || type == g_Player.MediaType.Recording) + if (g_Player.IsTV || g_Player.IsTVRecording) { try { Modified: trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvHome.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvHome.cs 2012-03-29 20:37:48 UTC (rev 4468) +++ trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvHome.cs 2012-04-02 12:04:32 UTC (rev 4469) @@ -509,7 +509,7 @@ { Log.Debug("TvHome: GUI_MSG_STOP_SERVER_TIMESHIFTING, stopped livestream = navigator livestream"); - if (g_Player.Playing && (g_Player.IsTV || g_Player.IsRadio)) + if (g_Player.Playing && g_Player.IsTimeShifting) { if (GUIWindowManager.ActiveWindow == (int)(int)GUIWindow.Window.WINDOW_TVFULLSCREEN) { @@ -733,6 +733,24 @@ } } break;*/ + + + //this (GUI_MSG_RECORDER_VIEW_CHANNEL) event is used to let other plugins play a recording, + //lastMediaHandler does this (with param1 = 5577 for indentification). + case GUIMessage.MessageType.GUI_MSG_RECORDER_VIEW_CHANNEL: + if (message.Param1 == 5577) + { + try + { + Recording rec = message.Object as Recording; + RecordedBase.PlayRecording(rec, message.Param2); + } + catch + { + Log.Error("TVHome: error on GUI_MSG_RECORDER_VIEW_CHANNEL event"); + } + } + break; } } @@ -763,8 +781,7 @@ { if (ForTheRecordMain.Navigator.IsLiveStreamOn) { - if (type == g_Player.MediaType.TV - || type == g_Player.MediaType.Radio) + if (g_Player.IsTV || g_Player.IsRadio) { // set audio track based on user prefs. int prefLangIdx = HomeBase.GetPreferedAudioStreamIndex(); 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) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |