Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SickRage-1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
SickRage-1
Commits
30bfe47e
Commit
30bfe47e
authored
Dec 18, 2015
by
miigotu
Browse files
Options
Downloads
Patches
Plain Diff
Fix displayShow showing -1.00 B for shows with missing dir, now shows 0.00 B
parent
03e3f477
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sickrage/helper/common.py
+2
-9
2 additions, 9 deletions
sickrage/helper/common.py
with
2 additions
and
9 deletions
sickrage/helper/common.py
+
2
−
9
View file @
30bfe47e
...
...
@@ -162,19 +162,12 @@ def pretty_file_size(size):
:param size: The size to convert
:return: The converted size
"""
if
isinstance
(
size
,
(
str
,
unicode
))
and
size
.
isdigit
():
size
=
float
(
size
)
elif
not
isinstance
(
size
,
(
int
,
long
,
float
)):
return
''
size
=
float
(
max
(
try_int
(
size
),
0
))
remaining_size
=
size
for
unit
in
[
'
B
'
,
'
KB
'
,
'
MB
'
,
'
GB
'
,
'
TB
'
,
'
PB
'
]:
if
remaining_size
<
1024.
:
return
'
%3.2f %s
'
%
(
remaining_size
,
unit
)
remaining_size
/=
1024.
remaining_size
//=
1024.
return
size
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment