Prevent dying on album_date_something_something

parent baa89361
...@@ -21,7 +21,7 @@ class Command(BaseCommand): ...@@ -21,7 +21,7 @@ class Command(BaseCommand):
raise Exception("You must specify a directory to import") raise Exception("You must specify a directory to import")
foldername = os.path.relpath(options['folder']) foldername = os.path.relpath(options['folder'])
album, date, title = foldername.split('_') album, date, title = foldername.split('_', maxsplit=2)
date = parse_date('{}-{}-{}'.format(date[:4], date[4:6], date[6:])) date = parse_date('{}-{}-{}'.format(date[:4], date[4:6], date[6:]))
slug = slugify('-'.join([str(date), title])) slug = slugify('-'.join([str(date), title]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment