mirror of
https://gitlab.com/parroquia-san-leandro/cancionero-web.git
synced 2024-12-22 08:43:33 +01:00
Add support for more audio name formats
This commit is contained in:
parent
8528131948
commit
67bedb49e4
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ def find_audios(index):
|
|||
res = []
|
||||
for f in listdir(AUDIO_DIR):
|
||||
full_file = join(AUDIO_DIR, f)
|
||||
re_date_match = re.match(r"^%03d_(\d{4}-[01]\d-[0-3]\d).mp3$" % index, f)
|
||||
re_date_match = re.match(r"^%03d[_ ](\d{4}-[01]\d-[0-3]\d).mp3$" % index, f)
|
||||
if not isfile(full_file) or not re_date_match:
|
||||
continue
|
||||
date = datetime.strptime(re_date_match.group(1), "%Y-%m-%d")
|
||||
|
|
Loading…
Reference in a new issue