Skip to content

Commit

Permalink
Match with clean_song_name_alpha_numeric in PlaylistManager correctly (
Browse files Browse the repository at this point in the history
…#2253)

* Match with clean_song_name_alpha_numeric in PlaylistManager correctly

* Linting
  • Loading branch information
Brainicism authored Nov 28, 2024
1 parent d208ecd commit 70a4b7b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/helpers/playlist_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
sendErrorMessage,
sendInfoMessage,
} from "./discord_utils";
import { sql } from "kysely";
import { youtube_v3 } from "googleapis";
import Axios from "axios";
import EnvVariableManager from "../env_variable_manager";
Expand Down Expand Up @@ -985,8 +986,13 @@ export default class PlaylistManager {
eb(
"clean_song_name_alpha_numeric",
"like",
songName.replace(/[^0-9a-z]/gi, "") ||
songName,
songName.replace(/[^0-9a-z]/gi, "")
? eb.fn("CleanSongName", [
sql`${songName}`,
])
: eb.fn("CleanSongName", [
sql`${songName.replace(/[^0-9a-z]/gi, "")}`,
]),
),
),
),
Expand Down

0 comments on commit 70a4b7b

Please sign in to comment.