fix incorrect album fetching

This commit is contained in:
geoffrey45
2021-12-28 10:08:31 +03:00
parent 49947a22b2
commit c49e1e48f1
7 changed files with 28 additions and 13 deletions
+2 -2
View File
@@ -46,8 +46,8 @@ class AllSongs(Mongo):
self.collection.create_index([('title', pymongo.TEXT)])
return self.collection.find({'title': {'$regex': query, '$options': 'i'}})
def find_songs_by_album(self, query):
return self.collection.find({'album': query})
def find_songs_by_album(self, name, artist):
return self.collection.find({'album': name, 'album_artist': artist})
def get_all_songs(self):
return self.collection.find().limit(25)