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:
herby2212 2023-10-24 00:51:35 +02:00 committed by GitHub
parent 1e4fc05ecf
commit a31dcb5508
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 92 additions and 58 deletions

View file

@ -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