mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-30 23:24:16 +01:00
rtmp: complain when the file exists
This commit is contained in:
parent
ea96cd165b
commit
8b93f902a7
@ -4,6 +4,7 @@ from __future__ import absolute_import
|
||||
import subprocess
|
||||
import re
|
||||
import shlex
|
||||
import os
|
||||
|
||||
from svtplay_dl.log import log
|
||||
from svtplay_dl.utils import is_py2
|
||||
@ -26,6 +27,9 @@ class RTMP(VideoRetriever):
|
||||
else:
|
||||
self.options.output = self.options.output + extension.group(1)
|
||||
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
|
||||
args += ["-o", self.options.output]
|
||||
if self.options.silent or self.options.output == "-":
|
||||
args.append("-q")
|
||||
|
Loading…
Reference in New Issue
Block a user