mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 04:23:01 +00:00
rewrite api/artist.py to remove artist cache
+ remove processing taylor's version
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
from app.models.track import Track
|
||||
|
||||
|
||||
class UseBisection:
|
||||
"""
|
||||
Uses bisection to find a list of items in another list.
|
||||
@@ -29,11 +32,11 @@ class UseBisection:
|
||||
|
||||
return None
|
||||
|
||||
def __call__(self) -> list:
|
||||
def __call__(self):
|
||||
if len(self.source_list) == 0:
|
||||
return [None]
|
||||
return []
|
||||
|
||||
results = []
|
||||
results: list[Track] = []
|
||||
|
||||
for query in self.queries_list:
|
||||
res = self.find(query)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
def handle_unicode(string: str):
|
||||
"""
|
||||
Try resolving unicode characters, else escape them.
|
||||
"""
|
||||
return string.encode("utf-16", "replace").decode("utf-16")
|
||||
# try:
|
||||
# except:
|
||||
# return string.encode("unicode_escape").decode("utf-8")
|
||||
Reference in New Issue
Block a user