File tree Expand file tree Collapse file tree 2 files changed +36
-26
lines changed Expand file tree Collapse file tree 2 files changed +36
-26
lines changed Original file line number Diff line number Diff line change 16
16
17
17
18
18
class QualityVideo (StrEnum ):
19
- P360 : str = "360"
20
- P480 : str = "480"
21
- P720 : str = "720"
22
- P1080 : str = "1080"
19
+ P360 = "360"
20
+ P480 = "480"
21
+ P720 = "720"
22
+ P1080 = "1080"
23
23
24
24
25
25
class MediaType (StrEnum ):
26
- TRACK : str = "track"
27
- VIDEO : str = "video"
28
- PLAYLIST : str = "playlist"
29
- ALBUM : str = "album"
30
- MIX : str = "mix"
31
- ARTIST : str = "artist"
26
+ TRACK = "track"
27
+ VIDEO = "video"
28
+ PLAYLIST = "playlist"
29
+ ALBUM = "album"
30
+ MIX = "mix"
31
+ ARTIST = "artist"
32
32
33
33
34
34
class CoverDimensions (StrEnum ):
35
- Px80 : str = "80"
36
- Px160 : str = "160"
37
- Px320 : str = "320"
38
- Px640 : str = "640"
39
- Px1280 : str = "1280"
40
- PxORIGIN : str = "origin"
35
+ Px80 = "80"
36
+ Px160 = "160"
37
+ Px320 = "320"
38
+ Px640 = "640"
39
+ Px1280 = "1280"
40
+ PxORIGIN = "origin"
41
41
42
42
43
43
class TidalLists (StrEnum ):
44
- Playlists : str = "Playlists"
45
- Favorites : str = "Favorites"
46
- Mixes : str = "Mixes"
44
+ Playlists = "Playlists"
45
+ Favorites = "Favorites"
46
+ Mixes = "Mixes"
47
47
48
48
49
49
class QueueDownloadStatus (StrEnum ):
50
- Waiting : str = "⏳️"
51
- Downloading : str = "▶️"
52
- Finished : str = "✅"
53
- Failed : str = "❌"
54
- Skipped : str = "↪️"
50
+ Waiting = "⏳️"
51
+ Downloading = "▶️"
52
+ Finished = "✅"
53
+ Failed = "❌"
54
+ Skipped = "↪️"
55
55
56
56
57
- FAVORITES : {} = {
57
+ FAVORITES : dict [ str , dict [ str , str ]] = {
58
58
"fav_videos" : {"name" : "Videos" , "function_name" : "videos" },
59
59
"fav_tracks" : {"name" : "Tracks" , "function_name" : "tracks" },
60
60
"fav_mixes" : {"name" : "Mixes & Radio" , "function_name" : "mixes" },
61
61
"fav_artists" : {"name" : "Artists" , "function_name" : "artists" },
62
62
"fav_albums" : {"name" : "Albums" , "function_name" : "albums" },
63
63
}
64
+
65
+
66
+ class AudioExtensionsValid (StrEnum ):
67
+ FLAC = ".flac"
68
+ M4A = ".m4a"
69
+ MP4 = ".mp4"
70
+ MP3 = ".mp3"
71
+ OGG = ".ogg"
72
+ ALAC = ".alac"
Original file line number Diff line number Diff line change 38
38
PLAYLIST_EXTENSION ,
39
39
PLAYLIST_PREFIX ,
40
40
REQUESTS_TIMEOUT_SEC ,
41
+ AudioExtensionsValid ,
41
42
CoverDimensions ,
42
43
MediaType ,
43
44
QualityVideo ,
@@ -1496,7 +1497,7 @@ def playlist_populate(
1496
1497
# Get all tracks in the directory
1497
1498
path_tracks : list [pathlib .Path ] = []
1498
1499
1499
- for extension_audio in AudioExtensions :
1500
+ for extension_audio in AudioExtensionsValid :
1500
1501
path_tracks = path_tracks + list (dir_scoped .glob (f"*{ extension_audio !s} " ))
1501
1502
1502
1503
# Sort alphabetically, e.g. if items are prefixed with numbers
You can’t perform that action at this time.
0 commit comments