Commit f37d410f authored by fred's avatar fred

ignore missing files when importing

parent bcca8043
import mutagen
import os
from django.core.management.base import BaseCommand, CommandError
......@@ -18,6 +19,10 @@ class Command(BaseCommand):
print filepath[len(LOCAL_BASE_PATH):]
if 'SPOTS/' in filepath:
continue
if not os.path.exists(filepath):
if self.verbose:
print 'missing file:', filepath[len(LOCAL_BASE_PATH):]
continue
metadata = mutagen.File(filepath, easy=True)
if not metadata or not metadata.get('artist') or not metadata.get('title'):
if self.verbose:
......
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