Skip to content

Conversation

zombiepigdragon
Copy link

This PR adds a new parameter to the payload for the /publish endpoint. The parameter makes it possible to attempt to publish lyrics with the intent to fail if there are already lyrics in the database for that track.

The reason for this PR is that I recently purchased and downloaded some music from Bandcamp with plain lyrics embedded in the UNSYNCEDLYRICS tag. I would like to write a script to extract these lyrics and add them to lrclib.net in bulk (rather than manually adding each track via lrcget) but a small number of these tracks already have lyrics, a few of which are properly synced. I would obviously prefer not to replace those lyrics, but there are hundreds of tracks involved and I worry I would make a mistake trying to exclude only the relevant tracks. This new parameter would make this script safe to run, as it would prevent overwriting them.

Full disclosure: I have tested that the server still can build/launch correctly with these changes, but I made no efforts to actually upload any tracks to the modified server or to otherwise test the PR. The logic involved is fairly simple and self-contained, but I would encourage checking it carefully to make sure I didn't make any mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant