Skip to content

Ditto v0.5.2

Choose a tag to compare

@da0t-exe da0t-exe released this 23 Sep 22:07
· 14 commits to main since this release

YouTube now plays reliably, and a track that breaks while playing is retried instead of skipped.

Fixed

  • YouTube tracks were skipped. Lavalink's YouTube plugin could load a video, then fail once playback began — "All clients failed to load the item… This video requires login" — and the track was dropped, because the yt-dlp fallbacks only covered loading. A playback error now moves the same track to the next route (direct address from yt-dlp, then a downloaded copy); Ditto only gives up when every route fails.
  • Events carry the Lavalink track id, so the end event of an abandoned attempt no longer skips the next track.

Changed

  • YouTube goes through yt-dlp first. From a home connection, YouTube refused the plugin for 7 of 8 videos while yt-dlp got every one through in about 3 seconds. Lavalink's plugin is now the fallback for YouTube; SoundCloud, Bandcamp, Twitch and direct links still go straight to Lavalink.
  • The next track is loaded while the current one plays, so moving through a queue is immediate, and a looped track is replayed without reloading.
  • The plugin also tries more sign-in-free YouTube clients: TVHTML5_SIMPLY, IOS, ANDROID_MUSIC.

New

npx tsx src/scripts/music-lab.ts [link…] resolves links the way /play does and has the built-in Lavalink really play each one, route by route, then reports what worked.

Tested

With music-lab, from the same network as the production server and with SERVER_PORT set as on Pterodactyl, 12 of 13 links played on the first route:

Source Route
YouTube ×2, YouTube Music searches ×2 yt-dlp direct
Spotify, Deezer, Apple Music tracks yt-dlp direct (matched on YouTube Music)
SoundCloud, Bandcamp, direct MP3 Lavalink
TikTok downloaded copy
Twitch clip yt-dlp direct, after Lavalink failed
X not verified — the test post no longer exists

Upgrading

git fetch origin && git reset --hard origin/main && npm install --omit=dev && npm start