server: use configurable socket path; remove unused import

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Icf8542f6d43f2a4c6424714886afb8416a6a6964
This commit is contained in:
raf 2026-03-29 20:38:15 +03:00
commit 637dc564fe
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
2 changed files with 46 additions and 38 deletions

View file

@ -42,12 +42,15 @@
pub mod commands;
pub mod interactive;
use serde_json::{Value, json};
use std::io;
use serde_json::{Value, json};
use thiserror::Error;
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::net::UnixStream;
use tracing::{debug, error};
use tokio::{
io::{AsyncReadExt, AsyncWriteExt},
net::UnixStream,
};
use tracing::debug;
pub const SOCKET_PATH: &str = "/tmp/mpvsocket";
const SOCKET_TIMEOUT_SECS: u64 = 5;
@ -459,10 +462,12 @@ pub async fn loadfile(
#[cfg(test)]
mod tests {
use super::*;
use serde_json::json;
use std::error::Error;
use serde_json::json;
use super::*;
#[test]
fn test_mrc_error_display() {
let error = MrcError::InvalidInput("test message".to_string());