Commit 33a4fafe authored by Jonathan Schaeffer's avatar Jonathan Schaeffer
Browse files

Passage en bynet

parent 85c310c1
......@@ -47,7 +47,7 @@ def scan_volume(path):
["du", "--exclude", ".snapshot", "-b", "-d4", volume]).decode("utf-8").splitlines()
logger.debug("Volume scanned in %s", datetime.now() - starttime)
for l in lines:
logger.debug(l)
logger.debug("Scanning %s",l)
(size, path) = l.split('\t')
# On ne garde que le chemin qui nous intéresse
path = path.replace(volume, '').split('/')
......@@ -55,8 +55,9 @@ def scan_volume(path):
if len(path) == 4:
logger.debug("path: %s, size: %s", path, size)
(channel, quality) = path[3].split('.')
data.append({'year': path[0], 'network': path[1], 'station': path[2],
data.append({'year': path[1], 'network': path[0], 'station': path[2],
'channel': channel, 'quality': quality, 'size': size})
logger.debug(data[-1])
return data
......
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