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:
JSC
2025-07-03 21:25:50 +02:00
parent 8f17dd730a
commit 7455811860
20 changed files with 760 additions and 91 deletions

View File

@@ -33,7 +33,9 @@ class UserOAuth(db.Model):
# Timestamps
created_at: Mapped[datetime] = mapped_column(
DateTime, default=datetime.utcnow, nullable=False,
DateTime,
default=datetime.utcnow,
nullable=False,
)
updated_at: Mapped[datetime] = mapped_column(
DateTime,
@@ -45,13 +47,16 @@ class UserOAuth(db.Model):
# Unique constraint on provider + provider_id combination
__table_args__ = (
db.UniqueConstraint(
"provider", "provider_id", name="unique_provider_user",
"provider",
"provider_id",
name="unique_provider_user",
),
)
# Relationships
user: Mapped["User"] = relationship(
"User", back_populates="oauth_providers",
"User",
back_populates="oauth_providers",
)
def __repr__(self) -> str:
@@ -73,11 +78,14 @@ class UserOAuth(db.Model):
@classmethod
def find_by_provider_and_id(
cls, provider: str, provider_id: str,
cls,
provider: str,
provider_id: str,
) -> Optional["UserOAuth"]:
"""Find OAuth provider by provider name and provider ID."""
return cls.query.filter_by(
provider=provider, provider_id=provider_id,
provider=provider,
provider_id=provider_id,
).first()
@classmethod