Skip to content

Keep a video's Copy in the cache and only export it once - #55

Closed
faetalize wants to merge 2 commits into
fix/49-video-export-inconsistencyfrom
fix/49-52-video-copy-cache
Closed

faetalize wants to merge 2 commits into
fix/49-video-export-inconsistencyfrom
fix/49-52-video-copy-cache

Conversation

@faetalize

Copy link
Copy Markdown
Owner

Copying a video now exports it once. Copying it again puts the same file back on the clipboard straight away, until the edit or the Copy profile changes or the file is gone.

Copied videos no longer pile up in the Videos folder. Each one is kept in ~/.cache/waytator/copies under a clean name and deleted a week after it was last copied. Export is the way to keep a video.

Sandboxed apps that can't read that folder can't paste these videos.

Built on #53, which should merge first.

Closes #49
Closes #52

Copy now exports into a folder of its own under ~/.cache/waytator/copies,
so the pasted file keeps a clean name and nothing piles up in ~/Videos.
It goes on disk rather than in the runtime folder because an export can
be bigger than memory.

Copy remembers the file it made with the edit and profile behind it, and
puts that file back on the clipboard while they match and it still
exists. Edits are compared by value, so undoing back to where the file
was made reuses it and undoing past it doesn't. Profiles are compared by
their settings, since one edited in the preferences keeps its id. The
memory goes when the video closes: the same edits on another video, or
on this one once it is replaced, come out differently.

A reused file counts as saved like an export does, or a window closing
on Copy could stop to ask about edits made since.

Copies are deleted a week after they were made or last copied, not when
the clipboard changes, because a clipboard manager keeps the link in its
history. That is judged by age rather than by the lock the rest of the
cache uses, as nothing that runs holds a copy. The sweep runs on its own
thread at startup and again on each video opened, since a background
service can run for weeks.

Closes #49
Closes #52
@faetalize
faetalize deleted the branch fix/49-video-export-inconsistency October 31, 2026 07:22
@faetalize faetalize closed this Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant