mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-20 10:35:32 +01:00
Bug Fixes: Removed limit on music dir, fixed issue with converting bytes to MBs
This commit is contained in:
@@ -90,7 +90,7 @@ def today():
|
||||
|
||||
def bytes_to_mb(bytes):
|
||||
|
||||
mb = bytes/1048576
|
||||
mb = int(bytes)/1048576
|
||||
size = '%.1f MB' % mb
|
||||
return size
|
||||
|
||||
|
||||
@@ -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)))
|
||||
|
||||
@@ -146,7 +146,7 @@ configform = form = '''
|
||||
<td>
|
||||
<br>
|
||||
|
||||
<p>Music Download Directory:</p><input type="text" name="download_dir" value="%s" size="60" maxlength="40"><br>
|
||||
<p>Music Download Directory:</p><input type="text" name="download_dir" value="%s" size="60"><br>
|
||||
|
||||
<i class="smalltext">Absolute or relative path to the dir where SAB downloads your music<br>
|
||||
i.e. Downloads/music or /Users/name/Downloads/music</i>
|
||||
|
||||
Reference in New Issue
Block a user