feat(stream): implement stream processing service with routes for managing streaming URLs; add support for concurrent processing and metadata extraction
This commit is contained in:
@@ -36,6 +36,9 @@ class Sound(db.Model):
|
||||
# Basic sound information
|
||||
name: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
filename: Mapped[str] = mapped_column(String(500), nullable=False)
|
||||
thumbnail: Mapped[str | None] = mapped_column(
|
||||
String(500), nullable=True
|
||||
) # Thumbnail filename
|
||||
duration: Mapped[int] = mapped_column(Integer, nullable=False)
|
||||
size: Mapped[int] = mapped_column(Integer, nullable=False) # Size in bytes
|
||||
hash: Mapped[str] = mapped_column(String(64), nullable=False) # SHA256 hash
|
||||
@@ -114,6 +117,7 @@ class Sound(db.Model):
|
||||
"type": self.type,
|
||||
"name": self.name,
|
||||
"filename": self.filename,
|
||||
"thumbnail": self.thumbnail,
|
||||
"duration": self.duration,
|
||||
"size": self.size,
|
||||
"hash": self.hash,
|
||||
@@ -217,6 +221,7 @@ class Sound(db.Model):
|
||||
duration: float,
|
||||
size: int,
|
||||
hash_value: str,
|
||||
thumbnail: Optional[str] = None,
|
||||
is_music: bool = False,
|
||||
is_deletable: bool = True,
|
||||
commit: bool = True,
|
||||
@@ -230,6 +235,7 @@ class Sound(db.Model):
|
||||
type=sound_type,
|
||||
name=name,
|
||||
filename=filename,
|
||||
thumbnail=thumbnail,
|
||||
duration=duration,
|
||||
size=size,
|
||||
hash=hash_value,
|
||||
|
||||
Reference in New Issue
Block a user