mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Quater values for History Watch Status (#2179)
* initial release * change fillup orientation to clockwise * fix indentation for css * fix 50 percent circle orientation * optimize colors and padding
This commit is contained in:
parent
1e4fc05ecf
commit
a31dcb5508
3 changed files with 92 additions and 58 deletions
|
@ -281,13 +281,19 @@ class DataFactory(object):
|
|||
if item['live']:
|
||||
item['percent_complete'] = 100
|
||||
|
||||
base_watched_value = watched_percent[item['media_type']] / 4.0
|
||||
|
||||
if helpers.check_watched(
|
||||
item['media_type'], item['view_offset'], item['duration'],
|
||||
item['marker_credits_first'], item['marker_credits_final']
|
||||
):
|
||||
watched_status = 1
|
||||
elif item['percent_complete'] >= watched_percent[item['media_type']] / 2.0:
|
||||
watched_status = 0.5
|
||||
elif item['percent_complete'] >= base_watched_value * 3.0:
|
||||
watched_status = 0.75
|
||||
elif item['percent_complete'] >= base_watched_value * 2.0:
|
||||
watched_status = 0.50
|
||||
elif item['percent_complete'] >= base_watched_value:
|
||||
watched_status = 0.25
|
||||
else:
|
||||
watched_status = 0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue