pinakes-server: update remaining route imports and handlers
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I67206fd813d514f8903041eea0a4cd266a6a6964
This commit is contained in:
parent
2b2c1830a1
commit
eb6c0a3577
20 changed files with 169 additions and 87 deletions
|
|
@ -98,7 +98,7 @@ pub async fn hls_variant_playlist(
|
|||
);
|
||||
for i in 0..num_segments.max(1) {
|
||||
let seg_dur = if i == num_segments.saturating_sub(1) && duration > 0.0 {
|
||||
duration - (i as f64 * segment_duration)
|
||||
(i as f64).mul_add(-segment_duration, duration)
|
||||
} else {
|
||||
segment_duration
|
||||
};
|
||||
|
|
@ -143,7 +143,7 @@ pub async fn hls_segment(
|
|||
if segment_path.exists() {
|
||||
let data = tokio::fs::read(&segment_path).await.map_err(|e| {
|
||||
ApiError(pinakes_core::error::PinakesError::InvalidOperation(
|
||||
format!("failed to read segment: {}", e),
|
||||
format!("failed to read segment: {e}"),
|
||||
))
|
||||
})?;
|
||||
|
||||
|
|
@ -246,7 +246,7 @@ pub async fn dash_segment(
|
|||
if segment_path.exists() {
|
||||
let data = tokio::fs::read(&segment_path).await.map_err(|e| {
|
||||
ApiError(pinakes_core::error::PinakesError::InvalidOperation(
|
||||
format!("failed to read segment: {}", e),
|
||||
format!("failed to read segment: {e}"),
|
||||
))
|
||||
})?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue