Skip to content

Commit fd1c2d3

Browse files
committed
Fixed OSD for DefaultWide skin
1 parent fa445a3 commit fd1c2d3

File tree

3 files changed

+66
-4
lines changed

3 files changed

+66
-4
lines changed

ArgusTV.UI.MediaPortal/TvHome.cs

+43-2
Original file line numberDiff line numberDiff line change
@@ -380,21 +380,62 @@ public override void OnAdded()
380380

381381
private static bool ShowFullScreenWindowTVHandler()
382382
{
383+
SetRecordingChaptersAndJumpPoints();
383384
if ((g_Player.IsTV && PluginMain.Navigator.IsLiveStreamOn) || g_Player.IsTVRecording)
384385
{
385386
// watching TV
386-
if (GUIWindowManager.ActiveWindow == (int)GUIWindow.Window.WINDOW_TVFULLSCREEN)
387+
if (GUIWindowManager.ActiveWindow == (int)Window.WINDOW_TVFULLSCREEN)
387388
{
388389
return true;
389390
}
390391
Log.Info("TVHome: ShowFullScreenWindow switching to fullscreen tv");
391-
GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_TVFULLSCREEN);
392+
GUIWindowManager.ActivateWindow((int)Window.WINDOW_TVFULLSCREEN);
392393
GUIGraphicsContext.IsFullScreenVideo = true;
393394
return true;
394395
}
395396
return g_Player.ShowFullScreenWindowTVDefault();
396397
}
397398

399+
internal static void SetRecordingChaptersAndJumpPoints()
400+
{
401+
//push chapter and jumppoint information into the gui property manager
402+
if (g_Player.IsTVRecording && g_Player.HasChapters)
403+
{
404+
double[] chapters = g_Player.Chapters;
405+
double[] jumppoints = g_Player.JumpPoints;
406+
407+
string strChapters = string.Empty;
408+
string strJumpPoints = string.Empty;
409+
410+
double duration = g_Player.Duration;
411+
if (chapters != null)
412+
{
413+
foreach (double chapter in chapters)
414+
{
415+
double chapterPercent = chapter / duration * 100.0d;
416+
strChapters += String.Format("{0:0.00}", chapterPercent) + " ";
417+
}
418+
}
419+
if (jumppoints != null)
420+
{
421+
foreach (double jump in jumppoints)
422+
{
423+
double jumpPercent = jump / duration * 100.0d;
424+
strJumpPoints += String.Format("{0:0.00}", jumpPercent) + " ";
425+
}
426+
}
427+
GUIPropertyManager.SetProperty("#TV.Record.chapters", strChapters);
428+
GUIPropertyManager.SetProperty("#TV.Record.jumppoints", strJumpPoints);
429+
Log.Debug("TVHome.ShowFullScreenWindowTVHandler - setting chapters: " + strChapters);
430+
Log.Debug("TVHome.ShowFUllScreenWindowTVHandler - setting jumppoints: " + strJumpPoints);
431+
}
432+
else
433+
{
434+
GUIPropertyManager.SetProperty("#TV.Record.chapters", string.Empty);
435+
GUIPropertyManager.SetProperty("#TV.Record.jumppoints", string.Empty);
436+
}
437+
}
438+
398439
protected override void OnWindowLoaded()
399440
{
400441
base.OnWindowLoaded();

ArgusTV.UI.MediaPortal/TvRecorded.cs

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public override bool IsTv
8888
///<returns></returns>
8989
private static bool ShowFullScreenWindowTVHandler()
9090
{
91+
TvHome.SetRecordingChaptersAndJumpPoints();
9192
if (g_Player.IsTVRecording)
9293
{
9394
// watching TV

ArgusTV.UI.MediaPortal/skin/DefaultWide/ARGUS_common.window.xml

+22-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,30 @@
99
</description>
1010
<controls>
1111
<control>
12+
<description>BG</description>
1213
<type>image</type>
1314
<id>1</id>
14-
<posX>60</posX>
15-
<posY>30</posY>
15+
<texture>background.png</texture>
16+
<width>1280</width>
17+
<height>720</height>
18+
<visible>skin.hassetting(#skin.no.category.fanart)+!control.isvisible(91919293)+!control.isvisible(91919294)</visible>
19+
</control>
20+
<control>
21+
<description>background top overlay</description>
22+
<type>image</type>
23+
<id>1</id>
24+
<posX>0</posX>
25+
<posY>0</posY>
26+
<width>1280</width>
27+
<height>270</height>
28+
<texture>overlay_top.png</texture>
29+
<colordiffuse>ccffffff</colordiffuse>
30+
</control>
31+
<control>
32+
<type>image</type>
33+
<id>1</id>
34+
<posX>58</posX>
35+
<posY>28</posY>
1636
<width>200</width>
1737
<height>40</height>
1838
<texture>ARGUS_logo.png</texture>

0 commit comments

Comments
 (0)