|
|
@ -64,16 +64,16 @@ def parse(keyword, argument, contentlist, config): |
|
|
|
continue |
|
|
|
with files.chdir(songdir.datadir): |
|
|
|
for filename in glob.iglob(os.path.join(songdir.subpath, elem)): |
|
|
|
LOGGER.debug('Parsing file "{}"…'.format(filename)) |
|
|
|
extension = filename.split(".")[-1] |
|
|
|
if extension not in plugins: |
|
|
|
LOGGER.warning( |
|
|
|
'File "{}" does not end with one of {}. Ignored.' |
|
|
|
'I do not know how to parse "{}": name does not end with one of {}. Ignored.' |
|
|
|
).format( |
|
|
|
os.path.join(songdir.datadir, filename), |
|
|
|
", ".join(["'.{}'".format(key) for key in plugins.keys()]), |
|
|
|
) |
|
|
|
continue |
|
|
|
LOGGER.debug('Parsing file "{}"…'.format(filename)) |
|
|
|
renderer = SongRenderer(plugins[extension]( |
|
|
|
songdir.datadir, |
|
|
|
filename, |
|
|
|