/
/
/
1"""Constants for the KION Music provider."""
2
3from __future__ import annotations
4
5from typing import Final
6
7# Configuration Keys
8CONF_TOKEN = "token"
9CONF_QUALITY = "quality"
10CONF_BASE_URL = "base_url"
11
12# Actions
13CONF_ACTION_AUTH = "auth"
14CONF_ACTION_CLEAR_AUTH = "clear_auth"
15
16# Labels
17LABEL_TOKEN = "token_label"
18LABEL_AUTH_INSTRUCTIONS = "auth_instructions_label"
19
20# API defaults
21DEFAULT_LIMIT: Final[int] = 50
22DEFAULT_BASE_URL: Final[str] = "https://music.mts.ru/ya_proxy_api"
23
24# Quality options
25QUALITY_HIGH = "high"
26QUALITY_LOSSLESS = "lossless"
27
28# Default tuning values for My Mix / browse / discovery behaviour
29MY_MIX_MAX_TRACKS: Final[int] = 150
30MY_MIX_BATCH_SIZE: Final[int] = 3
31TRACK_BATCH_SIZE: Final[int] = 50
32DISCOVERY_INITIAL_TRACKS: Final[int] = 20
33BROWSE_INITIAL_TRACKS: Final[int] = 15
34
35# Image sizes
36IMAGE_SIZE_SMALL = "200x200"
37IMAGE_SIZE_MEDIUM = "400x400"
38IMAGE_SIZE_LARGE = "1000x1000"
39
40# ID separators
41PLAYLIST_ID_SPLITTER: Final[str] = ":"
42
43# Rotor (radio) station identifiers
44ROTOR_STATION_MY_MIX: Final[str] = "user:onyourwave"
45
46# Client identifier for rotor radioStarted feedback.
47# The API expects a "from" field identifying the client; the desktop app
48# identifier ensures the rotor API returns proper recommendations.
49ROTOR_FEEDBACK_FROM: Final[str] = "YandexMusicDesktopAppWindows"
50
51# Virtual playlist ID for My Mix (used in get_playlist / get_playlist_tracks; not owner_id:kind)
52MY_MIX_PLAYLIST_ID: Final[str] = "my_mix"
53
54# Composite item_id for My Mix tracks: track_id + separator + station_id (for rotor feedback)
55RADIO_TRACK_ID_SEP: Final[str] = "@"
56
57# Browse folder names by locale (item_id -> display name)
58BROWSE_NAMES_RU: Final[dict[str, str]] = {
59 "my_mix": "Ðой ÐикÑ",
60 "artists": "Ðои иÑполниÑели",
61 "albums": "Ðои алÑбомÑ",
62 "tracks": "Ðне нÑавиÑÑÑ",
63 "playlists": "Ðои плейлиÑÑÑ",
64}
65BROWSE_NAMES_EN: Final[dict[str, str]] = {
66 "my_mix": "My Mix",
67 "artists": "My Artists",
68 "albums": "My Albums",
69 "tracks": "My Favorites",
70 "playlists": "My Playlists",
71}
72