Ver Fonte

added station option

Gamaliel Espinoza há 8 anos atrás
pai
commit
24497d4b7f
2 ficheiros alterados com 4 adições e 1 exclusões
  1. 1 1
      tools/fourier/__init__.py
  2. 3 0
      tools/fourier/cli.py

+ 1 - 1
tools/fourier/__init__.py

@@ -1 +1 @@
-__version__ = '1.0.0b4'
+__version__ = '1.0.0b5'

+ 3 - 0
tools/fourier/cli.py

@@ -47,6 +47,7 @@ def main():
     dbparser.add_argument('-from-date', dest='from_date',
                                         type=simple_date,
                                         )
+    dbparser.add_argument('-station', dest='station')
     dbparser.add_argument('--dry-run', dest='dry_run',
                           action='store_const',
                           const=True,
@@ -76,6 +77,8 @@ def main():
         already_indexed = 0
         conn = sqlite3.connect(dbpath)
         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 file in files:
                 if not file.endswith('.mp3'):