Store tracks from tracks editor

This commit is contained in:
Elias Projahn 2020-11-01 11:04:31 +01:00
parent 543f5ed1fd
commit 54e743b876
9 changed files with 126 additions and 11 deletions

View file

@ -183,7 +183,21 @@ impl From<RecordingDescription> for RecordingInsertion {
}
#[derive(Debug, Clone)]
pub struct Track {
pub struct TrackDescription {
pub work_parts: Vec<usize>,
pub file_name: String,
}
impl From<Track> for TrackDescription {
fn from(track: Track) -> Self {
let mut work_parts = Vec::<usize>::new();
for part in track.work_parts.split(",") {
work_parts.push(part.parse().unwrap());
}
TrackDescription {
work_parts,
file_name: track.file_name,
}
}
}