Fix monolib documentation

Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
This commit is contained in:
Ivan Bushchik 2024-08-26 20:29:14 +03:00
parent 29338f32e3
commit d43dcde7a2
No known key found for this signature in database
GPG key ID: 2F16FBF3262E090C
7 changed files with 9 additions and 7 deletions

2
Cargo.lock generated
View file

@ -2851,7 +2851,7 @@ dependencies = [
[[package]] [[package]]
name = "monolib" name = "monolib"
version = "0.7.0" version = "0.7.1"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"byteorder", "byteorder",

View file

@ -6,7 +6,7 @@ edition = "2021"
[dependencies] [dependencies]
slint = { version = "1.6" } slint = { version = "1.6" }
monolib = { path = "../monolib", version = "0.7.0" } monolib = { path = "../monolib", version = "0.7.1" }
zune-jpeg = "0.4.13" zune-jpeg = "0.4.13"
[package.metadata.bundle] [package.metadata.bundle]

View file

@ -7,6 +7,6 @@ authors = ["Ivan Bushchik <ivabus@ivabus.dev>"]
repository = "https://github.com/ivabus/lonelyradio" repository = "https://github.com/ivabus/lonelyradio"
[dependencies] [dependencies]
monolib = { version = "0.7.0", path = "../monolib" } monolib = { version = "0.7.1", path = "../monolib" }
clap = { version = "4.5.16", features = ["derive"] } clap = { version = "4.5.16", features = ["derive"] }
crossterm = "0.28.1" crossterm = "0.28.1"

View file

@ -1,6 +1,6 @@
[package] [package]
name = "monolib" name = "monolib"
version = "0.7.0" version = "0.7.1"
edition = "2021" edition = "2021"
license = "MIT" license = "MIT"
description = "A library implementing the lonely radio audio streaming protocol" description = "A library implementing the lonely radio audio streaming protocol"

View file

@ -9,7 +9,8 @@ A library implementing the lonely radio audio streaming protocol
## Examples ## Examples
- [CLI](../monoclient) - [CLI](../monoclient)
- [SwiftUI](../platform/swiftui) - [SwiftUI](../monoclient-x)
- [Slint](../monoclient-s)
## License ## License

View file

@ -5,8 +5,9 @@
//! extern crate monolib; //! extern crate monolib;
//! use std::thread::{sleep, spawn}; //! use std::thread::{sleep, spawn};
//! use std::time::Duration; //! use std::time::Duration;
//! use monolib::lonelyradio_types::{Settings, Encoder};
//! //!
//! spawn(|| monolib::run("someserver:someport")); //! spawn(|| monolib::run("someserver:someport", Settings {encoder: Encoder::Flac, cover: -1}, "my_playlist"));
//! while monolib::get_metadata().is_none() {} //! while monolib::get_metadata().is_none() {}
//! let seconds = md.length / md.sample_rate as u64 / 2; //! let seconds = md.length / md.sample_rate as u64 / 2;
//! println!("Playing: {} - {} - {} ({}:{:02})", md.artist, md.album, md.title, seconds / 60, seconds % 60); //! println!("Playing: {} - {} - {} ({}:{:02})", md.artist, md.album, md.title, seconds / 60, seconds % 60);

View file

@ -6,6 +6,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
monolib = { version = "0.7.0", path = "../monolib" } monolib = { version = "0.7.1", path = "../monolib" }
clap = { version = "4.4.18", features = ["derive"] } clap = { version = "4.4.18", features = ["derive"] }
hound = "3.5.1" hound = "3.5.1"