DuncteBot / java-timed-lyrics

Lyrics plugin for lavalink
MIT License
6 stars 1 forks source link

Invalid JSON returned by endpoint / duplicate object property #4

Closed angelobreuer closed 6 months ago

angelobreuer commented 6 months ago

When executing the following request, java-timed-lyrics will return an invalid payload with the type property being present twice.

Request

http://localhost:2333/v4/lyrics/search?query=Never Gonna Give You Up&source=genius

Response

{
    "type": "text",
    "track": {
        "title": "Never Gonna Give You Up",
        "author": "Rick Astley",
        "album": null,
        "albumArt": [
            {
                "url": "https://images.genius.com/88634fdafc60d4ff1e76944436c34a19.901x901x1.png",
                "height": -1,
                "width": -1
            }
        ]
    },
    "source": "genius.com",
    "text": "[Intro]\nDesert you\nOoh-ooh-ooh-ooh\nHurt you\n\n[Verse 1]\nWe're no strangers to love\nYou know the rules and so do I (Do I)\nA full commitment's what I'm thinking of\nYou wouldn't get this from any other guy\n\n[Pre-Chorus]\nI just wanna tell you how I'm feeling\nGotta make you understand\n\n[Chorus]\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna say goodbye\nNever gonna tell a lie and hurt you\n\n[Verse 2]\nWe've known each other for so long\nYour heart's been aching, but you're too shy to say it (To say it)\nInside, we both know what's been going on (Going on)\nWe know the game, and we're gonna play it",
    "type": "text" // !!! Duplicate property
}
duncte123 commented 6 months ago

Fixed in version 1.6.3