Skip to content

Commit bccccb4

Browse files
committed
Use linear interpolation for ratings
1 parent 3bf6be4 commit bccccb4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

resources/lib/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ def __add_stations(stations, add_custom=False, browse_more=None):
530530
'fanart': __get_plugin_fanart(),
531531
'info': {
532532
'title': station.get('name', ''),
533-
'rating': str(station.get('rating', '0.0')),
533+
'rating': (10.0 - 0.0)*((float(station.get('rating', 0.0))-30.000)/(1.0-30.000)), # linear interpolation
534534
'genre': station.get('genre', ''),
535535
'size': int(station.get('bitrate', 0)),
536536
'comment': station.get('description', ''),

0 commit comments

Comments
 (0)