From 5cda1fad654dcd6352a29c62a22248e674e35956 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Thu, 7 Jan 2016 13:15:52 +0000 Subject: [PATCH] Change get_size helper to also handle files. --- CHANGES.md | 1 + sickbeard/helpers.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 60918fb8..dff2592c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -106,6 +106,7 @@ * Change disable connection attempts and remove UI references to the TVRage info source * Change to simplify xem id fetching * Fix issue on Add Existing Shows page where shows were listed that should not have been +* Change get_size helper to also handle files ### 0.10.0 (2015-08-06 11:05:00 UTC) diff --git a/sickbeard/helpers.py b/sickbeard/helpers.py index a5ceaeb6..2f0d9814 100644 --- a/sickbeard/helpers.py +++ b/sickbeard/helpers.py @@ -1314,6 +1314,8 @@ def human(size): def get_size(start_path='.'): + if ek.ek(os.path.isfile, start_path): + return ek.ek(os.path.getsize, start_path) total_size = 0 for dirpath, dirnames, filenames in ek.ek(os.walk, start_path): for f in filenames: