- // Refresh videoFile because the createTorrentAndSetInfoHash could be long
- const refreshedFile = await VideoFileModel.loadWithVideo(file.id)
- // File does not exist anymore, remove the generated torrent
- if (!refreshedFile) return file.removeTorrent()