Skip to content

Commit 797f4c5

Browse files
committed
cleanup
1 parent 11d5dd3 commit 797f4c5

File tree

4 files changed

+4
-22
lines changed

4 files changed

+4
-22
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"rust-analyzer.cargo.features": ["image", "notify", "fzf"]
3+
}

spotify_player/src/cli/commands.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,5 @@ pub fn init_playlist_subcommand() -> Command {
236236
}
237237

238238
pub fn init_print_features_command() -> Command {
239-
Command::new("features")
240-
.about("Print compiled in features")
239+
Command::new("features").about("Print compiled in features")
241240
}
242-

spotify_player/src/cli/handlers.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ macro_rules! print_feature {
364364
}
365365

366366
fn print_features() {
367-
368367
println!("Compile-time features:");
369368

370369
print_feature!("daemon");
@@ -384,5 +383,4 @@ fn print_features() {
384383
print_feature!("jackaudio-backend");
385384
print_feature!("sdl-backend");
386385
print_feature!("gstreamer-backend");
387-
388386
}

spotify_player/src/ui/playback.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -416,23 +416,6 @@ fn render_playback_progress_bar(
416416

417417
#[cfg(feature = "image")]
418418
fn render_playback_cover_image(state: &SharedState, ui: &mut UIStateGuard) -> Result<()> {
419-
fn remove_temp_files() -> Result<()> {
420-
// Clean up temp files created by `viuer`'s kitty printer to avoid
421-
// possible freeze because of too many temp files in the temp folder.
422-
// Context: https://github.com/aome510/spotify-player/issues/148
423-
let tmp_dir = std::env::temp_dir();
424-
for path in (std::fs::read_dir(tmp_dir)?).flatten() {
425-
let path = path.path();
426-
if path.display().to_string().contains(".tmp.viuer") {
427-
std::fs::remove_file(path)?;
428-
}
429-
}
430-
431-
Ok(())
432-
}
433-
434-
remove_temp_files().context("remove temp files")?;
435-
436419
let data = state.data.read();
437420
if let Some(image) = data.caches.images.get(&ui.last_cover_image_render_info.url) {
438421
let rect = ui.last_cover_image_render_info.render_area;

0 commit comments

Comments
 (0)