chore: bump version

This commit is contained in:
Tal 2025-12-29 10:57:17 +01:00
parent cd002ef9ab
commit 9acfcdcf9d
5 changed files with 8 additions and 6 deletions

2
Cargo.lock generated
View File

@ -1311,7 +1311,7 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
[[package]]
name = "lowfi"
version = "2.0.1-dev"
version = "2.0.2-dev"
dependencies = [
"arc-swap",
"bytes",

View File

@ -1,6 +1,6 @@
[package]
name = "lowfi"
version = "2.0.1-dev"
version = "2.0.2-dev"
rust-version = "1.83.0"
edition = "2021"
description = "An extremely simple lofi player."

View File

@ -89,6 +89,8 @@ enum Commands {
},
}
/// Shorthand to get a boolean environment variable.
#[inline]
pub fn env(name: &str) -> bool {
std::env::var(name).is_ok_and(|x| x == "1")
}
@ -98,6 +100,7 @@ pub fn env(name: &str) -> bool {
/// The function returns the platform-specific user data directory with
/// a `lowfi` subfolder. Callers may use this path to store config,
/// bookmarks, and other persistent files.
#[inline]
pub fn data_dir() -> crate::Result<PathBuf> {
let dir = dirs::data_dir().unwrap().join("lowfi");

View File

@ -27,7 +27,7 @@ impl Environment {
pub fn ready(args: &crate::Args) -> super::Result<Self> {
let enabled = !crate::env("LOWFI_DISABLE_UI");
if !enabled {
return Ok(Environment {
return Ok(Self {
enhancement: false,
alternate: args.alternate,
enabled,
@ -70,7 +70,7 @@ impl Environment {
pub fn cleanup(&self, elegant: bool) -> super::Result<()> {
if !self.enabled {
return Ok(());
};
}
let mut lock = stdout().lock();

View File

@ -1,7 +1,6 @@
//! Contains the code for the MPRIS server & other helper functions.
use std::{
env,
hash::{DefaultHasher, Hash, Hasher},
process,
sync::Arc,
@ -328,7 +327,7 @@ impl Server {
sender: mpsc::Sender<Message>,
receiver: broadcast::Receiver<Update>,
) -> ui::Result<Server> {
let suffix = if env::var("LOWFI_FIXED_MPRIS_NAME").is_ok_and(|x| x == "1") {
let suffix = if crate::env("LOWFI_FIXED_MPRIS_NAME") {
String::from("lowfi")
} else {
format!("lowfi.{}.instance{}", state.tracklist, process::id())