Ensure that cached Metadata copies contain valid cover info when get_metadata is called with get_cover = True

This commit is contained in:
Charles Haley 2010-09-26 15:49:15 +01:00
parent 66ed343b11
commit 87020e38be

View File

@ -670,6 +670,8 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
mi = self.data.get(idx, self.FIELD_MAP['all_metadata'], mi = self.data.get(idx, self.FIELD_MAP['all_metadata'],
row_is_id = index_is_id) row_is_id = index_is_id)
if mi is not None: if mi is not None:
if get_cover and mi.cover is None:
mi.cover = self.cover(idx, index_is_id=index_is_id, as_path=True)
return mi return mi
self.gm_missed += 1 self.gm_missed += 1