mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-04-28 06:21:23 +00:00
better imports
This commit is contained in:
+13
-13
@@ -1,27 +1,27 @@
|
||||
mod pw;
|
||||
pub mod settings;
|
||||
|
||||
pub use settings::Settings;
|
||||
|
||||
use eframe::{CreationContext, Frame, NativeOptions};
|
||||
use egui::{
|
||||
Button, CentralPanel, ComboBox, Context, Label, ScrollArea, Separator, Slider, TextEdit, Ui,
|
||||
Vec2,
|
||||
};
|
||||
use egui_material_icons::icons;
|
||||
|
||||
use metadata::media_file::MediaFileMetadata;
|
||||
use rfd::FileDialog;
|
||||
use rodio::{Decoder, OutputStream, OutputStreamBuilder, Sink};
|
||||
pub use settings::Settings;
|
||||
use std::{fs, path::PathBuf};
|
||||
|
||||
#[derive(PartialEq)]
|
||||
#[derive(Default)]
|
||||
#[derive(PartialEq, Default)]
|
||||
enum PlayerState {
|
||||
Playing,
|
||||
#[default]
|
||||
Paused,
|
||||
}
|
||||
|
||||
|
||||
pub struct App {
|
||||
saved_settings: Settings,
|
||||
|
||||
@@ -329,15 +329,15 @@ impl App {
|
||||
|
||||
if let Some(extension) = path.extension().and_then(|n| n.to_str())
|
||||
&& music_extensions.contains(&extension.to_lowercase().as_str())
|
||||
&& path
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.to_string()
|
||||
.to_lowercase()
|
||||
.contains(self.search_query.as_str())
|
||||
{
|
||||
music_files.push(path);
|
||||
}
|
||||
&& path
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.to_string()
|
||||
.to_lowercase()
|
||||
.contains(self.search_query.as_str())
|
||||
{
|
||||
music_files.push(path);
|
||||
}
|
||||
}
|
||||
ui.vertical(|ui| {
|
||||
let search_entry = TextEdit::singleline(&mut self.search_query);
|
||||
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
use std::collections::HashMap;
|
||||
use std::error::Error;
|
||||
use std::process::Command;
|
||||
use std::{collections::HashMap, error::Error, process::Command};
|
||||
|
||||
pub struct AudioDevice {
|
||||
pub nick: String,
|
||||
|
||||
+6
-3
@@ -1,7 +1,10 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fs;
|
||||
use std::io::{Read, Write};
|
||||
use std::path::PathBuf;
|
||||
|
||||
use std::{
|
||||
fs,
|
||||
io::{Read, Write},
|
||||
path::PathBuf,
|
||||
};
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq)]
|
||||
pub struct Settings {
|
||||
|
||||
+1
-2
@@ -1,7 +1,6 @@
|
||||
use std::fs;
|
||||
|
||||
mod app;
|
||||
|
||||
use std::fs;
|
||||
fn main() -> Result<(), eframe::Error> {
|
||||
let settings = generate_settings();
|
||||
app::run(settings)
|
||||
|
||||
Reference in New Issue
Block a user