Add time for Album + pipe to convert Ms
This commit is contained in:
@@ -184,7 +184,8 @@ class ITunesParser:
|
||||
'Play Count': 0,
|
||||
'Rating': 0,
|
||||
'Genre': set(),
|
||||
'Artist': set()
|
||||
'Artist': set(),
|
||||
'Total Time': 0
|
||||
}
|
||||
|
||||
# Compute information
|
||||
@@ -193,9 +194,12 @@ class ITunesParser:
|
||||
rating = track['Rating'] if 'Rating' in track else 0
|
||||
rating = self.calc_rating(rating, self._albums[akey]['Rating'], self._albums[akey]['Track Count'])
|
||||
|
||||
total_time = track['Total Time'] if 'Total Time' in track else 0
|
||||
|
||||
self._albums[akey]['Track Count'] += 1
|
||||
self._albums[akey]['Rating'] = rating
|
||||
self._albums[akey]['Play Count'] += play_count
|
||||
self._albums[akey]['Total Time'] += total_time
|
||||
|
||||
if 'Genre' in track:
|
||||
# Split up the Genres
|
||||
|
||||
Reference in New Issue
Block a user