This commit is contained in:
j 2017-05-14 13:46:07 +00:00
parent b22d4e9551
commit 083934582a

View file

@ -77,9 +77,10 @@ else:
if not os.path.exists('DRONES.json'): if not os.path.exists('DRONES.json'):
DRONES = defaultdict(list) DRONES = defaultdict(list)
for letter in os.listdir('drones'): prefix = 'drones'
for fn in sorted(os.listdir(os.path.join('drones', letter))): for letter in os.listdir(prefix):
path = os.path.join('drones', letter, fn) for fn in sorted(os.listdir(os.path.join(prefix, letter))):
path = os.path.join(prefix, letter, fn)
DRONES[letter[0]].append({ DRONES[letter[0]].append({
'path': path, 'path': path,
'duration': ox.avinfo(path)['duration'] 'duration': ox.avinfo(path)['duration']