process albums seperate from tracks

- break populate function into 2
This commit is contained in:
geoffrey45
2022-06-19 14:45:25 +03:00
parent 06ed41d869
commit 3cf44759b5
11 changed files with 100 additions and 220 deletions
+2 -2
View File
@@ -2,7 +2,6 @@
This file contains the Album class for interacting with
album documents in MongoDB.
"""
from app import db
from app.db.mongodb import convert_many
from app.db.mongodb import convert_one
from app.db.mongodb import MongoAlbums
@@ -26,7 +25,8 @@ class Albums(MongoAlbums):
upsert=True,
).upserted_id
def insert_many(self, albums: list):
def insert_many(self, albums: Album):
albums = [a.__dict__ for a in albums]
"""
Inserts multiple albums into the database.
"""