Import hook for fetching lyrics automatically.
(self, _, task: ImportTask)
| 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.""" |