diff --git "a/R:\\temp\\TvOF02B.tmp\\TvOSD-131cd9b-left.cs" "b/D:\\Projekte\\MediaPortal\\TvEngine3\\TVLibrary\\TvPlugin\\TvPlugin\\TvOSD.cs"
index e56a101..6faaf10 100644
--- "a/R:\\temp\\TvOF02B.tmp\\TvOSD-131cd9b-left.cs"
+++ "b/D:\\Projekte\\MediaPortal\\TvEngine3\\TVLibrary\\TvPlugin\\TvPlugin\\TvOSD.cs"
@@ -1,6 +1,6 @@
-#region Copyright (C) 2005-2010 Team MediaPortal
+#region Copyright (C) 2005-2011 Team MediaPortal
 
-// Copyright (C) 2005-2010 Team MediaPortal
+// Copyright (C) 2005-2011 Team MediaPortal
 // http://www.team-mediaportal.com
 // 
 // MediaPortal is free software: you can redistribute it and/or modify
@@ -21,11 +21,11 @@
 using System;
 using System.Collections;
 using System.Globalization;
-using System.IO;
 using Gentle.Framework;
 using MediaPortal.Dialogs;
 using MediaPortal.GUI.Library;
 using MediaPortal.Player;
+using MediaPortal.Player.PostProcessing;
 using MediaPortal.Profile;
 using MediaPortal.Util;
 using TvControl;
@@ -34,18 +34,16 @@ using Action = MediaPortal.GUI.Library.Action;
 
 namespace TvPlugin
 {
-  /// <summary>
-  /// 
-  /// </summary>
-  /// 
   public class TvOsd : GUIInternalWindow
   {
     private enum Controls
     {
       OSD_VIDEOPROGRESS = 1,
+
       OSD_TIMEINFO = 100,
       Panel1 = 101,
       Panel2 = 150,
+
       OSD_PAUSE = 209,
       OSD_SKIPBWD = 210,
       OSD_REWIND = 211,
@@ -53,42 +51,65 @@ namespace TvPlugin
       OSD_PLAY = 213,
       OSD_FFWD = 214,
       OSD_SKIPFWD = 215,
+
       OSD_MUTE = 216,
       // OSD_SYNC =217 - not used
       OSD_SUBTITLES = 218,
       OSD_BOOKMARKS = 219,
       OSD_VIDEO = 220,
       OSD_AUDIO = 221,
+
       OSD_SUBMENU_BG_VOL = 300,
-      // OSD_SUBMENU_BG_SYNC 301	- not used
+      OSD_VOLUMESLIDER = 400,
+      OSD_VOLUMESLIDER_LABEL = 450,
+
+      // OSD_SUBMENU_BG_SYNC 301 - not used
+
       OSD_SUBMENU_BG_SUBTITLES = 302,
+      OSD_SUBTITLE_DELAY = 800,
+      OSD_SUBTITLE_DELAY_LABEL = 850,
+      OSD_SUBTITLE_ONOFF = 801,
+      OSD_SUBTITLE_LIST = 802,
+
       OSD_SUBMENU_BG_BOOKMARKS = 303,
+
       OSD_SUBMENU_BG_VIDEO = 304,
-      OSD_SUBMENU_BG_AUDIO = 305,
+      OSD_BRIGHTNESS = 704,
+      OSD_BRIGHTNESSLABEL = 752,
+      OSD_CONTRAST = 705,
+      OSD_CONTRASTLABEL = 753,
+      OSD_GAMMA = 706,
+      OSD_GAMMALABEL = 754,
+      OSD_SHARPNESS = 716,
+      OSD_SHARPNESSLABEL = 755,
+      OSD_SATURATION = 717,
+      OSD_SATURATIONLABEL = 756,
+      OSD_NONINTERLEAVED = 701,
+      OSD_NOCACHE = 702,
+      OSD_ADJFRAMERATE = 703,
+      OSD_VIDEO_POSTPROC_DEBLOCK_ONOFF = 707,
+      OSD_VIDEO_POSTPROC_RESIZE_ONOFF = 708,
+      OSD_VIDEO_POSTPROC_CROP_ONOFF = 709,
+      OSD_VIDEO_POSTPROC_CROP_VERTICAL = 711,
+      OSD_VIDEO_POSTPROC_CROP_VERTICAL_LABEL = 710,
+      OSD_VIDEO_POSTPROC_CROP_HORIZONTAL = 713,
+      OSD_VIDEO_POSTPROC_CROP_HORIZONTAL_LABEL = 712,
+      OSD_VIDEO_POSTPROC_DEINTERLACE_ONOFF = 714,
+
       OSD_SUBMENU_NIB = 350,
-      OSD_VOLUMESLIDER = 400,
       OSD_AVDELAY = 500,
       OSD_AVDELAY_LABEL = 550,
+
+      OSD_SUBMENU_BG_AUDIO = 305,
+      OSD_AUDIOSTREAM_LIST = 501,
+      OSD_AUDIOVOLUMESLIDER = 511,
+      OSD_AUDIOVOLUMESLIDER_LABEL = 512,
       OSD_CREATEBOOKMARK = 600,
       OSD_BOOKMARKS_LIST = 601,
       OSD_CLEARBOOKMARKS = 602,
       OSD_BOOKMARKS_LIST_LABEL = 650,
       OSD_VIDEOPOS = 700,
-      OSD_SHARPNESS = 701,
-      OSD_SATURATIONLABEL = 702,
-      OSD_SATURATION = 703,
-      OSD_BRIGHTNESS = 704,
-      OSD_CONTRAST = 705,
-      OSD_GAMMA = 706,
-      OSD_SHARPNESSLABEL = 710,
-      OSD_VIDEOPOS_LABEL = 750,
-      OSD_BRIGHTNESSLABEL = 752,
-      OSD_CONTRASTLABEL = 753,
-      OSD_GAMMALABEL = 754,
-      OSD_SUBTITLE_DELAY = 800,
-      OSD_SUBTITLE_ONOFF = 801,
-      OSD_SUBTITLE_LIST = 802,
-      OSD_SUBTITLE_DELAY_LABEL = 850,
+      OSD_VIDEOPOS_LABEL = 750
     } ;
 
     [SkinControl(10)] protected GUIImage imgTvChannelLogo = null;
@@ -102,19 +123,20 @@ namespace TvPlugin
     [SkinControl(38)] protected GUITextScrollUpControl tbProgramDescription = null;
     [SkinControl(39)] protected GUIImage imgRecIcon = null;
     [SkinControl(100)] protected GUILabelControl lblCurrentTime = null;
-    [SkinControl(501)] protected GUIListControl lstAudioStreamList = null;
 
     private bool isSubMenuVisible = false;
     private int m_iActiveMenu = 0;
     private int m_iActiveMenuButtonID = 0;
+    private int m_subtitleDelay = 0;
+    private int m_delayInterval = 0;
+    private int m_audioDelay = 0;
+    private int m_delayIntervalAudio = 0;
     private bool m_bNeedRefresh = false;
     private DateTime m_dateTime = DateTime.Now;
     private DateTime _RecIconLastCheck = DateTime.Now;
     private Program previousProgram = null;
     private bool _immediateSeekIsRelative = true;
     private int _immediateSeekValue = 10;
-    private int m_subtitleDelay = 0;
-    private int m_delayInterval = 0;
 
     private IList listTvChannels;
 
@@ -152,7 +174,7 @@ namespace TvPlugin
     public override void Render(float timePassed)
     {
       UpdateProgressBar();
-      SetVideoProgress(); // get the percentage of playback complete so far
+      //SetVideoProgress();
       Get_TimeInfo(); // show the time elapsed/total playing time
       SetRecorderStatus(); // BAV: fixing bug 1429: OSD is not updated with recording status 
       base.Render(timePassed); // render our controls to the screen
@@ -182,32 +204,41 @@ namespace TvPlugin
     {
       switch (action.wID)
       {
-          // translate movements (up, down, left right) back
+        // translate movements (up, down, left right) back
         case Action.ActionType.ACTION_STEP_BACK:
           action.wID = Action.ActionType.ACTION_MOVE_LEFT;
           break;
+
         case Action.ActionType.ACTION_STEP_FORWARD:
           action.wID = Action.ActionType.ACTION_MOVE_RIGHT;
           break;
+
         case Action.ActionType.ACTION_BIG_STEP_BACK:
           action.wID = Action.ActionType.ACTION_MOVE_DOWN;
           break;
+
         case Action.ActionType.ACTION_BIG_STEP_FORWARD:
           action.wID = Action.ActionType.ACTION_MOVE_UP;
           break;
+
         case Action.ActionType.ACTION_OSD_SHOW_LEFT:
           break;
+
         case Action.ActionType.ACTION_OSD_SHOW_RIGHT:
           break;
+
         case Action.ActionType.ACTION_OSD_SHOW_UP:
           break;
+
         case Action.ActionType.ACTION_OSD_SHOW_DOWN:
           break;
+
         case Action.ActionType.ACTION_OSD_SHOW_SELECT:
           break;
 
         case Action.ActionType.ACTION_OSD_HIDESUBMENU:
           break;
+
         case Action.ActionType.ACTION_CONTEXT_MENU:
         case Action.ActionType.ACTION_PREVIOUS_MENU:
         case Action.ActionType.ACTION_SHOW_OSD:
@@ -244,7 +275,6 @@ namespace TvPlugin
             return;
           }
 
-
         case Action.ActionType.ACTION_PLAY:
         case Action.ActionType.ACTION_MUSIC_PLAY:
           {
@@ -252,12 +282,10 @@ namespace TvPlugin
             ToggleButton((int)Controls.OSD_REWIND, false); // pop all the relevant
             ToggleButton((int)Controls.OSD_FFWD, false); // buttons back to
             ToggleButton((int)Controls.OSD_PLAY, false); // their up state
-            ToggleButton((int)Controls.OSD_PLAY, false); // make sure play button is up (so it shows the play symbol)
             GUIWindowManager.IsPauseOsdVisible = false;
             return;
           }
 
-
         case Action.ActionType.ACTION_STOP:
           {
             if (g_Player.IsTimeShifting)
@@ -285,10 +313,9 @@ namespace TvPlugin
                 g_Player.Stop();
             }
             GUIWindowManager.IsPauseOsdVisible = false;
-              return;
+            return;
           }
 
-
         case Action.ActionType.ACTION_FORWARD:
           {
             // push a message through to this window to handle the remote control button
@@ -300,7 +327,6 @@ namespace TvPlugin
             return;
           }
 
-
         case Action.ActionType.ACTION_REWIND:
           {
             // push a message through to this window to handle the remote control button
@@ -312,7 +338,6 @@ namespace TvPlugin
             return;
           }
 
-
         case Action.ActionType.ACTION_OSD_SHOW_VALUE_PLUS:
           {
             // push a message through to this window to handle the remote control button
@@ -345,9 +370,10 @@ namespace TvPlugin
             return;
           }
       }
+
       if (/*((action.wID >= Action.ActionType.REMOTE_0) && (action.wID <= Action.ActionType.REMOTE_9)) ||*/
-           (action.wID == Action.ActionType.ACTION_KEY_PRESSED && action.m_key != null &&
-            (char)action.m_key.KeyChar >= '0' && (char)action.m_key.KeyChar <= '9'))
+          (action.wID == Action.ActionType.ACTION_KEY_PRESSED && action.m_key != null &&
+          (char)action.m_key.KeyChar >= '0' && (char)action.m_key.KeyChar <= '9'))
       {
         TvFullScreen TVWindow = (TvFullScreen)GUIWindowManager.GetWindow((int)Window.WINDOW_TVFULLSCREEN);
         if (TVWindow != null)
@@ -364,8 +390,15 @@ namespace TvPlugin
       {
         case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT: // fired when OSD is hidden
           {
+            //if (g_application.m_pPlayer) g_application.m_pPlayer.ShowOSD(true);
+            // following line should stay. Problems with OSD not
+            // appearing are already fixed elsewhere
+            //for (int i = (int)Controls.Panel1; i < (int)Controls.Panel2; i++)
+            //{
+            //  HideControl(GetID, i);
+            //}
             Dispose();
-            GUIPropertyManager.SetProperty("#currentmodule", GUILocalizeStrings.Get(100000 + message.Param1));
+            GUIPropertyManager.SetProperty("#currentmodule", GUIWindowManager.GetWindow(message.Param1).GetModuleName());
             return true;
           }
 
@@ -379,8 +412,7 @@ namespace TvPlugin
             sb.AddOrderByField(true, "sortOrder");
             SqlStatement stmt = sb.GetStatement(true);
             listTvChannels = ObjectFactory.GetCollection(typeof (Channel), stmt.Execute());
-
-            GUIPropertyManager.SetProperty("#currentmodule", GUILocalizeStrings.Get(100000 + GetID));
+            GUIPropertyManager.SetProperty("#currentmodule", GetModuleName());
             previousProgram = null;
             AllocResources();
             // if (g_application.m_pPlayer) g_application.m_pPlayer.ShowOSD(false);
@@ -394,13 +426,25 @@ namespace TvPlugin
             FocusControl(GetID, (int)Controls.OSD_PLAY, 0); // set focus to play button by default when window is shown
             ShowPrograms();
             QueueAnimation(AnimationType.WindowOpen);
-            for (int i = (int)Controls.Panel1; i < (int)Controls.Panel2; ++i)
+            for (int i = (int)Controls.Panel1; i < (int)Controls.Panel2; i++)
             {
               ShowControl(GetID, i);
             }
+            if (g_Player.Paused)
+            {
+              ToggleButton((int)Controls.OSD_PLAY, true);
+              // make sure play button is down (so it shows the pause symbol)
+            }
+            else
+            {
+              ToggleButton((int)Controls.OSD_PLAY, false); // make sure play button is up (so it shows the play symbol)
+            }
             m_delayInterval = MediaPortal.Player.Subtitles.SubEngine.GetInstance().DelayInterval;
             if (m_delayInterval > 0)
               m_subtitleDelay = MediaPortal.Player.Subtitles.SubEngine.GetInstance().Delay / m_delayInterval;
+            m_delayIntervalAudio = PostProcessingEngine.GetInstance().AudioDelayInterval;
+            if (m_delayIntervalAudio > 0)
+              m_audioDelay = PostProcessingEngine.GetInstance().AudioDelay / m_delayIntervalAudio;
             return true;
           }
 
@@ -419,27 +463,17 @@ namespace TvPlugin
         case GUIMessage.MessageType.GUI_MSG_CLICKED:
           {
             int iControl = message.SenderControlId; // get the ID of the control sending us a message
-            if (iControl == lstAudioStreamList.GetID)
-            {
-              // only change the audio stream if a different one has been asked for
-              //@
-              /*if (RemoteControl.Instance.GetAudioLanguage() != lstAudioStreamList.SelectedListItem.ItemId)
-              {
-                // Set the audio stream to the one selected
-                RemoteControl.Instance.SetAudioLanguage(lstAudioStreamList.SelectedListItem.ItemId);
-                isSubMenuVisible = false;
-                m_bNeedRefresh = true;
-                PopulateAudioStreams();
-              }*/
-            }
+
             if (iControl == btnChannelUp.GetID)
             {
               OnNextChannel();
             }
+
             if (iControl == btnChannelDown.GetID)
             {
               OnPreviousChannel();
             }
+
             if (!g_Player.IsTVRecording)
             {
               if (iControl == btnPreviousProgram.GetID)
@@ -509,6 +543,7 @@ namespace TvPlugin
 
             if (iControl == (int)Controls.OSD_PLAY)
             {
+              //TODO
               int iSpeed = g_Player.Speed;
               if (iSpeed != 1) // we're in ffwd or rewind mode
               {
@@ -519,7 +554,7 @@ namespace TvPlugin
               }
               else
               {
-                g_Player.Pause(); //Pause/Un-Pause playback
+                g_Player.Pause(); // Pause/Un-Pause playback
                 if (g_Player.Paused)
                 {
                   ToggleButton((int)Controls.OSD_PLAY, true);
@@ -552,6 +587,7 @@ namespace TvPlugin
               }
               //GUIWindowManager.ShowPreviousWindow();							// go back to the previous window
             }
+
             if (iControl == (int)Controls.OSD_REWIND)
             {
               if (g_Player.Paused)
@@ -596,7 +632,6 @@ namespace TvPlugin
               }
             }
 
-
             if (iControl == (int)Controls.OSD_SKIPBWD)
             {
               if (_immediateSeekIsRelative)
@@ -628,7 +663,14 @@ namespace TvPlugin
               ToggleSubMenu(iControl, (int)Controls.OSD_SUBMENU_BG_VOL); // hide or show the sub-menu
               if (isSubMenuVisible) // is sub menu on?
               {
+                int iValue = g_Player.Volume;
+                GUISliderControl pSlider = GetControl((int)Controls.OSD_VOLUMESLIDER) as GUISliderControl;
+                if (null != pSlider)
+                {
+                  pSlider.Percentage = iValue; // Update our volume slider accordingly ...
+                }
                 ShowControl(GetID, (int)Controls.OSD_VOLUMESLIDER); // show the volume control
+                ShowControl(GetID, (int)Controls.OSD_VOLUMESLIDER_LABEL);
                 FocusControl(GetID, (int)Controls.OSD_VOLUMESLIDER, 0); // set focus to it
               }
               else // sub menu is off
@@ -637,13 +679,6 @@ namespace TvPlugin
               }
             }
 
-            /* not used
-            if (iControl == (int)Controls.OSD_SYNC)
-            {
-              ToggleSubMenu(iControl, Controls.OSD_SUBMENU_BG_SYNC);		// hide or show the sub-menu
-            }
-            */
-
             if (iControl == (int)Controls.OSD_SUBTITLES)
             {
               ToggleSubMenu(iControl, (int)Controls.OSD_SUBMENU_BG_SUBTITLES); // hide or show the sub-menu
@@ -670,18 +705,7 @@ namespace TvPlugin
 
             if (iControl == (int)Controls.OSD_BOOKMARKS)
             {
-              ToggleSubMenu(iControl, (int)Controls.OSD_SUBMENU_BG_BOOKMARKS); // hide or show the sub-menu
-              if (isSubMenuVisible)
-              {
-                // show the controls on this sub menu
-                ShowControl(GetID, (int)Controls.OSD_CREATEBOOKMARK);
-                ShowControl(GetID, (int)Controls.OSD_BOOKMARKS_LIST);
-                ShowControl(GetID, (int)Controls.OSD_BOOKMARKS_LIST_LABEL);
-                ShowControl(GetID, (int)Controls.OSD_CLEARBOOKMARKS);
-
-                FocusControl(GetID, (int)Controls.OSD_CREATEBOOKMARK, 0);
-                // set focus to the first control in our group
-              }
+              //not used
             }
 
             if (iControl == (int)Controls.OSD_VIDEO)
@@ -693,15 +717,40 @@ namespace TvPlugin
                 float fPercent = (float)(100 * (g_Player.CurrentPosition / g_Player.Duration));
                 SetSliderValue(0.0f, 100.0f, (float)fPercent, (int)Controls.OSD_VIDEOPOS);
 
+                bool hasPostProc = g_Player.HasPostprocessing;
+                if (hasPostProc)
+                {
+                  IPostProcessingEngine engine = PostProcessingEngine.GetInstance();
+                  SetCheckmarkValue(engine.EnablePostProcess, (int)Controls.OSD_VIDEO_POSTPROC_DEBLOCK_ONOFF);
+                  SetCheckmarkValue(engine.EnableResize, (int)Controls.OSD_VIDEO_POSTPROC_RESIZE_ONOFF);
+                  SetCheckmarkValue(engine.EnableCrop, (int)Controls.OSD_VIDEO_POSTPROC_CROP_ONOFF);
+                  SetCheckmarkValue(engine.EnableDeinterlace, (int)Controls.OSD_VIDEO_POSTPROC_DEINTERLACE_ONOFF);
+                  UpdatePostProcessing();
+                  ShowControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_DEBLOCK_ONOFF);
+                  ShowControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_RESIZE_ONOFF);
+                  ShowControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_CROP_ONOFF);
+                  ShowControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_DEINTERLACE_ONOFF);
+                  ShowControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_CROP_VERTICAL);
+                  ShowControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_CROP_HORIZONTAL);
+                  ShowControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_CROP_VERTICAL_LABEL);
+                  ShowControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_CROP_HORIZONTAL_LABEL);
+                }
+
+                //SetCheckmarkValue(g_stSettings.m_bNonInterleaved, Controls.OSD_NONINTERLEAVED);
+                //SetCheckmarkValue(g_stSettings.m_bNoCache, Controls.OSD_NOCACHE);
+                //SetCheckmarkValue(g_stSettings.m_bFrameRateConversions, Controls.OSD_ADJFRAMERATE);
 
                 UpdateGammaContrastBrightness();
                 // show the controls on this sub menu
                 ShowControl(GetID, (int)Controls.OSD_VIDEOPOS);
