mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
Added option to only download nfo
This commit is contained in:
parent
6901d27ae4
commit
1d1574a019
@ -192,6 +192,11 @@ def get_one_media(stream):
|
||||
if stream.config.get("list_quality"):
|
||||
list_quality(videos)
|
||||
return
|
||||
if stream.config.get("nfo"):
|
||||
# Create NFO files
|
||||
write_nfo_episode(stream.output, stream.config)
|
||||
write_nfo_tvshow(stream.output, stream.config)
|
||||
if stream.config.get("force_nfo"): return
|
||||
try:
|
||||
fstream = select_quality(stream.config, videos)
|
||||
if fstream.config.get("get_url"):
|
||||
@ -207,10 +212,6 @@ def get_one_media(stream):
|
||||
|
||||
if fstream.config.get("thumbnail") and hasattr(stream, "get_thumbnail"):
|
||||
stream.get_thumbnail(stream.config)
|
||||
if stream.config.get("nfo"):
|
||||
# Create NFO files
|
||||
write_nfo_episode(stream.output, stream.config)
|
||||
write_nfo_tvshow(stream.output, stream.config)
|
||||
|
||||
post = postprocess(fstream, fstream.config, subfixes)
|
||||
if fstream.audio and post.detect:
|
||||
|
@ -97,6 +97,8 @@ def parser(version):
|
||||
help="explain what is going on")
|
||||
general.add_argument("--nfo", action="store_true", dest="nfo", default=False,
|
||||
help="create a NFO file")
|
||||
general.add_argument("--force-nfo", action="store_true", dest="force_nfo", default=False,
|
||||
help="download only NFO if used with --nfo")
|
||||
|
||||
quality = parser.add_argument_group("Quality")
|
||||
quality.add_argument("-q", "--quality", default=0, metavar="quality",
|
||||
@ -177,6 +179,7 @@ def setup_defaults():
|
||||
options.set("preferred", None)
|
||||
options.set("verbose", False)
|
||||
options.set("nfo", False)
|
||||
options.set("force_nfo", False)
|
||||
options.set("output_auto", False)
|
||||
options.set("service", None)
|
||||
options.set("cookies", None)
|
||||
@ -220,6 +223,7 @@ def parsertoconfig(config, parser):
|
||||
config.set("preferred", parser.preferred)
|
||||
config.set("verbose", parser.verbose)
|
||||
config.set("nfo", parser.nfo)
|
||||
config.set("force_nfo", parser.nfo)
|
||||
config.set("exclude", parser.exclude)
|
||||
config.set("after_date", parser.after_date)
|
||||
config.set("get_url", parser.get_url)
|
||||
|
Loading…
Reference in New Issue
Block a user