Index: channels/timer.py ================================================================== --- channels/timer.py +++ channels/timer.py @@ -3,11 +3,11 @@ # title: Recording timer # description: Schedules play/record events for bookmarked radio stations. # type: feature # category: hook # depends: kronos, action >= 1.1.1 -# version: 0.7.2 +# version: 0.7.3 # config: # { name: timer_duration, type: select, select: "none|streamripper", value: none, description: support for time ranges } # priority: optional # support: unsupported # @@ -19,11 +19,12 @@ # Programmed events are visible in "timer" under the "bookmarks" channel. Times # are stored in the description field, and can thus be edited. However, after editing # times manually, streamtuner2 must be restarted for any changes to take effect. # # Allowable time specifications are "Mon,Wed,Fri 18:00-20:00 record" -# or even "Any 7:00-12:00 play". Though the length isn't honored currently. +# or even "Any 7:00-12:00 play". The duration is only honored for +# recording via streamripper or fIcy/fPls currently. # from config import * from channels import * @@ -189,11 +190,13 @@ duration = self.duration(row.get(self.timefield)) append = None if duration: _rec = conf.record.get("audio/*", "") if re.search("streamripper", _rec): - append = "-a %S.%d.%q -l " + str(duration*60) + append = "-a %S.%d.%q -l " + str(duration*60) # seconds + if re.search("fPls|fIcy", _rec, re.I): + append = "-M " + str(duration) # minutes # start recording action.record( row = row, audioformat = row.get("format","audio/mpeg"),