mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
don't create media db on server
This commit is contained in:
parent
5c5181f063
commit
ba0f6f36cc
1 changed files with 4 additions and 0 deletions
|
@ -28,6 +28,8 @@ class MediaManager(object):
|
||||||
self.connect()
|
self.connect()
|
||||||
|
|
||||||
def connect(self):
|
def connect(self):
|
||||||
|
if self.col.server:
|
||||||
|
return
|
||||||
path = self.dir()+".db"
|
path = self.dir()+".db"
|
||||||
create = not os.path.exists(path)
|
create = not os.path.exists(path)
|
||||||
self.db = DB(path)
|
self.db = DB(path)
|
||||||
|
@ -35,6 +37,8 @@ class MediaManager(object):
|
||||||
self._initDB()
|
self._initDB()
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
|
if self.col.server:
|
||||||
|
return
|
||||||
self.db.close()
|
self.db.close()
|
||||||
self.db = None
|
self.db = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue