Skip to content

Commit

Permalink
Added support for international links
Browse files Browse the repository at this point in the history
  • Loading branch information
Oceanity committed Aug 30, 2024
1 parent 0426672 commit 69f3255
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils/spotify/player/track.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { formatMsToTimecode } from "@oceanity/firebot-helpers/string";
import { getBiggestImageUrl } from "@utils/array";
import { SpotifyService } from "@utils/spotify";
import { LargeNumberLike } from "crypto";
import { EventEmitter } from "events";

export class SpotifyTrackService extends EventEmitter {
private readonly spotify: SpotifyService;
private readonly urlRegex: RegExp =
/(?:https?:)\/\/open\.spotify\.com\/track\/(.+?)(?:\?.+)?(?:\W|$)/;
/(?:https?:)\/\/open\.spotify\.com\/track\/(?:intl-[a-z]+\/)?(.+?)(?:\?.+)?(?:\W|$)/;

private _track?: SpotifyTrackDetails | null;
private _trackSummary?: SpotifyTrackSummary;
Expand Down

0 comments on commit 69f3255

Please sign in to comment.