Print a listing of tracks missing from each album in the library matching query.
(self, lib, query)
| 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 |
nothing calls this directly
no test coverage detected