add new lyrics provider

This commit is contained in:
bignutty 2025-01-09 19:00:57 +01:00
parent 13e4fb2976
commit e543287258
2 changed files with 14 additions and 2 deletions

View file

@ -28,7 +28,8 @@ function renderMetadata(metadata){
const LYRIC_PROVIDERS = { const LYRIC_PROVIDERS = {
UNKNOWN_PROVIDER: 0, UNKNOWN_PROVIDER: 0,
MUSIXMATCH: 1, MUSIXMATCH: 1,
GENIUS: 2 GENIUS: 2,
LRCLIB: 3,
} }
function renderLyricsFooter(context, provider){ function renderLyricsFooter(context, provider){
@ -45,6 +46,11 @@ function renderLyricsFooter(context, provider){
iconUrl: STATICS.genius iconUrl: STATICS.genius
} }
break; break;
case LYRIC_PROVIDERS.LRCLIB:
return {
text: `LRCLib • ${context.application.name}`
}
break;
default: // Fallback, this should never happen default: // Fallback, this should never happen
return { return {
text: context.application.name, text: context.application.name,

View file

@ -26,7 +26,8 @@ function renderMetadata(metadata){
const LYRIC_PROVIDERS = { const LYRIC_PROVIDERS = {
UNKNOWN_PROVIDER: 0, UNKNOWN_PROVIDER: 0,
MUSIXMATCH: 1, MUSIXMATCH: 1,
GENIUS: 2 GENIUS: 2,
LRCLIB: 3,
} }
function renderLyricsFooter(context, provider){ function renderLyricsFooter(context, provider){
@ -43,6 +44,11 @@ function renderLyricsFooter(context, provider){
iconUrl: STATICS.genius iconUrl: STATICS.genius
} }
break; break;
case LYRIC_PROVIDERS.LRCLIB:
return {
text: `LRCLib • ${context.application.name}`
}
break;
default: // Fallback, this should never happen default: // Fallback, this should never happen
return { return {
text: context.application.name, text: context.application.name,