if app_settings.DEBUG_WITH_SLEEPS:
if hasattr(item, 'is_stream') and item.is_stream():
cmd = 'sleep 86400 # %s' % item.stream.url
- else:
+ 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())
else:
cmd = [app_settings.PLAYER_COMMAND] + app_settings.PLAYER_ARGS
if hasattr(item, 'is_stream') and item.is_stream():