/
GUIInfoManager.cpp
11052 lines (10714 loc) · 431 KB
/
GUIInfoManager.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright (C) 2005-2013 Team XBMC
* http://xbmc.org
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This Program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XBMC; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
*
*/
#include "network/Network.h"
#include "system.h"
#include "CompileInfo.h"
#include "GUIInfoManager.h"
#include "view/GUIViewState.h"
#include "windows/GUIMediaWindow.h"
#include "dialogs/GUIDialogKeyboardGeneric.h"
#include "dialogs/GUIDialogNumeric.h"
#include "dialogs/GUIDialogProgress.h"
#include "Application.h"
#include "Util.h"
#include "utils/URIUtils.h"
#include "utils/Weather.h"
#include "PartyModeManager.h"
#include "addons/Visualisation.h"
#include "input/ButtonTranslator.h"
#include "utils/AlarmClock.h"
#include "LangInfo.h"
#include "utils/SystemInfo.h"
#include "guilib/GUITextBox.h"
#include "guilib/GUIControlGroupList.h"
#include "pictures/GUIWindowSlideShow.h"
#include "pictures/PictureInfoTag.h"
#include "music/tags/MusicInfoTag.h"
#include "guilib/IGUIContainer.h"
#include "guilib/GUIWindowManager.h"
#include "PlayListPlayer.h"
#include "playlists/PlayList.h"
#include "profiles/ProfilesManager.h"
#include "windowing/WindowingFactory.h"
#include "powermanagement/PowerManager.h"
#include "settings/AdvancedSettings.h"
#include "settings/DisplaySettings.h"
#include "settings/MediaSettings.h"
#include "settings/Settings.h"
#include "settings/SkinSettings.h"
#include "guilib/LocalizeStrings.h"
#include "guilib/StereoscopicsManager.h"
#include "utils/CharsetConverter.h"
#include "utils/CPUInfo.h"
#include "utils/SortUtils.h"
#include "utils/StringUtils.h"
#include "utils/MathUtils.h"
#include "utils/SeekHandler.h"
#include "URL.h"
#include "addons/Skin.h"
#include <algorithm>
#include <functional>
#include <iterator>
#include <memory>
#include "cores/DataCacheCore.h"
#include "guiinfo/GUIInfoLabels.h"
#include "messaging/ApplicationMessenger.h"
// stuff for current song
#include "music/MusicInfoLoader.h"
#include "GUIUserMessages.h"
#include "video/dialogs/GUIDialogVideoInfo.h"
#include "music/dialogs/GUIDialogMusicInfo.h"
#include "storage/MediaManager.h"
#include "utils/TimeUtils.h"
#include "threads/SingleLock.h"
#include "utils/log.h"
#include "pvr/PVRManager.h"
#include "pvr/channels/PVRChannelGroupsContainer.h"
#include "pvr/channels/PVRRadioRDSInfoTag.h"
#include "epg/EpgContainer.h"
#include "pvr/recordings/PVRRecording.h"
#include "addons/AddonManager.h"
#include "interfaces/info/InfoBool.h"
#include "video/VideoThumbLoader.h"
#include "music/MusicThumbLoader.h"
#include "video/VideoDatabase.h"
#include "cores/IPlayer.h"
#include "cores/AudioEngine/Engines/ActiveAE/AudioDSPAddons/ActiveAEDSP.h"
#include "cores/AudioEngine/Utils/AEUtil.h"
#include "cores/VideoPlayer/VideoRenderers/BaseRenderer.h"
#include "interfaces/info/InfoExpression.h"
#if defined(TARGET_DARWIN_OSX)
#include "platform/darwin/osx/smc.h"
#include "linux/LinuxResourceCounter.h"
static CLinuxResourceCounter m_resourceCounter;
#endif
#ifdef TARGET_POSIX
#include "linux/XMemUtils.h"
#endif
#define SYSHEATUPDATEINTERVAL 60000
using namespace XFILE;
using namespace MUSIC_INFO;
using namespace ADDON;
using namespace PVR;
using namespace INFO;
using namespace EPG;
class CSetCurrentItemJob : public CJob
{
CFileItemPtr m_itemCurrentFile;
public:
CSetCurrentItemJob(const CFileItemPtr item) : m_itemCurrentFile(item) { }
~CSetCurrentItemJob(void) {}
bool DoWork(void)
{
g_infoManager.SetCurrentItemJob(m_itemCurrentFile);
return true;
}
};
CGUIInfoManager::CGUIInfoManager(void) :
Observable()
{
m_lastSysHeatInfoTime = -SYSHEATUPDATEINTERVAL; // make sure we grab CPU temp on the first pass
m_fanSpeed = 0;
m_AfterSeekTimeout = 0;
m_seekOffset = 0;
m_nextWindowID = WINDOW_INVALID;
m_prevWindowID = WINDOW_INVALID;
m_stringParameters.push_back("__ZZZZ__"); // to offset the string parameters by 1 to assure that all entries are non-zero
m_currentFile = new CFileItem;
m_currentSlide = new CFileItem;
m_frameCounter = 0;
m_lastFPSTime = 0;
m_playerShowTime = false;
m_playerShowInfo = false;
m_fps = 0.0f;
ResetLibraryBools();
}
CGUIInfoManager::~CGUIInfoManager(void)
{
delete m_currentFile;
delete m_currentSlide;
}
bool CGUIInfoManager::OnMessage(CGUIMessage &message)
{
if (message.GetMessage() == GUI_MSG_NOTIFY_ALL)
{
if (message.GetParam1() == GUI_MSG_UPDATE_ITEM && message.GetItem())
{
CFileItemPtr item = std::static_pointer_cast<CFileItem>(message.GetItem());
if (m_currentFile->IsSamePath(item.get()))
{
m_currentFile->UpdateInfo(*item);
return true;
}
}
}
return false;
}
/// \brief Translates a string as given by the skin into an int that we use for more
/// efficient retrieval of data. Can handle combined strings on the form
/// Player.Caching + VideoPlayer.IsFullscreen (Logical and)
/// Player.HasVideo | Player.HasAudio (Logical or)
int CGUIInfoManager::TranslateString(const std::string &condition)
{
// translate $LOCALIZE as required
std::string strCondition(CGUIInfoLabel::ReplaceLocalize(condition));
return TranslateSingleString(strCondition);
}
typedef struct
{
const char *str;
int val;
} infomap;
/// \page modules__General__List_of_gui_access List of GUI access messages
/// \tableofcontents
///
/// \section modules__General__List_of_gui_access_Description Description
/// Skins can use boolean conditions with the <b><visible></b> tag or with condition
/// attributes. Scripts can read boolean conditions with
/// <b>xbmc.getCondVisibility(condition)</b>.
///
/// Skins can use infolabels with <b>$INFO[infolabel]</b> or the <b><info></b> tag. Scripts
/// can read infolabels with <b>xbmc.getInfoLabel('infolabel')</b>.
const infomap string_bools[] = {{ "isempty", STRING_IS_EMPTY },
{ "isequal", STRING_IS_EQUAL },
{ "startswith", STRING_STARTS_WITH },
{ "endswith", STRING_ENDS_WITH },
{ "contains", STRING_CONTAINS }};
const infomap integer_bools[] = {{ "isequal", INTEGER_IS_EQUAL },
{ "isgreater", INTEGER_GREATER_THAN },
{ "isgreaterorequal", INTEGER_GREATER_OR_EQUAL },
{ "isless", INTEGER_LESS_THAN },
{ "islessorequal", INTEGER_LESS_OR_EQUAL }};
/// \page modules__General__List_of_gui_access
/// \section modules__General__List_of_gui_access_Player Player
/// @{
/// \table_start
/// \table_h3{ Labels, Type, Description }
/// \table_row3{ <b>`Player.HasAudio`</b>,
/// \anchor Player_HasAudio
/// _boolean_,
/// Returns true if the player has an audio file.
/// }
/// \table_row3{ <b>`Player.HasMedia`</b>,
/// \anchor Player_HasMedia
/// _boolean_,
/// Returns true if the player has an audio or video file.
/// }
/// \table_row3{ <b>`Player.HasVideo`</b>,
/// \anchor Player_HasVideo
/// _boolean_,
/// Returns true if the player has a video file.
/// }
/// \table_row3{ <b>`Player.Paused`</b>,
/// \anchor Player_Paused
/// _boolean_,
/// Returns true if the player is paused.
/// }
/// \table_row3{ <b>`Player.Playing`</b>,
/// \anchor Player_Playing
/// _boolean_,
/// Returns true if the player is currently playing (ie not ffwding\,
/// rewinding or paused.)
/// }
/// \table_row3{ <b>`Player.Rewinding`</b>,
/// \anchor Player_Rewinding
/// _boolean_,
/// Returns true if the player is rewinding.
/// }
/// \table_row3{ <b>`Player.Rewinding2x`</b>,
/// \anchor Player_Rewinding2x
/// _boolean_,
/// Returns true if the player is rewinding at 2x.
/// }
/// \table_row3{ <b>`Player.Rewinding4x`</b>,
/// \anchor Player_Rewinding4x
/// _boolean_,
/// Returns true if the player is rewinding at 4x.
/// }
/// \table_row3{ <b>`Player.Rewinding8x`</b>,
/// \anchor Player_Rewinding8x
/// _boolean_,
/// Returns true if the player is rewinding at 8x.
/// }
/// \table_row3{ <b>`Player.Rewinding16x`</b>,
/// \anchor Player_Rewinding16x
/// _boolean_,
/// Returns true if the player is rewinding at 16x.
/// }
/// \table_row3{ <b>`Player.Rewinding32x`</b>,
/// \anchor Player_Rewinding32x
/// _boolean_,
/// Returns true if the player is rewinding at 32x.
/// }
/// \table_row3{ <b>`Player.Forwarding`</b>,
/// \anchor Player_Forwarding
/// _boolean_,
/// Returns true if the player is fast forwarding.
/// }
/// \table_row3{ <b>`Player.Forwarding2x`</b>,
/// \anchor Player_Forwarding2x
/// _boolean_,
/// Returns true if the player is fast forwarding at 2x.
/// }
/// \table_row3{ <b>`Player.Forwarding4x`</b>,
/// \anchor Player_Forwarding4x
/// _boolean_,
/// Returns true if the player is fast forwarding at 4x.
/// }
/// \table_row3{ <b>`Player.Forwarding8x`</b>,
/// \anchor Player_Forwarding8x
/// _boolean_,
/// Returns true if the player is fast forwarding at 8x.
/// }
/// \table_row3{ <b>`Player.Forwarding16x`</b>,
/// \anchor Player_Forwarding16x
/// _boolean_,
/// Returns true if the player is fast forwarding at 16x.
/// }
/// \table_row3{ <b>`Player.Forwarding32x`</b>,
/// \anchor Player_Forwarding32x
/// _boolean_,
/// Returns true if the player is fast forwarding at 32x.
/// }
/// \table_row3{ <b>`Player.CanRecord`</b>,
/// \anchor Player_CanRecord
/// _boolean_,
/// Returns true if the player can record the current internet stream.
/// }
/// \table_row3{ <b>`Player.Recording`</b>,
/// \anchor Player_Recording
/// _boolean_,
/// Returns true if the player is recording the current internet stream.
/// }
/// \table_row3{ <b>`Player.Caching`</b>,
/// \anchor Player_Caching
/// _boolean_,
/// Returns true if the player is current re-caching data (internet based
/// video playback).
/// }
/// \table_row3{ <b>`Player.DisplayAfterSeek`</b>,
/// \anchor Player_DisplayAfterSeek
/// _boolean_,
/// Returns true for the first 2.5 seconds after a seek.
/// }
/// \table_row3{ <b>`Player.Seekbar`</b>,
/// \anchor Player_Seekbar
/// _integer_,
/// Returns amount of percent of one seek to other position
/// }
/// \table_row3{ <b>`Player.Seeking`</b>,
/// \anchor Player_Seeking
/// _boolean_,
/// Returns true if a seek is in progress
/// }
/// \table_row3{ <b>`Player.ShowTime`</b>,
/// \anchor Player_ShowTime
/// _boolean_,
/// Returns true if the user has requested the time to show (occurs in video
/// fullscreen)
/// }
/// \table_row3{ <b>`Player.ShowInfo`</b>,
/// \anchor Player_ShowInfo
/// _boolean_,
/// Returns true if the user has requested the song info to show (occurs in
/// visualisation fullscreen and slideshow)
/// }
/// \table_row3{ <b>`Player.ShowCodec`</b>,
/// \anchor Player_ShowCodec
/// _boolean_,
/// Returns true if the user has requested the codec to show (occurs in
/// visualisation and video fullscreen)
/// }
/// \table_row3{ <b>`Player.Title`</b>,
/// \anchor Player_Title
/// _boolean_,
/// Returns the musicplayer title for audio and the videoplayer title for
/// videos.
/// }
/// \table_row3{ <b>`Player.Muted`</b>,
/// \anchor Player_Muted
/// _boolean_,
/// Returns true if the volume is muted.
/// }
/// \table_row3{ <b>`Player.HasDuration`</b>,
/// \anchor Player_HasDuration
/// _boolean_,
/// Returns true if Media isn't a true stream
/// }
/// \table_row3{ <b>`Player.Passthrough`</b>,
/// \anchor Player_Passthrough
/// _boolean_,
/// Returns true if the player is using audio passthrough.
/// }
/// \table_row3{ <b>`Player.CacheLevel`</b>,
/// \anchor Player_CacheLevel
/// _string_,
/// Get the used cache level as string with an integer number
/// }
/// \table_row3{ <b>`Player.Progress`</b>,
/// \anchor Player_Progress
/// _integer_,
/// Returns the progress position as percent
/// }
/// \table_row3{ <b>`Player.ProgressCache`</b>,
/// \anchor Player_ProgressCache
/// _boolean_,
/// Shows how much of the file is cached above current play percentage
/// }
/// \table_row3{ <b>`Player.Volume`</b>,
/// \anchor Player_Volume
/// _string_,
/// Returns the current player volume with the format `%2.1f dB`
/// }
/// \table_row3{ <b>`Player.SubtitleDelay`</b>,
/// \anchor Player_SubtitleDelay
/// _string_,
/// Return the used subtitle delay with the format `%2.3f s`
/// }
/// \table_row3{ <b>`Player.AudioDelay`</b>,
/// \anchor Player_AudioDelay
/// _string_,
/// Return the used audio delay with the format `%2.3f s`
/// }
/// \table_row3{ <b>`Player.Chapter`</b>,
/// \anchor Player_Chapter
/// _integer_,
/// Current chapter of current playing media
/// }
/// \table_row3{ <b>`Player.ChapterCount`</b>,
/// \anchor Player_ChapterCount
/// _integer_,
/// Total number of chapters of current playing media
/// }
/// \table_row3{ <b>`Player.ChapterName`</b>,
/// \anchor Player_ChapterName
/// _string_,
/// Return the name of currently used chapter if available
/// }
/// \table_row3{ <b>`Player.Folderpath`</b>,
/// \anchor Player_Folderpath
/// _path_,
/// Shows the full path of the currently playing song or movie
/// }
/// \table_row3{ <b>`Player.FilenameAndPath`</b>,
/// \anchor FilenameAndPath
/// _boolean_,
/// Shows the full path with filename of the currently playing song or movie
/// }
/// \table_row3{ <b>`Player.Filename`</b>,
/// \anchor Player_Filename
/// _path_,
/// Returns the filename of the currently playing media.
/// }
/// \table_row3{ <b>`Player.IsInternetStream`</b>,
/// \anchor Player_IsInternetStream
/// _boolean_,
/// Returns true if the player is playing an internet stream.
/// }
/// \table_row3{ <b>`Player.PauseEnabled`</b>,
/// \anchor Player_PauseEnabled
/// _boolean_,
/// Returns true if played stream is paused
/// }
/// \table_row3{ <b>`Player.SeekEnabled`</b>,
/// \anchor Player_SeekEnabled
/// _boolean_,
/// Returns true if seek on playing is enabled
/// }
/// \table_row3{ <b>`Player.ChannelPreviewActive`</b>,
/// \anchor Player_ChannelPreviewActive
/// _boolean_,
/// Returns true if pvr channel preview is active (used channel tag different
/// from played tag)
/// }
/// \table_end
/// @}
const infomap player_labels[] = {{ "hasmedia", PLAYER_HAS_MEDIA }, // bools from here
{ "hasaudio", PLAYER_HAS_AUDIO },
{ "hasvideo", PLAYER_HAS_VIDEO },
{ "playing", PLAYER_PLAYING },
{ "paused", PLAYER_PAUSED },
{ "rewinding", PLAYER_REWINDING },
{ "forwarding", PLAYER_FORWARDING },
{ "rewinding2x", PLAYER_REWINDING_2x },
{ "rewinding4x", PLAYER_REWINDING_4x },
{ "rewinding8x", PLAYER_REWINDING_8x },
{ "rewinding16x", PLAYER_REWINDING_16x },
{ "rewinding32x", PLAYER_REWINDING_32x },
{ "forwarding2x", PLAYER_FORWARDING_2x },
{ "forwarding4x", PLAYER_FORWARDING_4x },
{ "forwarding8x", PLAYER_FORWARDING_8x },
{ "forwarding16x", PLAYER_FORWARDING_16x },
{ "forwarding32x", PLAYER_FORWARDING_32x },
{ "canrecord", PLAYER_CAN_RECORD },
{ "recording", PLAYER_RECORDING },
{ "displayafterseek", PLAYER_DISPLAY_AFTER_SEEK },
{ "caching", PLAYER_CACHING },
{ "seekbar", PLAYER_SEEKBAR },
{ "seeking", PLAYER_SEEKING },
{ "showtime", PLAYER_SHOWTIME },
{ "showcodec", PLAYER_SHOWCODEC },
{ "showinfo", PLAYER_SHOWINFO },
{ "title", PLAYER_TITLE },
{ "muted", PLAYER_MUTED },
{ "hasduration", PLAYER_HASDURATION },
{ "passthrough", PLAYER_PASSTHROUGH },
{ "cachelevel", PLAYER_CACHELEVEL }, // labels from here
{ "progress", PLAYER_PROGRESS },
{ "progresscache", PLAYER_PROGRESS_CACHE },
{ "volume", PLAYER_VOLUME },
{ "subtitledelay", PLAYER_SUBTITLE_DELAY },
{ "audiodelay", PLAYER_AUDIO_DELAY },
{ "chapter", PLAYER_CHAPTER },
{ "chaptercount", PLAYER_CHAPTERCOUNT },
{ "chaptername", PLAYER_CHAPTERNAME },
{ "folderpath", PLAYER_PATH },
{ "filenameandpath", PLAYER_FILEPATH },
{ "filename", PLAYER_FILENAME },
{ "isinternetstream", PLAYER_ISINTERNETSTREAM },
{ "pauseenabled", PLAYER_CAN_PAUSE },
{ "seekenabled", PLAYER_CAN_SEEK },
{ "channelpreviewactive", PLAYER_IS_CHANNEL_PREVIEW_ACTIVE},
{ "tempoenabled", PLAYER_SUPPORTS_TEMPO},
{ "istempo", PLAYER_IS_TEMPO},
{ "playspeed", PLAYER_PLAYSPEED}};
/// \page modules__General__List_of_gui_access
/// @{
/// \table_start
/// \table_row3{ <b>`Player.Art(fanart)`</b>,
/// \anchor Player_Art_fanart
/// _string_,
/// Fanart Image of the currently playing episode's parent TV show
/// }
/// \table_row3{ <b>`Player.Art(thumb)`</b>,
/// \anchor Player_Art_thumb
/// _string_,
/// Returns the thumbnail image of the currently playing item.
/// }
/// \table_row3{ <b>`Player.Art(poster)`</b>,
/// \anchor Player_Art_poster
/// _string_,
/// Returns the poster of the currently playing movie.
/// }
/// \table_row3{ <b>`Player.Art(tvshow.poster)`</b>,
/// \anchor Player_Art_tvshowposter
/// _string_,
/// Returns the tv show poster of the currently playing episode's parent TV show.
/// }
/// \table_row3{ <b>`Player.Art(tvshow.banner)`</b>,
/// \anchor Player_Art_tvshowbanner
/// _string_,
/// Returns the tv show banner of the currently playing episode's parent TV show.
/// }
/// \table_end
/// @}
const infomap player_param[] = {{ "art", PLAYER_ITEM_ART }};
/// \page modules__General__List_of_gui_access
/// @{
/// \table_start
/// \table_row3{ <b>`Player.SeekTime`</b>,
/// \anchor Player_SeekTime
/// _string_,
/// Time to which the user is seeking
/// }
/// \table_row3{ <b>`Player.SeekOffset`</b>,
/// \anchor Player_SeekOffset
/// _string_,
/// Indicates the seek offset after a seek press (eg user presses
/// BigStepForward\, player.seekoffset returns +10:00)
/// }
/// \table_row3{ <b>`Player.SeekOffset(format)`</b>,
/// \anchor Player_SeekOffset_format
/// _string_,
/// Shows hours (hh)\, minutes (mm) or seconds (ss). Also supported: (hh:mm)\,
/// (mm:ss)\, (hh:mm:ss)\, (hh:mm:ss).
/// }
/// \table_row3{ <b>`Player.SeekStepSize`</b>,
/// \anchor Player_SeekStepSize
/// _string_,
/// Displays the seek step size. (v15 addition)
/// }
/// \table_row3{ <b>`Player.TimeRemaining`</b>,
/// \anchor Player_TimeRemaining
/// _string_,
/// Remaining time of current playing media
/// }
/// \table_row3{ <b>`Player.TimeRemaining(format)`</b>,
/// \anchor Player_TimeRemaining_format
/// _string_,
/// Shows hours (hh)\, minutes (mm) or seconds (ss). When 12 hour clock is
/// used (xx) will return AM/PM. Also supported: (hh:mm)\, (mm:ss)\,
/// (hh:mm:ss)\, (hh:mm:ss).
/// }
/// \table_row3{ <b>`Player.TimeSpeed`</b>,
/// \anchor Player_TimeSpeed
/// _string_,
/// Both the time and the playspeed formatted up. eg 1:23 (2x)
/// }
/// \table_row3{ <b>`Player.Time`</b>,
/// \anchor Player_Time
/// _string_,
/// Elapsed time of current playing media
/// }
/// \table_row3{ <b>`Player.Time(format)`</b>,
/// \anchor Player_Time_format
/// _string_,
/// Shows hours (hh)\, minutes (mm) or seconds (ss). When 12 hour clock is
/// used (xx) will return AM/PM. Also supported: (hh:mm)\, (mm:ss)\,
/// (hh:mm:ss)\, (hh:mm:ss).
/// }
/// \table_row3{ <b>`Player.Duration`</b>,
/// \anchor Player_Duration
/// _string_,
/// Total duration of the current playing media
/// }
/// \table_row3{ <b>`Player.Duration(format)`</b>,
/// \anchor Player_Duration_format
/// _string_,
/// Shows hours (hh)\, minutes (mm) or seconds (ss). When 12 hour clock is used
/// (xx) will return AM/PM. Also supported: (hh:mm)\, (mm:ss)\, (hh:mm:ss)\,
/// (hh:mm:ss).
/// }
/// \table_row3{ <b>`Player.FinishTime`</b>,
/// \anchor Player_FinishTime
/// _string_,
/// Time playing media will end
/// }
/// \table_row3{ <b>`Player.FinishTime(format)`</b>,
/// \anchor Player_FinishTime_format
/// _string_,
/// Shows hours (hh)\, minutes (mm) or seconds (ss). When 12 hour clock is
/// used (xx) will return AM/PM. Also supported: (hh:mm)\, (mm:ss)\,
/// (hh:mm:ss)\, (hh:mm:ss).
/// }
/// \table_end
///
/// -----------------------------------------------------------------------------
/// @}
const infomap player_times[] = {{ "seektime", PLAYER_SEEKTIME },
{ "seekoffset", PLAYER_SEEKOFFSET },
{ "seekstepsize", PLAYER_SEEKSTEPSIZE },
{ "timeremaining", PLAYER_TIME_REMAINING },
{ "timespeed", PLAYER_TIME_SPEED },
{ "time", PLAYER_TIME },
{ "duration", PLAYER_DURATION },
{ "finishtime", PLAYER_FINISH_TIME },
{ "starttime", PLAYER_START_TIME}};
/// \page modules__General__List_of_gui_access
/// \section modules__General__List_of_gui_access_Weather Weather
/// @{
/// \table_start
/// \table_h3{ Labels, Type, Description }
/// \table_row3{ <b>`Weather.IsFetched`</b>,
/// \anchor Weather_IsFetched
/// _boolean_,
/// Returns true if the weather data has been downloaded.
/// }
/// \table_row3{ <b>`Weather.Conditions`</b>,
/// \anchor Weather_Conditions
/// _string_,
/// Current weather conditions – this is looked up in a background process.
/// }
/// \table_row3{ <b>`Weather.Temperature`</b>,
/// \anchor Weather_Temperature
/// _string_,
/// Current weather temperature
/// }
/// \table_row3{ <b>`Weather.Location`</b>,
/// \anchor Weather_Location
/// _string_,
/// City/town which the above two items are for
/// }
/// \table_row3{ <b>`Weather.fanartcode`</b>,
/// \anchor Weather_fanartcode
/// _string_,
/// Current weather fanartcode.
/// }
/// \table_row3{ <b>`Weather.plugin`</b>,
/// \anchor Weather_plugin
/// _string_,
/// Current weather plugin.
/// }
/// \table_end
///
/// -----------------------------------------------------------------------------
/// @}
const infomap weather[] = {{ "isfetched", WEATHER_IS_FETCHED },
{ "conditions", WEATHER_CONDITIONS }, // labels from here
{ "temperature", WEATHER_TEMPERATURE },
{ "location", WEATHER_LOCATION },
{ "fanartcode", WEATHER_FANART_CODE },
{ "plugin", WEATHER_PLUGIN }};
/// \page modules__General__List_of_gui_access
/// \section modules__General__List_of_gui_access_System System
/// @{
/// \table_start
/// \table_h3{ Labels, Type, Description }
/// \table_row3{ <b>`System.AlarmLessOrEqual(alarmname\,seconds)`</b>,
/// \anchor System_AlarmLessOrEqual
/// _boolean_,
/// Returns true if the alarm with `alarmname` has less or equal to `seconds`
/// left. Standard use would be system.alarmlessorequal(shutdowntimer\,119)\,
/// which would return true when the shutdowntimer has less then 2 minutes
/// left.
/// }
/// \table_row3{ <b>`System.HasNetwork`</b>,
/// \anchor System_HasNetwork
/// _boolean_,
/// Returns true if the ethernet cable is plugged in.
/// }
/// \table_row3{ <b>`System.HasMediadvd`</b>,
/// \anchor System_HasMediadvd
/// _boolean_,
/// Returns true if there is a CD or DVD in the DVD-ROM drive.
/// }
/// \table_row3{ <b>`System.DVDReady`</b>,
/// \anchor System_DVDReady
/// _boolean_,
/// Returns true if disc is ready to use.
/// }
/// \table_row3{ <b>`System.TrayOpen`</b>,
/// \anchor System_TrayOpen
/// _boolean_,
/// Returns true if discs tray is open
/// }
/// \table_row3{ <b>`System.HasLocks`</b>,
/// \anchor System_HasLocks
/// _boolean_,
/// Todo
/// }
/// \table_row3{ <b>`System.IsMaster`</b>,
/// \anchor System_IsMaster
/// _boolean_,
/// Todo
/// }
/// \table_row3{ <b>`System.ShowExitButton`</b>,
/// \anchor System_ShowExitButton
/// _boolean_,
/// Todo
/// }
/// \table_row3{ <b>`System.DPMSActive`</b>,
/// \anchor System_DPMSActive
/// _boolean_,
/// Todo
/// }
/// \table_row3{ <b>`System.IdleTime(time)`</b>,
/// \anchor System_IdleTime
/// _boolean_,
/// Returns true if Kodi has had no input for ?time? amount of seconds.
/// }
/// \table_row3{ <b>`System.IsStandalone`</b>,
/// \anchor System_IsStandalone
/// _boolean_,
/// Returns true if Kodi is running in standalone mode.
/// }
/// \table_row3{ <b>`System.IsFullscreen`</b>,
/// \anchor System_IsFullscreen
/// _boolean_,
/// Returns true if Kodi is running fullscreen.
/// }
/// \table_row3{ <b>`System.LoggedOn`</b>,
/// \anchor System_LoggedOn
/// _boolean_,
/// Returns true if a user is currently logged on under a profile
/// }
/// \table_row3{ <b>`System.HasLoginScreen`</b>,
/// \anchor System_HasLoginScreen
/// _boolean_,
/// Returns true if the profile login screen is enabled
/// }
/// \table_row3{ <b>`System.HasPVR`</b>,
/// \anchor System_HasPVR
/// _boolean_,
/// Returns true if PVR is supported from Kodi
/// \note normally always true
/// }
/// \table_row3{ <b>`System.HasADSP`</b>,
/// \anchor System_HasADSP
/// _boolean_,
/// Returns true if ADSP is supported from Kodi
/// \note normally always true
/// }
/// \table_row3{ <b>`System.HasCMS`</b>,
/// \anchor System_HasCMS
/// _boolean_,
/// Returns true if colour management is supported from Kodi
/// \note currently only supported for OpenGL
/// }
/// \table_row3{ <b>`System.HasModalDialog`</b>,
/// \anchor System_HasModalDialog
/// _boolean_,
/// Returns true true if a modal dialog is visible
/// }
/// \table_row3{ <b>`System.Time(startTime\,endTime)`</b>,
/// \anchor System_Time
/// _boolean_,
/// Returns true if the current system time is >= startTime and < endTime.
/// endTime is optional. Time must be specified in the format HH:mm\, using
/// a 24 hour clock.
/// }
/// \table_row3{ <b>`System.Date(startDate\,endDate)`</b>,
/// \anchor System_Date
/// _boolean_,
/// Returns true if the current system date is >= startDate and < endDate.
/// endDate is optional. Date must be specified in the format MM-DD.
/// }
/// \table_row3{ <b>`System.Platform.Linux`</b>,
/// \anchor System_PlatformLinux
/// _boolean_,
/// Returns true if Kodi is running on a linux/unix based computer.
/// }
/// \table_row3{ <b>`System.Platform.Linux.RaspberryPi`</b>,
/// \anchor System_PlatformLinuxRaspberryPi
/// _boolean_,
/// Returns true if Kodi is running on a Raspberry Pi.
/// }
/// \table_row3{ <b>`System.Platform.Windows`</b>,
/// \anchor System_PlatformWindows
/// _boolean_,
/// Returns true if Kodi is running on a windows based computer.
/// }
/// \table_row3{ <b>`System.Platform.OSX`</b>,
/// \anchor System_PlatformOSX
/// _boolean_,
/// Returns true if Kodi is running on an OSX based computer.
/// }
/// \table_row3{ <b>`System.Platform.IOS`</b>,
/// \anchor System_PlatformIOS
/// _boolean_,
/// Returns true if Kodi is running on an IOS device.
/// }
/// \table_row3{ <b>`System.Platform.Darwin`</b>,
/// \anchor System_PlatformDarwin
/// _boolean_,
/// Returns true if Kodi is running on an OSX or IOS system.
/// }
/// \table_row3{ <b>`System.Platform.ATV2`</b>,
/// \anchor System_PlatformATV2
/// _boolean_,
/// Returns true if Kodi is running on an atv2.
/// }
/// \table_row3{ <b>`System.Platform.Android`</b>,
/// \anchor System_PlatformAndroid
/// _boolean_,
/// Returns true if Kodi is running on an android device.
/// }
/// \table_row3{ <b>`System.CanPowerDown`</b>,
/// \anchor System_CanPowerDown
/// _boolean_,
/// Returns true if Kodi can powerdown the system.
/// }
/// \table_row3{ <b>`System.CanSuspend`</b>,
/// \anchor System_CanSuspend
/// _boolean_,
/// Returns true if Kodi can suspend the system.
/// }
/// \table_row3{ <b>`System.CanHibernate`</b>,
/// \anchor System_CanHibernate
/// _boolean_,
/// Returns true if Kodi can hibernate the system.
/// }
/// \table_row3{ <b>`System.HasHiddenInput`</b>,
/// \anchor System_HasHiddenInput
/// _boolean_,
/// Return true when to osd keyboard/numeric dialog requests a
/// password/pincode.
/// }
/// \table_row3{ <b>`System.CanReboot`</b>,
/// \anchor System_CanReboot
/// _boolean_,
/// Returns true if Kodi can reboot the system.
/// }
/// \table_row3{ <b>`System.ScreenSaverActive`</b>,
/// \anchor System_ScreenSaverActive
/// _boolean_,
/// Returns true if ScreenSaver is active.
/// }
/// \table_row3{ <b>`System.IsInhibit`</b>,
/// \anchor System_IsInhibit
/// _boolean_,
/// Returns true when shutdown on idle is disabled.
/// }
/// \table_row3{ <b>`System.HasShutdown`</b>,
/// \anchor System_HasShutdown
/// _boolean_,
/// Returns true when shutdown on idle is enabled.
/// }
/// \table_row3{ <b>`System.Time`</b>,
/// \anchor System_Time
/// _string_,
/// Current time
/// }
/// \table_row3{ <b>`System.Time(format)`</b>,
/// \anchor System_Time_format
/// _string_,
/// Shows hours (hh)\, minutes (mm) or seconds (ss). When 12 hour clock is
/// used (xx) will return AM/PM. Also supported: (hh:mm)\, (mm:ss)\,
/// (hh:mm:ss)\, (hh:mm:ss). (xx) option added after dharma
/// }
/// \table_row3{ <b>`System.Date`</b>,
/// \anchor System_Date
/// _string_,
/// Current date
/// }
/// \table_row3{ <b>`System.Date(format)`</b>,
/// \anchor System_Date_format
/// _string_,
/// Show current date using format\, available markings: d (day of month
/// 1-31)\, dd (day of month 01-31)\, ddd (short day of the week Mon-Sun)\,
/// DDD (long day of the week Monday-Sunday)\, m (month 1-12)\, mm (month
/// 01-12)\, mmm (short month name Jan-Dec)\, MMM (long month name January -
/// December)\, yy (2-digit year)\, yyyy (4-digit year). Added after dharma.
/// }
/// \table_row3{ <b>`System.AlarmPos`</b>,
/// \anchor System_AlarmPos
/// _string_,
/// Shutdown Timer position
/// }
/// \table_row3{ <b>`System.BatteryLevel`</b>,
/// \anchor System_BatteryLevel
/// _string_,
/// Returns the remaining battery level in range 0-100
/// }
/// \table_row3{ <b>`System.FreeSpace`</b>,
/// \anchor System_FreeSpace
/// _string_,
/// Total Freespace on the drive
/// }
/// \table_row3{ <b>`System.UsedSpace`</b>,
/// \anchor System_UsedSpace
/// _string_,
/// Total Usedspace on the drive
/// }
/// \table_row3{ <b>`System.TotalSpace`</b>,
/// \anchor System_TotalSpace
/// _string_,
/// Totalspace on the drive
/// }
/// \table_row3{ <b>`System.UsedSpacePercent`</b>,
/// \anchor System_UsedSpacePercent
/// _string_,
/// Total Usedspace Percent on the drive
/// }
/// \table_row3{ <b>`System.FreeSpacePercent`</b>,
/// \anchor System_FreeSpacePercent
/// _string_,
/// Total Freespace Percent on the drive
/// }
/// \table_row3{ <b>`System.CPUTemperature`</b>,
/// \anchor System_CPUTemperature
/// _string_,
/// Current CPU temperature
/// }
/// \table_row3{ <b>`System.CpuUsage`</b>,
/// \anchor System_CpuUsage
/// _string_,
/// Displays the cpu usage for each individual cpu core.
/// }
/// \table_row3{ <b>`System.GPUTemperature`</b>,
/// \anchor System_GPUTemperature
/// _string_,
/// Current GPU temperature
/// }
/// \table_row3{ <b>`System.FanSpeed`</b>,
/// \anchor System_FanSpeed
/// _string_,
/// Current fan speed
/// }
/// \table_row3{ <b>`System.BuildVersion`</b>,
/// \anchor System_BuildVersion
/// _string_,
/// Version of build
/// }
/// \table_row3{ <b>`System.BuildVersionShort`</b>,
/// \anchor System_BuildVersionShort
/// _string_,
/// Shorter string with version of build
/// }
/// \table_row3{ <b>`System.BuildDate`</b>,
/// \anchor System_BuildDate
/// _string_,
/// Date of build
/// }
/// \table_row3{ <b>`System.FriendlyName`</b>,
/// \anchor System_FriendlyName
/// _string_,
/// Returns the Kodi instance name. It will auto append (%hostname%) in case
/// the device name was not changed. eg. "Kodi (htpc)"
/// }
/// \table_row3{ <b>`System.FPS`</b>,
/// \anchor System_FPS
/// _string_,
/// Current rendering speed (frames per second)
/// }
/// \table_row3{ <b>`System.FreeMemory`</b>,
/// \anchor System_FreeMemory
/// _string_,
/// Amount of free memory in Mb
/// }
/// \table_row3{ <b>`System.ScreenMode`</b>,
/// \anchor System_ScreenMode
/// _string_,
/// Screenmode (eg windowed / fullscreen)
/// }
/// \table_row3{ <b>`System.ScreenWidth`</b>,
/// \anchor System_ScreenWidth
/// _string_,
/// Width of screen in pixels
/// }