Skip to content

Commit

Permalink
Usar apenas track.title no check de similaridade do resolve_track
Browse files Browse the repository at this point in the history
  • Loading branch information
zRitsu committed Oct 10, 2024
1 parent 2593602 commit 7418d70
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions utils/music/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3127,10 +3127,7 @@ async def resolve_track(self, track: PartialTrack):
if not has_exclude_tags and any(tag for tag in exclude_tags if tag.lower() in t.title.lower()):
continue

track_check = track.title if track.info["sourceName"] not in ("youtube", "soundcloud") else f"{track.author} - {track.single_title}"
t_check = t.title if t.info["sourceName"] not in ("youtube", "soundcloud") else f"{t.author} - {t.single_title}"

if fuzz.token_sort_ratio(track_check, t_check) < 70:
if fuzz.token_sort_ratio(track.title.lower(), t.title.lower()) < 70:
continue

if check_duration and not ((t.duration - 10000) < track.duration < (t.duration + 10000)):
Expand Down

0 comments on commit 7418d70

Please sign in to comment.