mirror of
https://github.com/talwat/lowfi
synced 2025-12-31 19:13: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]]
|
[[package]]
|
||||||
name = "lowfi"
|
name = "lowfi"
|
||||||
version = "2.0.1-dev"
|
version = "2.0.2-dev"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lowfi"
|
name = "lowfi"
|
||||||
version = "2.0.1-dev"
|
version = "2.0.2-dev"
|
||||||
rust-version = "1.83.0"
|
rust-version = "1.83.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "An extremely simple lofi player."
|
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 {
|
pub fn env(name: &str) -> bool {
|
||||||
std::env::var(name).is_ok_and(|x| x == "1")
|
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
|
/// The function returns the platform-specific user data directory with
|
||||||
/// a `lowfi` subfolder. Callers may use this path to store config,
|
/// a `lowfi` subfolder. Callers may use this path to store config,
|
||||||
/// bookmarks, and other persistent files.
|
/// bookmarks, and other persistent files.
|
||||||
|
#[inline]
|
||||||
pub fn data_dir() -> crate::Result<PathBuf> {
|
pub fn data_dir() -> crate::Result<PathBuf> {
|
||||||
let dir = dirs::data_dir().unwrap().join("lowfi");
|
let dir = dirs::data_dir().unwrap().join("lowfi");
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ impl Environment {
|
|||||||
pub fn ready(args: &crate::Args) -> super::Result<Self> {
|
pub fn ready(args: &crate::Args) -> super::Result<Self> {
|
||||||
let enabled = !crate::env("LOWFI_DISABLE_UI");
|
let enabled = !crate::env("LOWFI_DISABLE_UI");
|
||||||
if !enabled {
|
if !enabled {
|
||||||
return Ok(Environment {
|
return Ok(Self {
|
||||||
enhancement: false,
|
enhancement: false,
|
||||||
alternate: args.alternate,
|
alternate: args.alternate,
|
||||||
enabled,
|
enabled,
|
||||||
@ -70,7 +70,7 @@ impl Environment {
|
|||||||
pub fn cleanup(&self, elegant: bool) -> super::Result<()> {
|
pub fn cleanup(&self, elegant: bool) -> super::Result<()> {
|
||||||
if !self.enabled {
|
if !self.enabled {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
};
|
}
|
||||||
|
|
||||||
let mut lock = stdout().lock();
|
let mut lock = stdout().lock();
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
//! Contains the code for the MPRIS server & other helper functions.
|
//! Contains the code for the MPRIS server & other helper functions.
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
env,
|
|
||||||
hash::{DefaultHasher, Hash, Hasher},
|
hash::{DefaultHasher, Hash, Hasher},
|
||||||
process,
|
process,
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
@ -328,7 +327,7 @@ impl Server {
|
|||||||
sender: mpsc::Sender<Message>,
|
sender: mpsc::Sender<Message>,
|
||||||
receiver: broadcast::Receiver<Update>,
|
receiver: broadcast::Receiver<Update>,
|
||||||
) -> ui::Result<Server> {
|
) -> 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")
|
String::from("lowfi")
|
||||||
} else {
|
} else {
|
||||||
format!("lowfi.{}.instance{}", state.tracklist, process::id())
|
format!("lowfi.{}.instance{}", state.tracklist, process::id())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user