Skip to content

Commit

Permalink
audio file insert bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaeSomnia committed Aug 11, 2023
1 parent 1ccc90f commit 3e52c38
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion src/database/audio_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ impl DatabaseAudioFileHandler for Database {
audio_file.bit_depth,
audio_file.bpm,
audio_file.key,
audio_file.key,
audio_file.size,
),
)?;
Expand Down
4 changes: 1 addition & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ fn main() {

let collections = db.get_all_collections().unwrap();
let audio_files = db.get_all_audio_files().unwrap();

let root = collections.iter().find(|v| v.parent_collection().is_none()).unwrap();

let root = collections_to_directories(&collections, &audio_files, root.clone());

let audio_files = db.get_all_audio_files().unwrap().len();
println!("num: {}", audio_files);

AppData {
browser: BrowserState::new(root),
Expand Down Expand Up @@ -151,8 +151,6 @@ fn collections_to_directories(
let afs: Vec<&AudioFile> =
audio_files.iter().filter(|v| v.collection == current.id()).collect();

println!("{:?} {}", current, afs.len());

Directory {
id: current.id(),
parent_id: current.parent_collection(),
Expand Down

0 comments on commit 3e52c38

Please sign in to comment.