mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Change get_size helper to also handle files.
This commit is contained in:
parent
dd1989a87e
commit
5cda1fad65
2 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue