Report

Meta-functions for providing reports to the user based on comparisons between objects implemented in this package.

Functions:

report_playlist_differences(source, reference)

Generate a report on the differences between two library's playlists.

report_missing_tags(collections[, tags, ...])

Generate a report on the items with a set of collections that have missing tags.

musify.report.report_playlist_differences(source, reference)

Generate a report on the differences between two library’s playlists.

Parameters:
  • source (Library | Iterable[Playlist]) – A source library object containing the source playlists, or a collection of playlists .

  • reference (Library | Iterable[Playlist]) – A comparative library object or collection of playlists containing the playlists to compare to the source’s playlists.

Returns:

dict[str, dict[str, tuple[MusifyItem, ...]]] – Report on extra, missing, and unavailable tracks for the reference library.

musify.report.report_missing_tags(collections, tags=TagFields.ALL, match_all=False)

Generate a report on the items with a set of collections that have missing tags.

Parameters:
  • collections (LocalLibrary | Iterable[MusifyCollection]) – A collection of item collections to report on. If a local library is given, use the albums of the library as the collections to report on.

  • tags (GenericAlias[TagField] (default: <TagFields.ALL: 0>)) – List of tags to consider missing.

  • match_all (bool (default: False)) – When True, item counts as missing tags if item is missing all of the given tags. When False, item counts as missing tags when missing only one of the given tags.

Returns:

dict[str, dict[MusifyItem, tuple[str, ...]]] – Report on collections by name which have items with missing tags.