From ac6c2813462a7ec4e34223aaf936a11dc463cc53 Mon Sep 17 00:00:00 2001 From: Yuzu Date: Sun, 27 Feb 2022 20:06:14 +0700 Subject: [PATCH] Disabled search button logic --- src/discord/MusicPlayer/Play.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/discord/MusicPlayer/Play.ts b/src/discord/MusicPlayer/Play.ts index 1b769f6..85b37d0 100644 --- a/src/discord/MusicPlayer/Play.ts +++ b/src/discord/MusicPlayer/Play.ts @@ -193,9 +193,10 @@ export default class Play { if(result.length > 1) { + // TODO: Find a better logic than this // If the first result title is exact match with the query or first title contains half the space of the query, it's probably a sentence // then we don't need to show the search results - if(result[0].title === query || result[0].title && (Math.ceil((result[0].title.split(" ").length - 1) / 2) === Math.ceil((query.split(" ").length - 1) / 2))) return; + // if(result[0].title === query || result[0].title && (Math.ceil((result[0].title.split(" ").length - 1) / 2) === Math.ceil((query.split(" ").length - 1) / 2))) return; // The query length is too long to fit in json if(query.length > 100 - 51) return;