Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [42e8a3d71a]:

To Artifact [9fca69ef1b]:


1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
#
# 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







|
|
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#
# api: streamtuner2
# title: Recording timer
# description: Schedules play/record events for bookmarked radio stations.
# type: feature
# category: hook
# depends: kronos
# version: 0.7.2
# 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
180
181
182
183
184
185
186

187

188

189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
        )

    # action wrapper
    def record(self, row, *args, **kwargs):
        log.TIMER("TIMED RECORD", *args)
        
        # extra params

        duration = self.duration(row.get(self.timefield))

        if duration:

            append = " -a %S.%d.%q -l "+str(duration*60)   # make streamripper record a whole broadcast
        else:
            append = ""

        # 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)









>

>

>
|
<
|





|
|






181
182
183
184
185
186
187
188
189
190
191
192
193

194
195
196
197
198
199
200
201
202
203
204
205
206
207
        )

    # action wrapper
    def record(self, row, *args, **kwargs):
        log.TIMER("TIMED RECORD", *args)
        
        # 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)

        # 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)