Fixing erros due to processing

This commit is contained in:
Rafael Vargas
2022-07-24 14:25:44 -03:00
parent 56456bf2ed
commit b904c75caa
16 changed files with 179 additions and 305 deletions

View File

@@ -1,4 +1,4 @@
from Config.Exceptions import DeezerError, InvalidInput, SpotifyError, YoutubeError
from Config.Exceptions import DeezerError, InvalidInput, SpotifyError, VulkanError, YoutubeError
from Music.Downloader import Downloader
from Music.Types import Provider
from Music.SpotifySearcher import SpotifySearch
@@ -25,7 +25,10 @@ class Searcher():
track = self.__cleanYoutubeInput(track)
musics = await self.__down.extract_info(track)
return musics
except:
except VulkanError as error:
raise error
except Exception as error:
print(f'[Error in Searcher] -> {error}, {type(error)}')
raise YoutubeError(self.__messages.YOUTUBE_NOT_FOUND, self.__messages.GENERIC_TITLE)
elif provider == Provider.Spotify: