Skip invalid scrobbles in Spotify import, fix GH-232

This commit is contained in:
krateng 2023-08-13 17:22:46 +02:00
parent c9ada8c953
commit f355582553

View File

@ -213,6 +213,10 @@ def parse_spotify_lite(inputf):
album = entry['master_metadata_album_album_name']
albumartist = entry['master_metadata_album_artist_name']
if None in [title,artist]:
yield ('CONFIDENT_SKIP',None,f"{entry} has relevant fields set to null, skipping...")
continue
if played < 30:
yield ('CONFIDENT_SKIP',None,f"{entry} is shorter than 30 seconds, skipping...")
continue