fix for older python runtime

This commit is contained in:
William Bell
2025-12-26 20:04:39 +00:00
parent d86587e526
commit 275f394580

View File

@@ -23,6 +23,16 @@ import requests
from pathlib import Path from pathlib import Path
import mimetypes import mimetypes
@dataclass
class Song:
id: str
url: str
name: str
duration: float
album_name: str
album_cover_path: str
artist_name: str
def song_data_to_Song(data, client_data) -> Song: def song_data_to_Song(data, client_data) -> Song:
# """ # """
# Build a Jellyfin audio stream URL using urllib.parse. # Build a Jellyfin audio stream URL using urllib.parse.
@@ -73,17 +83,6 @@ os.makedirs("data", exist_ok=True)
os.makedirs("data/images", exist_ok=True) os.makedirs("data/images", exist_ok=True)
@dataclass
class Song:
id: str
url: str
name: str
duration: float
album_name: str
album_cover_path: str
artist_name: str
class GaplessPlayer: class GaplessPlayer:
def __init__(self, samplerate: int = 96000, channels: int = 2): def __init__(self, samplerate: int = 96000, channels: int = 2):
self.samplerate = samplerate self.samplerate = samplerate