+                ShowControl(GetID, (int)Controls.OSD_VIDEOPOS_LABEL);
+                ShowControl(GetID, (int)Controls.OSD_NONINTERLEAVED);
+                ShowControl(GetID, (int)Controls.OSD_NOCACHE);
+                ShowControl(GetID, (int)Controls.OSD_ADJFRAMERATE);
                 ShowControl(GetID, (int)Controls.OSD_SATURATIONLABEL);
                 ShowControl(GetID, (int)Controls.OSD_SATURATION);
                 ShowControl(GetID, (int)Controls.OSD_SHARPNESSLABEL);
                 ShowControl(GetID, (int)Controls.OSD_SHARPNESS);
-                ShowControl(GetID, (int)Controls.OSD_VIDEOPOS_LABEL);
                 ShowControl(GetID, (int)Controls.OSD_BRIGHTNESS);
                 ShowControl(GetID, (int)Controls.OSD_BRIGHTNESSLABEL);
                 ShowControl(GetID, (int)Controls.OSD_CONTRAST);
@@ -717,13 +766,39 @@ namespace TvPlugin
               ToggleSubMenu(iControl, (int)Controls.OSD_SUBMENU_BG_AUDIO); // hide or show the sub-menu
               if (isSubMenuVisible) // is sub menu on?
               {
+                int iValue = g_Player.Volume;
+                GUISliderControl pSlider = GetControl((int)Controls.OSD_AUDIOVOLUMESLIDER) as GUISliderControl;
+                if (null != pSlider)
+                {
+                  pSlider.Percentage = iValue; // Update our volume slider accordingly ...
+                }
+
                 // set the controls values
-                //SetSliderValue(-10.0f, 10.0f, g_application.m_pPlayer.GetAVDelay(), Controls.OSD_AVDELAY);
+                GUISliderControl pControl = (GUISliderControl)GetControl((int)Controls.OSD_AVDELAY);
+                pControl.SpinType = GUISpinControl.SpinType.SPIN_CONTROL_TYPE_FLOAT;
+                pControl.SetRange(-20, 20);
+                SetSliderValue(-20, 20, m_audioDelay, (int)Controls.OSD_AVDELAY);
+
+                bool hasPostProc = g_Player.HasPostprocessing;
+                if (hasPostProc)
+                {
+                  GUIPropertyManager.SetProperty("#TvOSD.AudioVideoDelayPossible", "true");
+                  pControl.FloatInterval = 1;
+                }
+                else
+                { 
+                  GUIPropertyManager.SetProperty("#TvOSD.AudioVideoDelayPossible", "false");
+                  pControl.FloatValue = 0;
+                  m_audioDelay = 0;
+                  pControl.FloatInterval = 0;
+                }
 
                 // show the controls on this sub menu
                 ShowControl(GetID, (int)Controls.OSD_AVDELAY);
                 ShowControl(GetID, (int)Controls.OSD_AVDELAY_LABEL);
-                lstAudioStreamList.Visible = true;
+                ShowControl(GetID, (int)Controls.OSD_AUDIOSTREAM_LIST);
+                ShowControl(GetID, (int)Controls.OSD_AUDIOVOLUMESLIDER);
+                ShowControl(GetID, (int)Controls.OSD_AUDIOVOLUMESLIDER_LABEL);
 
                 FocusControl(GetID, (int)Controls.OSD_AVDELAY, 0); // set focus to the first control in our group
                 PopulateAudioStreams(); // populate the list control with audio streams for this video
@@ -751,6 +826,13 @@ namespace TvPlugin
       SetSliderValue(0.0f, 100.0f, (float)fSharpness, (int)Controls.OSD_SHARPNESS);
     }
 
+    private void UpdatePostProcessing()
+    {
+      IPostProcessingEngine engine = PostProcessingEngine.GetInstance();
+      SetSliderValue(0.0f, 100.0f, (float)engine.CropVertical, (int)Controls.OSD_VIDEO_POSTPROC_CROP_VERTICAL);
+      SetSliderValue(0.0f, 100.0f, (float)engine.CropHorizontal, (int)Controls.OSD_VIDEO_POSTPROC_CROP_HORIZONTAL);
+    }
+
     private void SetVideoProgress()
     {
       if (g_Player.Playing)
@@ -759,52 +841,21 @@ namespace TvPlugin
         //      GUIProgressControl pControl = (GUIProgressControl)GetControl((int)Controls.OSD_VIDEOPROGRESS);
         //    if (null!=pControl) pControl.Percentage=(int)(100*fPercentage);			// Update our progress bar accordingly ...
 
+        //float fPercent = (float)(100 * (g_Player.CurrentPosition / g_Player.Duration));
+        //SetSliderValue(0.0f, 100.0f, (float)fPercent, (int)Controls.OSD_VIDEOPOS); // Update our progress slider accordingly ...
+
         int iValue = g_Player.Volume;
         GUISliderControl pSlider = GetControl((int)Controls.OSD_VOLUMESLIDER) as GUISliderControl;
         if (null != pSlider)
         {
-          pSlider.Percentage = iValue; // Update our progress bar accordingly ...
+          pSlider.Percentage = iValue; // Update our volume slider accordingly ...
         }
-      }
-    }
-
-    private void Get_TimeInfo()
-    {
-      string strTime = "";
-      if (!g_Player.IsTVRecording)
-      {
-        string strChannel = GetChannelName();
-        strTime = strChannel;
-        Program prog = TVHome.Navigator.Channel.CurrentProgram;
-        if (prog != null)
+        pSlider = GetControl((int)Controls.OSD_AUDIOVOLUMESLIDER) as GUISliderControl;
+        if (null != pSlider)
         {
-          strTime = String.Format("{0}-{1}",
-                                  prog.StartTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat),
-                                  prog.EndTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat));
+          pSlider.Percentage = iValue; // Update our volume slider accordingly ...
         }
       }
