mirror of
https://github.com/Benexl/FastAnime.git
synced 2025-12-28 05:33:12 -08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12ef447eaf |
@@ -132,6 +132,7 @@ APP_SERVICE = "Configuration for the background download service."
|
|||||||
APP_FZF = "Settings for the FZF selector interface."
|
APP_FZF = "Settings for the FZF selector interface."
|
||||||
APP_ROFI = "Settings for the Rofi selector interface."
|
APP_ROFI = "Settings for the Rofi selector interface."
|
||||||
APP_MPV = "Configuration for the MPV media player."
|
APP_MPV = "Configuration for the MPV media player."
|
||||||
|
APP_VLC = "Configuration for the VLC media player."
|
||||||
APP_MEDIA_REGISTRY = "Configuration for the media registry."
|
APP_MEDIA_REGISTRY = "Configuration for the media registry."
|
||||||
APP_SESSIONS = "Configuration for sessions."
|
APP_SESSIONS = "Configuration for sessions."
|
||||||
|
|
||||||
|
|||||||
@@ -534,6 +534,7 @@ class AppConfig(BaseModel):
|
|||||||
description=desc.APP_ROFI,
|
description=desc.APP_ROFI,
|
||||||
)
|
)
|
||||||
mpv: MpvConfig = Field(default_factory=MpvConfig, description=desc.APP_MPV)
|
mpv: MpvConfig = Field(default_factory=MpvConfig, description=desc.APP_MPV)
|
||||||
|
vlc: VlcConfig = Field(default_factory=VlcConfig, description=desc.APP_VLC)
|
||||||
media_registry: MediaRegistryConfig = Field(
|
media_registry: MediaRegistryConfig = Field(
|
||||||
default_factory=MediaRegistryConfig, description=desc.APP_MEDIA_REGISTRY
|
default_factory=MediaRegistryConfig, description=desc.APP_MEDIA_REGISTRY
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -41,6 +41,10 @@ class PlayerFactory:
|
|||||||
from .mpv.player import MpvPlayer
|
from .mpv.player import MpvPlayer
|
||||||
|
|
||||||
return MpvPlayer(config.mpv)
|
return MpvPlayer(config.mpv)
|
||||||
|
elif player_name == "vlc":
|
||||||
|
from .vlc.player import VlcPlayer
|
||||||
|
|
||||||
|
return VlcPlayer(config.vlc)
|
||||||
raise NotImplementedError(
|
raise NotImplementedError(
|
||||||
f"Configuration logic for player '{player_name}' not implemented in factory."
|
f"Configuration logic for player '{player_name}' not implemented in factory."
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user