root/freevo/freevo_config.py

Revision 1930, 79.3 kB (checked in by duncan, 5 weeks ago)

Added back the skinable dialog setting

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1# -*- coding: iso-8859-1 -*-
2# -----------------------------------------------------------------------
3# freevo_config.py - System configuration
4# -----------------------------------------------------------------------
5# $Id$
6#
7# Notes:
8#    This file contains the freevo settings. To change the settings
9#    you can edit this file, or better, put a file named local_conf.py
10#    # in the same directory and add your changes there.  E.g.: when
11#    you # want a alsa as mplayer audio out, just put
12#    "MPLAYER_AO_DEV = # 'alsa9'" in local_conf.py
13#
14# How config files are loaded:
15#
16# [$freevo-bindir/ is the directory where the freevo start-script is
17# located (i.e. the "shipping copy dir"). This can be any directory, e.g.
18# the download directory or /usr/local]
19#
20# [$cwd/ is the directory the user started freevo from. This can be
21# $freevo-bindir/, or any other directory]
22#
23# 1) freevo.conf is not shipped, but it is required and must be generated
24# using ./configure before freevo can be used.
25#
26# 2) freevo.conf is searched for in ['$cwd/', '~/.freevo/',
27# '/etc/freevo/', $freevo-bindir/]. The first one found is loaded.
28#
29# 3) freevo_config.py is always loaded from $freevo-bindir/, it is not
30# supposed to be changed by the user. It has a format version number in
31# the format "MAJOR.MINOR", e.g. "2.3". The version number reflects the
32# config file format, *not* the Freevo version number.
33#
34# 4) local_conf.py is searched for in ['$cwd/', '~/.freevo',
35# '/etc/freevo/', $freevo-bindir/]. The first one found is loaded. It is
36# not a required file. The search is independent of where freevo.conf was
37# found.
38#
39# 5) The same logic as in 4) applies for local_skin.xml.
40#
41# 6) The version MAJOR numbers must match in freevo_config.py and
42# local_conf.py, otherwise it is an error.
43#
44# 7) The version MINOR number is used for backwards-compatible changes,
45# i.e. when new options are added that have reasonable default values.
46#
47# 8) A warning is issued if freevo_config.py.MINOR > local_conf.py.MINOR.
48#
49# 9) It is an error if local_conf.py.MINOR > freevo_config.py.MINOR since
50# the user most likely did not intend to use a recent local_conf.py with
51# an old Freevo installation.
52#
53# 10) There is a list of change descriptions in freevo_config.py,
54# one per MAJOR.MINOR change. The user is informed of what has
55# changed between his local_conf.py and the new freevo_config.py format if
56# they differ in version numbers.
57#
58#
59#
60# Developer Notes:
61#    The CVS log isn't used here. Write changes directly in this file
62#    to make it easier for the user. Make alos sure that you insert new
63#    options also in local_conf.py.example
64#
65# Todo:
66#    o a nice configure or install script to ask these things
67#    o different settings for MPG, AVI, VOB, etc
68#
69# -----------------------------------------------------------------------
70#
71# Changes:
72#    o Generate ROM_DRIVES from /etc/fstab on startup
73#    o Added FREEVO_CONF_VERSION and LOCAL_CONF_VERSION to keep the three
74#      different files on sync
75#
76#
77# -----------------------------------------------------------------------
78# Freevo - A Home Theater PC framework
79# Copyright (C) 2002 Krister Lagerstrom, et al.
80# Please see the file freevo/Docs/CREDITS for a complete list of authors.
81#
82# This program is free software; you can redistribute it and/or modify
83# it under the terms of the GNU General Public License as published by
84# the Free Software Foundation; either version 2 of the License, or
85# (at your option) any later version.
86#
87# This program is distributed in the hope that it will be useful, but
88# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
89# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
90# Public License for more details.
91#
92# You should have received a copy of the GNU General Public License along
93# with this program; if not, write to the Free Software Foundation, Inc.,
94# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
95#
96# -----------------------------------------------------------------------
97
98
99import plugin
100from event import *
101
102########################################################################
103# If you want to change some things for your personal setup, please
104# write this in a file called local_conf.py, see that file for more info.
105########################################################################
106
107# Version information for the two config files. When the major version
108# of the config file doesn't match, Freevo won't start. If the minor version
109# is different, there will be only a warning
110
111LOCAL_CONF_VERSION = 5.26
112
113# Description of changes in each new version
114FREEVO_CONF_CHANGES = [
115    (2.0,
116     """Changed xmame_SDL to just xmame"""),
117    (2.1,
118     """Added vlc"""),
119    (2.2,
120     """Added unzip"""),
121]
122
123LOCAL_CONF_CHANGES = [
124    (1.1,
125     """ROM_DRIVES are autodetected if left empty.
126    Added AUDIO_RANDOM_PLAYLIST (default on).
127    Added COVER_DIR for covers for files on CDs etc.
128    Added AUDIO_COVER_REGEXP for selection of covers for music files.
129    Changed MPlayer default args.
130    Changed TV_SETTINGS to /dev/video0."""),
131    (2.0,
132     """Remote control config has changed from Freevo Python files to the
133     standard Lirc program config files, see freevo_config.py for
134     more info."""),
135    (2.1,
136     """Added MPLAYER_ARGS_AUDIOCD for audio cd playback settings."""),
137    (3.0,
138     """New skin engine. The new engine has no automatic TV overscan support,
139     you need to set OSD_OVERSCAN_X and OSD_OVERSCAN_Y. There are also new variables
140     for this engine: MAIN_MENU_ITEMS and FORCE_SKIN_LAYOUT. The games menu
141     will be activated automaticly if setup.py found mame or snes"""),
142    (3.1,
143     """Renamed TV_SHOW_IMAGE_DIR to TV_SHOW_DATA_DIR. This directory now can
144     also contain fxd files with gloabl informations and mplayer options"""),
145    (3.2,
146     """Removed MPLAYER_ARGS_* and added a hash MPLAYER_ARGS to set args for
147     all different kinds of files. Also added MPLAYER_SOFTWARE_SCALER to use
148     the software scaler for fast CPUs"""),
149    (3.3,
150     """Added AUDIO_FORMAT_STRING to customize the audio item title generation"""),
151    (3.4,
152     """Removed RC_MPLAYER_CMDS for video and audio. Set special handling (and
153     other key mappings with the variable EVENTS. See event.py for possible
154     events"""),
155    (3.5,
156     """Added xine support (see xine section in freevo_config.py),
157     MPLAYER_AUTOCROP for 16:9 tv sets, ONLY_SCAN_DATADIR to make freevo start
158     faster and TVGUIDE_HOURS_PER_PAGE customize the tv guide"""),
159    (3.7,
160     """Added USE_MEDIAID_TAG_NAMES as directory based variable and
161     HIDE_UNUSABLE_DISCS to hide discs in the wrong menus and empty drives"""),
162    (3.8,
163     """Restructured GAMES_ITEMS and added XMLTV_GRABBER and XMLTV_DAYS for the
164     tv_grab helper script. Also added USE_NETWORK to deactivate everything
165     that needs a network connection."""),
166    (3.9,
167     """Add MPLAYER_SET_AUDIO_DELAY to correct AV sync problems"""),
168    (3.91,
169     """Add SKIN_FORCE_TEXTVIEW_STYLE and SKIN_MEDIAMENU_FORCE_TEXTVIEW to add
170     more control when to switch to text view."""),
171    (4.00,
172     """Reworked the directory settings: MOVIE_PLAYLISTS and AUDIO_RANDOM_PLAYLIST
173     are removed, the new variables to control a directory style are
174     DIRECTORY_CREATE_PLAYLIST, DIRECTORY_ADD_PLAYLIST_FILES,
175     DIRECTORY_ADD_RANDOM_PLAYLIST and DIRECTORY_AUTOPLAY_ITEMS. The directory
176     updated now uses stat, set DIRECTORY_USE_STAT_FOR_CHANGES = 0 if you have
177     problems with it."""),
178    (4.01,
179     """Removed SUFFIX_VIDEO_FILES and replaced it with SUFFIX_VIDEO_MPLAYER_FILES
180     and SUFFIX_VIDEO_XINE_FILES. Use PREFERED_VIDEO_PLAYER to choose a prefered
181     player."""),
182    (4.02,
183     """Added CHILDAPP_DEBUG to debug all kinds of childapps. MPLAYER_DEBUG will be
184     removed soon. Renamed PREFERED_VIDEO_PLAYER to VIDEO_PREFERED_PLAYER and
185     added AUDIO_PREFERED_PLAYER."""),
186    (4.03,
187     """Removed MOVIE_DATA_DIR and COVER_DIR. It has been replaved by the new
188     virtual filesystem controlled by OVERLAY_DIR"""),
189    (5.00,
190     """Changed some config variables. Use \'./freevo convert_config\' to convert
191     your local_conf.py to change the variable names"""),
192    (5.01,
193     """Add AUDIO_SHOW_VIDEOFILES to enable video files in the audio menu"""),
194    (5.02,
195     """Add XINE_ARGS_DEF to set xine arguments and OSD_BUSYICON_TIMER to show
196     a busy icon when the menu takes too much time building"""),
197    (5.03,
198     """Add UMASK to set umask for files in vfs""" ),
199    (5.04,
200     """SKIN_XML_FILE set to nothing as default, SKIN_START_LAYOUT is removed.
201     When SKIN_XML_FILE is not set, the skin will remember the last settings"""),
202    (5.05,
203     """Use MMPYTHON_CREATE_MD5_ID with current mmpython cvs to have a second
204     way to generate the disc ids in case they are not unique on your system"""),
205    (5.06,
206     """Add MEDIAINFO_USE_MEMORY. Setting this variable will keep all cache
207     files in memory. Startup will be slower, but for large directories, this
208     will speed up entering the dir"""),
209    (5.07,
210     """Add MENU_ARROW_NAVIGATION to change navigation style. New one is default
211     now. Also added OSD_EXTRA_FONT_PATH to search for fonts"""),
212    (5.08,
213     """Change MENU_ARROW_NAVIGATION to old style and make blurr the new default
214     skin. Also added RESTART_SYS_CMD, OSD_DIM_TEXT and OSD_UPDATE_COMPLETE_REDRAW."""),
215    (5.09,
216     """Add CACHE_IMAGES to turn off image caching. A new variable is
217     IMAGEVIEWER_BLEND_MODE to control the blending effect in the image viewer"""),
218    (5.11,
219     """Add IMAGEVIEWER_OSD to customize the osd and VIDEO_AUTOJOIN to auto join
220     movies with more than one file"""),
221    (5.12,
222     """Added TV_RECORD_SERVER_UID to set the uid for the recordserver and
223     TV_RECORDFILE_SUFFIX for the suffix. If your TV_RECORDFILE_MASK contains
224     the suffix, please remove it here"""),
225    (5.13,
226     """Added TV_RECORD_SERVER_GID to set the gid for the recordserver. If you
227     use TV_RECORD_SERVER_UID, the gui _must_ match one of the users gids""" ),
228    (5.14,
229     """Add IMAGEVIEWER_DURATION for auto slideshows""" ),
230    (5.15,
231     """Add two variables for mplayer post processing: MPLAYER_VF_INTERLACED and
232     MPLAYER_VF_PROGRESSIVE""" ),
233    (5.16,
234     """Removed the recordable setting in VIDEO_GROUPS, please remove this setting.
235     Added xmltv-1.2 this requires elementtree
236     Added XINE_HAS_NO_LIRC to see if '--no-lirc' should be passed to xine
237     Added XINE_TV_VO_DEV, XINE_TV_AO_DEV, and XINE_TV_TIMESHIFT_FILEMASK for the
238     new tv.ivtv_xine_tv plugin (the latter should be e.g. "/tmp/xine-buf-" and point
239     to a place with enough free diskspace (several gigabytes).
240     Added RADIO_IN_VOLUME for different volumes levels for TV and radio
241     Added TV_RECORD_PADDING_PRE/POST for separately setting TV_RECORD_PADDING
242     Added TV_RECORDFILE_OKLETTERS for characters allowed in recording filenames.
243     Added AUTOSHUTDOWN_ settings to turn off and on the machine automatically
244     Added Multi-tuner support to allow recording and watching at the same time
245     Added plug-in "upsoon" to stop the player when a recording is about to start
246     Added OSD_FORCE_FONTNAME and OSD_FORCE_FONTSIZE for asian fonts""" ),
247    (5.17,
248     """Using the name of the helper in local_conf.py
249     Changed the TV_RECORD_SERVER_* to RECORDSERVER_*,
250     Added optional RECORDSERVER_DEBUG, if not defined uses DEBUG
251     Changed WWW_PORT to WEBSERVER_PORT = 80
252     Added WEBSERVER_UID and WEBSERVER_GID
253     Added optional WEBSERVER_DEBUG, if not defined uses DEBUG
254     Added ENCODINGSERVER_UID and ENCODINGSERVER_GID
255     Added optional ENCODINGSERVER_DEBUG, if not defined uses DEBUG
256     Added RSSSERVER_UID and RSSSERVER_GID
257     Added plug-in: Apple trailers in the contrib area
258     Added plug-in: reencode and idlebar encode to compress mpeg video
259     Added plug-in: XM online
260     Added helpers: makevdev
261     Added servers: encodingserver, rssserver
262     Added SYS_USE_KEYBOARD to specify if generic keyboard handler should be used
263     Added EVENT_DEVS and EVENTMAP for the new Linux event device handler
264     Added VIDEO_PRE_PLAY and VIDEO_POST_PLAY to allow external commands to be run
265     Added CD_RIP_ for the cd backup plug-in
266     """ ),
267    (5.18,
268     """Added tv.recodings_manager plug-in to show what has been watched, TVRM_*,
269     Removed TV_RECORD_PADDING, use TV_RECORD_PADDING_PRE and TV_RECORD_PADDING_POST
270     """ ),
271    (5.19,
272     """Changed rss.feeds field separator to use a ';' instead of a ','
273     Changed weather locations to add a language code as the third parameter
274     Moved video.reencode to video.reencode-old and video.reencode2 to video.reencode
275     Added MAJOR_AUDIO_CTRL_MUTE to be able to choose a differente control for mute in the Alsa mixer plugin
276     Changed default locale from latin-1 to iso-8859-15, they are really the same
277     Added MPLAYER_OLDTVCHANNELCHANGE to allow the PREV_CH button to swap to previous channel
278     Added RSS_DOWNLOAD for a place to save downloaded data
279     Added IMAGE_EXCLUDE as a regular expression to exclude images such as thumbnails
280     Added TV_RECORD_FAVORITE_MARGIN to allow favourites to be added to the schedule within a tolerance value
281     """ ),
282    (5.20,
283     """Added PERSONAL_WWW_PAGE config item to allow private web pages in the webserver
284     Added LOGGING, can be one of CRITICAL, ERROR, WARNING, INFO, DEBUG or NOTSET
285     Added RECORDSERVER_LOGGING to allow different levels of errors to be reported
286     Changed VIDEO_INTERLACING to VIDEO_DEINTERLACE to be more consistent with autovars
287     Added SENSORS_PLATFORM_PATH and SENSORS_I2CDEV_PATH for sensor paths
288     Added OSD_SOUNDS_ENABLED defaulted to False for menu sounds
289     Added SKIN_DEBUG to show boxes around each skin area for debugging skins
290     Added IMAGEVIEWER_REVERSED_IMAGES for when the images are incorrectly rotated
291     Added SHOPPINGCART_CLOBBER to allow a move to clobber an existing file
292     Added XINE_BOOKMARK to enable the resume function to work with xine
293     Added CACHE_CROPDETECT to enable caching of crop detection using encodingcode
294     """ ),
295    (5.21,
296     """Added OS_STATICDIR, FREEVO_STATICDIR, OS_LOGDIR and FREEVO_LOGDIR
297     Change static data to use /var/lib/freevo or ~/.freevo, including TV_RECORD_SCHEDULE, TV_LOGOS,
298     XMLTV_FILE, you may also prefer OVERLAY_DIR to be FREEVO_STATICDIR+'/overlay',
299     Added a plugin that adds a submenu entry for ejecting rom drives and binds the default action of
300     an empty drive to the eject action
301     Replaced OSD_OVERSCAN_X with OSD_OVERSCAN_LEFT and OSD_OVERSCAN_RIGHT and OSD_OVERSCAN_Y with
302     OSD_OVERSCAN_TOP and OSD_OVERSCAN_BOTTOM
303     Added IMAGEVIEW_ASPECT to show images correctly on non-square pixel displays, it TVs
304     For the webserver configuration tool the following have been changed
305        PERSONAL_WWW_PAGE to WWW_PERSONAL_PAGE
306        TIME_DEBUG to DEBUG_TIME
307        SKIN_DEBUG to DEBUG_SKIN
308        CHILDAPP_DEBUG to DEBUG_CHILDAPP
309        RECORDSERVER_LOGGING to LOGGING_RECORDSERVER
310        DEFAULT_VOLUME to VOLUME_DEFAULT
311        TV_IN_VOLUME to VOLUME_TV_IN
312        VCR_IN_VOLUME to VOLUME_VCR_IN
313        RADIO_IN_VOLUME to VOLUME_RADIO_IN
314        MAX_VOLUME to VOLUME_MAX
315        DEV_MIXER to VOLUME_MIXER_DEV
316     and subsequently these, sorry if this is a little inconvenient
317        CONTROL_ALL_AUDIO to MIXER_CONTROL_ALL
318        VOLUME_DEFAULT to MIXER_VOLUME_DEFAULT
319        VOLUME_VCR_IN to MIXER_VOLUME_VCR_IN
320        VOLUME_TV_IN to MIXER_VOLUME_TV_IN
321        VOLUME_MIXER_STEP to MIXER_VOLUME_STEP
322        VOLUME_RADIO_IN to MIXER_VOLUME_RADIO_IN
323        VOLUME_MAX to MIXER_VOLUME_MAX
324        VOLUME_MIXER_DEV to MIXER_DEVICE
325        ENABLE_SHUTDOWN_SYS to SHUTDOWN_SYS_ENABLE
326        FREQUENCY_TABLE to TV_FREQUENCY_TABLE
327        CONFIRM_SHUTDOWN to SHUTDOWN_CONFIRM
328        DUPLICATE_DETECTION to TV_RECORD_DUPLICATE_DETECTION
329        ONLY_NEW_DETECTION to TV_RECORD_ONLY_NEW_DETECTION
330        CONFLICT_RESOLUTION to TV_RECORD_CONFLICT_RESOLUTION
331        REMOVE_COMMERCIALS to TV_RECORD_REMOVE_COMMERCIALS
332        TV_DATEFORMAT to TV_DATE_FORMAT
333        TV_TIMEFORMAT to TV_TIME_FORMAT
334        TV_DATETIMEFORMAT to TV_DATETIME_FORMAT
335        TV_RECORDFILE_MASK to TV_RECORD_FILE_MASK
336        TV_RECORDFILE_SUFFIX to TV_RECORD_FILE_SUFFIX
337        TV_RECORDFILE_OKLETTERS to TV_RECORD_FILE_OKLETTERS
338        VIDEO_GROUPS to TV_VIDEO_GROUPS
339     Added MIXER_VOLUME_STEP to allow the mixer volume change to be specified
340     Added for IVTV XINE TV:
341        XINE_TV_CONFIRM_STOP
342        XINE_TV_PROGRESSIVE_SEEK
343        XINE_TV_PROGRESSIVE_SEEK_THRESHOLD
344        XINE_TV_PROGRESSIVE_SEEK_INCREMENT
345     Added TV_RECORD_YEAR_FORMAT to allow the from of the year in TV fxd files to be specified
346     Moved plug-in "upsoon" to "tv.upsoon"
347     """),
348    (5.22,
349     """Added RECORDSERVER_SECRET and RECORDSERVER_PORT2=18002 for kaa.rpc
350     Renamed audio plug-in audio.playlist to audio.playlists
351     Added ENCODINGSERVER_SAVE_DIR for re-encoded DVDs
352     Added TV_CHANNELS_COMPARE as a lambda to sort the channels
353     """),
354    (5.23,
355     """ Added XMLTV_TIMEZONE to allow the time zone to be specified
356     Added OSD_X11_CURSORS to allow custom cursor to be set, stops xine showing a cursor
357     Changed TV_RECORD_SCHEDULE to be a pickle file, this will delete existing favorites
358     Added TV_RECORD_FAVORITES and TV_RECORD_FAVORITES_LIST to keep favorites separate
359     Changed SHUTDOWN_CONFIRM to SYS_SHUTDOWN_CONFIRM for consistency
360     Changed SHUTDOWN_SYS_CMD to SYS_SHUTDOWN_CMD for consistency
361     Changed RESTART_SYS_CMD to SYS_RESTART_CMD for consistency
362     Changed SHUTDOWN_SYS_ENABLE to SYS_SHUTDOWN_ENABLE for consistency
363     Removed RECORDSERVER_PORT2 as it is no longer needed, using RECORDSERVER_PORT instead
364     """),
365    (5.24,
366     """ Added POLL_TIME to allow custom poll rates to be set, default 0.01 seconds
367     """),
368    (5.25,
369     """ Added OSD_IDLEBAR_PADDING to allow the space between idlebar items to be set
370     Added OSD_IDLEBAR_FONT and OSD_IDLEBAR_CLOCK_FONT to allow idlebar fonts to be set
371     Added MPLAYER_AO_DEV_OPTS for audio device options
372     Changed MPLAYER_VO_DEV_OPTS, removed need for leading ':'
373     Added ROM_DRIVES_AUTOFS to allow an autmounter to be used for ROM drives
374     Moved freeboxtv to tv plug-ins
375     Added MPLAYER_AUDIO_CACHE_KB, MPLAYER_AUDIO_CACHE_MIN_PERCENT and MPLAYER_AUDIO_NETWORK_OPTS to allow changing the default cache amount
376     Added SPEAK_WELCOME and SPEAK_SHUTDOWN for customized welcome and shutdown messages in speak plugin
377     Added FREEVO_USE_ALPHABLENDING to enable alpha blending transitions between screen changes. False by default
378     Renamed audio.mplayervis to audio.mplayervis1, so that audio.mplayervis2 will get noticed
379     Added SYS_USE_MOUSE option for enabling mouse support if needed. False by default
380     """),
381    (5.26,
382     """ Added VIDEO_AUTOJOIN_REGEX to allow joining video files based on a regular expression
383     Renamed USE_NETWORK to SYS_USE_NETWORK
384     Renamed USE_SDL_KEYBOARD to SYS_USE_KEYBOARD
385     Added SYS_USE_JOYSTICK to allow a joystick device to be used
386     Added DEBUG_BENCHMARKING can be used to time and trace function calls
387     Added DEBUG_BENCHMARKCALL can be used to print the arguments and results of function calls
388     Removed MPLAYER_AUDIO_CACHE_KB, MPLAYER_AUDIO_CACHE_MIN_PERCENT and MPLAYER_AUDIO_NETWORK_OPTS, it broke detach
389     Added WWW_IMAGE_SIZE and WWW_IMAGE_THUMBNAIL_SIZE for Cooliris support
390     Added VIDEO_AUTOJOIN_REGEX to allow more control when joining video files
391     """),
392]
393
394
395# NOW check if freevo.conf is up-to-date. An older version may break the next
396# steps
397
398FREEVO_CONF_VERSION = setup_freevo.CONFIG_VERSION
399
400if int(str(CONF.version).split('.')[0]) != int(str(FREEVO_CONF_VERSION).split('.')[0]):
401    print "ERROR: The version information in freevo_config.py does't"
402    print 'match the version in %s.' % freevoconf
403    print 'please rerun "freevo setup" to generate a new freevo.conf'
404    print_config_changes(FREEVO_CONF_VERSION, CONF.version, FREEVO_CONF_CHANGES)
405    sys.exit(1)
406
407if int(str(CONF.version).split('.')[1]) != int(str(FREEVO_CONF_VERSION).split('.')[1]):
408    print 'WARNING: freevo_config.py was changed, please rerun "freevo setup"'
409    print_config_changes(FREEVO_CONF_VERSION, CONF.version, FREEVO_CONF_CHANGES)
410
411
412# ======================================================================
413# General freevo settings:
414# ======================================================================
415
416POLL_TIME             = 0.01         # time in seconds that the poll handlers are called
417                                     # a lower rate of 0.05 is less demanding for less
418                                     # powerful processors
419
420AUDIO_DEVICE          = '/dev/dsp'   # e.g.: /dev/dsp0, /dev/audio, /dev/alsa/?
421AUDIO_INPUT_DEVICE    = '/dev/dsp1'  # e.g.: /dev/dsp0, /dev/audio, /dev/alsa/?
422
423MIXER_MAJOR_CTRL      = 'VOL'        # Freevo takes control over one audio ctrl
424                                     # 'VOL', 'PCM' 'OGAIN' etc.
425MIXER_MAJOR_MUTE_CTRL = 'PCM'        # used in alsamixer.py, There are systems where
426                                     # volume and mute use different controls
427
428MIXER_DEVICE          = '/dev/mixer' # mixer device
429MIXER_CONTROL_ALL     = 1            # Should Freevo take complete control of audio
430MIXER_VOLUME_STEP     = 5            # Amount to increment the mixer volume
431MIXER_VOLUME_MAX      = 90           # Set what you want maximum volume level to be.
432MIXER_VOLUME_DEFAULT  = 40           # Set default volume level.
433MIXER_VOLUME_TV_IN    = 60           # Set this to your preferred level 0-100.
434MIXER_VOLUME_VCR_IN   = 90           # If you use different input from TV
435MIXER_VOLUME_RADIO_IN = 80           # Set this to your preferred level 0-100.
436
437START_FULLSCREEN_X = 0               # Start in fullscreen mode if using x11 or xv.
438
439#
440# Physical ROM drives, multiple ones can be specified
441# by adding comma-seperated and quoted entries.
442#
443# Format [ ('mountdir1', 'devicename1', 'displayed name1'),
444#          ('mountdir2', 'devicename2', 'displayed name2'), ...]
445#
446# Set to None to autodetect drives in during startup from /etc/fstab,
447# set to [] to disable rom drive support at all
448#
449ROM_DRIVES = None
450
451ROM_DRIVES_AUTOFS = False  # Indicates that an automounter daemon is being used.
452                           # Does not try to mount/umount the media.
453
454#
455# hide discs from the wrong menu (e.g. VCDs in audio menu) and empty discs
456#
457HIDE_UNUSABLE_DISCS = 1
458
459#
460# Attempt to set the speed of the ROM drive. A good value for keeping the
461# drive silent while playing movies is 8.
462#
463ROM_SPEED = 0
464
465#
466# Shutdown confirmation.
467# Set to 0 for no confirmation, set to 1 to show a confirm dialog
468# (OK preselected), set to 2 to show a confirm dialog (Cancel preselected)
469#
470SYS_SHUTDOWN_CONFIRM = 1                  # ask before shutdown
471
472SYS_SHUTDOWN_CMD = 'shutdown -h now'  # set this to 'sudo shutdown -h now' if
473                                      # you don't have the permissions to shutdown
474
475SYS_RESTART_CMD  = 'shutdown -r now'  # like SYS_SHUTDOWN_CMD, only for reboot
476
477SYS_SHUTDOWN_ENABLE = 0  # Performs a whole system shutdown at SHUTDOWN!
478                         # For standalone boxes.
479
480# ======================================================================
481# Main menu items
482# ======================================================================
483plugin.activate('tv', level=10)
484plugin.activate('video', level=20)
485plugin.activate('audio', level=30)
486plugin.activate('image', level=40)
487
488if CONF.xmame or CONF.snes:
489    plugin.activate('games', level=50)
490
491# Headlines
492plugin.activate('headlines', level=60)
493HEADLINES_LOCATIONS = [
494    ('Freevo news releases', 'http://sourceforge.net/export/rss2_projnews.php?group_id=46652'),
495   #('Freevo news releases (full)', 'http://sourceforge.net/export/rss2_projnews.php?group_id=46652&rss_fulltext=1'),
496    ('Freevo file releases', 'http://sourceforge.net/export/rss2_projfiles.php?group_id=46652'),
497    ('Freevo summary+stats', 'http://sourceforge.net/export/rss2_projsummary.php?group_id=46652'),
498    ('Freevo donors', 'http://sourceforge.net/export/rss2_projdonors.php?group_id=46652'),
499]
500plugin.activate('shutdown', level=90)
501
502
503# ======================================================================
504# AUTOSHUTDOWN CONFIGURATION
505# ======================================================================
506
507# replace the default shutdown plugin
508# plugin.remove('shutdown')
509# plugin.activate('autoshutdown', level=90)
510
511# activate the timer
512# plugin.activate('autoshutdown.autoshutdowntimer')
513
514# -- autoshutdown menu item configuration --
515
516# Set to True to popup dialog boxes for confirmation.
517# this applies to menu items only.
518AUTOSHUTDOWN_CONFIRM=True
519
520
521# -- autoshutdown timer configuration --
522
523# Set the timeout in minutes after which the system
524# is shutdown. The allowed idle time and the running
525# processes (see below) are evaluated to determine if
526# a shutdown is allowed. Menu navigation in freevo will
527# reset the timer.
528AUTOSHUTDOWN_TIMER_TIMEOUT=30
529
530
531# -- autoshutdown behaviour configuration --
532
533# PRETEND
534# Set to True to disable the actual shutdown command.
535AUTOSHUTDOWN_PRETEND=False
536
537# PROCESS_LIST
538# List the processes that will prevent an automatic
539# shutdown. If there are important programs that
540# should not be interrupted, then add them to this
541# list. Set to None if a shutdown is always allowed.
542AUTOSHUTDOWN_PROCESS_LIST = [
543    'emerge',
544    'tvgids',
545    'transcode',
546    'cdrecord',
547    'mplayer',
548    'mencoder',
549    'top'
550]
551
552# WHILE_LOGGED
553# The system will automatically shutdown even if someone
554# is logged in  (as reported by 'who' ); set this to False
555# to avoid Freevo to shutdown on your face.
556AUTOSHUTDOWN_WHILE_USER_LOGGED=True
557
558
559# DEFAULT_WAKEUP_TIME
560# Set the default time at which to wakeup if there
561# are no recordings scheduled. The time is specified
562# in localtime 24 hour format. Set to None to disable
563# default wakeup time.
564AUTOSHUTDOWN_DEFAULT_WAKEUP_TIME = "13:00"
565
566# FORCE_DEFAULT_WAKEUP
567# Set to True to always wakeup at the default wakeup
568# time. Set to False to only wakeup at the default
569# wakeup time when no recordings are scheduled.
570AUTOSHUTDOWN_FORCE_DEFAULT_WAKEUP = True
571
572# ALLOWED_IDLE_TIME
573# The number of minutes that may be spent idle until
574# the next scheduled recording or default wakeup. That
575# is, if the gap between "now" and the next recording
576# or default wakeup is less than the allowed idle time
577# then a shutdown is not performed but the system is
578# left running. If the period from now to the next
579# recording or default wakeup is more than the allowed
580# idle time, then the system is shut down and a wakeup
581# is scheduled. Use this to minimize the number of
582# shutdown/boot sequences when many short programs are
583# recorded in a short period of time. Note that this
584# variable is used by both the timer and the menu.
585AUTOSHUTDOWN_ALLOWED_IDLE_TIME = 45
586
587# -- Choice of wakeup method
588#
589# The wakeup can be done via acpi-alarm or nvram-wakeup.
590# AUTOSHUTDOWN_METHOD = 'acpi'
591AUTOSHUTDOWN_METHOD = 'nvram'
592
593# -- autoshutdown acpi-alarm configuration
594
595# This method uses the wakeup on alarm function that most BIOSs have.
596# The wakeup time is set by a simple
597#
598# "echo 2004-08-02 20:15:00 >/proc/acpi/alarm"
599#
600# On most mainbords you will have to ENABLE "Wake on Timer", "Resume on Alarm",
601# "RTC Alarm Resume" or similar things for the acpi wakeup method to work.
602# If you want to use acpi, you need to create a small script:
603#
604#    !/bin/sh
605#    echo "$1" >/proc/acpi/alarm
606#
607# You have to be root or use sudo for this to work.
608#AUTOSHUTDOWN_WAKEUP_CMD = sudo /PATH/TO/set_acpi.sh
609
610
611# -- autoshutdown nvram-wakeup configuration --
612
613# The nvram-wakeup utility is used to write the
614# wakeup alarm to the RTC in bios. Read the
615# nvram-wakeup documentation about this topic,
616# a working nvram-wakeup configuration is needed.
617
618# NVRAM_CMD / NVRAM_OPT
619# Path to nvram-wakeup and options. Options can
620# be used to specify a config file.
621AUTOSHUTDOWN_WAKEUP_CMD = "/usr/bin/nvram-wakeup"
622AUTOSHUTDOWN_NVRAM_OPT = "--syslog"
623
624# WAKEUP_NEEDS_REBOOT
625# Set to True if the bios needs a reboot to catch
626# up with the rtc alarm that nvram-wakeup sets. The
627# boot loader options should be set too. Read the
628# nvram-wakeup documentation about this topic.
629AUTOSHUTDOWN_BIOS_NEEDS_REBOOT=True
630
631# -- if the bios needs a reboot --
632
633# BOOT_LOADER
634# Set to "GRUB" or "LILO" Only needed if bios needs
635# a reboot to initialize the RTC wakeup call.
636AUTOSHUTDOWN_BOOT_LOADER = "GRUB"
637
638# REMOUNT_BOOT_CMD / REMOUNT_BOOT_OPT
639# Grub needs to write to /boot/grub/grub.conf. Set
640# the command and options to remount the /boot
641# partition writeable. Set to None if this is not
642# needed.
643AUTOSHUTDOWN_REMOUNT_BOOT_CMD = "/bin/mount"
644AUTOSHUTDOWN_REMOUNT_BOOT_OPT = "/boot -o remount,rw"
645
646# GRUB_CMD / GRUB_OPT
647# Grub-set-default command and options that will
648# reboot and poweroff the system.
649AUTOSHUTDOWN_GRUB_CMD = "/sbin/grub-set-default 0"
650AUTOSHUTDOWN_GRUB_OPT = "0"
651
652# LILO_CMD / LILO_OPT
653# Lilo command with options that will reboot and
654# poweroff the system.
655AUTOSHUTDOWN_LILO_CMD = "/sbin/lilo"
656AUTOSHUTDOWN_LILO_OPT = "-R PowerOff"
657
658# ======================================================================
659# Events
660# ======================================================================
661#
662# You can add more keybindings by adding them to the correct hash.
663# e.g. If you want to send 'contrast -100' to mplayer by pressing the '1' key,
664# just add the following line:
665#
666# EVENTS['video']['1'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='contrast -100')
667#
668# See src/event.py for a list of all possible events.
669EVENTS = {
670    'menu'       : MENU_EVENTS,
671    'tvmenu'     : TVMENU_EVENTS,
672    'input'      : INPUT_EVENTS,
673    'tv'         : TV_EVENTS,
674    'video'      : VIDEO_EVENTS,
675    'dvd'        : DVD_EVENTS,             # only used by xine
676    'vcd'        : VCD_EVENTS,             # only used by xine
677    'audio'      : AUDIO_EVENTS,
678    'games'      : GAMES_EVENTS,
679    'image'      : IMAGE_EVENTS,
680    'image_zoom' : IMAGE_ZOOM_EVENTS,
681    'global'     : GLOBAL_EVENTS
682    }
683
684#
685# Use arrow keys for back and select (alternate way of navigating)
686#
687MENU_ARROW_NAVIGATION = False
688
689#
690# Process keyboard events from SDL. You want this unless you use only lirc
691# or event devices below.
692#
693SYS_USE_KEYBOARD = True
694
695#
696# Process keyboard events from SDL. You want this unless you use only lirc
697# or event devices below.
698#
699SYS_USE_JOYSTICK = True
700
701#
702# Process mouse events from SDL/Pygame. You want this to control Freevo
703# with a mouse
704#
705SYS_USE_MOUSE = False
706
707#
708# Keymap to map keyboard keys to event strings. You can also add new keys
709# here, e.g. KEYMAP[key.K_x] = 'SUBTITLE'. The K_-names are defined by pygame.
710#
711KEYMAP = DEFAULT_KEYMAP
712
713# List of /dev/input/event# devices to monitor. You can specify either the
714# device node (e.g. '/dev/input/event1') or the name of the device (e.g.
715# 'ATI Remote Wonder II'). If you monitor your keyboard both here and with
716# SYS_USE_KEYBOARD, then you will get duplicate events.
717#
718EVENT_DEVS = []
719
720# Keymap to map input events to event strings. You can change current mappings
721# and add new ones here, e.g. EVENTMAP['KEY_COFFEE'] = 'SUBTITLE'. Key names
722# are defined by the Linux input layer (input.h). An axis is described by a
723# pair, one for positive and one for negative movement, e.g.
724# EVENTMAP['REL_Z'] = ('LEFT', 'RIGHT')
725#
726EVENTMAP = DEFAULT_EVENTMAP
727
728# Use Internet resources to fetch information?
729# For example, Freevo can use CDDB for album information,
730# the IMDB movie database for movie info, and Amazon for cover searches.
731# Set this to 0 if your computer isn't connected to a network.
732#
733SYS_USE_NETWORK = True
734
735# HOST_ALIVE_CHECK tests if the given host is online.
736# Will be used to avoid extremely long automounter timeouts.
737#
738HOST_ALIVE_CHECK = 'ping -c 1 -W 1 %s > /dev/null 2>&1'
739
740#
741# Directory location to save files when the normal filesystem
742# doesn't allow saving. This directory can save covers and fxd files
743# for read only filesystems like ROM drives. Set this variable to your
744# old MOVIE_DATA_DIR if you have one. It needs to be set to a directory
745# Freevo can write to.
746#
747#if os.environ.has_key('HOME') and os.environ['HOME']:
748#    OVERLAY_DIR = os.path.join(os.environ['HOME'], '.freevo/vfs')
749#else:
750#    OVERLAY_DIR = os.path.join(FREEVO_CACHEDIR, 'vfs')
751OVERLAY_DIR = os.path.join(FREEVO_CACHEDIR, 'vfs')
752
753#
754# Umask setting for all files.
755# 022 means only the user has write access. If you share your Freevo
756# installation with different users, set this to 002
757#
758UMASK = 022
759
760#
761# Suffix for playlist files
762#
763PLAYLIST_SUFFIX = [ 'm3u' ]
764
765#
766# Use md5 in mmpython to create unique disc ids. Enable this if you have
767# problems with different discs having the same id.
768#
769MMPYTHON_CREATE_MD5_ID = 0
770
771#
772# Keep metadata in memory
773# Setting this variable will keep all cache files in memory. Startup will be
774# slower, but for large directories, this will speed up the display.
775# 0 = Only keep current dir in memory. Use this if you have too much data
776#     and not enough RAM
777# 1 = Once loaded, keep cachefile for directory in memory
778# 2 = Load all cachefiles on startup
779#
780# WARNING: you should not run 'freevo cache' when freevo is running.
781#
782MEDIAINFO_USE_MEMORY = 1
783
784#
785# Cache images. This uses a lot of disc space but it's a huge speed
786# enhancement. The images will be cached in OVERLAY_DIR
787#
788CACHE_IMAGES = 1
789
790#
791# Cache cropdetection. This will take quite a while to run
792#
793CACHE_CROPDETECT = False
794
795# ======================================================================
796# Plugins:
797# ======================================================================
798
799# Remove undesired plugins by setting plugin.remove(code).
800# You can also use the name to remove a plugin. But if you do that,
801# all instances of this plugin will be removed.
802#
803# Examples:
804# plugin.remove(plugin_tv) or
805# plugin.remove('tv') will remove the tv module from the main menu
806# plugin.remove(rom_plugins['image']) will remove the rom drives from the
807#   image main menu,
808# plugin.remove('rom_drives.rom_items') will remove the rom drives from all
809#   menus
810
811
812# ======================================================================
813# Idlebar plug-ins
814# ======================================================================
815plugin.activate('idlebar')
816plugin.activate('idlebar.tv', level=20)
817plugin.activate('idlebar.cdstatus', level=25)
818plugin.activate('idlebar.diskfree', level=30)
819DISKFREE_VERY_LOW = 8 # In Gigabytes
820DISKFREE_LOW = 20
821plugin.activate('idlebar.clock', level=50)
822CLOCK_FORMAT = '%a %d %H:%M'
823
824# ======================================================================
825# Daemon plug-ins
826# ======================================================================
827
828# autostarter when inserting roms while Freevo is in the MAIN MENU
829plugin.activate('rom_drives.autostart')
830plugin.activate('ejectromdrives')
831
832# add the rom drives to each sub main menu
833rom_plugins = {}
834for t in ('video', 'audio', 'image', 'games'):
835    rom_plugins[t] = plugin.activate('rom_drives.rom_items', type=t, level=50)
836
837# Set to true to allow destination to be clobbered
838SHOPPINGCART_CLOBBER = False
839
840# mixer
841plugin.activate('mixer')
842
843# add imdb search to the video item menu
844plugin.activate('video.imdb')
845
846# list of regexp to be ignored on a disc label
847IMDB_REMOVE_FROM_LABEL = ('season[\._ -][0-9]+', 'disc[\._ -][0-9]+',
848                          'd[\._ -][0-9]+', 'german')
849# list of regexp to be ignored on a filename, match TV_RECORDMASK
850IMDB_REMOVE_FROM_NAME = ['^[0-9]+-[0-9]+[ _][0-9]+\.[0-9]+[ _]']
851
852# list of words to ignore when searching based on a filename
853IMDB_REMOVE_FROM_SEARCHSTRING = ('the', 'a')
854
855# When searching for a movie title in imdb, should the result be
856# autoaccepted if it is only one hit?
857# 0 = show menu even if it is only one hit (gives you an opportunity to cancel)
858# 1 = autoaccept
859IMDB_AUTOACCEPT_SINGLE_HIT = True
860
861# delete file in menu
862plugin.activate('file_ops', level=20)
863
864# use mplayer for video playpack
865plugin.activate('video.mplayer')
866
867# use mplayer for audio playpack
868plugin.activate('audio.mplayer')
869
870# make it possible to detach the player
871plugin.activate('audio.detach', level=20)
872plugin.activate('audio.detachbar')
873
874# Amazon seems to request the covers in one locale and get the data
875# in another encoding. Locale must be one of: de, jp, uk, us
876#
877AMAZON_LOCALE = 'us'
878AMAZON_QUERY_ENCODING = 'iso-8859-15'
879
880# use mplayer for tv
881# to use tvtime, put the following two lines in your local_conf.py:
882# plugin.remove('tv.mplayer')
883# plugin.activate('tv.tvtime')
884plugin.activate('tv.mplayer')
885
886# control an external tv tuner using irsend or another command
887# to use this you must reassign plugin_external_tuner in local_conf.py:
888# plugin_external_tuner = plugin.activate('tv.irsend_generic',
889#                                         args=('...', '...', ))
890# Please see each irsend plugin for individual arguments and be sure to
891# alter VIDEO_GROUPS to tell a VideoGroup to use it (tuner_type='external').
892plugin_external_tuner = 0
893
894# support for settings bookmarks (key RECORD) while playing. Also
895# auto bookmarking when playback is stopped
896plugin.activate('video.bookmarker', level=0)
897
898# show some messages on the screen
899plugin.activate('tiny_osd')
900
901# For recording tv
902#
903# generic_record plugin needs VCR_CMD to be set correctly
904plugin_record = plugin.activate('tv.generic_record')
905
906#
907# Use ivtv_record instead if you have an ivtv based card (PVR-250/350)
908# and want freevo to do everthing for you. TV_SETTINGS must be set
909# correctly. To use you need to set the following two lines:
910#
911# plugin.remove('tv.generic_record')
912# plugin_record = plugin.activate('tv.ivtv_record')
913
914# TV menu plugin to view scheduled recordings
915plugin.activate('tv.scheduled_recordings')
916
917# TV menu plugin to view recordings
918plugin.activate('tv.view_recordings')
919
920# TV menu plugin to view and edit favorites