aboutsummaryrefslogtreecommitdiff
path: root/lib/books.py
diff options
context:
space:
mode:
authorDylan Garrett <dylan.garrett@gmail.com>2021-06-09 22:08:05 -0700
committerDylan Garrett <dylan.garrett@gmail.com>2021-06-09 22:08:05 -0700
commit1356749036af0fc07253aac4f534d84c99e8c741 (patch)
tree82cc5c10ff5382ebfc387b43135d48135f704c99 /lib/books.py
parente406a8b2a5fd8c6995a444a92ca64e7d07c4507f (diff)
downloadroka-1356749036af0fc07253aac4f534d84c99e8c741.tar.gz
roka-1356749036af0fc07253aac4f534d84c99e8c741.zip
Cleanup config and allow passing as json on terminal
Diffstat (limited to 'lib/books.py')
-rw-r--r--lib/books.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/books.py b/lib/books.py
index 6f3510b..95df374 100644
--- a/lib/books.py
+++ b/lib/books.py
@@ -13,11 +13,6 @@ ABS_PATH = os.path.dirname(os.path.abspath(__file__))
CACHE_PATH = os.path.join(ABS_PATH, '../', 'cache')
JSON_PATH = os.path.join(CACHE_PATH, 'audiobooks.json')
-# use Flask's config parser, configparser would be hacky
-APP = Flask(__name__)
-if os.path.exists(os.path.join(ABS_PATH, '../', 'app.cfg')):
- APP.config.from_pyfile(os.path.join(ABS_PATH, '../', 'app.cfg'))
-
class Books:
def __init__(self):
'''
@@ -95,7 +90,7 @@ class Books:
(existing content is not re-hashed)
'''
ex = self._get_path_hash_dict()
- dirs = self._get_dirs(audiobook_path or APP.config['ROOT_PATH'])
+ dirs = self._get_dirs(audiobook_path)
books = dict()
for path in dirs: