Skip to content
This repository was archived by the owner on Sep 8, 2021. It is now read-only.

Commit

Permalink
Use default cover when there is no cover
Browse files Browse the repository at this point in the history
  • Loading branch information
1nikolas committed Sep 11, 2020
1 parent 7fef90a commit bd4fbf3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,12 @@ function getMusixmatchLyrics(songName, lyricUrl) {

console.log(coverUrl);

setLyrics(musixmatchTitle, "Lyrics not available on Musixmatch.", coverUrl, lyricUrl);
if (!coverUrl.includes('nocover')){
setLyrics(musixmatchTitle, "Lyrics not available on Musixmatch.", coverUrl, lyricUrl);
} else {
setLyrics(musixmatchTitle, "Lyrics not available on Musixmatch.", "none", lyricUrl);
}

} else {

var musixmatchTitle = body.substring(
Expand Down Expand Up @@ -205,7 +210,11 @@ function getMusixmatchLyrics(songName, lyricUrl) {
console.log(coverUrl);
console.log(lyrics);

setLyrics(musixmatchTitle, lyrics, coverUrl, lyricUrl)
if (!coverUrl.includes('nocover')){
setLyrics(musixmatchTitle, lyrics, coverUrl, lyricUrl)
} else {
setLyrics(musixmatchTitle, lyrics, "none", lyricUrl)
}


}
Expand Down

0 comments on commit bd4fbf3

Please sign in to comment.