Remove media patch, put usnLim in server code
Since dae/anki@d6874de8, usnLim always returns -1 regardless of the
`server` attribute.
Reference: d6874de8c8
This commit is contained in:
@@ -49,7 +49,7 @@ class CollectionWrapper:
|
||||
# mkdir -p the path, because it might not exist
|
||||
os.makedirs(os.path.dirname(self.path), exist_ok=True)
|
||||
|
||||
col = anki.storage.Collection(self.path, server=True)
|
||||
col = anki.storage.Collection(self.path)
|
||||
|
||||
# Do any special setup
|
||||
if self.setup_new_collection is not None:
|
||||
@@ -61,7 +61,7 @@ class CollectionWrapper:
|
||||
"""Open the collection, or create it if it doesn't exist."""
|
||||
if self.__col is None:
|
||||
if os.path.exists(self.path):
|
||||
self.__col = anki.storage.Collection(self.path, server=True)
|
||||
self.__col = anki.storage.Collection(self.path)
|
||||
else:
|
||||
self.__col = self.__create_collection()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user