Actually usable????????//
This commit is contained in:
@@ -108,11 +108,12 @@ impl SongCacheDl {
|
||||
}
|
||||
let mut from = song_p.clone();
|
||||
from.pop();
|
||||
from.push("{song_format}.{song_format}");
|
||||
from.push(format!("{song_format}.{song_format}"));
|
||||
|
||||
let mut to = song_p.clone();
|
||||
to.pop();
|
||||
to.set_extension(&song_format);
|
||||
log::debug!("from: {from:?} to: {to:?}");
|
||||
std::fs::copy(&from, &to).unwrap();
|
||||
from.pop();
|
||||
std::fs::remove_dir_all(from).unwrap();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use std::{collections::HashMap, str::FromStr, sync::{mpsc::{self, Receiver, Sender}, Arc, Mutex, MutexGuard}, time::Duration};
|
||||
use downloader::song::SongStatus;
|
||||
use log::warn;
|
||||
use xmpd_manifest::song::Song;
|
||||
|
||||
pub mod downloader;
|
||||
@@ -106,7 +105,6 @@ fn start_cache_mv_thread(tx: Sender<Message>) {
|
||||
song_p.push("songs");
|
||||
song_p.push(sid.clone().to_string());
|
||||
let song_p = song_p.with_extension(&song_format);
|
||||
log::debug!("Found done: {:?}: {}", song_p, song_p.exists());
|
||||
if song_p.exists() {
|
||||
let _ = tx.send(Message::DownloadDone(sid.clone()));
|
||||
cache.song_cache.insert(sid.clone(), DlStatus::Done(song_p));
|
||||
|
||||
Reference in New Issue
Block a user