mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Add Rotten Tomatoes rating
This commit is contained in:
parent
78fd83746e
commit
f6fc142c47
4 changed files with 20 additions and 7 deletions
|
@ -440,11 +440,8 @@ def convert_xml_to_dict(xml):
|
|||
|
||||
def get_percent(value1, value2):
|
||||
|
||||
if str(value1).isdigit() and str(value2).isdigit():
|
||||
value1 = cast_to_float(value1)
|
||||
value2 = cast_to_float(value2)
|
||||
else:
|
||||
return 0
|
||||
value1 = cast_to_float(value1)
|
||||
value2 = cast_to_float(value2)
|
||||
|
||||
if value1 != 0 and value2 != 0:
|
||||
percent = (value1 / value2) * 100
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue