summaryrefslogtreecommitdiff
path: root/tidal_dl_ng/constants.py
blob: 91cb0f3d3b9a0407753b4ad2a804abe7c5b3bf52 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from enum import IntEnum, StrEnum

CTX_TIDAL: str = "tidal"
REQUESTS_TIMEOUT_SEC: int = 45
EXTENSION_LYRICS: str = ".lrc"
UNIQUIFY_THRESHOLD: int = 99
FILENAME_SANITIZE_PLACEHOLDER: str = "_"


class QualityVideo(IntEnum):
    P360: int = 360
    P480: int = 480
    P720: int = 720
    P1080: int = 1080


class MediaType(StrEnum):
    TRACK: str = "track"
    VIDEO: str = "video"
    PLAYLIST: str = "playlist"
    ALBUM: str = "album"
    MIX: str = "mix"


class SkipExisting(StrEnum):
    Disabled: str = "False"
    Filename: str = "exact"
    ExtensionIgnore: str = "extension_ignore"
    Append: str = "append"


class StreamManifestMimeType(StrEnum):
    MPD: str = "application/dash+xml"
    BTS: str = "application/vnd.tidal.bts"
    VIDEO: str = "video/mp2t"


class CoverDimensions(IntEnum):
    Px80: int = 80
    Px160: int = 160
    Px320: int = 320
    Px640: int = 640
    Px1280: int = 1280


class TidalLists(StrEnum):
    Playlists: str = "Playlists"
    Favorites: str = "Favorites"
    Mixes: str = "Mixes"


class AudioExtensions(StrEnum):
    FLAC: str = ".flac"
    M4A: str = ".m4a"
    MP4: str = ".mp4"


class VideoExtensions(StrEnum):
    TS: str = ".ts"


class QueueDownloadStatus(StrEnum):
    Waiting: str = "⏳️"
    Downloading: str = "▶️"
    Finished: str = "✅"
    Failed: str = "❌"