# relative to ..._BASE_PATH
return self.get_setting('JINGLES_PREFIX', 'SPOTS')
- @property
- def DEBUG_WITH_SLEEPS(self):
- return self.get_setting('DEBUG_WITH_SLEEPS', False)
-
@property
def PLAYER_COMMAND(self):
return self.get_setting('PLAYER_COMMAND', 'mpv')
else:
cmd.append(item.file_path())
logger.info('Play file: %s', item.file_path())
- if app_settings.DEBUG_WITH_SLEEPS:
- # replace command by a sleep call, for silent debugging
- if hasattr(item, 'is_stream') and item.is_stream():
- cmd = 'sleep 86400 # %s' % item.stream.url
- elif isinstance(item.duration, datetime.timedelta):
- cmd = 'sleep %s # %s' % (item.duration.total_seconds(), item.file_path())
- elif isinstance(item.duration, int):
- cmd = 'sleep %s # %s' % (item.duration, item.file_path())
logger.debug('cmd %r', cmd)
if isinstance(cmd, str):
self.player = await asyncio.create_subprocess_shell(