Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Spotify music link that does not work #24

Closed
byorage opened this issue Aug 29, 2023 · 2 comments
Closed

Spotify music link that does not work #24

byorage opened this issue Aug 29, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@byorage
Copy link

byorage commented Aug 29, 2023

Please describe your problem in as much detail as possible:
when I launch a music and in the music link the link contains "intl-fr" the bot does not find the music and therefore does not play it.
example link: https://open.spotify.com/intl-fr/track/0HYaC4uGgpx7EIBekhxWfi?si=3d5289545af74ea2

Further information:

  • Plugin version: 1.5.1
  • DisTube version: 4.0.6
  • discord.js version: 14.13.0
  • Node.js version: 18.x
  • Operating system: Server Linux
@byorage byorage added the bug Something isn't working label Aug 29, 2023
@skick1234
Copy link
Contributor

All redirect links won't be supported since we cannot handle all of them.
Just follow redirects then play the final location instead.

@skick1234 skick1234 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2023
@Akif9748
Copy link

A basic solution for now:

// Input URLs
const inputURL = "https://open.spotify.com/intl-fr/track/0HYaC4uGgpx7EIBekhxWfi?si=3d5289545af74ea2";

// Define a regular expression to match and remove the '/intl-xx/' part from the URLs
const regex = /\/intl-[a-z]{2}\//;

// Replace the matching part with an empty string
const outputURL= inputURL.replace(regex, '/');

// Output converted URL
console.log(outputURL);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants