Postgres example storage
This commit is contained in:
parent
9d394116c0
commit
f22814c77b
6 changed files with 748 additions and 24 deletions
|
|
@ -350,6 +350,10 @@ impl ManagedTorrent {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn is_paused(&self) -> bool {
|
||||
self.with_state(|s| matches!(s, ManagedTorrentState::Paused(..)))
|
||||
}
|
||||
|
||||
/// Pause the torrent if it's live.
|
||||
pub(crate) fn pause(&self) -> anyhow::Result<()> {
|
||||
let mut g = self.locked.write();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue