250
251
252
253
254
255
256
257
258
259
260
261
262
263
|
# 2.1.1
if "audio/mp3" in self.play:
self.play["audio/mpeg"] = self.play["audio/mp3"]
del self.play["audio/mp3"]
if self.tmp == "/tmp":
self.tmp = "/tmp/streamtuner2"
# check for existing filename in directory list
def find_in_dirs(self, dirs, file):
for d in dirs:
if os.path.exists(d+"/"+file):
return d+"/"+file
|
>
>
>
>
>
>
>
>
>
|
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
# 2.1.1
if "audio/mp3" in self.play:
self.play["audio/mpeg"] = self.play["audio/mp3"]
del self.play["audio/mp3"]
if self.tmp == "/tmp":
self.tmp = "/tmp/streamtuner2"
# Shortcut to `state.json` loading (currently selected categories etc.)
def state(self, module=None, d={}):
if not d:
d.update(conf.load("state"))
if module:
return d.get(module, {})
return d
# check for existing filename in directory list
def find_in_dirs(self, dirs, file):
for d in dirs:
if os.path.exists(d+"/"+file):
return d+"/"+file
|