|
@@ -47,6 +47,7 @@ def main():
|
|
|
dbparser.add_argument('-from-date', dest='from_date',
|
|
dbparser.add_argument('-from-date', dest='from_date',
|
|
|
type=simple_date,
|
|
type=simple_date,
|
|
|
)
|
|
)
|
|
|
|
|
+ dbparser.add_argument('-station', dest='station')
|
|
|
dbparser.add_argument('--dry-run', dest='dry_run',
|
|
dbparser.add_argument('--dry-run', dest='dry_run',
|
|
|
action='store_const',
|
|
action='store_const',
|
|
|
const=True,
|
|
const=True,
|
|
@@ -76,6 +77,8 @@ def main():
|
|
|
already_indexed = 0
|
|
already_indexed = 0
|
|
|
conn = sqlite3.connect(dbpath)
|
|
conn = sqlite3.connect(dbpath)
|
|
|
path = os.path.join('/var/fourier', device_id)
|
|
path = os.path.join('/var/fourier', device_id)
|
|
|
|
|
+ if args.station:
|
|
|
|
|
+ path = os.path.join(path, args.station)
|
|
|
for folder, folders, files in os.walk(path):
|
|
for folder, folders, files in os.walk(path):
|
|
|
for file in files:
|
|
for file in files:
|
|
|
if not file.endswith('.mp3'):
|
|
if not file.endswith('.mp3'):
|