calliope.diff

Package Contents

Functions

creator_equal(a, b)

True if creator (artist) of a and b are the same.

album_equal(a, b)

True if a and b represent the same album (release group).

song_equal(a, b)

True if a and b represent the same song (recording).

track_equal(a, b)

True if a and b represent the same track on the same album.

diff(playlist_a, playlist_b, equal_function=None)

Calculate difference between two playlists.

calliope.diff.creator_equal(a, b)

True if creator (artist) of a and b are the same.

Considers properties:

  • musicbrainz.artist_id

  • creator (case insensitive)

Parameters
calliope.diff.album_equal(a, b)

True if a and b represent the same album (release group).

Considers properties:

  • musicbrainz.release_group_id

  • musicbrainz.release_id

  • album and creator (case insensitive)

Parameters
calliope.diff.song_equal(a, b)

True if a and b represent the same song (recording).

Considers creator_equal(), plus these properties properties:

  • identifier

  • musicbrainz.recording_id

  • title (case insensitive)

Parameters
calliope.diff.track_equal(a, b)

True if a and b represent the same track on the same album.

Considers song_equal(), album_equal(), plus these properties:

  • musicbrainz.track_id

  • trackNum

Parameters
calliope.diff.diff(playlist_a, playlist_b, equal_function=None)

Calculate difference between two playlists.

Playlists are sets of items. Two items are equal according to equal_function. This function calculates set difference between playlist_a and playlist_b, returning all items from playlist_a which do not have a counterpart in playlist_b.