CLI application that can make playlists based on mixxx trackdata
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
use crate::db::establish_connection;
|
|
|
|
use crate::models::TrackLocations;
|
|
|
|
use diesel::prelude::*;
|
|
|
|
|
|
|
|
mod db;
|
|
|
|
mod models;
|
|
|
|
mod schema;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
use schema::track_locations::dsl::*;
|
|
|
|
let mut connection = establish_connection();
|
|
|
|
|
|
|
|
let results = track_locations
|
|
|
|
.limit(5)
|
|
|
|
.load::<TrackLocations>(&mut connection)
|
|
|
|
.expect("Error loading track locations");
|
|
|
|
|
|
|
|
println!("Displaying {} tracks", results.len());
|
|
|
|
for track in results {
|
|
|
|
println!("{:?}", track.location);
|
|
|
|
println!("-----------\n");
|
|
|
|
println!("{:?}", track.directory);
|
|
|
|
}
|
|
|
|
}
|