mirror of https://gitlab.com/bashrc2/epicyon
Remove music metadata words containing colon
parent
7907d79eaa
commit
240e7219cd
7
media.py
7
media.py
|
@ -190,6 +190,13 @@ def get_music_metadata(filename: str) -> {}:
|
|||
field_value = line.split(field + ' = ')[1]
|
||||
if '>' in field_value:
|
||||
field_value = field_value.split('>')[0].strip()
|
||||
if ':' in field_value and ' ' in field_value:
|
||||
words = field_value.split(' ')
|
||||
new_value = ''
|
||||
for wrd in words:
|
||||
if ':' not in wrd:
|
||||
new_value += wrd + ' '
|
||||
field_value = new_value.strip()
|
||||
music_metadata[field.lower()] = field_value
|
||||
return music_metadata
|
||||
|
||||
|
|
Loading…
Reference in New Issue