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

Method _missing_tracks

beetsplug/missing.py:179–204  ·  view source on GitHub ↗

Print a listing of tracks missing from each album in the library matching query.

(self, lib, query)

Source from the content-addressed store, hash-verified

177 return [self._command]
178
179 def _missing_tracks(self, lib, query):
180 """Print a listing of tracks missing from each album in the library
181 matching query.
182 """
183 albums = lib.albums(query)
184
185 count = self.config["count"].get()
186 total = self.config["total"].get()
187 fmt = config["format_album" if count else "format_item"].get()
188
189 if total:
190 print(sum([_missing_count(a) for a in albums]))
191 return
192
193 # Default format string for count mode.
194 if count:
195 fmt += ": $missing"
196
197 for album in albums:
198 if count:
199 if _missing_count(album):
200 print_(format(album, fmt))
201
202 else:
203 for item in self._missing(album):
204 print_(format(item, fmt))
205
206 def _missing_albums(self, lib: Library, query: list[str]) -> None:
207 """Print a listing of albums missing from each artist in the library

Callers

nothing calls this directly

Calls 5

_missingMethod · 0.95
print_Function · 0.90
_missing_countFunction · 0.85
albumsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected