Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A collection of additional Lavaplayer/Lavalink Sources

License

NotificationsYou must be signed in to change notification settings

topi314/LavaSrc

Repository files navigation

LavaSrc

Important

For LavaSrc v3 (Lavaplayer v1 & Lavalink v3) lookhere

A collection of additionalLavaplayer v2,LavaSearch &LavaLyrics Audio Source Managers andLavalink v4 Plugin.

Important

Tracks from Spotify & Apple Music & Tidal don't actually play from their sources, but are instead resolved via the configured providers

Summary

Lavalink Usage

This plugin requires Lavalinkv4 or greater

To install this plugin either download the latest release and place it into yourplugins folder or add the following into yourapplication.yml

Note

For a fullapplication.yml example seehere

Replace x.y.z with the latest version number

lavalink:plugins:    -dependency:"com.github.topi314.lavasrc:lavasrc-plugin:x.y.z"repository:"https://maven.lavalink.dev/releases"# this is optional for lavalink v4.0.0-beta.5 or greatersnapshot:false# set to true if you want to use snapshot builds (see below)

Snapshot builds are available inhttps://maven.lavalink.dev/snapshots with the short commit hash as the version

Configuration

For all supported urls and queries seehere

To get your Spotify clientId, clientSecret gohere & then copy them into yourapplication.yml like the following.

To get your Spotify spDc cookie gohere

To get your Apple Music api token gohere

To get your Deezer arl cookie gohere

To get your Yandex Music access token gohere

To get your Vk Music user token gohere

To get your Tidal token gohere

Warning

YESplugins IS AT ROOT IN THE YAML

plugins:lavasrc:providers:# Custom providers for track loading. This is the default# - "dzisrc:%ISRC%" # Deezer ISRC provider# - "dzsearch:%QUERY%" # Deezer search provider      -"ytsearch:\"%ISRC%\""# Will be ignored if track does not have an ISRC. See https://en.wikipedia.org/wiki/International_Standard_Recording_Code      -"ytsearch:%QUERY%"# Will be used if track has no ISRC or no track could be found for the ISRC#  you can add multiple other fallback sources heresources:spotify:false# Enable Spotify sourceapplemusic:false# Enable Apple Music sourcedeezer:false# Enable Deezer sourceyandexmusic:false# Enable Yandex Music sourceflowerytts:false# Enable Flowery TTS sourceyoutube:false# Enable YouTube search source (https://github.com/topi314/LavaSearch)vkmusic:false# Enable Vk Music sourcetidal:false# Enable Tidal sourcelyrics-sources:spotify:false# Enable Spotify lyrics sourcedeezer:false# Enable Deezer lyrics sourceyoutube:false# Enable YouTube lyrics sourceyandexmusic:false# Enable Yandex Music lyrics sourcevkmusic:false# Enable Vk Music lyrics sourcespotify:clientId:"your client id"clientSecret:"your client secret"# spDc: "your sp dc cookie" # the sp dc cookie used for accessing the spotify lyrics apicountryCode:"US"# the country code you want to use for filtering the artists top tracks. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2playlistLoadLimit:6# The number of pages at 100 tracks eachalbumLoadLimit:6# The number of pages at 50 tracks eachresolveArtistsInSearch:true# Whether to resolve artists in track search results (can be slow)localFiles:false# Enable local files support with Spotify playlists. Please note `uri` & `isrc` will be `null` & `identifier` will be `"local"`applemusic:countryCode:"US"# the country code you want to use for filtering the artists top tracks and language. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2mediaAPIToken:"your apple music api token"# apple music api token# or specify an apple music keykeyID:"your key id"teamID:"your team id"musicKitKey:|        -----BEGIN PRIVATE KEY-----        your key        -----END PRIVATE KEY-----playlistLoadLimit:6# The number of pages at 300 tracks eachalbumLoadLimit:6# The number of pages at 300 tracks eachdeezer:masterDecryptionKey:"your master decryption key"# the master key used for decrypting the deezer tracks. (yes this is not here you need to get it from somewhere else)arl:"your deezer arl"# the arl cookie used for accessing the deezer api this does not appear to be optional anymoreformats:[ "FLAC", "MP3_320", "MP3_256", "MP3_128", "MP3_64", "AAC_64" ]# the formats you want to use for the deezer tracks. "FLAC", "MP3_320", "MP3_256" & "AAC_64" are only available for premium users and require a valid arlyandexmusic:accessToken:"your access token"# the token used for accessing the yandex music api. See https://github.com/TopiSenpai/LavaSrc#yandex-musicplaylistLoadLimit:1# The number of pages at 100 tracks eachalbumLoadLimit:1# The number of pages at 50 tracks eachartistLoadLimit:1# The number of pages at 10 tracks eachflowerytts:voice:"default voice"# (case-sensitive) get default voice from here https://api.flowery.pw/v1/tts/voicestranslate:false# whether to translate the text to the native language of voicesilence:0# the silence parameter is in milliseconds. Range is 0 to 10000. The default is 0.speed:1.0# the speed parameter is a float between 0.5 and 10. The default is 1.0. (0.5 is half speed, 2.0 is double speed, etc.)audioFormat:"mp3"# supported formats are: mp3, ogg_opus, ogg_vorbis, aac, wav, and flac. Default format is mp3youtube:countryCode:"US"# the country code you want to use for searching lyrics via ISRC. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2vkmusic:userToken:"your user token"# This token is needed for authorization in the api. Guide: https://github.com/topi314/LavaSrc#vk-musicplaylistLoadLimit:1# The number of pages at 50 tracks eachartistLoadLimit:1# The number of pages at 10 tracks eachrecommendationsLoadLimit:10# Number of trackstidal:countryCode:"US"# the country code for accessing region-specific content on Tidal (ISO 3166-1 alpha-2).searchLimit:6# How many search results should be returnedtoken:"your tidal token"# the token used for accessing the tidal api. See https://github.com/topi314/LavaSrc#tidal

Plugin Info

LavaSrc adds the following fields to tracks & playlists in Lavalink

Track

FieldTypeDescription
albumName?stringThe name of the album
albumArtUrl?stringThe url of the album art
artistUrl?stringThe url of the artist
artistArtworkUrl?stringThe url of the artist artwork
previewUrl?stringThe url of the preview
isPreviewboolWhether the track is a preview
Example Payload
{"encoded":"...","info": {...  },"pluginInfo": {"albumName":"...","albumArtUrl":"...","artistUrl":"...","artistArtworkUrl":"...","previewUrl":"...","isPreview":false  },"userData": {...  }}

Playlist

FieldTypeDescription
typePlaylist TypeThe type of the playlist
url?stringThe url of the playlist
artworkUrl?stringThe url of the playlist artwork
author?stringThe author of the playlist
totalTracks?intThe total number of tracks in the playlist
Example Payload
{"info": {...  },"pluginInfo": {"type":"playlist","url":"...","artworkUrl":"...","author":"...","totalTracks":10  },"tracks": [...  ]}

Playlist Types

TypeDescription
albumThe playlist is an album
playlistThe playlist is a playlist
artistThe playlist is an artist
recommendationsThe playlist is a recommendations playlist

Update Settings at Runtime

Sometimes you may want to update the settings at runtime without restarting Lavalink. This can be done by sending aPATCH request to the/v4/lavasrc/config endpoint.Keep in mind this willNOT update the settings in theapplication.yml file. If you restart Lavalink the settings will be reset to the ones in theapplication.yml file.

PATCH /v4/lavasrc/config

LavaSrc Config Object

Note

All fields are optional and only the fields you provide will be updated.

