mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
hls: complain when the file exists
This commit is contained in:
parent
ea9bd80356
commit
9bbf861e1b
@ -82,6 +82,9 @@ class HLS(VideoRetriever):
|
||||
if not extension:
|
||||
self.options.output = "%s.ts" % self.options.output
|
||||
log.info("Outfile: %s", self.options.output)
|
||||
if os.path.isfile(self.options.output) and not self.options.force:
|
||||
log.info("File already exists. use --force to overwrite")
|
||||
return
|
||||
file_d = open(self.options.output, "wb")
|
||||
else:
|
||||
file_d = sys.stdout
|
||||
|
Loading…
Reference in New Issue
Block a user