{flake.lock,Cargo.*}: bump
This commit is contained in:
Generated
+345
-356
File diff suppressed because it is too large
Load Diff
+10
-10
@@ -16,23 +16,23 @@ autolib = false
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.102"
|
||||
anyhow = "1.0.104"
|
||||
axum = { version = "0.8.9", features = ["macros", "ws"] }
|
||||
clap = { version = "4.6.1", features = ["derive"] }
|
||||
clap = { version = "4.6.2", features = ["derive"] }
|
||||
clap-verbosity-flag = "3.0.4"
|
||||
env_logger = "0.11.10"
|
||||
futures = "0.3.32"
|
||||
log = "0.4.29"
|
||||
env_logger = "0.11.11"
|
||||
futures = "0.3.33"
|
||||
log = "0.4.33"
|
||||
mpvipc-async = { git = "https://git.pvv.ntnu.no/Grzegorz/mpvipc-async.git", branch = "main" }
|
||||
sd-notify = "0.5.0"
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
serde_json = "1.0.149"
|
||||
serde = { version = "1.0.229", features = ["derive"] }
|
||||
serde_json = "1.0.151"
|
||||
systemd-journal-logger = "2.2.2"
|
||||
tempfile = "3.27.0"
|
||||
tokio = { version = "1.52.3", features = ["rt-multi-thread", "process", "signal"] }
|
||||
tokio = { version = "1.53.0", features = ["rt-multi-thread", "process", "signal"] }
|
||||
tower = "0.5.3"
|
||||
tower-http = "0.6.11"
|
||||
tungstenite = "0.29.0"
|
||||
tower-http = "0.7.0"
|
||||
tungstenite = "0.30.0"
|
||||
utoipa = { version = "5.5.0", features = ["axum_extras"] }
|
||||
utoipa-axum = "0.2.0"
|
||||
utoipa-swagger-ui = { version = "9.0.2", features = ["axum", "vendored"] }
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ rustPlatform.buildRustPackage rec {
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"mpvipc-async-0.2.0" = "sha256-Y4ryCH9ReQryb1Wxr5ZVdoI6zwb/nvxV2Mph9Mxnx4s=";
|
||||
"mpvipc-async-0.2.0" = "sha256-TxFpqoAzwdjvMxVb4ZkMImO//Yl4ZFhKXD4kAtU1vJM=";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Generated
+6
-6
@@ -2,11 +2,11 @@
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1778869304,
|
||||
"narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=",
|
||||
"lastModified": 1784497964,
|
||||
"narHash": "sha256-vlHUuqAcbcH2RKmHbPiuQzbv1pnzzavXnI62RD0bqCU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d233902339c02a9c334e7e593de68855ad26c4cb",
|
||||
"rev": "241313f4e8e508cb9b13278c2b0fa25b9ca27163",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -29,11 +29,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1779333539,
|
||||
"narHash": "sha256-lpmN2lrBDZDPjov2cbD3bOOJsI0fkKolKXasYPCqSys=",
|
||||
"lastModified": 1784526465,
|
||||
"narHash": "sha256-L37teKC6oINWG4PGZLIqbphMWvSQ0PEz+aWxAk+rIDw=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "672fa5fc5608d5cd82286a6f69aaf84a40b4fe41",
|
||||
"rev": "58c6334db52d51fc5dd8877c90b01f00cf8a696b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
+2
-2
@@ -262,7 +262,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
|
||||
let addr = match resolve(&args.host)
|
||||
.await
|
||||
.context(format!("Failed to resolve address: {}", &args.host))
|
||||
.context(format!("Failed to resolve address: {}", args.host))
|
||||
{
|
||||
Ok(addr) => addr,
|
||||
Err(e) => {
|
||||
@@ -287,7 +287,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
|
||||
let listener = match tokio::net::TcpListener::bind(&socket_addr)
|
||||
.await
|
||||
.context(format!("Failed to bind API server to '{}'", &socket_addr))
|
||||
.context(format!("Failed to bind API server to '{}'", socket_addr))
|
||||
{
|
||||
Ok(listener) => listener,
|
||||
Err(e) => {
|
||||
|
||||
+10
-10
@@ -17,7 +17,7 @@ const YTDL_HOOK_ARGS: [&str; 2] = ["try_ytdl_first=yes", "thumbnails=none"];
|
||||
pub fn create_mpv_config_file(args_config_file: Option<String>) -> anyhow::Result<NamedTempFile> {
|
||||
let file_content = if let Some(path) = args_config_file {
|
||||
if !Path::new(&path).exists() {
|
||||
anyhow::bail!("Mpv config file not found at {}", &path);
|
||||
anyhow::bail!("Mpv config file not found at {}", path);
|
||||
}
|
||||
|
||||
std::fs::read_to_string(&path).context("Failed to read mpv config file")?
|
||||
@@ -47,9 +47,9 @@ pub async fn connect_to_mpv(args: &MpvConnectionArgs<'_>) -> anyhow::Result<(Mpv
|
||||
let socket_path = Path::new(&args.socket_path);
|
||||
|
||||
if !socket_path.exists() {
|
||||
log::debug!("Mpv socket not found at {}", &args.socket_path);
|
||||
log::debug!("Mpv socket not found at {}", args.socket_path);
|
||||
if !args.auto_start {
|
||||
panic!("Mpv socket not found at {}", &args.socket_path);
|
||||
panic!("Mpv socket not found at {}", args.socket_path);
|
||||
}
|
||||
|
||||
log::debug!("Ensuring parent dir of mpv socket exists");
|
||||
@@ -61,7 +61,7 @@ pub async fn connect_to_mpv(args: &MpvConnectionArgs<'_>) -> anyhow::Result<(Mpv
|
||||
create_dir_all(parent_dir).context("Failed to create parent dir of mpv socket")?;
|
||||
}
|
||||
} else {
|
||||
log::debug!("Existing mpv socket found at {}", &args.socket_path);
|
||||
log::debug!("Existing mpv socket found at {}", args.socket_path);
|
||||
if args.force_auto_start {
|
||||
log::debug!("Removing mpv socket");
|
||||
std::fs::remove_file(&args.socket_path)?;
|
||||
@@ -69,12 +69,12 @@ pub async fn connect_to_mpv(args: &MpvConnectionArgs<'_>) -> anyhow::Result<(Mpv
|
||||
}
|
||||
|
||||
let process_handle = if args.auto_start {
|
||||
log::info!("Starting mpv with socket at {}", &args.socket_path);
|
||||
log::info!("Starting mpv with socket at {}", args.socket_path);
|
||||
|
||||
// TODO: try to fetch mpv from PATH
|
||||
Some(
|
||||
Command::new(args.executable_path.as_deref().unwrap_or("mpv"))
|
||||
.arg(format!("--input-ipc-server={}", &args.socket_path))
|
||||
.arg(format!("--input-ipc-server={}", args.socket_path))
|
||||
.arg("--idle")
|
||||
.arg("--force-window")
|
||||
.arg("--fullscreen")
|
||||
@@ -88,7 +88,7 @@ pub async fn connect_to_mpv(args: &MpvConnectionArgs<'_>) -> anyhow::Result<(Mpv
|
||||
)
|
||||
.arg(format!(
|
||||
"--include={}",
|
||||
&args.config_file.path().to_string_lossy()
|
||||
args.config_file.path().to_string_lossy()
|
||||
))
|
||||
// .arg("--no-terminal")
|
||||
.arg("--load-unsafe-playlists")
|
||||
@@ -103,7 +103,7 @@ pub async fn connect_to_mpv(args: &MpvConnectionArgs<'_>) -> anyhow::Result<(Mpv
|
||||
// Wait for mpv to create the socket
|
||||
if tokio::time::timeout(tokio::time::Duration::from_millis(500), async {
|
||||
while !&socket_path.exists() {
|
||||
log::debug!("Waiting for mpv socket at {}", &args.socket_path);
|
||||
log::debug!("Waiting for mpv socket at {}", args.socket_path);
|
||||
tokio::time::sleep(tokio::time::Duration::from_millis(10)).await;
|
||||
}
|
||||
})
|
||||
@@ -112,14 +112,14 @@ pub async fn connect_to_mpv(args: &MpvConnectionArgs<'_>) -> anyhow::Result<(Mpv
|
||||
{
|
||||
return Err(anyhow::anyhow!(
|
||||
"Failed to connect to mpv socket: {}",
|
||||
&args.socket_path
|
||||
args.socket_path
|
||||
));
|
||||
}
|
||||
|
||||
Ok((
|
||||
Mpv::connect(&args.socket_path).await.context(format!(
|
||||
"Failed to connect to mpv socket: {}",
|
||||
&args.socket_path
|
||||
args.socket_path
|
||||
))?,
|
||||
process_handle,
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user