Support a new property in favourite files called "filetype" which specifies the file...
[recordtv.git] / src / rtv_config.py
blob189b47af098718f134a1f62aa51467edd52d00eb
1 #!/usr/bin/python
3 import os, time
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"
10 # -------------
12 class GTVGConfig:
14 def __init__( self, options, args ):
15 self.options = options
16 self.args = args
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,
23 "xmltv_configs" )
25 self.xmltv_files_dir = os.path.join( self.config_dir,
26 "xmltv_files" )
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"
41 self.record_start_command = (
42 '/home/andy/cvs/recordtv/scripts/record_dvb_to_ts.sh ' +
43 '"%s" "%s" "%d" "%s" "%s" >> "%s" 2>&1' )
45 self.convert_command = (
46 '/home/andy/cvs/recordtv/scripts/convert_ts_to_mp2.sh ' +
47 '"%s" "%s" "%s" "%s"' )
49 self.tvguide_dir = os.path.join( self.converted_progs_dir, "tvguide" )
51 self.scheduled_events_dir = os.path.join( self.config_dir,
52 "scheduled_events" )
54 self.recording_log_dir = os.path.join( self.config_dir,
55 "recording_log" )
57 self.favourites_dir = os.path.join( self.config_dir,"favourites" )
58 self.selections_dir = os.path.join( self.config_dir,"selections" )
59 self.config_config_dir = os.path.join( self.config_dir, "config" )
61 self.channel_xmltv2tzap_file = os.path.join( self.config_config_dir,
62 "xmltv_channel_to_tzap.rtvcfg" )
64 self.channels_order_file = os.path.join( self.config_config_dir,
65 "channels_order.rtvcfg" )
67 self.html_templates_dir = os.path.join( self.config_dir,
68 "html_templates" )
70 self.html_single_day_file = os.path.join( self.html_templates_dir,
71 "doc_single_day.html" )
72 self.html_programme_small_normal_file = os.path.join(
73 self.html_templates_dir, "div_programme_normal.html" )
74 self.html_programme_small_highlight_file = os.path.join(
75 self.html_templates_dir, "div_programme_highlight.html" )
76 self.html_programme_small_remind_file = os.path.join(
77 self.html_templates_dir, "div_programme_remind.html" )
78 self.html_programme_small_record_file = os.path.join(
79 self.html_templates_dir, "div_programme_record.html" )
81 self.html_programme_full_normal_file = os.path.join(
82 self.html_templates_dir, "full_programme_normal.html" )
83 self.html_programme_full_highlight_file = os.path.join(
84 self.html_templates_dir, "full_programme_highlight.html" )
85 self.html_programme_full_remind_file = os.path.join(
86 self.html_templates_dir, "full_programme_remind.html" )
87 self.html_programme_full_record_file = os.path.join(
88 self.html_templates_dir, "full_programme_record.html" )
89 self.html_time_file = os.path.join(
90 self.html_templates_dir, "div_time.html" )
92 def get_listings_filename( self, struct_time ):
93 return os.path.join( self.xmltv_files_dir,
94 time.strftime( "tv-%Y-%m-%d.xmltv", struct_time ) )