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

Method imported

beetsplug/lyrics.py:1130–1139  ·  view source on GitHub ↗

Import hook for fetching lyrics automatically.

(self, _, task: ImportTask)

Source from the content-addressed store, hash-verified

1128 return [cmd]
1129
1130 def imported(self, _, task: ImportTask) -> None:
1131 """Import hook for fetching lyrics automatically."""
1132 if query_str := self.config["auto_ignore"].get():
1133 query, _ = parse_query_string(query_str, Item)
1134 else:
1135 # matches nothing, so all items proceed normally
1136 query = FalseQuery()
1137
1138 for item in filterfalse(query.match, task.imported_items()):
1139 self.add_item_lyrics(item, False)
1140
1141 def find_lyrics(self, item: Item) -> Lyrics | None:
1142 """Return the first lyrics match from the configured source search."""

Callers 2

test_importedMethod · 0.45

Calls 5

add_item_lyricsMethod · 0.95
parse_query_stringFunction · 0.90
FalseQueryClass · 0.90
getMethod · 0.45
imported_itemsMethod · 0.45

Tested by 2

test_importedMethod · 0.36