mirror of
https://github.com/talwat/lowfi
synced 2025-12-31 11:03:21 +00:00
chore: bump version
This commit is contained in:
parent
cd002ef9ab
commit
9acfcdcf9d
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1311,7 +1311,7 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
|
||||
|
||||
[[package]]
|
||||
name = "lowfi"
|
||||
version = "2.0.1-dev"
|
||||
version = "2.0.2-dev"
|
||||
dependencies = [
|
||||
"arc-swap",
|
||||
"bytes",
|
||||
|
||||
@ -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."
|
||||
|
||||
@ -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");
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
@ -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())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user