mirror of
https://gitlab.com/parroquia-san-leandro/cancionero-web.git
synced 2025-04-27 23:55:57 +02:00
arreglar audios despues de cambiar los titulos de formato
This commit is contained in:
parent
cb2ced5d52
commit
36db883be7
6 changed files with 9 additions and 22 deletions
|
@ -1,7 +1,6 @@
|
|||
import argparse
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
|
||||
from django.conf import settings
|
||||
from django.template import Engine, Context
|
||||
|
@ -141,14 +140,6 @@ class SongLoader:
|
|||
replay_index = 0
|
||||
if hasattr(self, "audio_dir"):
|
||||
for a in find_audios(self.index, self.audio_dir):
|
||||
a_split = a.audio_file.split("/")
|
||||
renamed_dir = join(join(".", "audios"), "Canciones")
|
||||
new_name = "%03d %s - %s - %s.mp3" % (
|
||||
current_song.number,
|
||||
current_song.name,
|
||||
current_song.author if current_song.author else "-",
|
||||
a.date.strftime("%Y-%m-%d"))
|
||||
shutil.copy2("/".join(a_split[1:]), join(renamed_dir, new_name))
|
||||
current_song.add_audio(a)
|
||||
continue
|
||||
if re.match(r"\\endsong", remain):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue