mirror of
https://github.com/nims11/IPod-Shuffle-4g.git
synced 2025-12-07 16:08:00 +09:00
comments
This commit is contained in:
parent
dde2e3b405
commit
d4a9a145be
1 changed files with 3 additions and 1 deletions
|
|
@ -33,13 +33,15 @@ class FileType(enum.Enum):
|
||||||
MP3 = (1, {'.mp3'})
|
MP3 = (1, {'.mp3'})
|
||||||
AAC = (2, {'.m4a', '.m4b', '.m4p', '.aa'})
|
AAC = (2, {'.m4a', '.m4b', '.m4p', '.aa'})
|
||||||
WAV = (4, {'.wav'})
|
WAV = (4, {'.wav'})
|
||||||
|
|
||||||
def __init__(self, filetype, extensions):
|
def __init__(self, filetype, extensions):
|
||||||
self.filetype = filetype
|
self.filetype = filetype
|
||||||
self.extensions = extensions
|
self.extensions = extensions
|
||||||
|
|
||||||
|
# collect all the supported audio extensions
|
||||||
audio_ext = functools.reduce(lambda j,k: j.union(k), map(lambda i: i.extensions, FileType))
|
audio_ext = functools.reduce(lambda j,k: j.union(k), map(lambda i: i.extensions, FileType))
|
||||||
|
# the supported playlist extensions
|
||||||
list_ext = {".pls", ".m3u"}
|
list_ext = {".pls", ".m3u"}
|
||||||
|
# all the supported file extensions
|
||||||
all_ext = audio_ext.union(list_ext)
|
all_ext = audio_ext.union(list_ext)
|
||||||
|
|
||||||
def make_dir_if_absent(path):
|
def make_dir_if_absent(path):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue