mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-27 04:07:25 +01:00
Update most dependencies
This commit is contained in:
parent
51030545db
commit
d6b79fae59
15 changed files with 687 additions and 532 deletions
|
|
@ -60,7 +60,12 @@ pub struct Track {
|
|||
}
|
||||
|
||||
impl Track {
|
||||
pub fn new(recording: Recording, work_parts: Vec<usize>, source_index: usize, path: String) -> Self {
|
||||
pub fn new(
|
||||
recording: Recording,
|
||||
work_parts: Vec<usize>,
|
||||
source_index: usize,
|
||||
path: String,
|
||||
) -> Self {
|
||||
Self {
|
||||
recording,
|
||||
work_parts,
|
||||
|
|
@ -295,8 +300,8 @@ impl Database {
|
|||
name: row.name,
|
||||
discid: row.discid,
|
||||
tracks,
|
||||
last_used: row.last_used.map(|t| Utc.timestamp(t, 0)),
|
||||
last_played: row.last_played.map(|t| Utc.timestamp(t, 0)),
|
||||
last_used: row.last_used.map(|t| Utc.timestamp_opt(t, 0).unwrap()),
|
||||
last_played: row.last_played.map(|t| Utc.timestamp_opt(t, 0).unwrap()),
|
||||
};
|
||||
|
||||
Ok(medium)
|
||||
|
|
@ -328,8 +333,8 @@ impl Database {
|
|||
work_parts: part_indices,
|
||||
source_index: row.source_index as usize,
|
||||
path: row.path,
|
||||
last_used: row.last_used.map(|t| Utc.timestamp(t, 0)),
|
||||
last_played: row.last_played.map(|t| Utc.timestamp(t, 0)),
|
||||
last_used: row.last_used.map(|t| Utc.timestamp_opt(t, 0).unwrap()),
|
||||
last_played: row.last_played.map(|t| Utc.timestamp_opt(t, 0).unwrap()),
|
||||
};
|
||||
|
||||
Ok(track)
|
||||
|
|
|
|||
|
|
@ -275,8 +275,8 @@ impl Database {
|
|||
work,
|
||||
comment: row.comment,
|
||||
performances: performance_descriptions,
|
||||
last_used: row.last_used.map(|t| Utc.timestamp(t, 0)),
|
||||
last_played: row.last_played.map(|t| Utc.timestamp(t, 0)),
|
||||
last_used: row.last_used.map(|t| Utc.timestamp_opt(t, 0).unwrap()),
|
||||
last_played: row.last_played.map(|t| Utc.timestamp_opt(t, 0).unwrap()),
|
||||
};
|
||||
|
||||
Ok(recording_description)
|
||||
|
|
|
|||
|
|
@ -67,7 +67,13 @@ pub struct Work {
|
|||
}
|
||||
|
||||
impl Work {
|
||||
pub fn new(id: String, title: String, composer: Person, instruments: Vec<Instrument>, parts: Vec<WorkPart>) -> Self {
|
||||
pub fn new(
|
||||
id: String,
|
||||
title: String,
|
||||
composer: Person,
|
||||
instruments: Vec<Instrument>,
|
||||
parts: Vec<WorkPart>,
|
||||
) -> Self {
|
||||
Self {
|
||||
id,
|
||||
title,
|
||||
|
|
@ -219,8 +225,8 @@ impl Database {
|
|||
title: row.title,
|
||||
instruments,
|
||||
parts,
|
||||
last_used: row.last_used.map(|t| Utc.timestamp(t, 0)),
|
||||
last_played: row.last_played.map(|t| Utc.timestamp(t, 0)),
|
||||
last_used: row.last_used.map(|t| Utc.timestamp_opt(t, 0).unwrap()),
|
||||
last_played: row.last_played.map(|t| Utc.timestamp_opt(t, 0).unwrap()),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue