1
0
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:
Johan Andersson 2014-04-27 16:12:46 +02:00
parent ea9bd80356
commit 9bbf861e1b

View File

@ -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