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:
flan
2018-08-20 15:44:10 +02:00
parent c4fad436c1
commit a83e68412d
3 changed files with 5 additions and 31 deletions

View File

@@ -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()