app: find a clip in the folder it was recorded to
History lists a timeline from the default recordings folder, where the daemon writes them, but review looked for its clip only there as well. A recording made into the folder chosen in settings therefore appeared in history with no video. The app now searches the configured folder first and the default one after it, and uses the path stored with the timeline when the recorder wrote one, so a clip stays playable after the setting moves and an older timeline still plays. Settings are read back after a save because the daemon resolves the chosen folder to an absolute path. The two Open folder buttons open the configured folder instead of the default one.
This commit is contained in:
1 parent
86fc7cea2f
commit
9e4349fe42
5 files changed
+166
-33
No files matched your search
+35
-6
@@ -473,6 +473,35 @@ impl App {
|
|||||||
self.processes_rx = Some(rx);
|
self.processes_rx = Some(rx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Where the daemon writes new recordings, as the settings it holds say.
|
||||||
|
///
|
||||||
|
/// The draft stands in until the daemon has answered, so a first launch points at the
|
||||||
|
/// default folder the daemon would use anyway.
|
||||||
|
pub fn output_dir(&self) -> PathBuf {
|
||||||
|
let path = self
|
||||||
|
.settings
|
||||||
|
.as_ref()
|
||||||
|
.map(|settings| settings.output.path.as_str())
|
||||||
|
.unwrap_or(self.form.draft.output.path.as_str());
|
||||||
|
if path.is_empty() {
|
||||||
|
crate::daemon::recordings_dir()
|
||||||
|
} else {
|
||||||
|
PathBuf::from(path)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The folders a recording's clip may be in: the configured output folder first, then the
|
||||||
|
/// default one, where timelines and the clips folder live.
|
||||||
|
pub fn video_roots(&self) -> Vec<PathBuf> {
|
||||||
|
let default = crate::daemon::recordings_dir();
|
||||||
|
let output = self.output_dir();
|
||||||
|
if output == default {
|
||||||
|
vec![output]
|
||||||
|
} else {
|
||||||
|
vec![output, default]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// List the timelines on disk and read the first page of rows on a thread of their own.
|
/// List the timelines on disk and read the first page of rows on a thread of their own.
|
||||||
/// `poll` picks them up.
|
/// `poll` picks them up.
|
||||||
pub fn refresh_games(&mut self) {
|
pub fn refresh_games(&mut self) {
|
||||||
@@ -700,14 +729,15 @@ impl App {
|
|||||||
Err(e) => self.notify_error(e),
|
Err(e) => self.notify_error(e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// The daemon answers a save with `{"success": true}`; the draft is already what
|
// The daemon answers a save with `{"success": true}`. Read the settings back:
|
||||||
// it holds, so there is nothing to read back.
|
// it may have resolved the recordings folder to an absolute path.
|
||||||
(ipc::Request::SaveSettings, Ok(_)) => {
|
(ipc::Request::SaveSettings, Ok(_)) => {
|
||||||
self.settings = Some(self.form.settings());
|
self.settings = Some(self.form.settings());
|
||||||
self.form.saving = false;
|
self.form.saving = false;
|
||||||
self.form.dirty = false;
|
self.form.dirty = false;
|
||||||
self.form.loaded = true;
|
self.form.loaded = true;
|
||||||
self.notify("Settings saved");
|
self.notify("Settings saved");
|
||||||
|
self.daemon.get_settings();
|
||||||
}
|
}
|
||||||
(ipc::Request::SaveSettings, Err(e)) => {
|
(ipc::Request::SaveSettings, Err(e)) => {
|
||||||
self.form.saving = false;
|
self.form.saving = false;
|
||||||
@@ -966,13 +996,12 @@ pub fn poll(app: &mut App, t: f64, tx: &mut Tx) -> bool {
|
|||||||
if let Some(at) = std::env::var("LR_DEMO_PAUSE_AT")
|
if let Some(at) = std::env::var("LR_DEMO_PAUSE_AT")
|
||||||
.ok()
|
.ok()
|
||||||
.and_then(|v| v.parse::<f64>().ok())
|
.and_then(|v| v.parse::<f64>().ok())
|
||||||
|
&& let Some(player) = &app.review.player
|
||||||
|
&& player.is_playing()
|
||||||
|
&& player.time() >= at
|
||||||
{
|
{
|
||||||
if let Some(player) = &app.review.player {
|
|
||||||
if player.is_playing() && player.time() >= at {
|
|
||||||
app.review.playback();
|
app.review.playback();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
app.handle_poll(t, tx)
|
app.handle_poll(t, tx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+113
-18
@@ -38,6 +38,13 @@ pub struct Timeline {
|
|||||||
pub raw_end_game_stats: Option<Value>,
|
pub raw_end_game_stats: Option<Value>,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub video_file: Option<String>,
|
pub video_file: Option<String>,
|
||||||
|
/// The absolute path the recorder wrote the video to, when it recorded one.
|
||||||
|
///
|
||||||
|
/// The recordings folder can change while older clips stay where they were, so the path
|
||||||
|
/// travels with the timeline. A recording made before the recorder wrote it has only
|
||||||
|
/// `video_file`, and is found by name in the folders the app searches.
|
||||||
|
#[serde(default)]
|
||||||
|
pub video_path: Option<PathBuf>,
|
||||||
/// What each audio track of the video carries, in file order. Empty for recordings made
|
/// What each audio track of the video carries, in file order. Empty for recordings made
|
||||||
/// before the recorder wrote one track per source.
|
/// before the recorder wrote one track per source.
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
@@ -188,6 +195,9 @@ pub struct Summary {
|
|||||||
pub duration_secs: i64,
|
pub duration_secs: i64,
|
||||||
/// The video file the row names, kept so deleting a row does not re-read its timeline.
|
/// The video file the row names, kept so deleting a row does not re-read its timeline.
|
||||||
pub video_file: Option<String>,
|
pub video_file: Option<String>,
|
||||||
|
/// The absolute path the recorder stored with the timeline, when it did, so a row still
|
||||||
|
/// finds its clip after the recordings folder changes.
|
||||||
|
pub video_path: Option<PathBuf>,
|
||||||
champion: Option<String>,
|
champion: Option<String>,
|
||||||
summoner: Option<String>,
|
summoner: Option<String>,
|
||||||
queue_label: String,
|
queue_label: String,
|
||||||
@@ -226,6 +236,15 @@ impl Summary {
|
|||||||
pub fn lp_change(&self) -> Option<LpChange> {
|
pub fn lp_change(&self) -> Option<LpChange> {
|
||||||
self.lp.clone()
|
self.lp.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The video file of this row: its stored path, or its name in `roots`.
|
||||||
|
pub fn video_path(&self, roots: &[PathBuf]) -> Option<PathBuf> {
|
||||||
|
video_path_of(
|
||||||
|
self.video_path.as_deref(),
|
||||||
|
self.video_file.as_deref(),
|
||||||
|
roots,
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Timeline {
|
impl Timeline {
|
||||||
@@ -236,6 +255,7 @@ impl Timeline {
|
|||||||
start_time: self.start_time,
|
start_time: self.start_time,
|
||||||
duration_secs: self.duration_secs,
|
duration_secs: self.duration_secs,
|
||||||
video_file: self.video_file.clone(),
|
video_file: self.video_file.clone(),
|
||||||
|
video_path: self.video_path.clone(),
|
||||||
champion: self.champion(),
|
champion: self.champion(),
|
||||||
summoner: self.summoner(),
|
summoner: self.summoner(),
|
||||||
queue_label: self.queue_label(),
|
queue_label: self.queue_label(),
|
||||||
@@ -256,19 +276,16 @@ pub fn load(recording_id: &str) -> Option<Timeline> {
|
|||||||
|
|
||||||
/// Remove a recording: its timeline JSON and its video file.
|
/// Remove a recording: its timeline JSON and its video file.
|
||||||
///
|
///
|
||||||
/// The video is found the way review finds it, so a clip renamed but keeping the timestamp
|
/// The caller resolves the video, searching the folders the app records to; the path stored
|
||||||
/// prefix goes too. A file that is already gone is fine: the list shows what was read
|
/// with the timeline keeps a clip reachable after the recordings folder changes. A file that
|
||||||
/// earlier, and a tidy-up elsewhere should not turn into an error here.
|
/// is already gone is fine: the list shows what was read earlier, and a tidy-up elsewhere
|
||||||
pub fn delete(recording_id: &str, video_file: Option<&str>) -> Result<(), String> {
|
/// should not turn into an error here.
|
||||||
delete_in(recording_id, video_file, &daemon::recordings_dir())
|
pub fn delete(recording_id: &str, video: Option<&Path>) -> Result<(), String> {
|
||||||
|
delete_in(recording_id, video, &daemon::recordings_dir())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// [`delete`] inside one recordings folder, so a test can point it at a temporary one.
|
/// [`delete`] inside one recordings folder, so a test can point it at a temporary one.
|
||||||
fn delete_in(
|
fn delete_in(recording_id: &str, video: Option<&Path>, recordings: &Path) -> Result<(), String> {
|
||||||
recording_id: &str,
|
|
||||||
video_file: Option<&str>,
|
|
||||||
recordings: &Path,
|
|
||||||
) -> Result<(), String> {
|
|
||||||
let json = recordings
|
let json = recordings
|
||||||
.join("timelines")
|
.join("timelines")
|
||||||
.join(format!("{recording_id}.json"));
|
.join(format!("{recording_id}.json"));
|
||||||
@@ -276,8 +293,8 @@ fn delete_in(
|
|||||||
std::fs::remove_file(&json)
|
std::fs::remove_file(&json)
|
||||||
.map_err(|e| format!("could not delete {}: {e}", json.display()))?;
|
.map_err(|e| format!("could not delete {}: {e}", json.display()))?;
|
||||||
}
|
}
|
||||||
if let Some(video) = video_file.and_then(|name| find_video_file(recordings, name)) {
|
if let Some(video) = video.filter(|path| path.exists()) {
|
||||||
std::fs::remove_file(&video)
|
std::fs::remove_file(video)
|
||||||
.map_err(|e| format!("could not delete {}: {e}", video.display()))?;
|
.map_err(|e| format!("could not delete {}: {e}", video.display()))?;
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
@@ -495,13 +512,33 @@ impl Timeline {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The recording's video file, by name or by the timestamp prefix.
|
/// The recording's video file: the path stored with the timeline, or its name in `roots`.
|
||||||
pub fn video_path(&self) -> Option<PathBuf> {
|
pub fn video_path(&self, roots: &[PathBuf]) -> Option<PathBuf> {
|
||||||
let dir = daemon::recordings_dir();
|
video_path_of(
|
||||||
find_video_file(&dir, self.video_file.as_deref()?)
|
self.video_path.as_deref(),
|
||||||
|
self.video_file.as_deref(),
|
||||||
|
roots,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The video file of a recording, as the stored path or a name in one of `roots`.
|
||||||
|
///
|
||||||
|
/// The stored path is what the recorder wrote, so a clip stays with its timeline after the
|
||||||
|
/// recordings folder changes. A timeline from before the recorder wrote the path has only the
|
||||||
|
/// name, and is looked up in every folder the app records to.
|
||||||
|
fn video_path_of(
|
||||||
|
stored: Option<&Path>,
|
||||||
|
video_file: Option<&str>,
|
||||||
|
roots: &[PathBuf],
|
||||||
|
) -> Option<PathBuf> {
|
||||||
|
if let Some(path) = stored.filter(|path| path.exists()) {
|
||||||
|
return Some(path.to_path_buf());
|
||||||
|
}
|
||||||
|
let name = video_file?;
|
||||||
|
roots.iter().find_map(|dir| find_video_file(dir, name))
|
||||||
|
}
|
||||||
|
|
||||||
/// Exact name first, then a file sharing the timestamp prefix.
|
/// Exact name first, then a file sharing the timestamp prefix.
|
||||||
pub fn find_video_file(dir: &Path, filename: &str) -> Option<PathBuf> {
|
pub fn find_video_file(dir: &Path, filename: &str) -> Option<PathBuf> {
|
||||||
let exact = dir.join(filename);
|
let exact = dir.join(filename);
|
||||||
@@ -617,6 +654,7 @@ pub fn sample() -> Vec<Timeline> {
|
|||||||
}
|
}
|
||||||
})),
|
})),
|
||||||
video_file: None,
|
video_file: None,
|
||||||
|
video_path: None,
|
||||||
audio_tracks: Vec::new(),
|
audio_tracks: Vec::new(),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -662,6 +700,20 @@ mod tests {
|
|||||||
assert!((timeline.events[1].time() - 1500.5).abs() < 1e-6);
|
assert!((timeline.events[1].time() - 1500.5).abs() < 1e-6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn a_timeline_reads_the_path_the_recorder_stored() {
|
||||||
|
let json = TIMELINE.replacen(
|
||||||
|
"\"video_file\"",
|
||||||
|
r#""video_path": "C:/clips/game.mp4", "video_file""#,
|
||||||
|
1,
|
||||||
|
);
|
||||||
|
let timeline: Timeline = serde_json::from_str(&json).unwrap();
|
||||||
|
assert_eq!(
|
||||||
|
timeline.video_path.as_deref(),
|
||||||
|
Some(Path::new("C:/clips/game.mp4"))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn the_game_values_come_out_of_the_raw_responses() {
|
fn the_game_values_come_out_of_the_raw_responses() {
|
||||||
let timeline = parsed();
|
let timeline = parsed();
|
||||||
@@ -721,13 +773,56 @@ mod tests {
|
|||||||
std::fs::create_dir_all(dir.join("timelines")).unwrap();
|
std::fs::create_dir_all(dir.join("timelines")).unwrap();
|
||||||
std::fs::write(dir.join("timelines").join("game.json"), TIMELINE).unwrap();
|
std::fs::write(dir.join("timelines").join("game.json"), TIMELINE).unwrap();
|
||||||
std::fs::write(dir.join("2026-03-27_16-42-52_kai_sa.mp4"), b"x").unwrap();
|
std::fs::write(dir.join("2026-03-27_16-42-52_kai_sa.mp4"), b"x").unwrap();
|
||||||
|
let video = dir.join("2026-03-27_16-42-52_kai_sa.mp4");
|
||||||
|
|
||||||
delete_in("game", Some("2026-03-27_16-42-52_unknown.mp4"), &dir).unwrap();
|
delete_in("game", Some(&video), &dir).unwrap();
|
||||||
assert!(!dir.join("timelines").join("game.json").exists());
|
assert!(!dir.join("timelines").join("game.json").exists());
|
||||||
assert!(!dir.join("2026-03-27_16-42-52_kai_sa.mp4").exists());
|
assert!(!dir.join("2026-03-27_16-42-52_kai_sa.mp4").exists());
|
||||||
|
|
||||||
// What is already gone is not an error.
|
// What is already gone is not an error.
|
||||||
delete_in("game", Some("2026-03-27_16-42-52_unknown.mp4"), &dir).unwrap();
|
delete_in("game", Some(&video), &dir).unwrap();
|
||||||
|
let _ = std::fs::remove_dir_all(dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn a_clip_is_found_in_the_folder_it_was_recorded_to() {
|
||||||
|
let default = std::env::temp_dir().join(format!("leaguerecorder-{}", uuid::Uuid::new_v4()));
|
||||||
|
let output = std::env::temp_dir().join(format!("leaguerecorder-{}", uuid::Uuid::new_v4()));
|
||||||
|
std::fs::create_dir_all(&default).unwrap();
|
||||||
|
std::fs::create_dir_all(&output).unwrap();
|
||||||
|
let video = output.join("2026-03-27_16-42-52_kai_sa.mp4");
|
||||||
|
std::fs::write(&video, b"x").unwrap();
|
||||||
|
|
||||||
|
let timeline = parsed();
|
||||||
|
let roots = [output, default];
|
||||||
|
assert_eq!(timeline.video_path(&roots), Some(video.clone()));
|
||||||
|
assert_eq!(timeline.summary().video_path(&roots), Some(video));
|
||||||
|
|
||||||
|
let _ = std::fs::remove_dir_all(&roots[0]);
|
||||||
|
let _ = std::fs::remove_dir_all(&roots[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn a_finished_timeline_keeps_the_path_of_its_clip() {
|
||||||
|
let dir = std::env::temp_dir().join(format!("leaguerecorder-{}", uuid::Uuid::new_v4()));
|
||||||
|
std::fs::create_dir_all(&dir).unwrap();
|
||||||
|
let video = dir.join("old-folder").join("game.mp4");
|
||||||
|
std::fs::create_dir_all(video.parent().unwrap()).unwrap();
|
||||||
|
std::fs::write(&video, b"x").unwrap();
|
||||||
|
|
||||||
|
let mut timeline = parsed();
|
||||||
|
timeline.video_path = Some(video.clone());
|
||||||
|
// The folders the app knows now hold nothing: the stored path still finds the clip.
|
||||||
|
assert_eq!(timeline.video_path(&[]), Some(video.clone()));
|
||||||
|
|
||||||
|
// A stored path that is gone falls back to the name in the folders it is given.
|
||||||
|
timeline.video_path = Some(dir.join("moved.mp4"));
|
||||||
|
std::fs::write(dir.join("2026-03-27_16-42-52_kai_sa.mp4"), b"x").unwrap();
|
||||||
|
assert_eq!(
|
||||||
|
timeline.video_path(std::slice::from_ref(&dir)),
|
||||||
|
Some(dir.join("2026-03-27_16-42-52_kai_sa.mp4"))
|
||||||
|
);
|
||||||
|
|
||||||
let _ = std::fs::remove_dir_all(dir);
|
let _ = std::fs::remove_dir_all(dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -457,7 +457,8 @@ fn delete_confirmed(app: &mut App) {
|
|||||||
let Some(summary) = app.games.iter().find(|g| g.recording_id == id).cloned() else {
|
let Some(summary) = app.games.iter().find(|g| g.recording_id == id).cloned() else {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
if let Err(e) = history::delete(&id, summary.video_file.as_deref()) {
|
let video = summary.video_path(&app.video_roots());
|
||||||
|
if let Err(e) = history::delete(&id, video.as_deref()) {
|
||||||
app.notify_error(e);
|
app.notify_error(e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
//! Game review: the recorded clip, a scrubber with event markers, highlights and export.
|
//! Game review: the recorded clip, a scrubber with event markers, highlights and export.
|
||||||
|
|
||||||
|
use std::path::PathBuf;
|
||||||
use std::sync::mpsc::{Receiver, TryRecvError, channel};
|
use std::sync::mpsc::{Receiver, TryRecvError, channel};
|
||||||
|
|
||||||
use rune::tok::{radius, space, type_};
|
use rune::tok::{radius, space, type_};
|
||||||
@@ -15,6 +16,8 @@ use crate::ui::{self, Paint, body, heading};
|
|||||||
pub struct Review {
|
pub struct Review {
|
||||||
/// The opened recording, once its file has been read.
|
/// The opened recording, once its file has been read.
|
||||||
pub game: Option<Timeline>,
|
pub game: Option<Timeline>,
|
||||||
|
/// The folders the clip may be in, as the settings named them when the row opened.
|
||||||
|
pub video_roots: Vec<PathBuf>,
|
||||||
/// Set while that file is on its way to the screen.
|
/// Set while that file is on its way to the screen.
|
||||||
pub loading: bool,
|
pub loading: bool,
|
||||||
pub player: Option<Player>,
|
pub player: Option<Player>,
|
||||||
@@ -348,6 +351,7 @@ impl Default for Review {
|
|||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
game: None,
|
game: None,
|
||||||
|
video_roots: Vec::new(),
|
||||||
loading: false,
|
loading: false,
|
||||||
player: None,
|
player: None,
|
||||||
sounds: Vec::new(),
|
sounds: Vec::new(),
|
||||||
@@ -396,7 +400,8 @@ pub fn open(app: &mut App, recording_id: &str) {
|
|||||||
|
|
||||||
/// Fill the review screen with a timeline that has been read, and load its clip.
|
/// Fill the review screen with a timeline that has been read, and load its clip.
|
||||||
pub fn show(app: &mut App, game: Timeline) {
|
pub fn show(app: &mut App, game: Timeline) {
|
||||||
let path = game.video_path();
|
let roots = app.video_roots();
|
||||||
|
let path = game.video_path(&roots);
|
||||||
let highlights = highlight::compute(
|
let highlights = highlight::compute(
|
||||||
&game,
|
&game,
|
||||||
game.summoner().as_deref(),
|
game.summoner().as_deref(),
|
||||||
@@ -405,6 +410,7 @@ pub fn show(app: &mut App, game: Timeline) {
|
|||||||
app.review.highlights = highlights;
|
app.review.highlights = highlights;
|
||||||
app.review.duration = game.duration_secs.max(0) as f64;
|
app.review.duration = game.duration_secs.max(0) as f64;
|
||||||
let video_file = game.video_file.clone();
|
let video_file = game.video_file.clone();
|
||||||
|
app.review.video_roots = roots;
|
||||||
app.review.game = Some(game);
|
app.review.game = Some(game);
|
||||||
|
|
||||||
let Some(path) = path else {
|
let Some(path) = path else {
|
||||||
@@ -459,7 +465,7 @@ fn follow_sound(app: &mut App) {
|
|||||||
.review
|
.review
|
||||||
.game
|
.game
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.and_then(history::Timeline::video_path)
|
.and_then(|game| game.video_path(&app.review.video_roots))
|
||||||
else {
|
else {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
@@ -912,7 +918,7 @@ fn channels(app: &App, p: Paint) -> Option<El> {
|
|||||||
fn clip_row(app: &App, p: Paint, clip: Clip) -> El {
|
fn clip_row(app: &App, p: Paint, clip: Clip) -> El {
|
||||||
let video = app
|
let video = app
|
||||||
.reviewed()
|
.reviewed()
|
||||||
.and_then(|game| game.video_path())
|
.and_then(|game| game.video_path(&app.review.video_roots))
|
||||||
.map(|path| path.display().to_string());
|
.map(|path| path.display().to_string());
|
||||||
let name = app
|
let name = app
|
||||||
.reviewed()
|
.reviewed()
|
||||||
@@ -1203,7 +1209,9 @@ fn highlights(app: &App, p: Paint, game: &Timeline) -> El {
|
|||||||
for (index, clip) in app.review.highlights.iter().enumerate() {
|
for (index, clip) in app.review.highlights.iter().enumerate() {
|
||||||
let start = clip.start;
|
let start = clip.start;
|
||||||
let end = clip.end;
|
let end = clip.end;
|
||||||
let video = game.video_path().map(|path| path.display().to_string());
|
let video = game
|
||||||
|
.video_path(&app.review.video_roots)
|
||||||
|
.map(|path| path.display().to_string());
|
||||||
let name = format!("{}-highlight-{}", game.recording_id, index);
|
let name = format!("{}-highlight-{}", game.recording_id, index);
|
||||||
let kind_ink = match clip.kind {
|
let kind_ink = match clip.kind {
|
||||||
highlight::Kind::Death => p.danger,
|
highlight::Kind::Death => p.danger,
|
||||||
|
|||||||
@@ -397,8 +397,8 @@ fn quick(app: &App, p: Paint, kit: &rune_kit::Kit, layer: &mut Vec<El>, content:
|
|||||||
"open-recordings",
|
"open-recordings",
|
||||||
"Open folder",
|
"Open folder",
|
||||||
false,
|
false,
|
||||||
|_app: &mut App| {
|
|app: &mut App| {
|
||||||
crate::daemon::open_folder(&crate::daemon::recordings_dir());
|
crate::daemon::open_folder(&app.output_dir());
|
||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
vec![ui::setting_row(
|
vec![ui::setting_row(
|
||||||
@@ -479,8 +479,8 @@ fn recording(app: &App, p: Paint, kit: &rune_kit::Kit, layer: &mut Vec<El>, cont
|
|||||||
"open-output",
|
"open-output",
|
||||||
"Open folder",
|
"Open folder",
|
||||||
false,
|
false,
|
||||||
|_app: &mut App| {
|
|app: &mut App| {
|
||||||
crate::daemon::open_folder(&crate::daemon::recordings_dir());
|
crate::daemon::open_folder(&app.output_dir());
|
||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
vec![
|
vec![
|
||||||
|
|||||||
Reference in new issue
Block a user