|
|
|
@ -19,11 +19,12 @@ use std::sync::{Arc, Mutex}; |
|
|
|
|
|
|
|
|
|
use registry::Registry; |
|
|
|
|
|
|
|
|
|
mod registry; |
|
|
|
|
|
|
|
|
|
lazy_static! { |
|
|
|
|
static ref REGISTRY: Arc<Mutex<Registry>> = Arc::new(Mutex::new(Registry::default())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
mod registry; |
|
|
|
|
fn main() -> Result<(), Error> { |
|
|
|
|
let matches = App::new("Music Sync") |
|
|
|
|
.version("0.1.0") |
|
|
|
@ -86,6 +87,7 @@ fn select_albums(ui: &mut Cursive) { |
|
|
|
|
let added_albums = registry.added_albums(); |
|
|
|
|
let existing_albums = registry.existing_albums(); |
|
|
|
|
let removed_albums = registry.removed_albums(); |
|
|
|
|
// FIXME: Use a custom view for this.
|
|
|
|
|
let list_view = ListView::new() |
|
|
|
|
.with(|list_view| { |
|
|
|
|
list_view.add_child("--- New", Checkbox::new().disabled()); |
|
|
|
@ -122,8 +124,7 @@ fn select_albums(ui: &mut Cursive) { |
|
|
|
|
} |
|
|
|
|
list_view.add_child(album_name(album_path), checkbox); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.scrollable(); |
|
|
|
|
}).scrollable(); |
|
|
|
|
|
|
|
|
|
ui.pop_layer(); |
|
|
|
|
ui.add_layer( |
|
|
|
|