Skip to content

Commit e0e7f80

Browse files
committed
added userRating property to Track
1 parent 75bf75f commit e0e7f80

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plexapi/audio.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ class Track(Audio, Playable):
251251
parentThumb (str): URL to album thumbnail image.
252252
parentTitle (str): Name of the album for this track.
253253
primaryExtraKey (str): Unknown
254-
ratingCount (int): Rating of this track (1-10?)
254+
ratingCount (int): Unknown
255+
userRating (float): Rating of this track (0.0 - 10.0) equaling (0 stars - 5 stars)
255256
viewOffset (int): Unknown
256257
year (int): Year this track was released.
257258
sessionKey (int): Session Key (active sessions only).
@@ -284,6 +285,7 @@ def _loadData(self, data):
284285
self.parentTitle = data.attrib.get('parentTitle')
285286
self.primaryExtraKey = data.attrib.get('primaryExtraKey')
286287
self.ratingCount = utils.cast(int, data.attrib.get('ratingCount'))
288+
self.userRating = utils.cast(float, data.attrib.get('userRating', 0))
287289
self.viewOffset = utils.cast(int, data.attrib.get('viewOffset', 0))
288290
self.year = utils.cast(int, data.attrib.get('year'))
289291
self.media = self.findItems(data, media.Media)

0 commit comments

Comments
 (0)