-      else
-      {
-        long currentPosition = (long)(g_Player.CurrentPosition);
-        int hh = (int)(currentPosition / 3600) % 100;
-        int mm = (int)((currentPosition / 60) % 60);
-        int ss = (int)((currentPosition / 1) % 60);
-        DateTime startTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, hh, mm, ss);
-
-        long duration = (long)(g_Player.Duration);
-        hh = (int)(duration / 3600) % 100;
-        mm = (int)((duration / 60) % 60);
-        ss = (int)((duration / 1) % 60);
-        DateTime endTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, hh, mm, ss);
-
-        strTime = String.Format("{0}-{1}",
-                                startTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat),
-                                endTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat));
-      }
-      GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_LABEL_SET, GetID, 0, (int)Controls.OSD_TIMEINFO, 0,
-                                      0, null);
-      msg.Label = strTime;
-      OnMessage(msg); // ask our label to update it's caption
     }
 
     private void ToggleButton(int iButtonID, bool bSelected)
@@ -876,18 +927,30 @@ namespace TvPlugin
       {
         m_bNeedRefresh = true;
       }
+
+      GUIPropertyManager.SetProperty("#TvOSD.AudioVideoDelayPossible", " ");
+
       // Set all sub menu controls to hidden
       HideControl(GetID, (int)Controls.OSD_VOLUMESLIDER);
+      HideControl(GetID, (int)Controls.OSD_VOLUMESLIDER_LABEL);
       HideControl(GetID, (int)Controls.OSD_VIDEOPOS);
       HideControl(GetID, (int)Controls.OSD_VIDEOPOS_LABEL);
-      lstAudioStreamList.Visible = false;
+      HideControl(GetID, (int)Controls.OSD_AUDIOSTREAM_LIST);
+      HideControl(GetID, (int)Controls.OSD_AUDIOVOLUMESLIDER);
+      HideControl(GetID, (int)Controls.OSD_AUDIOVOLUMESLIDER_LABEL);
 
       HideControl(GetID, (int)Controls.OSD_AVDELAY);
+      HideControl(GetID, (int)Controls.OSD_AVDELAY_LABEL);
+
+      HideControl(GetID, (int)Controls.OSD_NONINTERLEAVED);
+      HideControl(GetID, (int)Controls.OSD_NOCACHE);
+      HideControl(GetID, (int)Controls.OSD_ADJFRAMERATE);
+
       HideControl(GetID, (int)Controls.OSD_SHARPNESSLABEL);
       HideControl(GetID, (int)Controls.OSD_SHARPNESS);
+
       HideControl(GetID, (int)Controls.OSD_SATURATIONLABEL);
       HideControl(GetID, (int)Controls.OSD_SATURATION);
-      HideControl(GetID, (int)Controls.OSD_AVDELAY_LABEL);
 
       HideControl(GetID, (int)Controls.OSD_BRIGHTNESS);
       HideControl(GetID, (int)Controls.OSD_BRIGHTNESSLABEL);
@@ -895,6 +958,15 @@ namespace TvPlugin
       HideControl(GetID, (int)Controls.OSD_GAMMA);
       HideControl(GetID, (int)Controls.OSD_GAMMALABEL);
 
+      HideControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_DEBLOCK_ONOFF);
+      HideControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_RESIZE_ONOFF);
+      HideControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_CROP_ONOFF);
+      HideControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_DEINTERLACE_ONOFF);
+      HideControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_CROP_VERTICAL);
+      HideControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_CROP_HORIZONTAL);
+      HideControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_CROP_VERTICAL_LABEL);
+      HideControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_CROP_HORIZONTAL_LABEL);
+
       HideControl(GetID, (int)Controls.OSD_CONTRAST);
       HideControl(GetID, (int)Controls.OSD_CONTRASTLABEL);
 
