/
/
/
1"""Zvuk Music provider support for Music Assistant."""
2
3from __future__ import annotations
4
5from typing import TYPE_CHECKING
6
7from music_assistant_models.enums import ProviderFeature
8
9from .provider import ZvukMusicProvider
10
11if TYPE_CHECKING:
12 from music_assistant_models.config_entries import ProviderConfig
13 from music_assistant_models.provider import ProviderManifest
14
15 from music_assistant.mass import MusicAssistant
16 from music_assistant.models import ProviderInstanceType
17
18
19SUPPORTED_FEATURES = {
20 ProviderFeature.LIBRARY_ARTISTS,
21 ProviderFeature.LIBRARY_ALBUMS,
22 ProviderFeature.LIBRARY_TRACKS,
23 ProviderFeature.LIBRARY_PLAYLISTS,
24 ProviderFeature.ARTIST_ALBUMS,
25 ProviderFeature.ARTIST_TOPTRACKS,
26 ProviderFeature.SEARCH,
27 ProviderFeature.LIBRARY_ARTISTS_EDIT,
28 ProviderFeature.LIBRARY_ALBUMS_EDIT,
29 ProviderFeature.LIBRARY_TRACKS_EDIT,
30 ProviderFeature.LIBRARY_PLAYLISTS_EDIT,
31 ProviderFeature.PLAYLIST_TRACKS_EDIT,
32 ProviderFeature.PLAYLIST_CREATE,
33 ProviderFeature.SIMILAR_TRACKS,
34 ProviderFeature.BROWSE,
35 ProviderFeature.RECOMMENDATIONS,
36 ProviderFeature.LYRICS,
37 ProviderFeature.TRACK_METADATA,
38}
39
40
41async def setup(
42 mass: MusicAssistant, manifest: ProviderManifest, config: ProviderConfig
43) -> ProviderInstanceType:
44 """Initialize provider(instance) with given configuration."""
45 return ZvukMusicProvider(mass, manifest, config, SUPPORTED_FEATURES)
46