LTX-Desktop icon indicating copy to clipboard operation
LTX-Desktop copied to clipboard

double check deletion and restore

Open Mcofir opened this issue 1 month ago • 2 comments

ive just pressed by accident on the trash on a new generated video, because the trash button appears only when the mouse is on the video. it appeared right when i pressed on the video and deleted my vid, without asking if im sure, no option to restore, no trash can ?

so, please add these options, and for now. can i restore my video?

Mcofir avatar Nov 03 '26 09:11 Mcofir

Hi @Mcofir, sorry about the accidental delete. You can probably restore the video.

The app does not erase the record from the database. It only sets a deleted_at timestamp. You must clear that value.

[!WARNING] Close LTX Desktop completely before you start. Make a backup copy of the database file first.

Steps

  1. Find the data folder:

    OS Path
    Windows %LOCALAPPDATA%\LTXDesktop
    macOS ~/Library/Application Support/LTXDesktop
    Linux ~/.local/share/LTXDesktop
  2. Copy store.sqlite3 to a safe place, for example store.sqlite3.bak.

  3. Open store.sqlite3 with DB Browser for SQLite or the sqlite3 command line tool.

  4. Find the video you deleted. It is the newest deleted row:

    SELECT id, feature, status, datetime(deleted_at/1000, 'unixepoch') AS deleted
    FROM generations
    WHERE deleted_at IS NOT NULL
    ORDER BY deleted_at DESC
    LIMIT 5;
    
  5. Restore the row. Replace <ID> with the id from step 4:

    UPDATE generations SET deleted_at = NULL WHERE id = '<ID>';
    
  6. If you use DB Browser, click Write Changes. Then close the tool.

  7. Start LTX Desktop. The video must appear again.

If the video does not appear

Check the assets table:

SELECT id, name, datetime(deleted_at/1000, 'unixepoch') AS deleted
FROM assets
WHERE deleted_at IS NOT NULL
ORDER BY deleted_at DESC
LIMIT 5;

Restore the correct asset. Replace <ID> with the id of the asset:

UPDATE assets SET deleted_at = NULL WHERE id = '<ID>';

Then look in the assets folder in the same data folder. If the video file is not there, the app deleted the file. The app cannot restore it. Please tell us what you find.

Your suggestion

Thank you for the feedback. We have this feature ready to be shipped soon :)

bureyburey avatar Nov 04 '26 07:11 bureyburey

thanks , i was able to find the video using codex , but yes this feature is important hoping to see it soon

Mcofir avatar Nov 04 '26 07:11 Mcofir