forked from j62/ctbrec
Fix download filename
This commit is contained in:
parent
c0167155f3
commit
d5f2f043e4
|
@ -438,7 +438,7 @@ public class RecordingsTab extends Tab implements TabSelectionListener {
|
|||
}
|
||||
|
||||
private void download(Recording recording) throws IOException, ParseException, PlaylistException {
|
||||
String filename = recording.getPath().replaceAll("/", "-") + ".ts";
|
||||
String filename = recording.getPath().substring(1).replaceAll("/", "-") + ".ts";
|
||||
FileChooser chooser = new FileChooser();
|
||||
chooser.setInitialFileName(filename);
|
||||
if(config.getSettings().lastDownloadDir != null && !config.getSettings().lastDownloadDir.equals("")) {
|
||||
|
@ -452,7 +452,7 @@ public class RecordingsTab extends Tab implements TabSelectionListener {
|
|||
if(target != null) {
|
||||
config.getSettings().lastDownloadDir = target.getParent();
|
||||
String hlsBase = "http://" + config.getSettings().httpServer + ":" + config.getSettings().httpPort + "/hls";
|
||||
URL url = new URL(hlsBase + "/" + recording.getPath() + "/playlist.m3u8");
|
||||
URL url = new URL(hlsBase + recording.getPath() + "/playlist.m3u8");
|
||||
LOG.info("Downloading {}", recording.getPath());
|
||||
|
||||
Thread t = new Thread() {
|
||||
|
|
Loading…
Reference in New Issue