Giter VIP home page Giter VIP logo

idonthavespotify's Introduction

idonthavespotify's People

Contributors

sjdonado avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

beatsvilleusa

idonthavespotify's Issues

Inverse search?

Hi!

For the same reasons why I would like to convert a Spotify link into a non-Spotify one, I also frequently find myself wanting to convert a non-Spotify link into a Spotify one. Would it be possible to implement the inverse functionality? (As in, pasting an Apple Music link and getting in return a Spotify link to the same item.)

Thanks!

Doesn't work with mobile links

The mobile app returns links with another schema, e.g. https://spotify.link/Lh6MLTOo2Bb.

I tried to get this working myself but couldn't figure out how best to structure it in this kind of app.

Here's a failing test.

  test('should return a song with a valid shortLink - Song', async ({ page }) => {
    const shortLinkSong = 'https://spotify.link/Lh6MLTOo2Bb';
    const searchCard = page.getByTestId('search-card');

    await page.fill('#song-link', spotifyLinkSong);
    await page.press('#song-link', 'Enter');

    const searchCardText = await searchCard.textContent() ?? '';

    expect(searchCardText).toContain('Do Not Disturb');
    expect(searchCardText).toContain('Drake · Song · 2017');
    expect(searchCardText).toContain('Listen on Youtube');
    expect(searchCardText).toContain('Listen on Deezer');
    expect(searchCardText).toContain('Listen on Apple Music');
    expect(searchCardText).toContain('Listen on Tidal');
    expect(searchCardText).toContain('Listen on SoundCloud');

    const youtubeLink = await page.getByText('Listen on Youtube').getAttribute('href');
    const deezerLink = await page.getByText('Listen on Deezer').getAttribute('href');
    const appleMusicLink = await page.getByText('Listen on Apple Music').getAttribute('href');
    const tidalLink = await page.getByText('Listen on Tidal').getAttribute('href');
    const soundcloudLink = await page.getByText('Listen on SoundCloud').getAttribute('href');

    expect(youtubeLink).toBe('https://www.youtube.com/watch?v=zhY_0DoQCQs');
    expect(deezerLink).toBe('https://www.deezer.com/track/144572248');
    expect(appleMusicLink).toBe('https://music.apple.com/us/album/do-not-disturb/1440890708?i=1440892237');
    expect(tidalLink).toBe('https://listen.tidal.com/search?q=Do%20Not%20Disturb%20Drake');
    expect(soundcloudLink).toBe('https://soundcloud.com/search/sounds?q=Do%20Not%20Disturb%20Drake');
  });

The regex needs updating:

export const SPOTIFY_LINK_REGEX = /^https:\/\/(open\.spotify\.com\/(track|album|playlist|artist|episode|show)|spotify.link)\/.*$/;

Unfortunately, after that it's not as simple as updating the fetch call to fetch(spotifyLink, { redirect: 'follow' }) as it redirects to a page that tries to open the app or show a button with a link to the correct URL. (I would use a[href^=https://open.spotify.com to get this)

1.0.0 release

  • Apple Music verified link
  • Youtube verified link
  • Deezer verified link
  • SoundCloud verified link
  • check top 3 results (scrapers)

Tidal is currently on hold until the next version #10 (comment).
Amazon Music is a good candidate to be included in the next version.

Mark a service as default

Get only one result, WEB + API.

Web: Settings screen with services picker (include inverted search too)
API: search queryParam.

Spotify parser request canceledError: canceled

The first Spotify request is failing, but it works after retrying 🤔

[10:17:17.822] ERROR (7): [Spotify Parser] (https://open.spotify.com/track/6LsUo3PX3QeJmWBRcmaf5b) CanceledError: canceled
2024-01-31T10:17:17.825210576Z app[web.1]:     err: {
2024-01-31T10:17:17.825217336Z app[web.1]:       "type": "Error",
2024-01-31T10:17:17.825222096Z app[web.1]:       "message": "[Spotify Parser] (https://open.spotify.com/track/6LsUo3PX3QeJmWBRcmaf5b?si=cd59ba91cfa14d9a) CanceledError: canceled",
2024-01-31T10:17:17.825227096Z app[web.1]:       "stack":
2024-01-31T10:17:17.825231176Z app[web.1]:           Error: [Spotify Parser] (https://open.spotify.com/track/6LsUo3PX3QeJmWBRcmaf5b) CanceledError: canceled
2024-01-31T10:17:17.825235816Z app[web.1]:               at <anonymous> (/usr/src/app/src/parsers/spotify.ts:73:62)
2024-01-31T10:17:17.825240056Z app[web.1]:               at processTicksAndRejections (:12:39)
2024-01-31T10:17:17.825244016Z app[web.1]:       "originalLine": 39,
2024-01-31T10:17:17.825247976Z app[web.1]:       "originalColumn": 20
2024-01-31T10:17:17.825262736Z app[web.1]:     }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.