NextFire / apple-music-discord-rpc

🎵 Discord Rich Presence Client for the macOS Apple Music app and iTunes
MIT License
559 stars 37 forks source link

Suggestion: use Songwhip instead of Spotify search #71

Closed lucasPoret closed 11 months ago

lucasPoret commented 12 months ago

music-rpc.ts

        // const query = encodeURIComponent(`artist:${props.artist} track:${props.name}`);
        // const spotifyUrl = `https://open.spotify.com/search/${query}?si`;
        // if (spotifyUrl.length <= 512) {
        //   buttons.push({
        //     label: "Search on Spotify",
        //     url: spotifyUrl,
        //   });
        // }

        const songwhipUrl = `https://songwhip.com/${infos.iTunesUrl}`;
        if (songwhipUrl.length <= 512) {
          buttons.push({
            label: "Search on Songwhip",
            url: songwhipUrl,
          });
        }

If you use songwhip you will be able to share with all users and not just AM or Spotify. In addition, this takes you directly to the songs page because otherwise some music does not have the same titles on AM as on Spotify, so the Spotify search gives nothing.

Example of Songwhip: https://songwhip.com/imagine-dragons/waves

NextFire commented 11 months ago

Hi! Thanks for the tip. However, I would prefer to avoid making links to 3rd services such as this one in the script. Feel free to make your own fork!