Skip to content

Commit

Permalink
feat: atualizar biblioteca de busca de letras para @faouzkk/lyrics-fi…
Browse files Browse the repository at this point in the history
…nder
  • Loading branch information
Drack112 committed Jan 12, 2025
1 parent 41943b0 commit 03c8d0b
Show file tree
Hide file tree
Showing 3 changed files with 260 additions and 32 deletions.
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
"@dnd-kit/modifiers": "^7.0.0",
"@dnd-kit/sortable": "^8.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@faouzkk/lyrics-finder": "^1.0.3",
"@formkit/auto-animate": "^0.8.2",
"@headlessui/react": "^2.1.1",
"@heroicons/react": "^2.1.4",
"@hookform/resolvers": "^3.9.0",
"@iconify/react": "^5.0.2",
"@jeve/lyrics-finder": "^1.0.1",
"@libsql/client": "^0.14.0",
"@paralleldrive/cuid2": "^2.2.2",
"@radix-ui/react-select": "^2.1.3",
Expand Down
8 changes: 4 additions & 4 deletions apps/web/src/server/modules/lyrics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
// @ts-ignore-next-line

import { logger } from '@/server/logger'

import type { GetLyricsOptions } from './types'

import lyricsFinder from '@jeve/lyrics-finder'
import lyrics from '@faouzkk/lyrics-finder'

const getLyrics = async (args: Pick<GetLyricsOptions, 'artist' | 'title'>) => {
const [title, artist] = `${args.title}${args.artist}`
Expand All @@ -20,7 +18,9 @@ const getLyrics = async (args: Pick<GetLyricsOptions, 'artist' | 'title'>) => {

logger.info(`Fetching lyrics for ${title} by ${artist}`)

return await lyricsFinder.LyricsFinder(`${title} ${artist}`)
const response = await lyrics(`${artist} ${title}`)
console.log(response)
return response
}

export { getLyrics }
Loading

0 comments on commit 03c8d0b

Please sign in to comment.