-
-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow running without spotify #1092
Conversation
📦 🤖 A new release has been made for this pull request.To play around with this PR, pull Images are available for x86_64 and ARM64.
|
@sofushn Thanks for the PR, it currently lgtm. But to confirm something, this does still display the spotify query in the search function. Even if spotify is disabled? |
@Codixer It's quite a long time since I wrote this PR, if I remember correctly I just show an error to the user if they try to search with a Spotify URL otherwise the whole Spotify part is ignored. edit: is this what you are referring to? Have never noticed that it said Spotify there so didn't think to remove it 😅 |
No worries @sofushn, I was just given access to this repo. I am going through everything to check what has been updated. What still needs to be done and so on and so forth. |
🚀 Released in Release v2.10.0. |
Closes #835
This PR allows muse to run without a Spotify client ID and secret.
The command will responde with
🚫 ope: Spotify is not enabled!
if a user tries to query a song with a Spotify URL.Logic changes
To allow for cases where Spotify isn't available two methods required changes.
addToQueue()
: The logic for determining which source to fetch songs from has been moved to thegetSongs
service class inget-songs.ts
. Songs are fetched through a single method namedgetSongs()
which include the old logic fromaddToQueue()
, all other methods in the class has been made private.getYouTubeAndSpotifySuggestionsFor()
: Has been refactored, all Spotify logic has been moved to the end of the method (fetching still happens asynchrony at the beginning).PR also updates
YoutubeAPI.search()
method to return an empty array if no match is found for the search query. This allows for better error handling other places in the code.