@@ -380,21 +380,62 @@ public override void OnAdded()
380
380
381
381
private static bool ShowFullScreenWindowTVHandler ( )
382
382
{
383
+ SetRecordingChaptersAndJumpPoints ( ) ;
383
384
if ( ( g_Player . IsTV && PluginMain . Navigator . IsLiveStreamOn ) || g_Player . IsTVRecording )
384
385
{
385
386
// watching TV
386
- if ( GUIWindowManager . ActiveWindow == ( int ) GUIWindow . Window . WINDOW_TVFULLSCREEN )
387
+ if ( GUIWindowManager . ActiveWindow == ( int ) Window . WINDOW_TVFULLSCREEN )
387
388
{
388
389
return true ;
389
390
}
390
391
Log . Info ( "TVHome: ShowFullScreenWindow switching to fullscreen tv" ) ;
391
- GUIWindowManager . ActivateWindow ( ( int ) GUIWindow . Window . WINDOW_TVFULLSCREEN ) ;
392
+ GUIWindowManager . ActivateWindow ( ( int ) Window . WINDOW_TVFULLSCREEN ) ;
392
393
GUIGraphicsContext . IsFullScreenVideo = true ;
393
394
return true ;
394
395
}
395
396
return g_Player . ShowFullScreenWindowTVDefault ( ) ;
396
397
}
397
398
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
+
398
439
protected override void OnWindowLoaded ( )
399
440
{
400
441
base . OnWindowLoaded ( ) ;
0 commit comments