FieldTypeDescription
?spotifySpotify ConfigThe Spotify settings
?applemusicApple Music ConfigThe Apple Music settings
?deezerDeezer ConfigThe Deezer settings
?yandexMusicYandex Music ConfigThe Yandex Music settings
?vkMusicVk Music ConfigThe Vk Music settings
Spotify Config Object
FieldTypeDescription
?clientIdstringThe Spotify clientId
?clientSecretstringThe Spotify clientSecret
?spDcstringThe Spotify spDc cookie
Apple Music Config Object
FieldTypeDescription
?mediaAPITokenstringThe Apple Music api token
Deezer Config Object
FieldTypeDescription
?arlstringThe Deezer arl cookie
?formatsarray ofDeezer FormatThe Deezer formats
Deezer Formats
FormatDescription
FLACFLAC
MP3_320MP3 320kbps
MP3_256MP3 256kbps
MP3_128MP3 128kbps
MP3_64MP3 64kbps
AAC_64AAC 64kbps
Yandex Music Config Object
FieldTypeDescription
?accessTokenstringThe Yandex Music access token
Vk Music Config Object
FieldTypeDescription
?userTokenstringThe Vk Music user token
Example Payload
{"spotify": {"clientId":"your client id","clientSecret":"your client secret","spDc":"your sp dc cookie"  },"applemusic": {"mediaAPIToken":"your apple music api token"  },"deezer": {"arl":"your deezer arl","formats": ["FLAC","MP3_320","MP3_256","MP3_128","MP3_64","AAC_64"    ]  },"yandexMusic": {"accessToken":"your access token"  },"vkMusic": {"userToken":"your user token"  }}

Lavaplayer Usage

Replacex.y.z with the latest version number

Snapshot builds are instead available inhttps://maven.topi.wtf/snapshots with the short commit hash as the version

Using in Gradle:

Gradle
repositories {  maven {    url"https://maven.topi.wtf/releases"  }}dependencies {  implementation"com.github.topi314.lavasrc:lavasrc:x.y.z"  implementation"com.github.topi314.lavasrc:lavasrc-protocol:x.y.z"}

Using in Maven:

Maven
<repositories>  <repository>    <id>TopiWTF-releases</id>    <name>Topis Maven Repo</name>    <url>https://maven.topi.wtf/releases</url>  </repository></repositories><dependencies>  <dependency>    <groupId>com.github.topi314.lavasrc</groupId>    <artifactId>lavasrc</artifactId>    <version>x.y.z</version>  </dependency>  <dependency>    <groupId>com.github.topi314.lavasrc</groupId>    <artifactId>lavasrc-protocol-jvm</artifactId>    <version>x.y.z</version>  </dependency></dependencies>

Spotify

To get a Spotify clientId & clientSecret you must gohere and create a new application.

How to get sp dc cookie
  1. Go tohttps://open.spotify.com
  2. Open DevTools and go to the Application tab
  3. Copy the value of thesp_dc cookie
AudioPlayerManagerplayerManager =newDefaultAudioPlayerManager();// create a new SpotifySourceManager with the default providers, clientId, clientSecret, spDc, countryCode and AudioPlayerManager and register it// spDc is only needed if you want to use it with LavaLyricsvarspotify =newSpotifySourceManager(clientId,clientSecret,spDc,countryCode, () ->playerManager,DefaultMirroringAudioTrackResolver);playerManager.registerSourceManager(spotify);

LavaLyrics

Click to expand
// create new lyrics managervarlyricsManager =newLyricsManager();// register sourcelyricsManager.registerLyricsManager(spotify);

LavaSearch

Click to expand
// create new search managervarsearchManager =newSearchManager();// register sourcesearchManager.registerSearchManager(spotify);

Apple Music

How to get media api token without Apple developer account
  1. Go tohttps://music.apple.com
  2. Open DevTools and go to the Debugger tab
  3. Search with this regex"(?<token>(ey[\w-]+)\.([\w-]+)\.([\w-]+))" in allindex-*.js files
  4. Copy the token from the source code

Alternatively, you canfollowthis guide

AudioPlayerManagerplayerManager =newDefaultAudioPlayerManager();// create a new AppleMusicSourceManager with the standard providers, apple music api token, countrycode and AudioPlayerManager and register itvarappleMusic =newAppleMusicSourceManager(null,mediaAPIToken,"us",playerManager);playerManager.registerSourceManager(appleMusic);

LavaSearch

Click to expand
// create new search managervarsearchManager =newSearchManager();// register sourcesearchManager.registerSearchManager(appleMusic);

Deezer

How to get deezer master decryption key

Use Google.

How to get deezer arl cookie

Use Google to find a guide on how to get the arl cookie. It's not that hard.

AudioPlayerManagerplayerManager =newDefaultAudioPlayerManager();// create a new DeezerSourceManager with the master decryption key and register itvardeezer =newDeezerSourceManager("the master decryption key","your arl",formats);playerManager.registerSourceManager(deezer);

LavaLyrics

Click to expand
// create new lyrics managervarlyricsManager =newLyricsManager();// register sourcelyricsManager.registerLyricsManager(deezer);

LavaSearch

Click to expand
// create new search managervarsearchManager =newSearchManager();// register sourcesearchManager.registerSearchManager(deezer);

Yandex Music

How to get access token
  1. (Optional) Open DevTools in your browser and on the Network tab enable trotlining.
  2. Go tohttps://oauth.yandex.ru/authorize?response_type=token&client_id=23cabbbdc6cd418abb4b39c32c41195d
  3. Authorize and grant access
  4. The browser will redirect to the address likehttps://music.yandex.ru/#access_token=AQAAAAAYc***&token_type=bearer&expires_in=31535645.Very quickly there will be a redirect to another page, so you need to have time to copy the link.image
  5. Your accessToken, what is afteraccess_token.

Token expires in 1 year. You can get a new one by repeating the steps above.

Important information

Yandex Music is very location-dependent. You should either have a premium subscription or be located in one of the following countries:

  • Azerbaijan
  • Armenia
  • Belarus
  • Georgia
  • Kazakhstan
  • Kyrgyzstan
  • Moldova
  • Russia
  • Tajikistan
  • Turkmenistan
  • Uzbekistan

Else you will only have access to podcasts.

AudioPlayerManagerplayerManager =newDefaultAudioPlayerManager();// create a new YandexMusicSourceManager with the access token and register itvaryandex =newYandexMusicSourceManager("...");playerManager.registerSourceManager(yandex);

LavaLyrics

Click to expand
// create new lyrics managervarlyricsManager =newLyricsManager();// register sourcelyricsManager.registerLyricsManager(yandex);

LavaSearch

Click to expand
// create new search managervarsearchManager =newSearchManager();// register sourcesearchManager.registerSearchManager(yandex);

Flowery Text-to-Speech

Get list of all voices and languages supportedhere

AudioPlayerManagerplayerManager =newDefaultAudioPlayerManager();// create a new FloweryTTSSourceManagerplayerManager.registerSourceManager(newFloweryTTSSourceManager());// create a new FloweryTTSSourceManager with a default voiceplayerManager.registerSourceManager(newFloweryTTSSourceManager("..."));

Vk Music

How to get user token

WARNING!

Carefully, this token can be used to access your personal data. Use a newly created account specifically for LavaSrc. This source is designed mainly for the RU region, 80% of songs in other regions will not be played.

  1. Go to the authorization pageMarusya application
  2. Authorize through your vk account.
  3. A link like thishttps://oauth.vk.com/blank.html#access_token=$$$$$&expires_in=0&user_id=$$$$$@email=$$$$$@gmail.com
  4. Copy your token and paste it into your config! Enjoy captcha-free vk music!
AudioPlayerManagerplayerManager =newDefaultAudioPlayerManager();// create a new VkMusicSourceManager with the user token and register itplayerManager.registerSourceManager(newVkMusicSourceManager("...");

LavaLyrics

Click to expand
// create new lyrics managervarlyricsManager =newLyricsManager();// register sourcelyricsManager.registerLyricsManager(vkmusic);

LavaSearch

Click to expand
// create new search managervarsearchManager =newSearchManager();// register sourcesearchManager.registerSearchManager(vkmusic);

Tidal

How to get tidal token

Use Google to get the tidal token.

AudioPlayerManagerplayerManager =newDefaultAudioPlayerManager();// create a new TidalSourceManager with the token and register itvartidal =newTidalSourceManager(countryCode, () ->playerManager,newDefaultMirroringAudioTrackResolver(providers),"your tidal token");playerManager.registerSourceManager(tidal);

Supported URLs and Queries

Spotify

(including new regional links likehttps://open.spotify.com/intl-de/track/0eG08cBeKk0mzykKjw4hcQ)

Apple Music

Deezer

Yandex Music

Flowery TTS

You can read about all the available optionshere, a list of available voices ishere

  • ftts://hello%20world
  • ftts://hello%20world?audio_format=ogg_opus&translate=False&silence=1000&speed=1.0&voice=09924826-684f-51e9-825b-cf85aed2b2cf

Vk Music

Tidal



[8]ページ先頭

©2009-2025 Movatter.jp