libytdlr

Crates.iolibytdlr
lib.rslibytdlr
version0.12.0
created_at2025-06-12 14:47:54.412669+00
updated_at2025-06-12 14:47:54.412669+00
descriptionA library to interact with youtube-dl/p with a custom archive
homepage
repositoryhttps://github.com/hasezoey/yt-downloader-rust
max_upload_size
id1709886
size201,602
hasezoey (hasezoey)

documentation

README

libYTDLR

A library to interact with youtube-dl / yt-dlp from rust, with custom archive support.

This library is mainly made for ytdlr binary, but can also be consumed standalone.

For build / run requirements please see the project README.

Functions provided

download

The main functionality: interacting with yt-dlp; downloading actual media.

Small example:

libytdlr::main::download::download_single(connection, &options, progress_callback, &mut result_vec)?;

For a full example see examples/simple.

rethumbnail

Extra functionality to re-apply a thumbnail to a video or audio container:

Small example:

libytdlr::main::rethumbnail::re_thumbnail_with_tmp(&media_path, &image_path, &output_path)?;

For a full example see `examples/rehtumbnail.

archive interaction

The custom archive libytdlr uses is based on SQLite and provides full read & write ability. It is recommended to only do reads from outside functions.

The main function that will be necessary to be called to make use of the archive is:

libytdlr::main::sql_utils::migrate_and_connect(&database_path, progress_callback)?;
// or without any format migration:
libytdlr::main::sql_utils::sqlite_connect(&database_path)?;
Commit count: 895

cargo fmt