/
/
/
1"""NFS filesystem provider for Music Assistant."""
2
3from __future__ import annotations
4
5from typing import TYPE_CHECKING
6
7from .provider import NFSFileSystemProvider
8
9if TYPE_CHECKING:
10 from music_assistant_models.config_entries import ProviderConfig
11 from music_assistant_models.provider import ProviderManifest
12
13 from music_assistant.mass import MusicAssistant
14 from music_assistant.models import ProviderInstanceType
15
16
17async def setup(
18 mass: MusicAssistant, manifest: ProviderManifest, config: ProviderConfig
19) -> ProviderInstanceType:
20 """Initialize provider(instance) with given configuration."""
21 # base_path will be the path where we're going to mount the NFS export
22 base_path = f"/tmp/{config.instance_id}" # noqa: S108
23 return NFSFileSystemProvider(mass, manifest, config, base_path)
24