Merge pull request #601 from JackDandy/feature/ChangeGetSize

Change get_size helper to also handle files.
This commit is contained in:
JackDandy 2016-01-07 13:21:56 +00:00
commit 394315d00c
2 changed files with 3 additions and 0 deletions

View file

@ -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)

View file

@ -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: