Commit 8b4899ad authored by Gerion Entrup's avatar Gerion Entrup
Browse files

add offline test data

parent 4f43d5f2
......@@ -3,6 +3,9 @@ import mutagen
import musicbrainzngs
import itertools
#for debugging
from offline import CACHE
class Fetcher:
"""
Fetches the musicdata and caches them.
......@@ -14,6 +17,8 @@ class Fetcher:
'release-group': {},
'artist': {},
'release': {}}
#for debugging
self.cache = CACHE
def get_table_by_id(self, mbid, tablename):
methods = {
......@@ -41,4 +46,3 @@ class Fetcher:
#pp.pprint(result)
return result
......@@ -15,7 +15,7 @@ from mbdata import patch_model_schemas, NO_SCHEMAS
class Main:
def init_database(self, dbfile):
engine = create_engine('sqlite:///' + dbfile, echo=True)
engine = create_engine('sqlite:///' + dbfile)#, echo=True)
#engine = create_engine('sqlite://')#, echo=True)
patch_model_schemas(NO_SCHEMAS)
Base.metadata.create_all(engine)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Supports Markdown
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