museofficial / muse

🎧 a self-hosted midwestern Discord music bot that doesn't suck
MIT License
894 stars 236 forks source link

Bot plays music video when using spotify link #1093

Closed someone12421 closed 2 months ago

someone12421 commented 2 months ago

What's happening? Concisely describe what's going wrong.

when i use a spotify link, the bot plays the youtube video for the music video instead of the one thats just the song. is there any way to change this?

Runtime I'm running Muse:

Versions

JoeWHoward commented 2 months ago

Muse currently does not have the capability to distinguish songs vs music videos.

Muse cannot play songs directly from Spotify's API, so instead it fetches the song name and artist name from Spotify's API, then searches YouTube for "Track Name" "Artist Name" . It picks the top result, which in this case, is likely a music video.

You could try enabling SponsorBlock, which might skip through intro scenes of a music video (if that is why you want to avoid music videos) by setting the environment variable ENABLE_SPONSORBLOCK=true or uncomment it in your .env

Alternatively, you can create a YouTube Playlist and play that with Muse, or queue up the specific YouTube URL that you want to hear.

JoeWHoward commented 2 months ago

If you are running Muse with Docker Compose, you can add

- ENABLE_SPONSORBLOCK=true

Underneath your existing environment variables (with the same indentation). Else, you can add -e ENABLE_SPONSORBLOCK='true' to your Docker docker run command.