lucida.to's fork of lucida, renamed for simplicity
Find a file
2026-04-12 17:59:07 -04:00
.husky add husky 2024-07-30 13:13:54 -05:00
scripts add format selection to most services 2026-04-09 04:40:25 -04:00
src fix trackId extraction 2026-04-12 17:59:07 -04:00
.eslintignore Initial commit 2023-09-16 21:05:49 -05:00
.eslintrc.cjs Initial commit 2023-09-16 21:05:49 -05:00
.gitignore fix tidal ripping 2026-04-07 14:02:51 -04:00
.prettierignore Initial commit 2023-09-16 21:05:49 -05:00
.prettierrc update dependencies 2023-10-31 22:09:29 -05:00
LICENSE.md update license 2024-05-05 22:49:00 -05:00
package.json bump version 2026-04-11 21:02:18 +05:00
pnpm-lock.yaml update librespot, bump version 2024-11-11 15:06:56 +01:00
pnpm-workspace.yaml update package info 2026-04-07 14:04:08 -04:00
README.md add atmos to tidal 2026-04-11 21:02:16 +05:00
tsconfig.json change tsconfig rootDir 2024-07-30 17:39:20 -05:00

verdana

verdana (stylized as "verdana") is a fork of Lucida, as it no longer seems to be maintained. It remains under the OQL as the original author hazycora intended. This fork was specifically made to be used with lucida.to, but can be used in most other environments.

Changes made

  • Name change
  • Format selection: verdana.getFormatsByUrl(), streamer.getFormats()
    • Dolby Atmos

Planned changes

  • Focus less on the individual streaming service and give best priority to the highest quality rip available
  • Client selection

Usage

import Verdana from 'verdana'
import Tidal from 'verdana/streamers/tidal/main.js'
import Qobuz from 'verdana/streamers/qobuz/main.js'
import Spotify from 'verdana/streamers/spotify/main.js'

const verdana = new Verdana({
	modules: {
		tidal: new Tidal({
			// tokens
		}),
		qobuz: new Qobuz({
			// tokens
		}),
		spotify: new Spotify({
			// options
		})
		// Any other modules
	},
	logins: {
		qobuz: {
			username: '',
			password: ''
		},
		spotify: {
			username: '',
			password: ''
		}
	}
})

// only needed if using modules which use the logins configuration rather than tokens
await verdana.login()

const track = await verdana.getByUrl('https://tidal.com/browse/track/255207223')

await fs.promises.writeFile('test.flac', (await track.getStream()).stream)

// only needed for modules which create persistent connections (of the built-in modules, this is just Spotify)
await verdana.disconnect()

For using a specific module, you can just use the functions built into the Streamer interface.

Project Structure

src/streamers/{app-name}

main.ts

Default export is a class which implements the Streamer interface:

interface Streamer {
	hostnames: string[]
	search(query: string, limit: number): Promise<SearchResults>
	getByUrl(url: string): Promise<GetByUrlResponse>
}

They can optionally include a login function in this class which takes a username and password (if supported):

async login(username: string, password: string): void

Options for the app, including tokens (if supported by the given app), are passed to the class's constructor:

new StreamerApp({ token: 'secret!' })

The classes can also include their own custom functions. Any function used by verdana's app-agnostic code should be defined in the Streamer interface for compatibility across multiple apps.

parse.ts

Functions for parsing the app's API into the types defined in src/types.ts.

constants.ts

Constants used by main.ts. Secrets should not be defined here (or anywhere else in the project).

src/index.ts

Wraps all the Streamers using a module system. See the usage section.

src/types.ts

Types used across the project. The purpose of many of these is to make sure all apps' functions return the same types so the rest of the logic can work across all apps the same.

Acknowledgements

As stated above, verdana is a fork of Lucida.

Both Lucida and verdana are partially inspired by OrpheusDL, a Python program for music archival which can be used similarly to verdana/Lucida. Some scripts inside verdana/Lucida are modeled after OrpheusDL modules.