@@ -28,6 +28,7 @@ class Audio(PlexPartialObject):
2828 librarySectionTitle (str): :class:`~plexapi.library.LibrarySection` title.
2929 listType (str): Hardcoded as 'audio' (useful for search filters).
3030 moods (List<:class:`~plexapi.media.Mood`>): List of mood objects.
31+ musicAnalysisVersion (int): The Plex music analysis version for the item.
3132 ratingKey (int): Unique key identifying the item.
3233 summary (str): Summary of the artist, album, or track.
3334 thumb (str): URL to thumbnail image (/library/metadata/<ratingKey>/thumb/<thumbid>).
@@ -59,6 +60,7 @@ def _loadData(self, data):
5960 self .librarySectionTitle = data .attrib .get ('librarySectionTitle' )
6061 self .listType = 'audio'
6162 self .moods = self .findItems (data , media .Mood )
63+ self .musicAnalysisVersion = utils .cast (int , data .attrib .get ('musicAnalysisVersion' ))
6264 self .ratingKey = utils .cast (int , data .attrib .get ('ratingKey' ))
6365 self .summary = data .attrib .get ('summary' )
6466 self .thumb = data .attrib .get ('thumb' )
@@ -78,6 +80,11 @@ def _defaultSyncTitle(self):
7880 """ Returns str, default title for a new syncItem. """
7981 return self .title
8082
83+ @property
84+ def hasSonicAnalysis (self ):
85+ """ Returns True if the audio has been sonically analyzed. """
86+ return self .musicAnalysisVersion == 1
87+
8188 def sync (self , bitrate , client = None , clientId = None , limit = None , title = None ):
8289 """ Add current audio (artist, album or track) as sync item for specified device.
8390 See :func:`~plexapi.myplex.MyPlexAccount.sync` for possible exceptions.
0 commit comments