From b0b0bcbdb735dd70c1af4352374fbc091337b26a Mon Sep 17 00:00:00 2001 From: rembo10 Date: Fri, 6 Mar 2015 10:02:04 -0800 Subject: [PATCH] Fix for piratebay returning size as 0 bytes for all results --- headphones/helpers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/headphones/helpers.py b/headphones/helpers.py index ca8c9fdc..1a319ab5 100644 --- a/headphones/helpers.py +++ b/headphones/helpers.py @@ -173,15 +173,15 @@ def piratesize(size): factor = float(split[0]) unit = split[1].upper() - if unit == 'MiB': + if unit == 'MIB': size = factor * 1048576 elif unit == 'MB': size = factor * 1000000 - elif unit == 'GiB': + elif unit == 'GIB': size = factor * 1073741824 elif unit == 'GB': size = factor * 1000000000 - elif unit == 'KiB': + elif unit == 'KIB': size = factor * 1024 elif unit == 'KB': size = factor * 1000