mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Fix handling of clips in activity pane.
Start standardising variable names in templates.
This commit is contained in:
parent
b4f1bddc02
commit
c770c90d76
7 changed files with 188 additions and 124 deletions
|
@ -347,8 +347,12 @@ def convert_xml_to_dict(xml):
|
|||
|
||||
|
||||
def get_percent(value1, value2):
|
||||
value1 = cast_to_float(value1)
|
||||
value2 = cast_to_float(value2)
|
||||
|
||||
if value1.isdigit() and value2.isdigit():
|
||||
value1 = cast_to_float(value1)
|
||||
value2 = cast_to_float(value2)
|
||||
else:
|
||||
return 0
|
||||
|
||||
if value1 != 0 and value2 != 0:
|
||||
percent = (value1 / value2) * 100
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue