Less restrictive filter + convert rating
This commit is contained in:
@@ -102,10 +102,18 @@ class ITunesGraphParser:
|
||||
track = tracks[k]
|
||||
|
||||
# Filter out any non-music with ratings lower than 3 stars
|
||||
if (track['Track Type'] != 'File') or ('Artist' not in track) or ('Genre' not in track) or (
|
||||
'Rating' not in track) or (track['Rating'] < self._rating) or (track['Artist'] == 'Various Artists'):
|
||||
if (track['Track Type'] != 'File') or ('Artist' not in track) or ('Genre' not in track):
|
||||
# After a lot of investigation, songs without these properties are really problematic
|
||||
# (songs that need to be relocated, podcast, etc.)
|
||||
continue
|
||||
|
||||
# Convert rating - needed for calculation later
|
||||
if ('Rating' not in track):
|
||||
if ('Album Rating' not in track):
|
||||
track['Rating'] = 0
|
||||
else:
|
||||
track['Rating'] = track['Album Rating']
|
||||
|
||||
akey = track['Artist']
|
||||
if akey not in self._artists:
|
||||
self._artists[akey] = {
|
||||
|
||||
Reference in New Issue
Block a user