mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-27 04:07:25 +01:00
Store tracks from tracks editor
This commit is contained in:
parent
543f5ed1fd
commit
54e743b876
9 changed files with 126 additions and 11 deletions
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue