forked from freevo/freevo1
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfreevo_config.py
2394 lines (2060 loc) · 83.9 KB
/
freevo_config.py
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
# -*- coding: iso-8859-1 -*-
# -----------------------------------------------------------------------
# System configuration
# -----------------------------------------------------------------------
# $Id: freevo_config.py 11904 2011-11-12 22:26:54Z adam $
#
# Notes:
# This file contains the freevo settings. To change the settings
# you can edit this file, or better, put a file named local_conf.py
# # in the same directory and add your changes there. E.g.: when
# you # want a alsa as mplayer audio out, just put
# "MPLAYER_AO_DEV = # 'alsa9'" in local_conf.py
#
# This file has the format::
#
# # Note line 1
# # Note line 2
# # Note line n
# VAR = 'default value' # tool tip text
#
# How config files are loaded:
#
# [$freevo-bindir/ is the directory where the freevo start-script is
# located (i.e. the "shipping copy dir"). This can be any directory, e.g.
# the download directory or /usr/local]
#
# [$cwd/ is the directory the user started freevo from. This can be
# $freevo-bindir/, or any other directory]
#
# 1) freevo.conf is not shipped, but it is required and must be generated
# using ./configure before freevo can be used.
#
# 2) freevo.conf is searched for in ['$cwd/', '~/.freevo/',
# '/etc/freevo/', $freevo-bindir/]. The first one found is loaded.
#
# 3) freevo_config.py is always loaded from $freevo-bindir/, it is not
# supposed to be changed by the user. It has a format version number in
# the format "MAJOR.MINOR", e.g. "2.3". The version number reflects the
# config file format, *not* the Freevo version number.
#
# 4) local_conf.py is searched for in ['$cwd/', '~/.freevo',
# '/etc/freevo/', $freevo-bindir/]. The first one found is loaded. It is
# not a required file. The search is independent of where freevo.conf was
# found.
#
# 5) The same logic as in 4) applies for local_skin.xml.
#
# 6) The version MAJOR numbers must match in freevo_config.py and
# local_conf.py, otherwise it is an error.
#
# 7) The version MINOR number is used for backwards-compatible changes,
# i.e. when new options are added that have reasonable default values.
#
# 8) A warning is issued if freevo_config.py.MINOR > local_conf.py.MINOR.
#
# 9) It is an error if local_conf.py.MINOR > freevo_config.py.MINOR since
# the user most likely did not intend to use a recent local_conf.py with
# an old Freevo installation.
#
# 10) There is a list of change descriptions in freevo_config.py,
# one per MAJOR.MINOR change. The user is informed of what has
# changed between his local_conf.py and the new freevo_config.py format if
# they differ in version numbers.
#
#
#
# Developer Notes:
# The CVS log isn't used here. Write changes directly in this file
# to make it easier for the user. Make alos sure that you insert new
# options also in local_conf.py.example
#
# Todo:
# o a nice configure or install script to ask these things
# o different settings for MPG, AVI, VOB, etc
#
# -----------------------------------------------------------------------
#
# Changes:
# o Generate ROM_DRIVES from /etc/fstab on startup
# o Added FREEVO_CONF_VERSION and LOCAL_CONF_VERSION to keep the three
# different files on sync
#
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
# Copyright (C) 2002 Krister Lagerstrom, et al.
# Please see the file freevo/Docs/CREDITS for a complete list of authors.
#
# 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 of the License, 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 MER-
# CHANTABILITY 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 this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# -----------------------------------------------------------------------
import plugin
from event import *
########################################################################
# If you want to change some things for your personal setup, please
# write this in a file called local_conf.py, see that file for more info.
########################################################################
# Version information for the two config files. When the major version
# of the config file doesn't match, Freevo won't start. If the minor version
# is different, there will be only a warning
LOCAL_CONF_VERSION = 5.29
# Description of changes in each new version
FREEVO_CONF_CHANGES = [
(2.0,
"""Changed xmame_SDL to just xmame"""),
(2.1,
"""Added vlc"""),
(2.2,
"""Added unzip"""),
]
LOCAL_CONF_CHANGES = [
(1.1,
"""ROM_DRIVES are autodetected if left empty.
Added AUDIO_RANDOM_PLAYLIST (default on).
Added COVER_DIR for covers for files on CDs etc.
Added AUDIO_COVER_REGEXP for selection of covers for music files.
Changed MPlayer default args.
Changed TV_SETTINGS to /dev/video0."""),
(2.0,
"""Remote control config has changed from Freevo Python files to the
standard Lirc program config files, see freevo_config.py for
more info."""),
(2.1,
"""Added MPLAYER_ARGS_AUDIOCD for audio cd playback settings."""),
(3.0,
"""New skin engine. The new engine has no automatic TV overscan support,
you need to set OSD_OVERSCAN_X and OSD_OVERSCAN_Y. There are also new variables
for this engine: MAIN_MENU_ITEMS and FORCE_SKIN_LAYOUT. The games menu
will be activated automaticly if setup.py found mame or snes"""),
(3.1,
"""Renamed TV_SHOW_IMAGE_DIR to TV_SHOW_DATA_DIR. This directory now can
also contain fxd files with gloabl informations and mplayer options"""),
(3.2,
"""Removed MPLAYER_ARGS_* and added a hash MPLAYER_ARGS to set args for
all different kinds of files. Also added MPLAYER_SOFTWARE_SCALER to use
the software scaler for fast CPUs"""),
(3.3,
"""Added AUDIO_FORMAT_STRING to customize the audio item title generation"""),
(3.4,
"""Removed RC_MPLAYER_CMDS for video and audio. Set special handling (and
other key mappings with the variable EVENTS. See event.py for possible
events"""),
(3.5,
"""Added xine support (see xine section in freevo_config.py),
MPLAYER_AUTOCROP for 16:9 tv sets, ONLY_SCAN_DATADIR to make freevo start
faster and TVGUIDE_HOURS_PER_PAGE customize the tv guide"""),
(3.7,
"""Added USE_MEDIAID_TAG_NAMES as directory based variable and
HIDE_UNUSABLE_DISCS to hide discs in the wrong menus and empty drives"""),
(3.8,
"""Restructured GAMES_ITEMS and added XMLTV_GRABBER and XMLTV_DAYS for the
tv_grab helper script. Also added USE_NETWORK to deactivate everything
that needs a network connection."""),
(3.9,
"""Add MPLAYER_SET_AUDIO_DELAY to correct AV sync problems"""),
(3.91,
"""Add SKIN_FORCE_TEXTVIEW_STYLE and SKIN_MEDIAMENU_FORCE_TEXTVIEW to add
more control when to switch to text view."""),
(4.00,
"""Reworked the directory settings: MOVIE_PLAYLISTS and AUDIO_RANDOM_PLAYLIST
are removed, the new variables to control a directory style are
DIRECTORY_CREATE_PLAYLIST, DIRECTORY_ADD_PLAYLIST_FILES,
DIRECTORY_ADD_RANDOM_PLAYLIST and DIRECTORY_AUTOPLAY_ITEMS. The directory
updated now uses stat, set DIRECTORY_USE_STAT_FOR_CHANGES = 0 if you have
problems with it."""),
(4.01,
"""Removed SUFFIX_VIDEO_FILES and replaced it with SUFFIX_VIDEO_MPLAYER_FILES
and SUFFIX_VIDEO_XINE_FILES. Use PREFERED_VIDEO_PLAYER to choose a prefered
player."""),
(4.02,
"""Added CHILDAPP_DEBUG to debug all kinds of childapps. MPLAYER_DEBUG will be
removed soon. Renamed PREFERED_VIDEO_PLAYER to VIDEO_PREFERED_PLAYER and
added AUDIO_PREFERED_PLAYER."""),
(4.03,
"""Removed MOVIE_DATA_DIR and COVER_DIR. It has been replaved by the new
virtual filesystem controlled by OVERLAY_DIR"""),
(5.00,
"""Changed some config variables. Use \'./freevo convert_config\' to convert
your local_conf.py to change the variable names"""),
(5.01,
"""Add AUDIO_SHOW_VIDEOFILES to enable video files in the audio menu"""),
(5.02,
"""Add XINE_ARGS_DEF to set xine arguments and OSD_BUSYICON_TIMER to show
a busy icon when the menu takes too much time building"""),
(5.03,
"""Add UMASK to set umask for files in vfs""" ),
(5.04,
"""SKIN_XML_FILE set to nothing as default, SKIN_START_LAYOUT is removed.
When SKIN_XML_FILE is not set, the skin will remember the last settings"""),
(5.05,
"""Use MMPYTHON_CREATE_MD5_ID with current mmpython cvs to have a second
way to generate the disc ids in case they are not unique on your system"""),
(5.06,
"""Add MEDIAINFO_USE_MEMORY. Setting this variable will keep all cache
files in memory. Startup will be slower, but for large directories, this
will speed up entering the dir"""),
(5.07,
"""Add MENU_ARROW_NAVIGATION to change navigation style. New one is default
now. Also added OSD_EXTRA_FONT_PATH to search for fonts"""),
(5.08,
"""Change MENU_ARROW_NAVIGATION to old style and make blurr the new default
skin. Also added RESTART_SYS_CMD, OSD_DIM_TEXT and OSD_UPDATE_COMPLETE_REDRAW."""),
(5.09,
"""Add CACHE_IMAGES to turn off image caching. A new variable is
IMAGEVIEWER_BLEND_MODE to control the blending effect in the image viewer"""),
(5.11,
"""Add IMAGEVIEWER_OSD to customize the osd and VIDEO_AUTOJOIN to auto join
movies with more than one file"""),
(5.12,
"""Added TV_RECORD_SERVER_UID to set the uid for the recordserver and
TV_RECORDFILE_SUFFIX for the suffix. If your TV_RECORDFILE_MASK contains
the suffix, please remove it here"""),
(5.13,
"""Added TV_RECORD_SERVER_GID to set the gid for the recordserver. If you
use TV_RECORD_SERVER_UID, the gui _must_ match one of the users gids""" ),
(5.14,
"""Add IMAGEVIEWER_DURATION for auto slideshows""" ),
(5.15,
"""Add two variables for mplayer post processing: MPLAYER_VF_INTERLACED and
MPLAYER_VF_PROGRESSIVE""" ),
(5.16,
"""Removed the recordable setting in VIDEO_GROUPS, please remove this setting.
Added xmltv-1.2 this requires elementtree
Added XINE_HAS_NO_LIRC to see if '--no-lirc' should be passed to xine
Added XINE_TV_VO_DEV, XINE_TV_AO_DEV, and XINE_TV_TIMESHIFT_FILEMASK for the
new tv.ivtv_xine_tv plugin (the latter should be e.g. "/tmp/xine-buf-" and point
to a place with enough free diskspace (several gigabytes).
Added RADIO_IN_VOLUME for different volumes levels for TV and radio
Added TV_RECORD_PADDING_PRE/POST for separately setting TV_RECORD_PADDING
Added TV_RECORDFILE_OKLETTERS for characters allowed in recording filenames.
Added AUTOSHUTDOWN_ settings to turn off and on the machine automatically
Added Multi-tuner support to allow recording and watching at the same time
Added plug-in "upsoon" to stop the player when a recording is about to start
Added OSD_FORCE_FONTNAME and OSD_FORCE_FONTSIZE for asian fonts""" ),
(5.17,
"""Using the name of the helper in local_conf.py
Changed the TV_RECORD_SERVER_* to RECORDSERVER_*,
Added optional RECORDSERVER_DEBUG, if not defined uses DEBUG
Changed WWW_PORT to WEBSERVER_PORT = 80
Added WEBSERVER_UID and WEBSERVER_GID
Added optional WEBSERVER_DEBUG, if not defined uses DEBUG
Added ENCODINGSERVER_UID and ENCODINGSERVER_GID
Added optional ENCODINGSERVER_DEBUG, if not defined uses DEBUG
Added RSSSERVER_UID and RSSSERVER_GID
Added plug-in: Apple trailers in the contrib area
Added plug-in: reencode and idlebar encode to compress mpeg video
Added plug-in: XM online
Added helpers: makevdev
Added servers: encodingserver, rssserver
Added SYS_USE_KEYBOARD to specify if generic keyboard handler should be used
Added EVENT_DEVS and EVENTMAP for the new Linux event device handler
Added VIDEO_PRE_PLAY and VIDEO_POST_PLAY to allow external commands to be run
Added CD_RIP_ for the cd backup plug-in
""" ),
(5.18,
"""Added tv.recodings_manager plug-in to show what has been watched, TVRM_*,
Removed TV_RECORD_PADDING, use TV_RECORD_PADDING_PRE and TV_RECORD_PADDING_POST
""" ),
(5.19,
"""Changed rss.feeds field separator to use a ';' instead of a ','
Changed weather locations to add a language code as the third parameter
Moved video.reencode to video.reencode-old and video.reencode2 to video.reencode
Added MAJOR_AUDIO_CTRL_MUTE to be able to choose a differente control for mute in the Alsa mixer plugin
Changed default locale from latin-1 to iso-8859-15, they are really the same
Added MPLAYER_OLDTVCHANNELCHANGE to allow the PREV_CH button to swap to previous channel
Added RSS_DOWNLOAD for a place to save downloaded data
Added IMAGE_EXCLUDE as a regular expression to exclude images such as thumbnails
Added TV_RECORD_FAVORITE_MARGIN to allow favourites to be added to the schedule within a tolerance value
""" ),
(5.20,
"""Added PERSONAL_WWW_PAGE config item to allow private web pages in the webserver
Added LOGGING, can be one of CRITICAL, ERROR, WARNING, INFO, DEBUG or NOTSET
Added RECORDSERVER_LOGGING to allow different levels of errors to be reported
Changed VIDEO_INTERLACING to VIDEO_DEINTERLACE to be more consistent with autovars
Added SENSORS_PLATFORM_PATH and SENSORS_I2CDEV_PATH for sensor paths
Added OSD_SOUNDS_ENABLED defaulted to False for menu sounds
Added SKIN_DEBUG to show boxes around each skin area for debugging skins
Added IMAGEVIEWER_REVERSED_IMAGES for when the images are incorrectly rotated
Added SHOPPINGCART_CLOBBER to allow a move to clobber an existing file
Added XINE_BOOKMARK to enable the resume function to work with xine
Added CACHE_CROPDETECT to enable caching of crop detection using encodingcode
""" ),
(5.21,
"""Added OS_STATICDIR, FREEVO_STATICDIR, OS_LOGDIR and FREEVO_LOGDIR
Change static data to use /var/lib/freevo or ~/.freevo, including TV_RECORD_SCHEDULE, TV_LOGOS,
XMLTV_FILE, you may also prefer OVERLAY_DIR to be FREEVO_STATICDIR+'/overlay',
Added a plugin that adds a submenu entry for ejecting rom drives and binds the default action of
an empty drive to the eject action
Replaced OSD_OVERSCAN_X with OSD_OVERSCAN_LEFT and OSD_OVERSCAN_RIGHT and OSD_OVERSCAN_Y with
OSD_OVERSCAN_TOP and OSD_OVERSCAN_BOTTOM
Added IMAGEVIEW_ASPECT to show images correctly on non-square pixel displays, it TVs
For the webserver configuration tool the following have been changed
PERSONAL_WWW_PAGE to WWW_PERSONAL_PAGE
TIME_DEBUG to DEBUG_TIME
SKIN_DEBUG to DEBUG_SKIN
CHILDAPP_DEBUG to DEBUG_CHILDAPP
RECORDSERVER_LOGGING to LOGGING_RECORDSERVER
DEFAULT_VOLUME to VOLUME_DEFAULT
TV_IN_VOLUME to VOLUME_TV_IN
VCR_IN_VOLUME to VOLUME_VCR_IN
RADIO_IN_VOLUME to VOLUME_RADIO_IN
MAX_VOLUME to VOLUME_MAX
DEV_MIXER to VOLUME_MIXER_DEV
and subsequently these, sorry if this is a little inconvenient
CONTROL_ALL_AUDIO to MIXER_CONTROL_ALL
VOLUME_DEFAULT to MIXER_VOLUME_DEFAULT
VOLUME_VCR_IN to MIXER_VOLUME_VCR_IN
VOLUME_TV_IN to MIXER_VOLUME_TV_IN
VOLUME_MIXER_STEP to MIXER_VOLUME_STEP
VOLUME_RADIO_IN to MIXER_VOLUME_RADIO_IN
VOLUME_MAX to MIXER_VOLUME_MAX
VOLUME_MIXER_DEV to MIXER_DEVICE
ENABLE_SHUTDOWN_SYS to SHUTDOWN_SYS_ENABLE
FREQUENCY_TABLE to TV_FREQUENCY_TABLE
CONFIRM_SHUTDOWN to SHUTDOWN_CONFIRM
DUPLICATE_DETECTION to TV_RECORD_DUPLICATE_DETECTION
ONLY_NEW_DETECTION to TV_RECORD_ONLY_NEW_DETECTION
CONFLICT_RESOLUTION to TV_RECORD_CONFLICT_RESOLUTION
REMOVE_COMMERCIALS to TV_RECORD_REMOVE_COMMERCIALS
TV_DATEFORMAT to TV_DATE_FORMAT
TV_TIMEFORMAT to TV_TIME_FORMAT
TV_DATETIMEFORMAT to TV_DATETIME_FORMAT
TV_RECORDFILE_MASK to TV_RECORD_FILE_MASK
TV_RECORDFILE_SUFFIX to TV_RECORD_FILE_SUFFIX
TV_RECORDFILE_OKLETTERS to TV_RECORD_FILE_OKLETTERS
VIDEO_GROUPS to TV_VIDEO_GROUPS
Added MIXER_VOLUME_STEP to allow the mixer volume change to be specified
Added for IVTV XINE TV:
XINE_TV_CONFIRM_STOP
XINE_TV_PROGRESSIVE_SEEK
XINE_TV_PROGRESSIVE_SEEK_THRESHOLD
XINE_TV_PROGRESSIVE_SEEK_INCREMENT
Added TV_RECORD_YEAR_FORMAT to allow the from of the year in TV fxd files to be specified
Moved plug-in "upsoon" to "tv.upsoon"
"""),
(5.22,
"""Added RECORDSERVER_SECRET and RECORDSERVER_PORT2=18002 for kaa.rpc
Renamed audio plug-in audio.playlist to audio.playlists
Added TV_CHANNELS_COMPARE as a lambda to sort the channels
"""),
(5.23,
""" Added XMLTV_TIMEZONE to allow the time zone to be specified
Added OSD_X11_CURSORS to allow custom cursor to be set, stops xine showing a cursor
Changed TV_RECORD_SCHEDULE to be a pickle file, this will delete existing favorites
Added TV_RECORD_FAVORITES and TV_RECORD_FAVORITES_LIST to keep favorites separate
Changed SHUTDOWN_CONFIRM to SYS_SHUTDOWN_CONFIRM for consistency
Changed SHUTDOWN_SYS_CMD to SYS_SHUTDOWN_CMD for consistency
Changed RESTART_SYS_CMD to SYS_RESTART_CMD for consistency
Changed SHUTDOWN_SYS_ENABLE to SYS_SHUTDOWN_ENABLE for consistency
Removed RECORDSERVER_PORT2 as it is no longer needed, using RECORDSERVER_PORT instead
"""),
(5.24,
""" Added POLL_TIME to allow custom poll rates to be set, default 0.01 seconds
"""),
(5.25,
""" Added OSD_IDLEBAR_PADDING to allow the space between idlebar items to be set
Added OSD_IDLEBAR_FONT and OSD_IDLEBAR_CLOCK_FONT to allow idlebar fonts to be set
Added MPLAYER_AO_DEV_OPTS for audio device options
Changed MPLAYER_VO_DEV_OPTS, removed need for leading ':'
Added ROM_DRIVES_AUTOFS to allow an autmounter to be used for ROM drives
Moved freeboxtv to tv plug-ins
Added MPLAYER_AUDIO_CACHE_KB, MPLAYER_AUDIO_CACHE_MIN_PERCENT and MPLAYER_AUDIO_NETWORK_OPTS to allow changing the default cache amount
Added SPEAK_WELCOME and SPEAK_SHUTDOWN for customized welcome and shutdown messages in speak plugin
Added FREEVO_USE_ALPHABLENDING to enable alpha blending transitions between screen changes. False by default
Renamed audio.mplayervis to audio.mplayervis1, so that audio.mplayervis2 will get noticed
Added SYS_USE_MOUSE option for enabling mouse support if needed. False by default
"""),
(5.26,
""" Added VIDEO_AUTOJOIN_REGEX to allow joining video files based on a regular expression
Renamed USE_NETWORK to SYS_USE_NETWORK
Renamed USE_SDL_KEYBOARD to SYS_USE_KEYBOARD
Added SYS_USE_JOYSTICK to allow a joystick device to be used
Added DEBUG_BENCHMARKING can be used to time and trace function calls
Added DEBUG_BENCHMARKCALL can be used to print the arguments and results of function calls
Removed MPLAYER_AUDIO_CACHE_KB, MPLAYER_AUDIO_CACHE_MIN_PERCENT and MPLAYER_AUDIO_NETWORK_OPTS, it broke detach
Added WWW_IMAGE_SIZE and WWW_IMAGE_THUMBNAIL_SIZE for Cooliris support
Added VIDEO_AUTOJOIN_REGEX to allow more control when joining video files
"""),
(5.27,
""" Added RECORDSERVER_ATTIMER to control when the programme recording should start
Added MPLAYERVIS_DOCK_ZOOM to allow the docked goom image to be zoomed
Renamed MPLAYERVIS_FAST_FULLSCREEN to MPLAYERVIS_FULL_ZOOM
Renamed IMAGEVIEWER_ASPECT to OSD_PIXEL_ASPECT as this affects not just images
Added AUTOSHUTDOWN_WAKEUP_TIME_PAD to control how much time to allow for
system boot to complete when waking up from an AUTOSHUTDOWN.
Added ENCODINGSERVER_SAVEDIR for re-encoded DVDs
Added FREEVO_TEMPDIR for temporary files
Split AUTOSHUTDOWN_WAKEUP_CMD into AUTOSHUTDOWN_ACPI_CMD_OPT and AUTOSHUTDOWN_NVRAM_CMD_OPT
Removed AUTOSHUTDOWN_LILO_CMD_OPT, AUTOSHUTDOWN_GRUB_CMD_OPT and AUTOSHUTDOWN_REMOUNT_BOOT_CMD_OPT
"""),
(5.28,
""" Added MPLAYER_PROPERTY_TIMEOUT to control how long freevo waits for mplayer property calls
Added SYS_FOLLOW_SYMLINKS to follow symlinks, default is false
"""),
(5.29,
""" Added SHUTDOWN_NEW_STYLE_DIALOG to control whether the new shutdown dialog is used or the old
multi-option menu.
"""),
(5.30,
""" change FREEVO_USE_ALPHABLENDING to SKIN_USE_SCREEN_TRANSITIONS and add
ability to select the transition style.
Added SKIN_USE_PAGE_TRANSITIONS to select whether transitions between pages
of menus etc are animated.
Added SKIN_SCREEN_TRANSITION to select the style of transition.
""")
]
# NOW check if freevo.conf is up-to-date. An older version may break the next
# steps
FREEVO_CONF_VERSION = setup_freevo.CONFIG_VERSION
if int(str(CONF.version).split('.')[0]) != int(str(FREEVO_CONF_VERSION).split('.')[0]):
print "ERROR: The version information in freevo_config.py does't"
print 'match the version in %s.' % freevoconf
print 'please rerun "freevo setup" to generate a new freevo.conf'
print_config_changes(FREEVO_CONF_VERSION, CONF.version, FREEVO_CONF_CHANGES)
sys.exit(1)
if int(str(CONF.version).split('.')[1]) != int(str(FREEVO_CONF_VERSION).split('.')[1]):
print 'WARNING: freevo_config.py was changed, please rerun "freevo setup"'
print_config_changes(FREEVO_CONF_VERSION, CONF.version, FREEVO_CONF_CHANGES)
# ======================================================================
# General freevo settings:
# ======================================================================
# time in seconds that the poll handlers are called a lower rate of 0.05 is
# less demanding for less powerful processors
POLL_TIME = 0.01 # time per poll in secs
AUDIO_DEVICE = '/dev/dsp' # e.g.: /dev/dsp0, /dev/audio, /dev/alsa/?
AUDIO_INPUT_DEVICE = '/dev/dsp1' # e.g.: /dev/dsp0, /dev/audio, /dev/alsa/?
MIXER_MAJOR_CTRL = 'VOL' # Freevo takes control over one audio ctrl
# 'VOL', 'PCM' 'OGAIN' etc.
MIXER_MAJOR_MUTE_CTRL = 'PCM' # used in alsamixer.py, There are systems where
# volume and mute use different controls
MIXER_DEVICE = '/dev/mixer' # mixer device
MIXER_CONTROL_ALL = 1 # Should Freevo take complete control of audio
MIXER_VOLUME_STEP = 5 # Amount to increment the mixer volume
MIXER_VOLUME_MAX = 90 # Set what you want maximum volume level to be.
MIXER_VOLUME_DEFAULT = 40 # Set default volume level.
MIXER_VOLUME_TV_IN = 60 # Set this to your preferred level 0-100.
MIXER_VOLUME_VCR_IN = 90 # If you use different input from TV
MIXER_VOLUME_RADIO_IN = 80 # Set this to your preferred level 0-100.
START_FULLSCREEN_X = 0 # Start in fullscreen mode if using x11 or xv.
#
# Physical ROM drives, multiple ones can be specified
# by adding comma-seperated and quoted entries.
#
# Format [ ('mountdir1', 'devicename1', 'displayed name1'),
# ('mountdir2', 'devicename2', 'displayed name2'), ...]
#
# Set to None to autodetect drives in during startup from /etc/fstab,
# set to [] to disable rom drive support at all
#
ROM_DRIVES = None
ROM_DRIVES_AUTOFS = False # Indicates that an automounter daemon is being used.
# Does not try to mount/umount the media.
#
# hide discs from the wrong menu (e.g. VCDs in audio menu) and empty discs
#
HIDE_UNUSABLE_DISCS = 1
#
# Attempt to set the speed of the ROM drive. A good value for keeping the
# drive silent while playing movies is 8.
#
ROM_SPEED = 0
#
# Shutdown confirmation.
# Set to 0 for no confirmation, set to 1 to show a confirm dialog
# (OK preselected), set to 2 to show a confirm dialog (Cancel preselected)
#
SYS_SHUTDOWN_CONFIRM = 1 # ask before shutdown
SYS_SHUTDOWN_CMD = 'shutdown -h now' # set this to 'sudo shutdown -h now' if
# you don't have the permissions to shutdown
SYS_RESTART_CMD = 'shutdown -r now' # like SYS_SHUTDOWN_CMD, only for reboot
SYS_SHUTDOWN_ENABLE = 0 # Performs a whole system shutdown at SHUTDOWN!
# For standalone boxes.
SHUTDOWN_NEW_STYLE_DIALOG=True # New style shutdown dialog
# ======================================================================
# Main menu items
# ======================================================================
plugin.activate('tv', level=10)
plugin.activate('video', level=20)
plugin.activate('audio', level=30)
plugin.activate('image', level=40)
if CONF.xmame or CONF.snes:
plugin.activate('games', level=50)
# Headlines
plugin.activate('headlines', level=60)
HEADLINES_LOCATIONS = [
('Freevo news releases', 'http://sourceforge.net/export/rss2_projnews.php?group_id=46652'),
#('Freevo news releases (full)', 'http://sourceforge.net/export/rss2_projnews.php?group_id=46652&rss_fulltext=1'),
('Freevo file releases', 'http://sourceforge.net/export/rss2_projfiles.php?group_id=46652'),
('Freevo summary+stats', 'http://sourceforge.net/export/rss2_projsummary.php?group_id=46652'),
('Freevo donors', 'http://sourceforge.net/export/rss2_projdonors.php?group_id=46652'),
]
plugin.activate('shutdown', level=90)
# ======================================================================
# AUTOSHUTDOWN CONFIGURATION
# ======================================================================
# Default config for autoshutdown and its timer are
# now set by the plugin. Info is available in thethe apprentice
# plugin help.
# plugin.remove('shutdown')
# plugin.activate('autoshutdown', level=90)
# plugin.activate('autoshutdown.autoshutdowntimer')
# ======================================================================
# Events
# ======================================================================
#
# You can add more keybindings by adding them to the correct hash.
# e.g. If you want to send 'contrast -100' to mplayer by pressing the '1' key,
# just add the following line:
#
# EVENTS['video']['1'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='contrast -100')
#
# See src/event.py for a list of all possible events.
EVENTS = {
'menu' : MENU_EVENTS,
'tvmenu' : TVMENU_EVENTS,
'input' : INPUT_EVENTS,
'tv' : TV_EVENTS,
'video' : VIDEO_EVENTS,
'dvd' : DVD_EVENTS, # only used by xine
'vcd' : VCD_EVENTS, # only used by xine
'audio' : AUDIO_EVENTS,
'games' : GAMES_EVENTS,
'image' : IMAGE_EVENTS,
'image_zoom' : IMAGE_ZOOM_EVENTS,
'global' : GLOBAL_EVENTS
}
#
# Use arrow keys for back and select (alternate way of navigating)
#
MENU_ARROW_NAVIGATION = False
#
# Process keyboard events from SDL. You want this unless you use only lirc
# or event devices below.
#
SYS_USE_KEYBOARD = True
#
# Process joystick events from SDL. You want this unless you use only lirc
# or event devices below.
#
SYS_USE_JOYSTICK = False
#
# Process mouse events from SDL/Pygame. You want this to control Freevo
# with a mouse
#
SYS_USE_MOUSE = False
#
# Modifiers for KEYMAP
#
M_ALT = 0x10000
M_CTRL = 0x20000
M_SHIFT = 0x40000
M_SCAN = 0x80000
#
# Keymap to map keyboard keys to event strings. You can also add new keys
# here, e.g. KEYMAP[key.K_x] = 'SUBTITLE'. The K_-names are defined by pygame.
#
KEYMAP = DEFAULT_KEYMAP
# List of /dev/input/event# devices to monitor. You can specify either the
# device node (e.g. '/dev/input/event1') or the name of the device (e.g.
# 'ATI Remote Wonder II'). If you monitor your keyboard both here and with
# SYS_USE_KEYBOARD, then you will get duplicate events.
#
EVENT_DEVS = []
# Keymap to map input events to event strings. You can change current mappings
# and add new ones here, e.g. EVENTMAP['KEY_COFFEE'] = 'SUBTITLE'. Key names
# are defined by the Linux input layer (input.h). An axis is described by a
# pair, one for positive and one for negative movement, e.g.
# EVENTMAP['REL_Z'] = ('LEFT', 'RIGHT')
#
EVENTMAP = DEFAULT_EVENTMAP
# Use Internet resources to fetch information?
# For example, Freevo can use CDDB for album information,
# the IMDB movie database for movie info, and Amazon for cover searches.
# Set this to 0 if your computer isn't connected to a network.
#
SYS_USE_NETWORK = True
# HOST_ALIVE_CHECK tests if the given host is online.
# Will be used to avoid extremely long automounter timeouts.
#
HOST_ALIVE_CHECK = 'ping -c 1 -W 1 %s > /dev/null 2>&1'
# Follow symlinks in media directories
#
SYS_FOLLOW_SYMLINKS = False
#
# Directory to store temporary files
#
FREEVO_TEMPDIR = '/tmp'
#
# Directory location to save files when the normal filesystem
# doesn't allow saving. This directory can save covers and fxd files
# for read only filesystems like ROM drives. Set this variable to your
# old MOVIE_DATA_DIR if you have one. It needs to be set to a directory
# Freevo can write to.
#
#if os.environ.has_key('HOME') and os.environ['HOME']:
# OVERLAY_DIR = os.path.join(os.environ['HOME'], '.freevo/vfs')
#else:
# OVERLAY_DIR = os.path.join(FREEVO_CACHEDIR, 'vfs')
OVERLAY_DIR = os.path.join(FREEVO_CACHEDIR, 'vfs')
#
# Umask setting for all files.
# 022 means only the user has write access. If you share your Freevo
# installation with different users, set this to 002
#
UMASK = 022
#
# Suffix for playlist files
#
PLAYLIST_SUFFIX = [ 'm3u' ]
#
# Use md5 in mmpython to create unique disc ids. Enable this if you have
# problems with different discs having the same id.
#
MMPYTHON_CREATE_MD5_ID = 0
#
# Keep metadata in memory
# Setting this variable will keep all cache files in memory. Startup will be
# slower, but for large directories, this will speed up the display.
# 0 = Only keep current dir in memory. Use this if you have too much data
# and not enough RAM
# 1 = Once loaded, keep cachefile for directory in memory
# 2 = Load all cachefiles on startup
#
# WARNING: you should not run 'freevo cache' when freevo is running.
#
MEDIAINFO_USE_MEMORY = 1
#
# Cache images. This uses a lot of disc space but it's a huge speed
# enhancement. The images will be cached in OVERLAY_DIR
#
CACHE_IMAGES = 1
#
# Cache cropdetection. This will take quite a while to run
#
CACHE_CROPDETECT = False
# ======================================================================
# Plugins:
# ======================================================================
# Remove undesired plugins by setting plugin.remove(code).
# You can also use the name to remove a plugin. But if you do that,
# all instances of this plugin will be removed.
#
# Examples:
# plugin.remove(plugin_tv) or
# plugin.remove('tv') will remove the tv module from the main menu
# plugin.remove(rom_plugins['image']) will remove the rom drives from the
# image main menu,
# plugin.remove('rom_drives.rom_items') will remove the rom drives from all
# menus
# ======================================================================
# Idlebar plug-ins
# ======================================================================
plugin.activate('idlebar')
plugin.activate('idlebar.tv', level=20)
plugin.activate('idlebar.cdstatus', level=25)
plugin.activate('idlebar.diskfree', level=30)
DISKFREE_VERY_LOW = 8 # In Gigabytes
DISKFREE_LOW = 20
plugin.activate('idlebar.clock', level=50)
CLOCK_FORMAT = '%a %d %H:%M'
# ======================================================================
# Daemon plug-ins
# ======================================================================
plugin.activate('fullscreen')
plugin.activate('help')
plugin.activate('screenshot')
# autostarter when inserting roms while Freevo is in the MAIN MENU
plugin.activate('rom_drives.autostart')
plugin.activate('ejectromdrives')
# add the rom drives to each sub main menu
rom_plugins = {}
for t in ('video', 'audio', 'image', 'games'):
rom_plugins[t] = plugin.activate('rom_drives.rom_items', type=t, level=50)
# Use udisks to find removable storage
plugin.activate('udisks')
AUTOSHUTDOWN_PROCESS_LIST = ['mencoder','transcode','cdrecord','emerge','tvgids.sh','tv_grab','sshd:']
# Set to true to allow destination to be clobbered
SHOPPINGCART_CLOBBER = False
# mixer
try:
import alsaaudio
plugin.activate('alsamixer')
except:
plugin.activate('mixer')
# add imdb search to the video item menu
plugin.activate('video.imdb')
# list of regexp to be ignored on a disc label
IMDB_REMOVE_FROM_LABEL = ('season[\._ -][0-9]+', 'disc[\._ -][0-9]+',
'd[\._ -][0-9]+', 'german')
# list of regexp to be ignored on a filename, match TV_RECORDMASK
IMDB_REMOVE_FROM_NAME = ['^[0-9]+-[0-9]+[ _][0-9]+\.[0-9]+[ _]']
# list of words to ignore when searching based on a filename
IMDB_REMOVE_FROM_SEARCHSTRING = ()
# format of the season/episode in the tv series title
IMDB_SEASON_EPISODE_FORMAT = "[%01dx%02d]"
#IMDB_SEASON_EPISODE_FORMAT = "%01dx%02d"
#IMDB_SEASON_EPISODE_FORMAT = "S%02dE%02d"
# When searching for a movie title in imdb, should the result be
# autoaccepted if it is only one hit?
# 0 = show menu even if it is only one hit (gives you an opportunity to cancel)
# 1 = autoaccept
IMDB_AUTOACCEPT_SINGLE_HIT = True
# Use the local file lenght or runtime value from IMDB?
IMDB_USE_IMDB_RUNTIME = False
# add subtitle search to the video item menu
plugin.activate('video.subtitles')
plugin.activate('video.subtitles.napiprojekt')
plugin.activate('video.subtitles.opensubtitles')
SUBS_LANGS = { 'eng': ('English') }
# delete file in menu
plugin.activate('file_ops', level=20)
# use mplayer for video playpack
plugin.activate('video.mplayer')
# use mplayer for audio playpack
plugin.activate('audio.mplayer')
# activate xine if available
if (CONF.display == 'x11' and CONF.xine) or \
(CONF.display in ('dfbmga', 'directfb') and CONF.df_xine) or \
(CONF.display in ('mga', 'fbdev', 'dxr3') and CONF.fbxine):
plugin.activate('video.xine')
if CONF.fbxine:
plugin.activate('audio.xine')
# make it possible to detach the player
plugin.activate('audio.detach', level=20)
plugin.activate('audio.detachbar')
plugin.activate('audio.playlists')
# Amazon seems to request the covers in one locale and get the data
# in another encoding. Locale must be one of: de, jp, uk, us
#
AMAZON_LOCALE = 'us'
AMAZON_QUERY_ENCODING = 'iso-8859-15'
# use mplayer for tv
# to use tvtime, put the following two lines in your local_conf.py:
# plugin.remove('tv.mplayer')
# plugin.activate('tv.tvtime')
plugin.activate('tv.mplayer')
# control an external tv tuner using irsend or another command
# to use this you must reassign plugin_external_tuner in local_conf.py:
# plugin_external_tuner = plugin.activate('tv.irsend_generic',
# args=('...', '...', ))
# Please see each irsend plugin for individual arguments and be sure to
# alter VIDEO_GROUPS to tell a VideoGroup to use it (tuner_type='external').
plugin_external_tuner = 0
# support for settings bookmarks (key RECORD) while playing. Also
# auto bookmarking when playback is stopped
plugin.activate('video.bookmarker', level=0)
# show some messages on the screen
plugin.activate('tiny_osd')
# For recording tv
#
# generic_record plugin needs VCR_CMD to be set correctly
plugin_record = plugin.activate('tv.generic_record')
#
# Use ivtv_record instead if you have an ivtv based card (PVR-250/350)
# and want freevo to do everthing for you. TV_SETTINGS must be set
# correctly. To use you need to set the following two lines:
#
# plugin.remove('tv.generic_record')
# plugin_record = plugin.activate('tv.ivtv_record')
# TV menu plugin to view recordings
plugin.activate('tv.recordings_manager', level=1)
# TV menu plugin to search for programs
plugin.activate('tv.search_programs', level=2)
# TV menu plugin to view programs via categories
plugin.activate('tv.categories', level=3)
# TV menu plugin to view and edit favorites
plugin.activate('tv.view_favorites', level=4)
# TV menu plugin to view scheduled recordings
plugin.activate('tv.scheduled_recordings', level=5)
# TV menu plugin to allow the use to set reminders for programs they want to
# watch.
plugin.activate('tv.remind')
# TV menu plugin to manually schedule recordings
plugin.activate('tv.manual_record')
# Youtube
plugin.activate('video.youtube')
# Apple Trailers
plugin.activate('video.appletrailers')
#
# Enable this for joystick support:
# plugin.activate('joy')
# ======================================================================
# Dialog Display Plugins
# ======================================================================
plugin.activate('dialog.osd_display')
plugin.activate('dialog.x11_overlay_display')
# Speak plugin to output menu items via festival
# plugin.activate('speak')
SPEAK_WELCOME = ''
SPEAK_SHUTDOWN = ''
# ----------------------------------------------------------------------
# CD Ripping
# ----------------------------------------------------------------------
CD_RIP_TMP_DIR = '/tmp/'
CD_RIP_TMP_NAME = 'track_%(track)s_being_ripped'
CD_RIP_PN_PREF = '%(artist)s/%(album)s/%(track)s - %(song)s'
CD_RIP_CDPAR_OPTS = '-s'
CD_RIP_LAME_OPTS = '--vbr-new -b 192 -h'
CD_RIP_OGG_OPTS = '-m 128'
CD_RIP_FLAC_OPTS = '-8'
CD_RIP_CASE = None # Can be title, upper, lower
CD_RIP_REPLACE_SPACE = None # Can be '_', '-', etc.
# ======================================================================
# Freevo directory settings:
# ======================================================================
# You can change all this variables in the folder.fxd on a per folder
# basis
#
# Example:
# <freevo>
# <folder title="Title of the directory" img-cover="nice-cover.png">
# <setvar name="directory_autoplay_single_item" val="0"/>
# <info>
# <content>A small description of the directory</content>
# </info>
# </folder>
# </freevo>
#
# Should directories sorted by date instead of filename?
# 0 = No, always sort by filename.
# 1 = Yes, sort by date
# 2 = No, don't sory by date for normal directories,
# but sort by date for TV_RECORD_DIR.
#
DIRECTORY_SORT_BY_DATE = 2
#
# Should directory items be sorted in reverse order?
#
DIRECTORY_REVERSE_SORT = 0
#
# Should we use "smart" sorting?
# Smart sorting ignores the word "The" in item names.
#
DIRECTORY_SMART_SORT = 0
#
# Should files in directories have smart names?
# This removes the first part of the names when identical
#
DIRECTORY_SMART_NAMES = 1
#
# Should Freevo autoplay an item if only one item is in the directory?
#
DIRECTORY_AUTOPLAY_SINGLE_ITEM = 1
#
# Force the skin to use a specific layout number. -1 == no force. The layout
# toggle with DISPLAY will be disabled
#
DIRECTORY_FORCE_SKIN_LAYOUT = -1
#
# Format string for the audio item names.
#
# Possible strings:
# a=artist, n=tracknumber, t=title, y=year, f=filename
#
# Example:
# This will show the title and the track number:
# DIRECTORY_AUDIO_FORMAT_STRING = '%(n)s - %(t)s'
#
DIRECTORY_AUDIO_FORMAT_STRING = '%(t)s'
#
# Use media id tags to generate the name of the item. This should be
# enabled all the time. It should only be disabled for directories with
# broken tags.
#
DIRECTORY_USE_MEDIAID_TAG_NAMES = 1
#
# The following settings determine which features are available for
# which media types.
#
# If you set this variable in a folder.fxd, the value is 1 (enabled)
# or 0 (disabled).
#
# Examples:
# To enable autoplay for audio and image files:
# DIRECTORY_AUTOPLAY_ITEMS = [ 'audio', 'image' ]