mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-03 16:41:26 +01:00
feat(app): media keys and desktop media widget, keep the screen on during a film
- MPRIS on Linux and SMTC on Windows through souvlaki: play/pause, next, previous, stop and seeking from media keys and the panel widget, with the title, episode, duration and the cached cover as a file:// URL - the screensaver is held off while a film plays on the player page, through the desktop portal with org.freedesktop.ScreenSaver as the fallback, and SetThreadExecutionState on Windows. mpv's own stop-screensaver has no window to act for under the render API
This commit is contained in:
1 parent
c60ffc7ab1
commit
959547cdc8
8 files changed
+573
-3
No files matched your search
@@ -2008,6 +2008,15 @@ impl Engine {
|
||||
});
|
||||
}
|
||||
|
||||
/// Where a provider's picture is cached, if it is.
|
||||
pub fn poster_file(&self, url: &str) -> Option<std::path::PathBuf> {
|
||||
let path = self
|
||||
.dirs
|
||||
.poster_cache()
|
||||
.join(format!("{}.img", digest(url)));
|
||||
path.is_file().then_some(path)
|
||||
}
|
||||
|
||||
/// Fetch, decode and post one title's artwork.
|
||||
///
|
||||
/// Cached on disk under a hash of the URL, so a provider that moves its CDN
|
||||
|
||||
Reference in new issue
Block a user