-
Notifications
You must be signed in to change notification settings - Fork 2
Policies
Policies are implemented throughout Shepherd to control the logic on choosing if there is sufficient data or how to merge overlapping programme data.
The following default policies are used when grabbing data and determining if there is any missing data.
To override the defaults, you may manually add a configuration directive into your local ~/.shepherd/shepherd.conf configuration file. Note that we strongly discourage changing of default values unless you are really sure you know what you are doing! If you put some invalid syntax in the config file, shepherd may not work any more. If you get stuck, delete the ~/.shepherd/shepherd.conf configuration file and run ~/.shepherd/shepherd --configure to rebuild it.
$policy{timeslot_size} = (5 * 60); # 5 minute slots
$policy{timeslot_debug} = 0; # don't debug timeslot policy by default
# PEAK timeslots -
# between 4.30pm and 10.30pm every day, only allow a maximum of
# 15 minutes "programming data" missing
# if there is more than this, we will continue asking grabbers for more
# programming on this channel
$policy{peak_max_missing} = 15*60; # up to 15 mins max allowed missing
$policy{peak_start} = (16*(60*60))+(30*60); # 4.30pm
$policy{peak_stop} = (22*(60*60))+(30*60); # 10.30pm
# NON-PEAK timeslots -
# between midnight and 7.15am every day, only allow up to 6 hours missing
# if there is more than this, we will continue asking grabbers for more
# programming on this channel
$policy{nonpeak_max_missing} = 7*(60*60); # up to 6 hours can be missing
$policy{nonpeak_start} = 0; # midnight
$policy{nonpeak_stop} = (7*(60*60))+(15*60); # 7.15am
# all other timeslots - (7.15am-4.30pm, 10.30pm-midnight)
# allow up to 60 minutes maximum missing programming
$policy{other_max_missing} = 3*60*60; # up to 3 hrs max allowed missing
# if a postprocessor failed 5 times in a row, automatically disable it
$policy{postprocessor_disable_failure_threshold} = 5;
# don't accept programmes that last for longer than 8 hours.
$policy{max_programme_length} = (8 * 60 * 60); # 8 hours
The following default policies are used when reconciling data from multiple grabbers:
To override the defaults, you may manually add a configuration directive into your local ~/.shepherd/reconcilers/reconciler_mk2/reconciler_mk2.config configuration file in the setting_override section. We strongly discourage changing of default values unless you are really sure you know what you are doing! If you put some invalid syntax in the config file, the reconciler may not work any more. If you get stuck, just delete the ~/.shepherd/reconcilers/reconciler_mk2/reconciler_mk2.config configuration file.
### *******************************************************************************
### *** NOTE: all of these can be overridden through a (site local) config file ***
### *******************************************************************************
### Doing that is HIGHLY PREFERABLE to CHANGING THIS FILE!
### remember that Shepherd may upgrade this automatically from time-to-time,
### causing any changes here to be LOST!
#
# reconciler logic settings
#
# delete_window_smaller_than_prog_window_threshold:
$reclogic{delete_window_smaller_than_prog_window_threshold} = (5*60); # 5 mins each side
# min_prog_length_for_delete_cutoff:
$reclogic{min_prog_length_for_delete_cutoff} = (10*60); # prog needs to be at least 10 mins if we're cutting back
# max_prog_length_for_rejig:
$reclogic{max_prog_length_for_rejig} = (10*60); # allow programme times to be changed by at-most 10 mins
$reclogic{fuzzy_match_title_time_window} = (10*60); # attempt title matches within +/- 10 min window
# always rewrite XMLTV 'start' & 'stop', removing timezone
$reclogic{always_rewrite_start_stop_without_timezone} = 1;
# when we have a title with a ": " in the middle but no subtitle, split
# the title into "title: subtitle" provided title & subtitle are each at least
# 5 characters long
$reclogic{min_title_for_colon_title_split} = 5;
# don't accept programmes that last for longer than 8 hours.
$reclogic{max_programme_length} = (8 * 60 * 60); # 8 hours
# do store a preference title, even if we don't have any alternatives
$reclogic{title_xlate_table_min_alt_progs} = 0;
#
# warning messages
#
$reclogic{warn_on_encoding_differences} = 0; # don't warn on encoding differences between XMLTV files
$reclogic{warn_on_no_title} = 1; # do warn on programme with no title
$reclogic{warn_on_no_channel} = 1; # do warn on programme with no channel
$reclogic{warn_on_unknown_channel} = 1; # do warn on programme with unknown channel
$reclogic{warn_on_invalid_time_in_prog} = 1; # do warn on programme with bad time format
$reclogic{warn_on_overlapping_programmes_always} = 0; # don't warn on all overlapping programmes from same source
$reclogic{warn_on_overlapping_programmes_for_different_title} = 1; # do warn on overlapping programmes from same source with different names
$reclogic{warn_on_invalid_time_in_prog} = 1; # do warn on a programme with a duration that is too long
#
# debug messages
#
$reclogic{debug_parse_time} = 0; # don't show debugging when parsing input time
$reclogic{debug_reconcile} = 0; # don't show reconciler logic
$reclogic{debug_reconcile_pass1} = 0; # don't show verbose pass 1 reconciler logic
$reclogic{debug_reconcile_pass2} = 0; # don't show verbose pass 2 reconciler logic
$reclogic{debug_add_logic} = 0; # don't show add logic debugging messages
$reclogic{debug_add_logic_verbose} = 0; # don't show add logic verbose debugging messages
$reclogic{debug_add_logic_name_xlate} = 0; # don't show add logic title translation messages
$reclogic{debug_delete_logic} = 0; # don't show delete logic debugging messages
$reclogic{debug_show_nonmatching_title_alternatives} = 0; # don't show non-matching alternative debugging messages
$reclogic{debug_find_prog_to_add} = 0; # don't show add_multiple logic debugging messages
$reclogic{debug_find_prog_to_add_verbose} = 0; # don't show add_multiple logic verbose debugging messages
$reclogic{debug_print_programme_list} = 0; # don't show programme listings while writing
$reclogic{debug_subtitle_derived_from_title} = 0; # don't show subtitles mapped from titles