From 3249ce9fe68662779579b1750bb3079da86257a6 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Fri, 9 Oct 2009 11:05:27 +0100 Subject: [PATCH] Support a new property in favourite files called "filetype" which specifies the file extension (default is .ts). --- src/rtv_config.py | 2 +- src/rtv_favourite.py | 1 + src/rtv_schedule.py | 9 ++++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/rtv_config.py b/src/rtv_config.py index 764177b..189b47a 100644 --- a/src/rtv_config.py +++ b/src/rtv_config.py @@ -40,7 +40,7 @@ class GTVGConfig: self.record_start_command = ( '/home/andy/cvs/recordtv/scripts/record_dvb_to_ts.sh ' + - '"%s" "%s" "%d" "%s" >> "%s" 2>&1' ) + '"%s" "%s" "%d" "%s" "%s" >> "%s" 2>&1' ) self.convert_command = ( '/home/andy/cvs/recordtv/scripts/convert_ts_to_mp2.sh ' + diff --git a/src/rtv_favourite.py b/src/rtv_favourite.py index 059bc92..4fd200e 100644 --- a/src/rtv_favourite.py +++ b/src/rtv_favourite.py @@ -14,6 +14,7 @@ class Favourite(rtv_propertiesfile.PropertiesFile): self.destination = None self.real_title = None self.unique_subtitles = True + self.filetype = None self._title_re = None diff --git a/src/rtv_schedule.py b/src/rtv_schedule.py index df0e991..104416e 100644 --- a/src/rtv_schedule.py +++ b/src/rtv_schedule.py @@ -204,10 +204,16 @@ class Schedule: filename ) cmds_array = ( "at", programmeInfo.startTime.strftime( "%H:%M %d.%m.%Y" ) ) + + if programmeInfo.filetype is not None: + filetype = programmeInfo.filetype + else: + filetype = "" + at_output = rtv_utils.run_command_feed_input( cmds_array, self.config.record_start_command % ( self.channel_xmltv2tzap.get_value( programmeInfo.channel ), - outfilename, length_in_seconds, sched_filename, + outfilename, length_in_seconds, sched_filename, filetype, os.path.join( self.config.recording_log_dir, filename + ".log" ) ) ) at_job_start = self.get_at_job( at_output ) @@ -238,6 +244,7 @@ class Schedule: pi.priority = fav.priority pi.destination = fav.destination pi.unique_subtitles = fav.unique_subtitles + pi.filetype = fav.filetype if fav.real_title: pi.title = fav.real_title -- 2.11.4.GIT