5 # TODO: put these in a config file, obviously
7 cfg_config_dir
= "~/.recordtv"
8 cfg_xmltv_command
= "/usr/local/bin/tv_grab_uk_rt"
14 def __init__( self
, options
, args
):
15 self
.options
= options
18 self
.extra_recording_time_mins
= 10
20 self
.config_dir
= os
.path
.expanduser( cfg_config_dir
)
22 self
.xmltv_configs_dir
= os
.path
.join( self
.config_dir
,
25 self
.xmltv_files_dir
= os
.path
.join( self
.config_dir
,
28 self
.xmltv_config_file
= os
.path
.join( self
.xmltv_configs_dir
,
29 "tv_grab_uk_rt.conf" )
31 self
.xmltv_download_command
= ( cfg_xmltv_command
, "--quiet",
32 "--config-file", self
.xmltv_config_file
)
34 self
.xmltv_config_command
= ( cfg_xmltv_command
, "--quiet",
35 "--configure", "--gui",
36 "--config-file", self
.xmltv_config_file
)
38 self
.recorded_progs_dir
= "/home/andy/Videos/Recorded"
39 self
.converted_progs_dir
= "/home/andy/Videos/Wii"
40 self
.converted_audio_dir
= "/home/andy/PodCasts"
42 self
.record_start_command
= (
43 '/home/andy/cvs/recordtv/scripts/record_dvb_to_ts.sh ' +
44 '"%s" "%s" "%d" "%s" "%s" >> "%s" 2>&1' )
46 self
.convert_command
= (
47 '/home/andy/cvs/recordtv/scripts/convert_ts_to_mp2.sh ' +
48 '"%s" "%s" "%s" "%s"' )
50 self
.audio_convert_command
= (
51 '/home/andy/cvs/recordtv/scripts/convert_audiots_to_ogg.sh ' +
52 '"%s" "%s" "%s" "%s"' )
54 self
.tvguide_dir
= os
.path
.join( self
.converted_progs_dir
, "tvguide" )
56 self
.scheduled_events_dir
= os
.path
.join( self
.config_dir
,
59 self
.recording_log_dir
= os
.path
.join( self
.config_dir
,
62 self
.favourites_dir
= os
.path
.join( self
.config_dir
,"favourites" )
63 self
.selections_dir
= os
.path
.join( self
.config_dir
,"selections" )
64 self
.config_config_dir
= os
.path
.join( self
.config_dir
, "config" )
66 self
.channel_xmltv2tzap_file
= os
.path
.join( self
.config_config_dir
,
67 "xmltv_channel_to_tzap.rtvcfg" )
69 self
.channels_order_file
= os
.path
.join( self
.config_config_dir
,
70 "channels_order.rtvcfg" )
72 self
.html_templates_dir
= os
.path
.join( self
.config_dir
,
75 self
.html_single_day_file
= os
.path
.join( self
.html_templates_dir
,
76 "doc_single_day.html" )
77 self
.html_programme_small_normal_file
= os
.path
.join(
78 self
.html_templates_dir
, "div_programme_normal.html" )
79 self
.html_programme_small_highlight_file
= os
.path
.join(
80 self
.html_templates_dir
, "div_programme_highlight.html" )
81 self
.html_programme_small_remind_file
= os
.path
.join(
82 self
.html_templates_dir
, "div_programme_remind.html" )
83 self
.html_programme_small_record_file
= os
.path
.join(
84 self
.html_templates_dir
, "div_programme_record.html" )
86 self
.html_programme_full_normal_file
= os
.path
.join(
87 self
.html_templates_dir
, "full_programme_normal.html" )
88 self
.html_programme_full_highlight_file
= os
.path
.join(
89 self
.html_templates_dir
, "full_programme_highlight.html" )
90 self
.html_programme_full_remind_file
= os
.path
.join(
91 self
.html_templates_dir
, "full_programme_remind.html" )
92 self
.html_programme_full_record_file
= os
.path
.join(
93 self
.html_templates_dir
, "full_programme_record.html" )
94 self
.html_time_file
= os
.path
.join(
95 self
.html_templates_dir
, "div_time.html" )
97 def get_listings_filename( self
, struct_time
):
98 return os
.path
.join( self
.xmltv_files_dir
,
99 time
.strftime( "tv-%Y-%m-%d.xmltv", struct_time
) )