Commit 99f75761 authored by Jonathan Schaeffer's avatar Jonathan Schaeffer
Browse files

Bud and Validated archived differ in pattern

parent 356d7e89
...@@ -5,6 +5,7 @@ import os ...@@ -5,6 +5,7 @@ import os
import sys import sys
import io import io
import subprocess import subprocess
import re
from time import gmtime, strftime from time import gmtime, strftime
from datetime import datetime, date, timedelta from datetime import datetime, date, timedelta
import yaml import yaml
...@@ -40,8 +41,12 @@ def scan_volume(path): ...@@ -40,8 +41,12 @@ def scan_volume(path):
if len(path) == 4: if len(path) == 4:
logger.debug("path: %s, size: %s", path, size) logger.debug("path: %s, size: %s", path, size)
(channel, quality) = path[3].split('.') (channel, quality) = path[3].split('.')
data.append({'year': path[1], 'network': path[0], 'station': path[2], if re.match('[2-9][0-9]{3}', path[0]):
'channel': channel, 'quality': quality, 'size': size}) data.append({'year': path[0], 'network': path[1], 'station': path[2],
'channel': channel, 'quality': quality, 'size': size})
data.append({'year': path[1], 'network': path[0], 'station': path[2],
'channel': channel, 'quality': quality, 'size': size})
logger.debug(data[-1]) logger.debug(data[-1])
logger.debug("Volume scanned in %s", - starttime) logger.debug("Volume scanned in %s", - starttime)
return data 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