Update lastimport.py

This commit is contained in:
Alok Saboo 2023-12-20 10:20:16 -05:00
parent c437a5594e
commit 135faac62e

View file

@ -223,6 +223,17 @@ def process_tracks(lib, tracks, log):
dbcore.query.MatchQuery("mb_trackid", trackid)
).get()
# If not, try just album/title
if song is None:
log.debug("no album match, trying by album/title")
query = dbcore.AndQuery(
[
dbcore.query.SubstringQuery("album", album),
dbcore.query.SubstringQuery("title", title),
]
)
song = lib.items(query).get()
# If not, try just artist/title
if song is None:
log.debug("no album match, trying by artist/title")