Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drschlaubi/lyrics.kt
A Lyrics finder for Lavaplayer/Lavalink and Kotlin
https://github.com/drschlaubi/lyrics.kt
Last synced: 1 day ago
JSON representation
A Lyrics finder for Lavaplayer/Lavalink and Kotlin
- Host: GitHub
- URL: https://github.com/drschlaubi/lyrics.kt
- Owner: DRSchlaubi
- License: mit
- Created: 2023-12-16T23:26:07.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-08-24T22:10:13.000Z (2 months ago)
- Last Synced: 2024-08-24T23:19:53.026Z (2 months ago)
- Language: Kotlin
- Size: 268 KB
- Stars: 12
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lyrics.kt
A very simple lyrics client based on YouTube
# Using from Kotlin
````kotlin
val client = LyricsClient()val (videoId) = lyrics.search("Electric callboy we got the moves").first()
client.requestLyrics(videoId)
````# Using from Lavaplayer
```java
var client = new LyricsClient();
LavaplayerUtil.findLyrics(client, player.getPlayingTrack());
```# Using with Lavalink
Replace x.y.z with the current version
```yaml
lavalink:
plugins:
- dependency: "dev.schlaubi.lyrics:lavalink:x.y.z"
repository: "https://maven.lavalink.dev/releases" # this is optional for lavalink v4.0.0-beta.5 or greater
snapshot: false # set to true if you want to use snapshot builds (see below)
plugins:
lyrics:
countryCode: de #country code for resolving isrc tracks
```## API for clients
```json5
// GET /v4/lyrics/{videoId}
// GET /v4/sessions/{sessionId}/players/{guildId}/lyrics{
"type": "timed",
// can also be text
"track": {
"title": "We Got the Moves",
"author": "Electric Callboy",
"album": "We Got the Moves",
"albumArt": [
{
"url": "https://lh3.googleusercontent.com/rDaGBvVRyBbHKJuQFFfIUuCLU36OuHHTjDz2u9xDwbIgD2MWM_P6L2L01IOOtoJvi7ks43OFeCqx0cRp=w60-h60-l90-rj",
"height": 60,
"width": 60
}
]
},
"source": "LyricFind",
"text": "",
// Only present for type text
// Only present for type timed
"lines": [
{
"line": "♪",
"range": {
"start": 0,
// start timestamp in ms since track start
"end": 6510
// end timestamp in ms since track start
}
},
{
"line": "Summer mood",
"range": {
"start": 6510,
"end": 7330
}
}
]
}
```
```json5
// /v4/lyrics/search/{query}[
{"videoId": "UVXvQtm6ji0", "title": "We Got The moves"}
]
```