Repository navigation
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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