MCPcopy
hub / github.com/beetbox/beets / import_stage

Method import_stage

beetsplug/importsource.py:44–55  ·  view source on GitHub ↗

Event handler for albums import finished.

(self, _, task)

Source from the content-addressed store, hash-verified

42 self.stop_suggestions_for_albums.add(item.mb_albumid)
43
44 def import_stage(self, _, task):
45 """Event handler for albums import finished."""
46 for item in task.imported_items():
47 # During reimports (import --library), we prevent overwriting the
48 # source_path attribute with the path from the music library
49 if "source_path" in item:
50 self._log.info(
51 "Preserving source_path of reimported item {}", item.id
52 )
53 continue
54 item["source_path"] = item.path
55 item.try_sync(write=False, move=False)
56
57 def suggest_removal(self, item):
58 """Prompts the user to delete the original path the item was imported from."""

Callers

nothing calls this directly

Calls 3

imported_itemsMethod · 0.45
infoMethod · 0.45
try_syncMethod · 0.45

Tested by

no test coverage detected