Thread Locked This thread is locked - replies are not allowed.



Permlink Replies: 0 - Pages: 1 Threads: [ Previous | Next ]
davidekholm

Posts: 3,468
Registered: 18-Oct-2002
Script to avoid regenerating videos
Posted: 7 Feb 23, 22:26
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()
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums