93
94
95
96
97
98
99
100
101
102
103
104
105
106
107 | # close dialog,get data
def add_timer(self, *w):
self.parent.timer_dialog.hide()
row = self.parent.row()
row = copy.copy(row)
# add data
row["listformat"] = "url/direct" #self.parent.channel().listformat
if row.get(self.timefield):
row["title"] = row["title"] + " -- " + row[self.timefield]
row[self.timefield] = self.parent.timer_value.get_text()
# store
self.save_timer(row)
|
|
| 93
94
95
96
97
98
99
100
101
102
103
104
105
106
107 | # close dialog,get data
def add_timer(self, *w):
self.parent.timer_dialog.hide()
row = self.parent.row()
row = copy.copy(row)
# add data
row["listformat"] = "href" #self.parent.channel().listformat
if row.get(self.timefield):
row["title"] = row["title"] + " -- " + row[self.timefield]
row[self.timefield] = self.parent.timer_value.get_text()
# store
self.save_timer(row)
|
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200 | return 0 # no limit
# action wrapper
def play(self, row, *args, **kwargs):
action.play(
url = row["url"],
audioformat = row.get("format","audio/mpeg"),
listformat = row.get("listformat","url/direct"),
)
# action wrapper
def record(self, row, *args, **kwargs):
#print("TIMED RECORD")
# 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(
url = row["url"],
audioformat = row.get("format","audio/mpeg"),
listformat = row.get("listformat","url/direct"),
append = append,
)
def test(self, row, *args, **kwargs):
print("TEST KRONOS", row)
|
|
|
| 168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200 | return 0 # no limit
# action wrapper
def play(self, row, *args, **kwargs):
action.play(
url = row["url"],
audioformat = row.get("format","audio/mpeg"),
listformat = row.get("listformat","href"),
)
# action wrapper
def record(self, row, *args, **kwargs):
#print("TIMED RECORD")
# 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(
url = row["url"],
audioformat = row.get("format","audio/mpeg"),
listformat = row.get("listformat","href"),
append = append,
)
def test(self, row, *args, **kwargs):
print("TEST KRONOS", row)
|