This commit is contained in:
Ericson Soares 2024-09-29 02:08:59 -03:00
parent 16f37c9216
commit 70ea030c97
9 changed files with 39 additions and 25 deletions

View File

@ -1167,7 +1167,8 @@ impl JobTaskDispatcher {
matches!(
*state,
JobRunningState::Running
| JobRunningState::Canceled | JobRunningState::Shutdown
| JobRunningState::Canceled
| JobRunningState::Shutdown
)
})
.await

View File

@ -344,8 +344,10 @@ impl Status {
matches!(
self,
Self::Completed
| Self::Canceled | Self::Paused
| Self::Failed | Self::CompletedWithErrors
| Self::Canceled
| Self::Paused
| Self::Failed
| Self::CompletedWithErrors
)
}
}

View File

@ -83,7 +83,9 @@ pub async fn load_jobs<OuterCtx: OuterContext, JobCtx: JobContext<OuterCtx>>(
root_job: StoredJob { id, .. },
next_jobs,
..
}| { iter::once(*id).chain(next_jobs.iter().map(|StoredJob { id, .. }| *id)) },
}| {
iter::once(*id).chain(next_jobs.iter().map(|StoredJob { id, .. }| *id))
},
)
.map(|job_id| uuid_to_bytes(&job_id))
.collect::<Vec<_>>(),

View File

@ -61,12 +61,15 @@ pub const fn can_extract_for_audio(audio_extension: AudioExtension) -> bool {
matches!(
audio_extension,
Mp3 | Mp2
| M4a | Wav | Aiff
| Aif | Flac | Ogg
| Oga | Opus | Wma
| Amr | Aac | Wv
| Voc | Tta | Loas
| Caf | Aptx | Adts
| M4a | Wav
| Aiff | Aif
| Flac | Ogg
| Oga | Opus
| Wma | Amr
| Aac | Wv
| Voc | Tta
| Loas | Caf
| Aptx | Adts
| Ast | Mid
)
}
@ -81,15 +84,18 @@ pub const fn can_extract_for_video(video_extension: VideoExtension) -> bool {
matches!(
video_extension,
Avi | Avifs
| Qt | Mov | Swf
| Mjpeg | Mpeg
| Mxf | M2v | Mpg
| Mpe | M2ts | Flv
| Wm | _3gp | M4v
| Wmv | Asf | Mp4
| Webm | Mkv | Vob
| Ogv | Wtv | Hevc
| F4v // | Ts | Mts TODO: Uncomment when we start using magic instead of extension
| Qt | Mov
| Swf | Mjpeg
| Mpeg | Mxf
| M2v | Mpg
| Mpe | M2ts
| Flv | Wm
| _3gp | M4v
| Wmv | Asf
| Mp4 | Webm
| Mkv | Vob
| Ogv | Wtv
| Hevc | F4v // | Ts | Mts TODO: Uncomment when we start using magic instead of extension
)
}

View File

@ -284,7 +284,7 @@ impl Manager {
device_pub_id: &'a DevicePubId,
chunk_size: u32,
initial_timestamp: NTP64,
) -> impl Stream<Item = Result<Vec<CRDTOperation>, Error>> + Send + '_ {
) -> impl Stream<Item = Result<Vec<CRDTOperation>, Error>> + Send + 'a {
stream! {
let mut current_initial_timestamp = initial_timestamp;

View File

@ -752,7 +752,8 @@ async fn create_location(
.location()
.count(vec![location::path::equals(Some(path.clone()))])
.exec()
.await? > 0
.await?
> 0
{
return Err(LocationError::LocationAlreadyExists(location_path.into()));
}

View File

@ -418,8 +418,10 @@ impl JobStatus {
matches!(
self,
Self::Completed
| Self::Canceled | Self::Paused
| Self::Failed | Self::CompletedWithErrors
| Self::Canceled
| Self::Paused
| Self::Failed
| Self::CompletedWithErrors
)
}
}