Check-in [918b7bed4a]
Overview
| Comment: | Support fIcy/fPls for recording with time range/duration. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
918b7bed4a61a17c82f341220075081f |
| User & Date: | mario on 2015-11-10 23:47:23 |
| Other Links: | manifest | tags |
Context
|
2015-11-11
| ||
| 00:25 | Reintroduces STOP button for killing streamripper. check-in: fe52f71656 user: mario tags: trunk | |
|
2015-11-10
| ||
| 23:47 | Support fIcy/fPls for recording with time range/duration. check-in: 918b7bed4a user: mario tags: trunk | |
| 23:26 | Add dependency. check-in: 02558ef729 user: mario tags: trunk | |
Changes
Modified channels/timer.py from [9c8f71554a] to [f126a64016].
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, action >= 1.1.1 | | | > | 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 32 |
#
# api: streamtuner2
# 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.3
# config:
# { name: timer_duration, type: select, select: "none|streamripper", value: none, description: support for time ranges }
# 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". The duration is only honored for
# recording via streamripper or fIcy/fPls currently.
#
from config import *
from channels import *
import bundle.kronos as kronos # Doesn't work with Python3
from uikit import uikit
|
| ︙ | ︙ | |||
187 188 189 190 191 192 193 |
# extra params
# make streamripper record a timed broadcast
duration = self.duration(row.get(self.timefield))
append = None
if duration:
_rec = conf.record.get("audio/*", "")
if re.search("streamripper", _rec):
| | > > | 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# extra params
# make streamripper record a timed broadcast
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) # 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"),
source = row.get("listformat","href"),
append = append,
)
def test(self, row, *args, **kwargs):
log.TEST("KRONOS", row)
|