Fix moving of segmented downloads
This commit is contained in:
parent
d76ee3994b
commit
dafde88721
|
@ -1,9 +1,12 @@
|
|||
3.10.7
|
||||
========================
|
||||
* Fixed streaming of recordings from the server (the file path was duplicated
|
||||
if single file was used)
|
||||
* Fixed credentials related bugs for Streamate and Stripchat
|
||||
They used the user name from Chaturbate for some requests. Whoopsie!
|
||||
* Renamed settings for Chaturbate's user name and password
|
||||
* Add setting to split recordings by size
|
||||
* Fixed moving of segment recordings on the server (post-processing)
|
||||
|
||||
3.10.6
|
||||
========================
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.io.IOException;
|
|||
import java.nio.file.Files;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -15,7 +16,7 @@ import ctbrec.recorder.RecordingManager;
|
|||
|
||||
public class Move extends AbstractPlaceholderAwarePostProcessor {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(Rename.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(Move.class);
|
||||
public static final String PATH_TEMPLATE = "path.template";
|
||||
public static final String DEFAULT = "${modelSanitizedName}" + File.separatorChar + "${localDateTime}";
|
||||
|
||||
|
@ -36,7 +37,11 @@ public class Move extends AbstractPlaceholderAwarePostProcessor {
|
|||
}
|
||||
LOG.info("Moving {} to {}", src.getName(), target.getParentFile().getCanonicalPath());
|
||||
Files.createDirectories(target.getParentFile().toPath());
|
||||
Files.move(rec.getPostProcessedFile().toPath(), target.toPath());
|
||||
if (rec.getPostProcessedFile().isDirectory()) {
|
||||
FileUtils.moveDirectory(rec.getPostProcessedFile(), target);
|
||||
} else {
|
||||
FileUtils.moveFile(rec.getPostProcessedFile(), target);
|
||||
}
|
||||
rec.setPostProcessedFile(target);
|
||||
if (Objects.equals(src, rec.getAbsoluteFile())) {
|
||||
rec.setAbsoluteFile(target);
|
||||
|
|
Loading…
Reference in New Issue