mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-06-09 12:37:22 +00:00
remove regex in album songs query
This commit is contained in:
parent
2f14b5a6de
commit
01f31f4dc6
@ -14,7 +14,8 @@ class Artists(Mongo):
|
|||||||
self.collection = self.db['THEM_ARTISTS']
|
self.collection = self.db['THEM_ARTISTS']
|
||||||
|
|
||||||
def insert_artist(self, artist_obj):
|
def insert_artist(self, artist_obj):
|
||||||
self.collection.update_one(artist_obj, {'$set': artist_obj}, upsert=True)
|
self.collection.update_one(
|
||||||
|
artist_obj, {'$set': artist_obj}, upsert=True)
|
||||||
|
|
||||||
def get_all_artists(self):
|
def get_all_artists(self):
|
||||||
return self.collection.find()
|
return self.collection.find()
|
||||||
@ -46,7 +47,7 @@ class AllSongs(Mongo):
|
|||||||
return self.collection.find({'title': {'$regex': query, '$options': 'i'}})
|
return self.collection.find({'title': {'$regex': query, '$options': 'i'}})
|
||||||
|
|
||||||
def find_songs_by_album(self, query):
|
def find_songs_by_album(self, query):
|
||||||
return self.collection.find({'album': {'$regex': query, '$options': 'i'}})
|
return self.collection.find({'album': query})
|
||||||
|
|
||||||
def get_all_songs(self):
|
def get_all_songs(self):
|
||||||
return self.collection.find().limit(25)
|
return self.collection.find().limit(25)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user