-----

CONFIG_VERSION = 5.21


# ======================================================================
# General freevo settings:
# ======================================================================

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_MAX      = 90           # Set what you want maximum volume level to be.
MIXER_VOLUME_DEFAULT  = 60           # 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 = 1               # Start in fullscreen mode if using x11 or xv.

SHUTDOWN_CONFIRM   = 0               # ask before shutdown

#
# 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 = [
        ('/media/cdrom', '/dev/cdrom', 'DVD')
]

#
# 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

#
# Perform a whole system shutdown at SHUTDOWN! Useful for standalone boxes.
#
# SHUTDOWN_SYS_ENABLE = 0
#
# Command to execute to shutdown the system
#
# SHUTDOWN_SYS_CMD = "sudo shutdown -h now"
# RESTART_SYS_CMD = "sudo shutdown -r now"

# ======================================================================
# 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.

#
# Some events to jump to menus
#
# EVENTS['menu']['GUIDE'] = Event(MENU_GOTO_TVGUIDE) # Not working
# EVENTS['menu']['VIDEOS'] = Event(MENU_GOTO_VIDEOS)
# EVENTS['menu']['MUSIC'] = Event(MENU_GOTO_MUSIC)
# EVENTS['menu']['PICTURES'] = Event(MENU_GOTO_IMAGES)
# EVENTS['menu']['GAMES'] = Event(MENU_GOTO_GAMES)
# EVENTS['menu']['RADIO'] = Event(MENU_GOTO_RADIO) # Not working
# EVENTS['menu']['POWER'] = Event(MENU_GOTO_SHUTDOWN)

#
# Use arrow keys for back and select (alternate way of navigating)
#
MENU_ARROW_NAVIGATION =1

#
# Process keyboard events from SDL. You want this unless you use only lirc
# or event devices below.
#

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')

# 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.
#
USE_NETWORK = 1

#
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


# ======================================================================
# 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
#
# See freevo_config.py for a list of loaded plugins

#
# 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')

#
# Enable this for joystick support:
# plugin.activate('joy')


# ----------------------------------------------------------------------
# Headlines
#
# You are free to use any rss feeds in the HEADLINES_LOCATIONS below
# These are just working examples for the Freevo feeds.
# To turn off Headlines add plugin.remove('headlines')
# ----------------------------------------------------------------------
# plugin.activate('headlines', level=45)
# HEADLINES_LOCATIONS = [
#    ('Freevo news releases', 'http://sourceforge.net/export/rss2_projnews.php?group_id=46652'),
#    ('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'),
# ]
HEADLINES_LOCATIONS = [
    ('ABC Top Stories', 'http://www.abc.net.au/news/syndicate/topstoriesrss.xml'),
    ('ABC Breaking News','http://www.abc.net.au/news/syndicate/breakingrss.xml'),
    ('ABC Health News', 'http://www.abc.net.au/news/syndicate/healthrss.xml'),
    ('ABC Science News', 'http://www.abc.net.au/news/syndicate/sciencerss.xml'),
]

# ----------------------------------------------------------------------
# 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.

# ----------------------------------------------------------------------
# CD Burning
# ----------------------------------------------------------------------
CDBURN_AUDIO_DAO = 1
CDBURN_MKISOFS_PATH = '/usr/bin/mkisofs'
CDBURN_CDRECORD_PATH = '/usr/bin/cdrecord'
CDBURN_TEMP_DIR='/tmp/'
CDBURN_DEV = '/dev/cdrom'
CDBURN_SPEED = 32

# ----------------------------------------------------------------------
#plugin.activate('buttonbar')

# You'll also need to map the 'RED', 'GREEN', 'YELLOW'
# and 'BLUE' events to keys for example (don't use this
# it overrides some default keys)
# KEYMAP[key.K_F5] = 'RED'
# KEYMAP[key.K_F6] = 'GREEN' #Already mapped to record
# KEYMAP[key.K_F7] = 'YELLOW'
# KEYMAP[key.K_F8] = 'BLUE'

plugin.activate('buttonbar')
KEYMAP[key.K_F7] = 'RED'
KEYMAP[key.K_F8] = 'GREEN'
KEYMAP[key.K_F9] = 'YELLOW'
KEYMAP[key.K_F10] = 'BLUE'



# ----------------------------------------------------------------------
# Freevo Screensaver Plug-in
# ----------------------------------------------------------------------
SCREENSAVER_DELAY = 120 # of seconds to wait to start saver.
SCREENSAVER_CYCLE_TIME = 60 # of seconds to run a screensaver before starting another saver.
# plugin.activate('screensaver')
# plugin.activate('screensaver.balls') # Bouncing balls all over the screen
plugin.activate('screensaver.bouncing_freevo') # The freevo logo bouncing around the screen


# ======================================================================
# 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 = 1 

#
# Should files in directories have smart names?
# This removes the first part of the names when identical
#
DIRECTORY_SMART_NAMES = 0

#
# Should Freevo autoplay an item if only one item is in the directory?
#
DIRECTORY_AUTOPLAY_SINGLE_ITEM = 0

#
# 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' ]
# To disable autoplay entirely:
# DIRECTORY_AUTOPLAY_ITEMS = []

# Make all items a playlist. So when one is finished, the next one will
# start. It's also possible to browse through the list with UP and DOWN
#
DIRECTORY_CREATE_PLAYLIST     = [ 'audio', 'image' ]

# Add playlist files ('m3u') to the directory
#
DIRECTORY_ADD_PLAYLIST_FILES  = [ 'audio', 'image' ]

# Add the item 'Random Playlist' to the directory
#
DIRECTORY_ADD_RANDOM_PLAYLIST = [ 'audio' ]

# Make 'Play' not 'Browse' the default action when only items and not
# subdirectories are in the directory
#
# DIRECTORY_AUTOPLAY_ITEMS      = [ ]


# ======================================================================
# Freevo movie settings:
# ======================================================================

#
# Where the movie files can be found.
# This is a list of items (e.g. directories, fxd files). The items themselves
# can also be a list of (title, file)
#
VIDEO_ITEMS = [ ('Movies', '/home/tv/Movies'),
                ('Hairy Bikers', '/mnt/sdf1/Hairy_Bikers'),
                ('Tour de France 2007', '/mnt/sdf1/TDF2007'),
                ('Time Team', '/mnt/sdf1/Time_Team'),
                ('Himalaya - Michael Palin', '/mnt/sdf1/Himalaya') ]    

#
# Some people access movies on a different machine using an automounter.
# To avoid timeouts, you can specify the machine name in the directory
# to check if the machine is alive first
# Directory myserver:/files/server-stuff will show the item for the
# directory /files/server-stuff if the computer myserver is alive.

#
# The list of filename suffixes that are used to match the files that
# are played wih MPlayer.
#
VIDEO_MPLAYER_SUFFIX = [ 'avi', 'mpg', 'mpeg', 'wmv', 'bin', 'rm',
                          'divx', 'ogm', 'vob', 'asf', 'm2v', 'm2p',
                          'mp4', 'viv', 'nuv', 'mov', 'iso',
                         'nsv', 'mkv' ]

#
# The list of filename suffixes that are used to match the files that
# are played wih Xine.
#
VIDEO_XINE_SUFFIX = [ 'avi', 'mpg', 'mpeg', 'rm', 'divx', 'ogm',
                       'asf', 'm2v', 'm2p', 'mp4', 'mov', 'cue' ]

#
# Preferred video player
#
VIDEO_PREFERED_PLAYER = 'xine'

#
# Only scan OVERLAY_DIR and VIDEO_SHOW_DATA_DIR for fxd files containing
# information about a disc. If you only have the fxd files for discs in
# one of this directories (and subdirectories), set this to 1, it will
# speed up startup, 0 may be needed if you have fxd files with disc links
# in your normal movie tree.
#
# VIDEO_ONLY_SCAN_DATADIR = 1

#
# try to detect a movie with more than one file and join them as one
# item
#
# VIDEO_AUTOJOIN = 1

#
# try to find out if deinterlacing is needed or not
#
# VIDEO_DEINTERLACE = None

#
# Instruct player to use XVMC for playback
#
# VIDEO_USE_XVMC = None

#
# Pass field dominance parameter to MPlayer
#
# VIDEO_FIELD_DOMINANCE = None

# PRE and POST playing commands.  Set these to a runnable command if
# you wish to do something before and after playing a video, like
# dimming the lights
# VIDEO_PRE_PLAY  = None
# VIDEO_POST_PLAY = None


# ======================================================================
# Freevo audio settings:
# ======================================================================

#
# Where the Audio (mp3, ogg) files can be found.
# This is a list of items (e.g. directories, fxd files). The items themselves
# can also be a list of (title, file)
#
# To add webradio support, add fxd/webradio.fxd to this list
#
# AUDIO_ITEMS = [
#     ('Music Collection', '/freevo/audio/mp3'),
#     'fxd/webradio.fxd',
# ]
AUDIO_ITEMS = [ ('Music on Netjuke', '/mnt/netjuke') ]

#
# The list of filename suffixes that are used to match the files that
# are played as audio.
#
AUDIO_SUFFIX = [ 'mp3', 'ogg', 'wav','m4a', 'wma', 'aac', 'flac', 'mka' ]

#
# Regular expression used to recognize filenames which are likely to be
# covers for an album
#
# This will match front.jpg and cover-f.jpg, but not back.jpg nor cover-b.jpg:
# AUDIO_COVER_REGEXP = 'front|-f'

#
# Format strings used to seach for audio cover images.
# Fist matching GIF, JPG or PNG image will be used as cover.
#
# Examples:
# AUDIO_COVER_FORMAT_STRINGS = [ 'cover-%(artist)s-%(album)s', 'mycover' ]
# AUDIO_COVER_FORMAT_STRINGS = [ '%(album)s', '../covers/%(album)s', '../covers/nocover' ]
#

#
# Preferred audio player
#
AUDIO_PREFERED_PLAYER = 'mplayer'

#
# Show video files in the audio menu (for music-videos)
#
# AUDIO_SHOW_VIDEOFILES = False

# ======================================================================
# Freevo image viewer settings:
# ======================================================================

#
# Where image files can be found.
# This is a list of items (e.g. directories, fxd files). The items itself
# can also be a list of (title, file)
#
IMAGE_ITEMS = [('Photos','/home/tv/Pictures/'),
      ('Cartoons', '/home/tv/cartoons'),
]


#
# The list of filename suffixes that are used to match the files that
# are used for the image viewer.
#
IMAGE_SUFFIX = [ 'jpg','gif','png','jpeg','bmp','tiff','psd' ]

#
# The viewer now supports a new type of menu entry, a slideshow file.
# It also has the slideshow alarm signal handler for automated shows.
# It uses a new configuration option:
#
# IMAGE_SSHOW_SUFFIX = [ 'ssr' ]

# The viewer can exclude certain types of images based on the regular expression list
# eg IMAGE_EXCLUDE = [('thm','tn_')]

# IMAGE_EXCLUDE = None

#
# Mode of the blending effect in the image viewer between two images
# Possible values are:
#
# None: no blending
# -1    random effect
#  0    alpha blending
#  1    wipe effect

IMAGEVIEWER_BLEND_MODE = -1



# ======================================================================
# Freevo SKIN settings:
# ======================================================================

#
# XML file for the skin. If SKIN_XML_FILE is set, this skin will be
# used, otherwise the skin will rememeber the last choosen skin.
#
SKIN_XML_FILE = 'noia'
#
#
# Select a way when to switch to text view even if a image menu is there
#
# 1 = Force text view when all items have the same image and there are no
#     directories
# 2 = Ignore the directories, always switch to text view when all images
#     are the same
#
SKIN_FORCE_TEXTVIEW_STYLE = 1

#
# Force text view for the media menu
# (The media menu is the first menu displayed for video, audio, images
# and games).
#
SKIN_MEDIAMENU_FORCE_TEXTVIEW = 0


# ======================================================================
# Freevo OSD settings:
# ======================================================================

#
# System Path to search for fonts not included in the Freevo distribution
#
OSD_EXTRA_FONT_PATH = [ '/usr/share/fonts/truetype' ]

#
JOY_DEV = 0

# ======================================================================
# MPlayer settings:
# ======================================================================

MPLAYER_AO_DEV      = 'alsa'  # e.g.: oss,sdl,alsa, see mplayer docs

MPLAYER_VO_DEV_OPTS = ''              # e.g.: ':some_var=vcal'

DVD_LANG_PREF       = 'en,se,no'      # Order of preferred languages on DVD.
DVD_SUBTITLE_PREF   = ''              # Order of preferred subtitles on DVD.

# Priority of mplayer process. 0 is unchanged, <0 is higher prio, >0 lower prio.
# prio <0 has no effect unless run as root.
# MPLAYER_NICE        = -20

#
# Mplayer options to use the software scaler. If your CPU is fast enough, you
# might try a software scaler. You can disable it later for some larger files
# with the mplayer option '-nosws'. If you have -framedrop or -hardframedrop
# as mplayer option, the software scaler will also not be used.
# A good value for this variable is:
# MPLAYER_SOFTWARE_SCALER = "-subfont-text-scale 5 -fs -sws 2 -vf scale=%s:-3,"\
#                           "expand=%s:%s " % ( CONF.width, CONF.width, CONF.height )
# older versions of mplayer may need
# MPLAYER_SOFTWARE_SCALER = '-xy %s -sws 2 -vop scale:-1:-1:-1:100' % CONF.width
#
# MPLAYER_SOFTWARE_SCALER = ''

#
# Mplayer arguments for different media formats. (eg DVDs, CDs, AVI files, etc)
# Uses a default value if nothing else matches.
#
MPLAYER_ARGS = { 'dvd'    : '-cache 8192',
                  'vcd'    : '-cache 4096',
                  'cd'     : '-cache 1024 -cdda speed=2',
                  'tv'     : '-nocache',
                  'ivtv'   : '-cache 8192',
                  'avi'    : '-cache 5000 -idx',
                  'rm'     : '-cache 5000 -forceidx',
                  'rmvb'   : '-cache 5000 -forceidx',
                  'webcam' : 'tv:// -tv driver=v4l:width=352:height=288:outfmt=yuy2:device=/dev/video2',
                  'default': '-cache 5000'
                  }


#
# ======================================================================
# Xine settings:
# ======================================================================

# You need xine-ui version greater 0.9.21 to use the all the features
# of the xine plugin

XINE_VO_DEV  = 'xv'
XINE_COMMAND = '%s --auto-play=fq --hide-gui --borderless --geometry %sx%s+0+0 --no-splash' % \
                (CONF.xine, CONF.width, CONF.height)
XINE_ARGS_DEF = "--no-lirc --post='pp:quality=10;expand'"

XINE_AO_DEV = 'alsa'                     # alsa or oss

# Set to False if xine doesn't have '--no-lirc' option
# XINE_HAS_NO_LIRC = True

# Set to True is xine supports get_time this enables the position to be saved
# XINE_BOOKMARK = False


# ======================================================================
# IVTV Xine TV settings:
# ======================================================================

# -- plugin configuration --

# plugin.remove('tv.mplayer')
# plugin.activate('tv.ivtv_xine_tv')

# Note: TV_IVTV_OPTIONS must be configured properly
# Note: TV_FREQUENCY_TABLE must be configured properly
# Note: XINE_COMMAND must be configured properly
# Note: XINE_ARGS_DEF must be configured properly

# -- TV/XINE configuration --

# Video output device for TV. For Hauppage PVR x50,
# use "xxmc" if you have hardware acceleration enabled.
# Otherwise, see XINE_VO_DEV
# XINE_TV_VO_DEV = "xxmc"

# Audio output device to use for TV. See XINE_AO_DEV.
# XINE_TV_AO_DEV = "alsa"

# This specifies the path and filemask that xine uses for
# timeshifting. File can get quite big (several gigabytes)
# XINE_TV_TIMESHIFT_FILEMASK = "/tmp/xine-buf-"

# Stop confirmation: press STOP twice to return to menu
# XINE_TV_CONFIRM_STOP = True

# This enables the progressive seek feature. The speed
# for seeking (fast forward and rewind) is increased
# automatically. The speed is increased every [THRESHOLD]
# seconds in steps of [INCREMENT] secnds.
# XINE_TV_PROGRESSIVE_SEEK = True
# XINE_TV_PROGRESSIVE_SEEK_THRESHOLD = 2
# XINE_TV_PROGRESSIVE_SEEK_INCREMENT = 5

# ======================================================================
# Freevo TV settings:
# ======================================================================

#
# This is where recorded video is written.
#
# XXX the path doesn't work from the www cgi scripts!

TV_RECORD_DIR = '/home/tv/record/'
# This will enable duplicate recording detection
TV_RECORD_DUPLICATE_DETECTION = True

# This will enable only new episodes to be recorded
TV_RECORD_ONLY_NEW_DETECTION = True

# ================================================================================
# Watching TV
# ================================================================================
#
# XXX You must change this to fit your local conditions!
#
# NORM: ntsc, pal, secam
# INPUT: television, composite1
# CHANLIST: One of the following:
#
# us-bcast, us-cable, us-cable-hrc, japan-bcast, japan-cable, europe-west,
# europe-east, italy, newzealand, australia, ireland, france, china-bcast,
# southafrica, argentina, canada-cable, russia
#
TV_SETTINGS = 'pal television australia /dev/video0'

#
# Video input device
#
# Usually /dev/video0, but might be /dev/video1 instead for multiple boards.
#
# FreeBSD uses the Brooktree TV-card driver, not V4L.
#
TV_DRIVER = 'v4l2'
TV_DEVICE = '/dev/video0'
TV_INPUT = 4
#
# ================================================================================
# Listening to radio
# ================================================================================
#
# Radio device default is None, /dev/video24 for ivtv
RADIO_DEVICE = '/dev/video24'

# Radio commands:
plugin.activate('audio.radioplayer')
plugin.activate('audio.radio')
#
# for fmtools
# RADIO_CMD = 'fm'
# RADIO_CMD_START = (RADIO_CMD + ' ' + '-q %s 65535')
# RADIO_CMD_STOP = (RADIO_CMD + ' ' + '-q off')
#
# for ivtv-radio
RADIO_CMD = '/usr/bin/ivtv-radio -d /dev/radio0 -i /dev/video24'
RADIO_STATIONS = [
     ('TripleJ', '96.50'),
     ('Radio National', '98.90'),
     ('Regional Radio', '100.50'),
     ('ABC News Radio', '98.1'),
     ('Classic FM', '97.3'),
     ('MIA-FM', '95.10'),
     ('StarFM', '99.70'), ]

#
# Additional options to pass to mplayer in TV mode.
#
# eg. To turn off deinterlacing:
TV_OPTS = '-vop pp=ci'
#


TV_RECORD_FILE_MASK = '%%m-%%d %%H:%%M %(progname)s - %(title)s'

# If using the persistent recordserver
TV_RECORD_SCHEDULE = '%s/record_schedule.xml' % FREEVO_CACHEDIR

RECORDSERVER_IP = 'localhost'
RECORDSERVER_PORT = 18001

# If the recordserver runs as root, set the uid to the given one
# after startup. The gui must also match one of the users group ids
# RECORDSERVER_UID = 0
# RECORDSERVER_UID = 0

# Remove old recordings if GB free is less than specified value
# RECORDSERVER_CLEANUP_THRESHOLD = 0

# start every recording X minutes before scheduled,
# and stop X minutes after scheduled - default to zero minutes.
# This must be a value in seconds although at the moment only has
# the percision of one minute.
TV_RECORD_PADDING_PRE = 1 * 60
TV_RECORD_PADDING_POST = 1 * 60


TV_VIEW_SIZE = (768,586)
TV_REC_SIZE = (768,586)   # Default for slower computers

#

# TV_FREQUENCY_TABLE = {
#     'tuner_id'   :    55250,
# }

TV_FREQUENCY_TABLE = {
     '28'       :       527250,
     '7'        :       182250,
     '9'        :       196250,
     '31'       :       548250,
}


# TV_VIDEO_GROUPS setting to handles multiple arbitrary groups of devices
# for viewing or recording.  It is possible to have different Freevo
# channels use different Video Groups.
# 
# This example is when you have one IVTV type card installed
#
# TV_VIDEO_GROUPS = [
#     VideoGroup(vdev=TV_DEVICE,
#                adev=AUDIO_DEVICE,
#                input_type='tuner',
#                input_num=0,
#                tuner_norm=CONF.tv,
#                tuner_chanlist=CONF.chanlist,
#                group_type = 'ivtv',
#                desc='PVR-350 Video Group'),
# ]
#

TV_VIDEO_GROUPS = [
        VideoGroup(vdev = '/dev/video0',
                adev = None,
                input_type = 'tuner 1',
                input_num = 0,
                tuner_norm = CONF.tv,
                tuner_chanlist = CONF.chanlist,
                desc='Default Video Group',
                group_type = 'ivtv',
                record_group = None),
]
# This example is for two normal TV cards to allow you to use one card to
# view a programme and the other card to record at the same time
# See the wiki for more details:
#   http://doc.freevo.org/MultiTunerConfig
#   http://doc.freevo.org/Analoguemulti
#
# TV_VIDEO_GROUPS = [
#     # Use this group for watching tv
#     VideoGroup(vdev=TV_DEVICE,
#                adev=AUDIO_DEVICE,
#                input_type='tuner',
#                tuner_norm=CONF.tv,
#                tuner_chanlist=CONF.chanlist,
#                desc='Watching Video Group',
#                record_group=1),
#     # Use this group for recording tv
#     VideoGroup(vdev='/dev/video1',
#                adev=AUDIO_DEVICE,
#                input_type='tuner',
#                tuner_norm=CONF.tv,
#                tuner_chanlist=CONF.chanlist,
#                desc='Recording Video Group',
#                record_group=None),
# ]


#
# TV Channels. This list contains a mapping from the displayed channel name
# to the actual channel name as used by the TV watching application.
# The display name must match the names from the XMLTV guide,
# and the TV channel name must be what the tuner expects (usually a number).
#
# The TV menu is supposed to be supported by the XMLTV application for
# up to date listings, but can be used without it to just display
# the available channels.
#
# This list also determines the order in which the channels are displayed!
# N.B.: You must delete the XMLTV cache file (e.g. /var/cache/freevo/TV.xml.pickled)
#       if you make changes here and restart!
#
# Format: [('xmltv channel id', 'freevo display name', 'tv channel name'), ...]
#
# If this variable is set to None (default), Freevo will try to auto-detect
# the channel list based on the xmltv file. This doesn't work for all
# xmltv grabber, e.g. the German list doesn't contain station lists. In this
# case Freevo will output the possible list for you to add them manually.
#
# If auto-detection doesn't work or you want to edit the list, run
# freevo tv_grab -query.
#
# Setting this variable to [] will deactivate the tv guide. If you don't have
# a tv card, you may also want to add plugin.remove('tv') to remove the whole
# tv menu.
#
# All channels listed here will be displayed on the TV menu, even if they're
# not present in the XMLTV listing.
#
#
# Timedependent channels:
#
# The TV_CHANNELS-list can look like this:
#
# TV_CHANNELS = [('21', 'SVT1',              'E5'),
#                ('22', 'SVT2',              'E3'),
#                ('26', 'TV3',               'E10'),
#                ('27', 'TV4',               'E6'),
#                ('10', 'Kanal 5',           'E7'),
#                ('60', 'Fox Kids',          'E8', ('1234567','0600','1659')),
#                ('16', 'TV6',               'E8', ('1234567','1700','2359'),
#                                                  ('1234567','0000','0300')),
#                ('14', 'MTV Europe',        'E11') ]
#
# As you can see the list takes optional tuples:
# ( 'DAYS', 'START','END')
#
# 1234567 in days means all days.
# 12345 would mean monday to friday.
#
# It will display "Fox Kids" from 06:00 to 16:59 and "TV6" from 17:00 to 03:00.
# 03:00 to 06:00 it won't be displayed at all.
#
#old channels from xmltv
#TV_CHANNELS = [ 
#       ('free.NSWReg.PrimS.d1.com.au', 'Prime', '31'),
#       ('free.NSWReg.2.d1.com.au', 'ABC', '7'),
#       ('free.NSWReg.WIN.d1.com.au', 'WIN', '9'),
#       ('free.NSWReg.SBS.d1.com.au', 'SBS', '28')
#]
#full list of tv channels, channel IDs may be invented
#TV_CHANNELS = [ 
#       ('abc.free.au', 'ABC', '7'),
#       ('sbs.free.au', 'SBS', '28'),
#       ('win.free.au', 'WIN', '9'),
#       ('prime.free.au', 'Prime', '31')]
#       ('7hd.free.au','7HD','11'),
#       ('abc2.free.au','ABC2','11'),
#       ('tenhd.free.au','TEN HD','25'),
#       ('sbsnews.free.au','SBS News','33'),
#       ('ten.free.au','TEN','45')
#]      
#tv channels from shepherd      
TV_CHANNELS = [ 
        ('prime.free.au', 'Prime', '31'),
        ('abc.free.au', 'ABC', '7'),
        ('win.free.au', 'WIN', '9'),
        ('sbs.free.au', 'SBS', '28')
]       
        
#
# Program to grab xmltv listings. To get a grabber, you need to download
# xmltv. A possible value for users in the USA is tv_grab_na
# Use the tv_grab helper to grab the listings and cache them. Start
# 'freevo tv_grab --help' for more informations.

XMLTV_GRABBER = '/home/freevo/.shepherd/tv_grab_au --timeoffset=Auto'

#
# If you want to run tv_sort on your listings add the path to tv_sort here.
# tv_sort will make sure all your programs have proper stop times, otherwise
# programs might get cut off at midnight.
#
XMLTV_SORT = '/usr/bin/tv_sort'

#
# Number of days the grabber should get
#
XMLTV_DAYS = 7


# ======================================================================
# Freevo builtin commdetect server settings:
# ======================================================================
COMMDETECTSERVER_UID = 0
COMMDETECTSERVER_GID = 0
#
COMMDETECTSERVER_IP   = 'localhost'
COMMDETECTSERVER_PORT = 6667

# ======================================================================
# Freevo xmradio plug-in settings:
# ======================================================================

#
plugin.activate('www')

#
# Web server port number. 80 is the standard port, but is often
# taken already by apache, and cannot be used unless the server
# runs as root. Port 8080 is the default, change to 80 if
# needed.
#
WEBSERVER_PORT = 8080

#
# Username / Password combinations to login to the web interface.
#
WWW_USERS = {
     "tv" : "xxxxxxx",
     "TV" : "yyyyyyyy"
 }
#

#
# Divide the TV guide into intervals of this length (in minutes)
#
WWW_GUIDE_INTERVAL = 30

#
# Precision for TV guide (in minutes)
#
WWW_GUIDE_PRECISION = 5 #

#
# Show this many blocks at once
#
WWW_GUIDE_COLS = 10

WWW_STYLESHEET = 'styles/main.css'

WWW_JAVASCRIPT = 'scripts/display_prog-head.js'



ENABLE_NETWORK_REMOTE = 1
REMOTE_CONTROL_HOST = '127.0.0.1'
REMOTE_CONTROL_PORT = 16310



XMLTV_FILE = '/var/cache/freevo/TV.xml'


DEBUG = 1

DEBUG_CHILDAPP = 1
