Skip to content

Commit

Permalink
Merge pull request #30 from fgsalomon/master
Browse files Browse the repository at this point in the history
fix: support localized Spotify URLs
  • Loading branch information
sjdonado authored Nov 12, 2024
2 parents 7ec95e6 + 6f3b08e commit 61af20e
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cloning repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to dokku
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "idonthavespotify",
"version": "1.4.0",
"version": "1.4.1",
"scripts": {
"dev": "concurrently \"bun run build:dev\" \"bun run --watch www/bin.ts\"",
"build:dev": "vite build --mode=development --watch",
Expand Down
2 changes: 1 addition & 1 deletion src/config/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const SPOTIFY_LINK_REGEX =
/^https:\/\/(open\.spotify\.com\/(track|album|playlist|artist|episode|show)|spotify\.link)\/(\w{11,24})(?:[\?#].*)?$/;
/^https:\/\/(open\.spotify\.com\/(?:intl-[a-z]{2}\/)?(track|album|playlist|artist|episode|show)|spotify\.link)\/(\w{11,24})(?:[\?#].*)?$/;

export const SPOTIFY_LINK_MOBILE_REGEX = /^https:\/\/spotify\.link\/(\w+)/;
export const SPOTIFY_LINK_DESKTOP_REGEX =
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/search/artist.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('GET /search - Artist', () => {
const response = await app.handle(request).then(res => res.json());

expect(response).toEqual({
id: '6l3HvQ5sa6mXTsMTB19rO5',
id: 'b3Blbi5zcG90aWZ5LmNvbS9hcnRpc3QvNmwzSHZRNXNhNm1YVHNNVEIxOXJPNQ%3D%3D',
type: 'artist',
title: 'J. Cole',
description: 'Artist · 45.1M monthly listeners.',
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/search/playlist.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('GET /search - Playlist', () => {
const response = await app.handle(request).then(res => res.json());

expect(response).toEqual({
id: '37i9dQZF1DX2apWzyECwyZ',
id: 'b3Blbi5zcG90aWZ5LmNvbS9wbGF5bGlzdC8zN2k5ZFFaRjFEWDJhcFd6eUVDd3la',
type: 'playlist',
title: 'This Is Bad Bunny',
description: 'This Is Bad Bunny · Playlist · 109 songs · 5.2M likes',
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/search/show.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('GET /search - Podcast Show', () => {
const response = await app.handle(request).then(res => res.json());

expect(response).toEqual({
id: '6o81QuW22s5m2nfcXWjucc',
id: 'b3Blbi5zcG90aWZ5LmNvbS9zaG93LzZvODFRdVcyMnM1bTJuZmNYV2p1Y2M%3D',
type: 'show',
title: 'Waveform: The MKBHD Podcast',
description:
Expand Down

0 comments on commit 61af20e

Please sign in to comment.