mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
Restyle Implement Fuzzy search using rapidfuzz (#60)
This commit is contained in:
@@ -6,8 +6,8 @@ from dataclasses import field
|
||||
from typing import List
|
||||
|
||||
from app import api
|
||||
from app.exceptions import TrackExistsInPlaylist
|
||||
from app import helpers
|
||||
from app.exceptions import TrackExistsInPlaylist
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
@@ -97,11 +97,9 @@ class Album:
|
||||
|
||||
def get_p_track(ptrack):
|
||||
for track in api.TRACKS:
|
||||
if (
|
||||
track.title == ptrack["title"]
|
||||
and track.artists == ptrack["artists"]
|
||||
and ptrack["album"] == track.album
|
||||
):
|
||||
if (track.title == ptrack["title"]
|
||||
and track.artists == ptrack["artists"]
|
||||
and ptrack["album"] == track.album):
|
||||
return track
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user