Unverified Commit 99f77697 authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Prevent dying on album_date_something_something

parent baa89361
......@@ -21,7 +21,7 @@ class Command(BaseCommand):
raise Exception("You must specify a directory to import")
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:]))
slug = slugify('-'.join([str(date), title]))
Supports Markdown
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