fix numOfBytes variable name not changed in the rest of the function call

This commit is contained in:
Daniel Ahn 2018-07-24 08:58:14 -07:00
parent a1a3598d82
commit bf8e96010d

View File

@ -127,11 +127,11 @@ def formatTime(timeInSeconds, weeksAsTitles=True):
return formattedTime
def formatSize(num_of_bytes, precise=False):
if bytes == 0: # E.g. when file size privacy is enabled
def formatSize(numOfBytes, precise=False):
if numOfBytes == 0: # E.g. when file size privacy is enabled
return "???"
try:
megabytes = int(bytes) / 1048576.0 # Technically this is a mebibyte, but whatever
megabytes = int(numOfBytes) / 1048576.0 # Technically this is a mebibyte, but whatever
if precise:
megabytes = round(megabytes, 1)
else: