[Sync] update: removed unnecesarry Sync subclasses

This commit is contained in:
Roman Timashev committed 2017-09-17 16:34:56 +03:00
1 parent 84745ead6d
commit 6fa8564cc8
15 files changed
+163 -471

No files matched your search

+8 -9
View File
@@ -23,16 +23,15 @@ logger = logging.getLogger(settings.name + '.Album')
store = collection(settings.collection_albums)
def find(item_id: str):
q = {'id': item_id}
try:
return store.find_one(q)
except ValueError:
pass
return None
class Album(Model):
@staticmethod
async def find(query):
return store.find(query)
@staticmethod
async def delete(query):
return store.find_one_and_delete(query)
@staticmethod
async def scan(provider):
documents = [i for i in provider.scan('.') if provider.is_dir(i)]