Compare commits

..

No commits in common. "015da43d1b47cc8d5f53006d07367dc80108e57b" and "2f23e63349a715317ddbbd18f5d51346cd8a52ea" have entirely different histories.

4 changed files with 10 additions and 6 deletions

2
Cargo.lock generated
View file

@ -1616,7 +1616,7 @@ dependencies = [
[[package]] [[package]]
name = "mpd_info_screen" name = "mpd_info_screen"
version = "0.4.11" version = "0.4.10"
dependencies = [ dependencies = [
"bindgen", "bindgen",
"clap", "clap",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "mpd_info_screen" name = "mpd_info_screen"
version = "0.4.11" version = "0.4.10"
edition = "2021" edition = "2021"
description = "Displays info on currently playing music from an MPD daemon" description = "Displays info on currently playing music from an MPD daemon"
license = "MIT" license = "MIT"

View file

@ -1,5 +1,5 @@
use clap::ValueEnum;
use std::fmt::Display; use std::fmt::Display;
use clap::ValueEnum;
#[derive(Copy, Clone, Debug, PartialEq, Eq)] #[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum LogState { pub enum LogState {

View file

@ -4,7 +4,6 @@ mod mpd_handler;
#[cfg(feature = "unicode_support")] #[cfg(feature = "unicode_support")]
mod unicode_support; mod unicode_support;
use clap::Parser;
use ggez::conf::{WindowMode, WindowSetup}; use ggez::conf::{WindowMode, WindowSetup};
use ggez::event::winit_event::{ElementState, KeyboardInput, ModifiersState}; use ggez::event::winit_event::{ElementState, KeyboardInput, ModifiersState};
use ggez::event::{self, ControlFlow, EventHandler}; use ggez::event::{self, ControlFlow, EventHandler};
@ -16,6 +15,7 @@ use std::net::Ipv4Addr;
use std::path::PathBuf; use std::path::PathBuf;
use std::thread; use std::thread;
use std::time::{Duration, Instant}; use std::time::{Duration, Instant};
use clap::Parser;
use debug_log::log; use debug_log::log;
@ -44,7 +44,11 @@ pub struct Opt {
help = "don't scale-fill the album art to the window" help = "don't scale-fill the album art to the window"
)] )]
do_not_fill_scale_album_art: bool, do_not_fill_scale_album_art: bool,
#[arg(short = 'l', long = "log-level", default_value = "error")] #[arg(
short = 'l',
long = "log-level",
default_value = "error",
)]
log_level: debug_log::LogLevel, log_level: debug_log::LogLevel,
#[arg( #[arg(
short, short,
@ -97,7 +101,7 @@ fn main() -> Result<(), String> {
let mut modifiers_state: ModifiersState = ModifiersState::default(); let mut modifiers_state: ModifiersState = ModifiersState::default();
event_loop.run(move |mut event, _window_target, control_flow| { event_loop.run(move |mut event, _window_target, control_flow| {
if !ctx.continuing || ctx.quit_requested { if !ctx.continuing {
*control_flow = ControlFlow::Exit; *control_flow = ControlFlow::Exit;
return; return;
} }