Check-in [6402b2ce1d]
Overview
| Comment: | Permit "Any" or "All" in time specifications (for all weekdays). |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
6402b2ce1d36cd13a5f7aae173830131 |
| User & Date: | mario on 2015-11-09 21:37:42 |
| Other Links: | manifest | tags |
Context
|
2015-11-10
| ||
| 23:25 | Readd support for timer record durations 01:00-02:00, streamripper only. check-in: 9febd83e03 user: mario tags: trunk | |
|
2015-11-09
| ||
| 21:37 | Permit "Any" or "All" in time specifications (for all weekdays). check-in: 6402b2ce1d user: mario tags: trunk | |
| 00:10 | Preliminary fix for recent action.play/record hook changes. check-in: cdb98c5876 user: mario tags: trunk | |
Changes
Modified channels/timer.py from [6a46d248b9] to [42e8a3d71a].
1 2 3 4 5 6 7 | # # api: streamtuner2 # title: Recording timer # description: Schedules play/record events for bookmarked radio stations. # type: feature # category: hook # depends: kronos | | > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # # api: streamtuner2 # title: Recording timer # description: Schedules play/record events for bookmarked radio stations. # type: feature # category: hook # depends: kronos # version: 0.7.1 # config: - # priority: optional # support: unsupported # # Provides an internal timer, to configure recording and playback times/intervals # for stations. It accepts a natural language time string when registering a stream. # # Context menu > Extension > Add timer # # 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. # from config import * from channels import * import bundle.kronos as kronos # Doesn't work with Python3 from uikit import uikit import action |
| ︙ | ︙ | |||
136 137 138 139 140 141 142 |
# add
task = self.sched.add_daytime_task(action_method, activity, days, None, time, kronos.method.threaded, [row], {})
log.QUEUE( activity, self.sched, (action_method, activity, days, None, time, kronos.method.threaded, [row], {}), task.get_schedule_time(True) )
| | > > | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# add
task = self.sched.add_daytime_task(action_method, activity, days, None, time, kronos.method.threaded, [row], {})
log.QUEUE( activity, self.sched, (action_method, activity, days, None, time, kronos.method.threaded, [row], {}), task.get_schedule_time(True) )
# converts Mon,Tue,... into numeric 1-7
def days(self, s):
weekdays = ["su", "mo", "tu", "we", "th", "fr", "sa", "su"]
r = []
if re.search("any|all|\*", s, re.I):
return range(0,7)
for day in re.findall("\w\w+", s.lower()):
day = day[0:2]
if day in weekdays:
r.append(weekdays.index(day))
return list(set(r))
# get start time 18:00
|
| ︙ | ︙ |