From 1356749036af0fc07253aac4f534d84c99e8c741 Mon Sep 17 00:00:00 2001 From: Dylan Garrett Date: Wed, 9 Jun 2021 22:08:05 -0700 Subject: Cleanup config and allow passing as json on terminal --- lib/books.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib/books.py') 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: -- cgit v1.2.3-54-g00ecf