Remove query part from segment file name
This commit is contained in:
parent
1c8758ef52
commit
e08cf998d5
|
@ -124,7 +124,12 @@ public class HlsDownload extends AbstractHlsDownload2 {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected OutputStream getSegmentOutputStream(String prefix, String fileName) throws FileNotFoundException {
|
protected OutputStream getSegmentOutputStream(String prefix, String fileName) throws FileNotFoundException {
|
||||||
File file = FileSystems.getDefault().getPath(downloadDir.toAbsolutePath().toString(), prefix + '_' + fileName).toFile();
|
String prefixedFileName = prefix + '_' + fileName;
|
||||||
|
int questionMarkPosition = prefixedFileName.indexOf('?');
|
||||||
|
if (questionMarkPosition > 0) {
|
||||||
|
prefixedFileName = prefixedFileName.substring(0, questionMarkPosition);
|
||||||
|
}
|
||||||
|
File file = FileSystems.getDefault().getPath(downloadDir.toAbsolutePath().toString(), prefixedFileName).toFile();
|
||||||
return new FileOutputStream(file);
|
return new FileOutputStream(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue