Do you find yourself accidentally getting your videos re-generated when making albums? This script will replace your videos with their generated versions and tick the "Do not re-encode" checkbox, effectively avoiding any future re-processing of videos. Only use if you're content with the current quality of your generated videos.
alsync = new AlbumSynchronizer(engine);
Work.on(rootFolder.descendants)
.titled("Use original videos")
.ask("Ok to replae your video files with the generated video files?")
.filter(ao -> ao.category == Category.video)
.forEach(ao) -> {
File videoFile = alsync.getVideoFile(alsync.translate(ao));
if (videoFile.exists()) {
IO.copyFile(videoFile, ao.file);
}
ao.includeOriginal = true
}
.showResult()