diff options
Diffstat (limited to 'api/lyrics.php')
-rw-r--r-- | api/lyrics.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/api/lyrics.php b/api/lyrics.php index 11910d9..d72a17c 100644 --- a/api/lyrics.php +++ b/api/lyrics.php @@ -48,9 +48,17 @@ $id = array_values(array_filter(json_decode(file_get_contents("https://api.geniu $data = []; exec('bash -c "cd /opt/spotify/spotify-lyrics-api; python genius.py ' . $id . '"', $data); $data = array_slice(array_map(function ($i) { - if (str_ends_with($i, "1Embed")) { - return substr($i, 0, -6); - } elseif (str_ends_with($i, "2Embed")) { + if (str_ends_with($i, "1Embed") + || str_ends_with($i, "2Embed") + || str_ends_with($i, "3Embed") + || str_ends_with($i, "4Embed") + || str_ends_with($i, "5Embed") + || str_ends_with($i, "6Embed") + || str_ends_with($i, "7Embed") + || str_ends_with($i, "8Embed") + || str_ends_with($i, "9Embed") + || str_ends_with($i, "0Embed") + ) { return substr($i, 0, -6); } elseif (str_ends_with($i, "Embed")) { return substr($i, 0, -5); |