Permalink
Browse files

Allow only int arguments for (flexible-)quality

  • Loading branch information...
1 parent e697659 commit 72a1f765f2d1c28f80ce65efd336f57ed0d4573d @quite committed Mar 23, 2013
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/svtplay_dl/__init__.py
  2. +2 −2 lib/svtplay_dl/utils.py
View
4 lib/svtplay_dl/__init__.py
@@ -106,9 +106,9 @@ def main():
help="Enable for live streams")
parser.add_option("-s", "--silent",
action="store_true", dest="silent", default=False)
- parser.add_option("-q", "--quality", default=0,
+ parser.add_option("-q", "--quality", type="int", default=0,
metavar="quality", help="Choose what format to download.\nIt will download the best format by default")
- parser.add_option("-Q", "--flexible-quality", default=0,
+ parser.add_option("-Q", "--flexible-quality", type="int", default=0,
metavar="amount", dest="flexibleq", help="Allow given quality (as above) to differ by an amount.")
parser.add_option("-H", "--hls",
action="store_true", dest="hls", default=False)
View
4 lib/svtplay_dl/utils.py
@@ -179,9 +179,9 @@ def subtitle_wsrt(options, data):
def select_quality(options, streams):
available = sorted(streams.keys(), key=int)
- optq = int(options.quality)
+ optq = options.quality
if optq:
- optf = int(options.flexibleq)
+ optf = options.flexibleq
if not optf:
wanted = [optq]
else:

0 comments on commit 72a1f76

Please sign in to comment.