diff --git a/headphones/helpers.py b/headphones/helpers.py index b82ecba1..6715d1bc 100644 --- a/headphones/helpers.py +++ b/headphones/helpers.py @@ -90,7 +90,7 @@ def today(): def bytes_to_mb(bytes): - mb = bytes/1048576 + mb = int(bytes)/1048576 size = '%.1f MB' % mb return size diff --git a/headphones/searcher.py b/headphones/searcher.py index bee94b22..ed9c39f1 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -130,7 +130,7 @@ def searchNZB(albumid=None): try: url = item.link title = item.title - size = int(item.links[1]['length']) + size = int(item.report_size) if size < maxsize: resultlist.append((title, size, url)) logger.info('Found %s. Size: %s' % (title, helpers.bytes_to_mb(size))) diff --git a/headphones/templates.py b/headphones/templates.py index bd5e842a..574ab901 100644 --- a/headphones/templates.py +++ b/headphones/templates.py @@ -146,7 +146,7 @@ configform = form = '''
-

Music Download Directory:


+

Music Download Directory:


Absolute or relative path to the dir where SAB downloads your music
i.e. Downloads/music or /Users/name/Downloads/music