From 5e4cb20c4ae97e096dae8d929f225da15e0ed81e Mon Sep 17 00:00:00 2001 From: Alok Saboo Date: Wed, 20 Dec 2023 10:21:45 -0500 Subject: [PATCH] Update lastimport.py --- beetsplug/lastimport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beetsplug/lastimport.py b/beetsplug/lastimport.py index 86abd97b9..dc84a3bc8 100644 --- a/beetsplug/lastimport.py +++ b/beetsplug/lastimport.py @@ -259,7 +259,7 @@ def process_tracks(lib, tracks, log): if song is not None: count = int(song.get("play_count", 0)) - new_count = int(tracks[num]["playcount"]) if tracks[num]["playcount"] else 1 + new_count = int(tracks[num].get("playcount", 1)) log.debug( "match: {0} - {1} ({2}) " "updating: play_count {3} => {4}", song.artist,