diff --git a/beet/library/base.py b/beet/library/base.py index e31b8772..7facb3bb 100644 --- a/beet/library/base.py +++ b/beet/library/base.py @@ -810,6 +810,12 @@ def __delitem__(self, key: str): for i, entry in enumerate(entries): if entry.get("directory") == key: del entries[i] + if not entries: + del overlays["entries"] + if not overlays: + del self.pack.mcmeta.data["overlays"] + break + def missing(self, key: str) -> PackType: if self.pack is None: