Skip to content

Commit

Permalink
fix: Seeking is not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Losses committed Dec 5, 2024
1 parent 38992b2 commit 9bafa0f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions playback/src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::sync::{Arc, Mutex};

use anyhow::{anyhow, bail, Context, Result};
use log::{debug, error, info, warn};
use rodio::source::SeekError;
use rodio::{Decoder, PlayError, Sink, Source};
use tokio::sync::mpsc;
use tokio::time::{interval, sleep_until, Duration, Instant};
Expand Down Expand Up @@ -164,6 +165,10 @@ impl Source for SharedSource {
fn total_duration(&self) -> Option<Duration> {
self.inner.lock().unwrap().total_duration()
}

fn try_seek(&mut self, pos: Duration) -> Result<(), SeekError> {
self.inner.lock().unwrap().try_seek(pos)
}
}

pub(crate) struct PlayerInternal {
Expand Down

0 comments on commit 9bafa0f

Please sign in to comment.