feat: Add VLC service for sound playback and management
- Implemented VLCService to handle sound playback using VLC. - Added routes for soundboard management including play, stop, and status. - Introduced admin routes for sound normalization and scanning. - Updated user model and services to accommodate new functionalities. - Enhanced error handling and logging throughout the application. - Updated dependencies to include python-vlc for sound playback capabilities.
This commit is contained in:
@@ -97,7 +97,9 @@ class SchedulerService:
|
||||
f"{result['credits_added']} credits added",
|
||||
)
|
||||
else:
|
||||
logger.error(f"Daily credit refill failed: {result['message']}")
|
||||
logger.error(
|
||||
f"Daily credit refill failed: {result['message']}"
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
logger.exception(f"Error during daily credit refill: {e}")
|
||||
@@ -119,7 +121,9 @@ class SchedulerService:
|
||||
else:
|
||||
logger.debug("Sound scan completed: no new files found")
|
||||
else:
|
||||
logger.error(f"Sound scan failed: {result.get('error', 'Unknown error')}")
|
||||
logger.error(
|
||||
f"Sound scan failed: {result.get('error', 'Unknown error')}"
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
logger.exception(f"Error during sound scan: {e}")
|
||||
@@ -148,7 +152,8 @@ class SchedulerService:
|
||||
"id": job.id,
|
||||
"name": job.name,
|
||||
"next_run": job.next_run_time.isoformat()
|
||||
if job.next_run_time else None,
|
||||
if job.next_run_time
|
||||
else None,
|
||||
"trigger": str(job.trigger),
|
||||
}
|
||||
for job in self.scheduler.get_jobs()
|
||||
|
||||
Reference in New Issue
Block a user