@@ -930,18 +1002,39 @@ namespace TvPlugin
         ToggleButton((int)Controls.OSD_AUDIO, false);
       }
 
+      if (m_iActiveMenu > 1 && m_iActiveMenu != iBackID)
+        GUIControl.HideControl(GetID, m_iActiveMenu);
+
       m_iActiveMenu = iBackID;
       m_iActiveMenuButtonID = iButtonID;
     }
 
-    private void SetSliderValue(float fMin, float fMax, float fValue, int iControlID)
+    private float GetSliderValue(int iControlID)
     {
-      GUISliderControl pControl = GetControl(iControlID) as GUISliderControl;
-      if (pControl == null)
+      GUISliderControl pControl = (GUISliderControl)GetControl(iControlID);
+
+      if (null != pControl)
       {
-        return;
+        switch (pControl.SpinType)
+        {
+          case GUISpinControl.SpinType.SPIN_CONTROL_TYPE_FLOAT:
+            return pControl.FloatValue;
+
+          case GUISpinControl.SpinType.SPIN_CONTROL_TYPE_INT:
+            return pControl.IntValue;
+
+          default:
+            return pControl.Percentage;
+        }
       }
 
+      return 0.0f;
+    }
+
+    private void SetSliderValue(float fMin, float fMax, float fValue, int iControlID)
+    {
+      GUISliderControl pControl = GetControl(iControlID) as GUISliderControl;
+
       if (null != pControl)
       {
         switch (pControl.SpinType)
@@ -984,6 +1077,7 @@ namespace TvPlugin
       switch (iControlID)
       {
         case (int)Controls.OSD_VOLUMESLIDER:
+        case (int)Controls.OSD_AUDIOVOLUMESLIDER:
           {
             GUISliderControl pControl = GetControl(iControlID) as GUISliderControl;
             if (null != pControl)
@@ -1000,118 +1094,89 @@ namespace TvPlugin
 
         case (int)Controls.OSD_VIDEOPOS:
           {
-            GUISliderControl pControl = GetControl(iControlID) as GUISliderControl;
-            if (null != pControl)
-            {
-              // Set mplayer's seek position to the percentage requested by the user
-              g_Player.SeekAsolutePercentage(pControl.Percentage);
-            }
+            g_Player.SeekAsolutePercentage((int)GetSliderValue(iControlID));
           }
           break;
+
         case (int)Controls.OSD_SATURATION:
           {
-            GUISliderControl pControl = GetControl(iControlID) as GUISliderControl;
-            if (null != pControl)
-            {
-              // Set mplayer's seek position to the percentage requested by the user
-              GUIGraphicsContext.Saturation = pControl.Percentage;
-              UpdateGammaContrastBrightness();
-            }
+            GUIGraphicsContext.Saturation = (int)GetSliderValue(iControlID);
+            UpdateGammaContrastBrightness();
           }
           break;
+
         case (int)Controls.OSD_SHARPNESS:
           {
-            GUISliderControl pControl = GetControl(iControlID) as GUISliderControl;
-            if (null != pControl)
-            {
-              // Set mplayer's seek position to the percentage requested by the user
-              GUIGraphicsContext.Sharpness = pControl.Percentage;
-              UpdateGammaContrastBrightness();
-            }
+            GUIGraphicsContext.Sharpness = (int)GetSliderValue(iControlID);
+            UpdateGammaContrastBrightness();
           }
           break;
 
         case (int)Controls.OSD_BRIGHTNESS:
           {
-            GUISliderControl pControl = GetControl(iControlID) as GUISliderControl;
-            if (null != pControl)
-            {
-              // Set mplayer's seek position to the percentage requested by the user
-              GUIGraphicsContext.Brightness = pControl.Percentage;
-              UpdateGammaContrastBrightness();
-            }
+            GUIGraphicsContext.Brightness = (int)GetSliderValue(iControlID);
+            UpdateGammaContrastBrightness();
           }
           break;
+
         case (int)Controls.OSD_CONTRAST:
           {
-            GUISliderControl pControl = GetControl(iControlID) as GUISliderControl;
-            if (null != pControl)
-            {
-              // Set mplayer's seek position to the percentage requested by the user
-              GUIGraphicsContext.Contrast = pControl.Percentage;
-              UpdateGammaContrastBrightness();
-            }
+            GUIGraphicsContext.Contrast = (int)GetSliderValue(iControlID);
+            UpdateGammaContrastBrightness();
           }
           break;
+
         case (int)Controls.OSD_GAMMA:
           {
-            GUISliderControl pControl = GetControl(iControlID) as GUISliderControl;
-            if (null != pControl)
-            {
-              // Set mplayer's seek position to the percentage requested by the user
-              GUIGraphicsContext.Gamma = pControl.Percentage;
-              UpdateGammaContrastBrightness();
-            }
+            GUIGraphicsContext.Gamma = (int)GetSliderValue(iControlID);
+            UpdateGammaContrastBrightness();
           }
           break;
 
-          /*
-              case Controls.OSD_AVDELAY:
-              {
-                GUISliderControl pControl=(GUISliderControl)GetControl(iControlID);
-                if (pControl)
-                {
-                  // Set the AV Delay
-                  g_application.m_pPlayer.SetAVDelay(pControl.GetFloatValue());
-                }
-              }
-              break;
+        /* not used
+        case (int)Controls.OSD_AUDIOSTREAM_LIST:
+          {
 
+          }
+          break;
 
-              case Controls.OSD_CREATEBOOKMARK:
-              {
-                long lPTS1=g_application.m_pPlayer.GetTime();			// get the current playing time position
+        case (int)Controls.OSD_CREATEBOOKMARK:
+          {
 
-                VideoDatabase.AddBookMarkToMovie(strMovie, (float)lPTS1);				// add the current timestamp
-                PopulateBookmarks();										// refresh our list control
-              }
-              break;
+          }
+          break;
 
-              case Controls.OSD_BOOKMARKS_LIST:
-              {
-                if (wID)	// check to see if list control has an action ID, remote can cause 0 based events
-                {
-                  GUIMessage msg=new GUIMessage(GUIMessage.MessageType.GUI_MSG_ITEM_SELECTED,GetID,(int)Controls.OSD_BOOKMARKS_LIST,0,0,null);
-                  OnMessage(msg);
-                  m_iCurrentBookmark = msg.Param1;					// index of bookmark user selected
+        case (int)Controls.OSD_BOOKMARKS_LIST:
+          {
 
-            
-                  VideoDatabase.GetBookMarksForMovie(strMovie, bookmarks);			// load the stored bookmarks
-                  if (bookmarks.Count<=0) return;						// no bookmarks? leave if so ...
+          }
+          break;
 
-                  g_application.m_pPlayer.SeekTime((long) bookmarks[m_iCurrentBookmark]);	// set mplayers play position
-                }
-              }
-              break;
+        case (int)Controls.OSD_CLEARBOOKMARKS:
+          {
+
+          }
+          break;
+        */
+
+        case (int)Controls.OSD_VIDEO_POSTPROC_DEBLOCK_ONOFF:
+          {
+            PostProcessingEngine.GetInstance().EnablePostProcess = !PostProcessingEngine.GetInstance().EnablePostProcess;
+          }
+          break;
+
+        case (int)Controls.OSD_VIDEO_POSTPROC_RESIZE_ONOFF:
+          {
+            PostProcessingEngine.GetInstance().EnableResize = !PostProcessingEngine.GetInstance().EnableResize;
+          }
+          break;
+
+        case (int)Controls.OSD_VIDEO_POSTPROC_DEINTERLACE_ONOFF:
+          {
+            PostProcessingEngine.GetInstance().EnableDeinterlace = !PostProcessingEngine.GetInstance().EnableDeinterlace;
+          }
+          break;
 
-                case Controls.OSD_CLEARBOOKMARKS:
-                {
-                  VideoDatabase.ClearBookMarksOfMovie(strMovie);					// empty the bookmarks table for this movie
-                  m_iCurrentBookmark=0;									// reset current bookmark
-                  PopulateBookmarks();									// refresh our list control
-                }
-                break;                
-      */
         case (int)Controls.OSD_SUBTITLE_ONOFF:
           {
             g_Player.EnableSubtitle = !g_Player.EnableSubtitle;
@@ -1161,7 +1226,7 @@ namespace TvPlugin
               {
                 MediaPortal.Player.Subtitles.SubEngine.GetInstance().DelayMinus();
               }
-              else
+              else if (pControl.FloatValue > m_subtitleDelay)
               {
                 MediaPortal.Player.Subtitles.SubEngine.GetInstance().DelayPlus();
               }
@@ -1169,19 +1234,67 @@ namespace TvPlugin
             }
           }
           break;
+
+        case (int)Controls.OSD_VIDEO_POSTPROC_CROP_VERTICAL:
+          {
+            GUISliderControl pControl = (GUISliderControl)GetControl(iControlID);
+            if (null != pControl)
+            {
+              PostProcessingEngine.GetInstance().CropVertical = pControl.Percentage;
+              UpdatePostProcessing();
+            }
+          }
+          break;
+
+        case (int)Controls.OSD_VIDEO_POSTPROC_CROP_HORIZONTAL:
+          {
+            GUISliderControl pControl = (GUISliderControl)GetControl(iControlID);
+            if (null != pControl)
+            {
+              PostProcessingEngine.GetInstance().CropHorizontal = pControl.Percentage;
+              UpdatePostProcessing();
+            }
+          }
+          break;
+
+        case (int)Controls.OSD_AVDELAY:
+          {
+            GUISliderControl pControl = (GUISliderControl)GetControl(iControlID);
+            IPostProcessingEngine engine = PostProcessingEngine.GetInstance();
+
+            if (null != pControl && g_Player.HasPostprocessing)
+            {
+              if (pControl.FloatValue < m_audioDelay)
+              { 
+                  PostProcessingEngine.GetInstance().AudioDelayMinus();
+              }
+              else if (pControl.FloatValue > m_audioDelay)
+              { 
+                  PostProcessingEngine.GetInstance().AudioDelayPlus();
+              }
+              m_audioDelay = (int)pControl.FloatValue;
+            }
+          }
+          break;
       }
     }
 
     private void PopulateAudioStreams()
     {
-      string strLabel = GUILocalizeStrings.Get(460); // "Audio Stream"
-      string strActiveLabel = GUILocalizeStrings.Get(461); // "[active]"
-
       // tell the list control not to show the page x/y spin control
-      lstAudioStreamList.SetPageControlVisible(false);
+      GUIListControl pControl = (GUIListControl)GetControl((int)Controls.OSD_AUDIOSTREAM_LIST);
+      if (null != pControl)
+      {
+          pControl.SetPageControlVisible(false);
+      }
 
       // empty the list ready for population
-      lstAudioStreamList.Clear();
+      GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_LABEL_RESET, GetID, 0,
+                                      (int)Controls.OSD_AUDIOSTREAM_LIST, 0, 0, null);
+      OnMessage(msg);
+
+      string strLabel = GUILocalizeStrings.Get(460); // "Audio Stream"
+      string strActiveLabel = GUILocalizeStrings.Get(461); // "[active]"
 
       // Add DVB audio streams
       /*
@@ -1360,26 +1473,34 @@ namespace TvPlugin
 
     private void Reset()
     {
-      // Set all sub menu controls to hidden
+      GUIPropertyManager.SetProperty("#TvOSD.AudioVideoDelayPossible", " ");
 
+      // Set all sub menu controls to hidden
       HideControl(GetID, (int)Controls.OSD_SUBMENU_BG_AUDIO);
       HideControl(GetID, (int)Controls.OSD_SUBMENU_BG_VIDEO);
       HideControl(GetID, (int)Controls.OSD_SUBMENU_BG_BOOKMARKS);
       HideControl(GetID, (int)Controls.OSD_SUBMENU_BG_SUBTITLES);
       HideControl(GetID, (int)Controls.OSD_SUBMENU_BG_VOL);
 
-
       HideControl(GetID, (int)Controls.OSD_VOLUMESLIDER);
+      HideControl(GetID, (int)Controls.OSD_VOLUMESLIDER_LABEL);
       HideControl(GetID, (int)Controls.OSD_VIDEOPOS);
       HideControl(GetID, (int)Controls.OSD_VIDEOPOS_LABEL);
-      lstAudioStreamList.Visible = false;
-
+      HideControl(GetID, (int)Controls.OSD_AUDIOSTREAM_LIST);
       HideControl(GetID, (int)Controls.OSD_AVDELAY);
-      HideControl(GetID, (int)Controls.OSD_SATURATIONLABEL);
+      HideControl(GetID, (int)Controls.OSD_AVDELAY_LABEL);
+      HideControl(GetID, (int)Controls.OSD_AUDIOVOLUMESLIDER);
+      HideControl(GetID, (int)Controls.OSD_AUDIOVOLUMESLIDER_LABEL);
+
+      HideControl(GetID, (int)Controls.OSD_NONINTERLEAVED);
+      HideControl(GetID, (int)Controls.OSD_NOCACHE);
+      HideControl(GetID, (int)Controls.OSD_ADJFRAMERATE);
+
       HideControl(GetID, (int)Controls.OSD_SATURATION);
-      HideControl(GetID, (int)Controls.OSD_SHARPNESSLABEL);
+      HideControl(GetID, (int)Controls.OSD_SATURATIONLABEL);
+
       HideControl(GetID, (int)Controls.OSD_SHARPNESS);
-      HideControl(GetID, (int)Controls.OSD_AVDELAY_LABEL);
+      HideControl(GetID, (int)Controls.OSD_SHARPNESSLABEL);
 
       HideControl(GetID, (int)Controls.OSD_BRIGHTNESS);
       HideControl(GetID, (int)Controls.OSD_BRIGHTNESSLABEL);
@@ -1399,6 +1520,15 @@ namespace TvPlugin
       HideControl(GetID, (int)Controls.OSD_SUBTITLE_ONOFF);
       HideControl(GetID, (int)Controls.OSD_SUBTITLE_LIST);
 
+      HideControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_DEBLOCK_ONOFF);
+      HideControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_RESIZE_ONOFF);
+      HideControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_CROP_ONOFF);
+      HideControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_DEINTERLACE_ONOFF);
+      HideControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_CROP_VERTICAL);
+      HideControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_CROP_HORIZONTAL);
+      HideControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_CROP_VERTICAL_LABEL);
+      HideControl(GetID, (int)Controls.OSD_VIDEO_POSTPROC_CROP_HORIZONTAL_LABEL);
+
       ToggleButton((int)Controls.OSD_MUTE, false);
       ToggleButton((int)Controls.OSD_SUBTITLES, false);
       ToggleButton((int)Controls.OSD_BOOKMARKS, false);
@@ -1413,6 +1543,8 @@ namespace TvPlugin
       ToggleButton((int)Controls.OSD_STOP, false); // buttons back to
       ToggleButton((int)Controls.OSD_SKIPFWD, false); // their up state
       ToggleButton((int)Controls.OSD_MUTE, false); // their up state
+
+      //ShowControl(GetID, (int)Controls.OSD_VIDEOPROGRESS);
     }
 
     public override bool NeedRefresh()
@@ -1425,6 +1557,45 @@ namespace TvPlugin
       return false;
     }
 
+    private void Get_TimeInfo()
+    {
+      string strTime = "";
+      if (!g_Player.IsTVRecording)
+      {
+        string strChannel = GetChannelName();
+        strTime = strChannel;
+        Program prog = TVHome.Navigator.Channel.CurrentProgram;
+        if (prog != null)
+        {
+          strTime = String.Format("{0}-{1}",
+                                  prog.StartTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat),
+                                  prog.EndTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat));
+        }
+      }
+      else
+      {
+        long currentPosition = (long)(g_Player.CurrentPosition);
+        int hh = (int)(currentPosition / 3600) % 100;
+        int mm = (int)((currentPosition / 60) % 60);
+        int ss = (int)((currentPosition / 1) % 60);
+        DateTime startTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, hh, mm, ss);
+
+        long duration = (long)(g_Player.Duration);
+        hh = (int)(duration / 3600) % 100;
+        mm = (int)((duration / 60) % 60);
+        ss = (int)((duration / 1) % 60);
+        DateTime endTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, hh, mm, ss);
+
+        strTime = String.Format("{0}-{1}",
+                                startTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat),
+                                endTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat));
+      }
+      GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_LABEL_SET, GetID, 0, (int)Controls.OSD_TIMEINFO, 0,
+                                      0, null);
+      msg.Label = strTime;
+      OnMessage(msg); // ask our label to update it's caption
+    }
+
     private void OnPreviousChannel()
     {
       Log.Debug("GUITV OSD: OnPreviousChannel");
@@ -1457,7 +1628,6 @@ namespace TvPlugin
       ShowPrograms();
     }
 
-
     private void SetCurrentChannelLogo()
     {
       string strChannel = GetChannelName();
@@ -1742,6 +1912,7 @@ namespace TvPlugin
         if (updateProperties)
         {
           GUIPropertyManager.SetProperty("#TV.View.channel", prog.ReferencedChannel().DisplayName);
+	  GUIPropertyManager.SetProperty("#TV.View.idProgram", prog.idProgram);
           GUIPropertyManager.SetProperty("#TV.View.start",
                                          prog.StartTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat));
           GUIPropertyManager.SetProperty("#TV.View.stop",
@@ -1789,6 +1960,7 @@ namespace TvPlugin
           Get_TimeInfo();
 
           GUIPropertyManager.SetProperty("#TV.View.channel", channelDisplayName);
+	  GUIPropertyManager.SetProperty("#TV.View.idProgram", 0);
           GUIPropertyManager.SetProperty("#TV.View.start", startTime);
           GUIPropertyManager.SetProperty("#TV.View.stop", endTime);
           GUIPropertyManager.SetProperty("#TV.View.genre", rec.Genre);
