Remove demo clip placeholders
This commit is contained in:
1 parent
bb07173857
commit
eda85f91a6
4 files changed
+11
-60
No files matched your search
@@ -30,7 +30,7 @@
|
|||||||
- A backend worker loop now refreshes game detection and drains auto-clip integrations while the desktop app is running, independent of the currently selected UI view.
|
- A backend worker loop now refreshes game detection and drains auto-clip integrations while the desktop app is running, independent of the currently selected UI view.
|
||||||
- Local clip library can add, filter, remove, update upload state, write a tab-separated manifest, and persist clip metadata in SQLite.
|
- Local clip library can add, filter, remove, update upload state, write a tab-separated manifest, and persist clip metadata in SQLite.
|
||||||
- Versioned local settings are saved to `settings.json`; replay buffer length and mic toggle are wired from the UI to Rust.
|
- Versioned local settings are saved to `settings.json`; replay buffer length and mic toggle are wired from the UI to Rust.
|
||||||
- Storage layer creates the planned folders, sanitizes clip paths, keeps placeholder helpers for tests/demo paths, and cleans oldest temporary files under a size limit.
|
- Storage layer creates the planned folders, sanitizes clip paths, provides test clip builders for unit coverage, and cleans oldest temporary files under a size limit.
|
||||||
- Upload adapters perform live HTTP uploads for Catbox, Litterbox, and custom multipart endpoints; Lustful remains blocked behind unknown API details.
|
- Upload adapters perform live HTTP uploads for Catbox, Litterbox, and custom multipart endpoints; Lustful remains blocked behind unknown API details.
|
||||||
- The UI Upload button currently performs an explicit Catbox upload for the selected clip and saves the returned URL.
|
- The UI Upload button currently performs an explicit Catbox upload for the selected clip and saves the returned URL.
|
||||||
- Vite TypeScript UI builds and has interactive Library, Recording, Auto Clip, Uploads, and Settings views.
|
- Vite TypeScript UI builds and has interactive Library, Recording, Auto Clip, Uploads, and Settings views.
|
||||||
|
|||||||
+3
-3
@@ -168,13 +168,13 @@ pub fn trim_duration(start: Duration, end: Duration) -> Option<Duration> {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::storage::{build_placeholder_clip, LibraryPaths};
|
use crate::storage::{build_test_clip, LibraryPaths};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn filters_by_game_and_tag() {
|
fn filters_by_game_and_tag() {
|
||||||
let paths = LibraryPaths::new("root");
|
let paths = LibraryPaths::new("root");
|
||||||
let mut library = ClipLibrary::new();
|
let mut library = ClipLibrary::new();
|
||||||
let mut clip = build_placeholder_clip(
|
let mut clip = build_test_clip(
|
||||||
&paths,
|
&paths,
|
||||||
"clip",
|
"clip",
|
||||||
"session",
|
"session",
|
||||||
@@ -197,7 +197,7 @@ mod tests {
|
|||||||
fn manifest_contains_clip_rows() {
|
fn manifest_contains_clip_rows() {
|
||||||
let paths = LibraryPaths::new("root");
|
let paths = LibraryPaths::new("root");
|
||||||
let mut library = ClipLibrary::new();
|
let mut library = ClipLibrary::new();
|
||||||
library.add_clip(build_placeholder_clip(
|
library.add_clip(build_test_clip(
|
||||||
&paths,
|
&paths,
|
||||||
"clip",
|
"clip",
|
||||||
"session",
|
"session",
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ pub fn clip_path(
|
|||||||
.join(format!("{}.mp4", sanitize_path_component(clip_id)))
|
.join(format!("{}.mp4", sanitize_path_component(clip_id)))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build_placeholder_clip(
|
pub fn build_test_clip(
|
||||||
paths: &LibraryPaths,
|
paths: &LibraryPaths,
|
||||||
clip_id: &str,
|
clip_id: &str,
|
||||||
session_id: &str,
|
session_id: &str,
|
||||||
|
|||||||
+6
-55
@@ -126,8 +126,8 @@ let tauriInvoke: (<T>(command: string, args?: Record<string, unknown>) => Promis
|
|||||||
|
|
||||||
const state: AppState = {
|
const state: AppState = {
|
||||||
activeView: "Library",
|
activeView: "Library",
|
||||||
recordingState: "Buffering",
|
recordingState: "WaitingForGame",
|
||||||
detectedGame: "Counter-Strike 2",
|
detectedGame: "Waiting for game",
|
||||||
replayBufferSeconds: 60,
|
replayBufferSeconds: 60,
|
||||||
systemAudioEnabled: true,
|
systemAudioEnabled: true,
|
||||||
sessionRecording: false,
|
sessionRecording: false,
|
||||||
@@ -147,57 +147,8 @@ const state: AppState = {
|
|||||||
customUploadEndpoint: "",
|
customUploadEndpoint: "",
|
||||||
customUploadResponsePath: "url",
|
customUploadResponsePath: "url",
|
||||||
gsiConfigStatus: "",
|
gsiConfigStatus: "",
|
||||||
selectedClipId: "clip-1",
|
selectedClipId: "",
|
||||||
clips: [
|
clips: [],
|
||||||
{
|
|
||||||
id: "clip-1",
|
|
||||||
title: "Dust II clutch",
|
|
||||||
game: "Counter-Strike 2",
|
|
||||||
event: "Kill",
|
|
||||||
source: "Auto Event",
|
|
||||||
duration: "0:18",
|
|
||||||
createdAt: "Today 12:08",
|
|
||||||
uploadState: "Local only",
|
|
||||||
path: "",
|
|
||||||
thumbnailPath: null,
|
|
||||||
videoUrl: null,
|
|
||||||
thumbnailUrl: null,
|
|
||||||
tags: ["clutch", "kill"],
|
|
||||||
colorClass: "kill",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "clip-2",
|
|
||||||
title: "Baron steal",
|
|
||||||
game: "League of Legends",
|
|
||||||
event: "Objective",
|
|
||||||
source: "Auto Event",
|
|
||||||
duration: "0:22",
|
|
||||||
createdAt: "Today 11:44",
|
|
||||||
uploadState: "Queued",
|
|
||||||
path: "",
|
|
||||||
thumbnailPath: null,
|
|
||||||
videoUrl: null,
|
|
||||||
thumbnailUrl: null,
|
|
||||||
tags: ["objective"],
|
|
||||||
colorClass: "objective",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "clip-3",
|
|
||||||
title: "Manual save",
|
|
||||||
game: "Dota 2",
|
|
||||||
event: "Manual",
|
|
||||||
source: "Manual Hotkey",
|
|
||||||
duration: "1:00",
|
|
||||||
createdAt: "Yesterday 22:15",
|
|
||||||
uploadState: "Uploaded",
|
|
||||||
path: "",
|
|
||||||
thumbnailPath: null,
|
|
||||||
videoUrl: null,
|
|
||||||
thumbnailUrl: null,
|
|
||||||
tags: ["teamfight"],
|
|
||||||
colorClass: "manual",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
autoEvents: [
|
autoEvents: [
|
||||||
{ id: "cs2-kill", game: "Counter-Strike 2", event: "Kill", enabled: true },
|
{ id: "cs2-kill", game: "Counter-Strike 2", event: "Kill", enabled: true },
|
||||||
{ id: "cs2-round", game: "Counter-Strike 2", event: "Round win", enabled: true },
|
{ id: "cs2-round", game: "Counter-Strike 2", event: "Round win", enabled: true },
|
||||||
@@ -267,7 +218,7 @@ function renderRecordingBar() {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderActiveView(selectedClip: Clip) {
|
function renderActiveView(selectedClip: Clip | undefined) {
|
||||||
switch (state.activeView) {
|
switch (state.activeView) {
|
||||||
case "Recording":
|
case "Recording":
|
||||||
return renderRecordingView();
|
return renderRecordingView();
|
||||||
@@ -366,7 +317,7 @@ function renderClipDetails(clip: Clip | undefined) {
|
|||||||
<h2>${clip.title}</h2>
|
<h2>${clip.title}</h2>
|
||||||
<p class="muted">${clip.game} · ${clip.event} · ${clip.createdAt} · ${clip.uploadState}</p>
|
<p class="muted">${clip.game} · ${clip.event} · ${clip.createdAt} · ${clip.uploadState}</p>
|
||||||
<div class="tag-row">${clip.tags.map((tag) => `<span>${tag}</span>`).join("")}</div>
|
<div class="tag-row">${clip.tags.map((tag) => `<span>${tag}</span>`).join("")}</div>
|
||||||
<p class="muted file-path">${clip.path || "Demo clip; no local file yet"}</p>
|
<p class="muted file-path">${clip.path || "Clip file unavailable"}</p>
|
||||||
<div class="trim-row">
|
<div class="trim-row">
|
||||||
<label>Start <input value="00:00" data-action="trim-start" /></label>
|
<label>Start <input value="00:00" data-action="trim-start" /></label>
|
||||||
<label>End <input value="${clip.duration}" data-action="trim-end" /></label>
|
<label>End <input value="${clip.duration}" data-action="trim-end" /></label>
|
||||||
|
|||||||
Reference in new issue
Block a user