calliope.diff.compare
¶
Module Contents¶
Classes¶
Generic enumeration. |
Functions¶
|
True if |
|
True if |
|
True if creator (artist) of |
|
True if |
|
True if |
|
True if |
- class calliope.diff.compare.PropertyState¶
Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
- MISSING_BOTH = 0¶
- MISSING_A = 1¶
- MISSING_B = 2¶
- NOT_EQUAL = 3¶
- EQUAL = 4¶
- calliope.diff.compare.property_compare_exact(property_name, a, b)¶
True if
property_name
is present and exactly equal.- Parameters
property_name (str) –
a (calliope.playlist.Item) –
b (calliope.playlist.Item) –
- Return type
- calliope.diff.compare.property_compare_case_insensitive(property_name, a, b)¶
True if
property_name
is present and equal when lowercased.- Parameters
property_name (str) –
a (calliope.playlist.Item) –
b (calliope.playlist.Item) –
- Return type
- calliope.diff.compare.creator_equal(a, b)¶
True if creator (artist) of
a
andb
are the same.Considers properties:
musicbrainz.artist_id
creator
(case insensitive)
- Parameters
a (calliope.playlist.Item) –
b (calliope.playlist.Item) –
- calliope.diff.compare.album_equal(a, b)¶
True if
a
andb
represent the same album (release group).Considers properties:
musicbrainz.release_group_id
musicbrainz.release_id
album
andcreator
(case insensitive)
- Parameters
a (calliope.playlist.Item) –
b (calliope.playlist.Item) –
- calliope.diff.compare.song_equal(a, b)¶
True if
a
andb
represent the same song (recording).Considers
creator_equal()
, plus these properties properties:identifier
musicbrainz.recording_id
title
(case insensitive)
- Parameters
a (calliope.playlist.Item) –
b (calliope.playlist.Item) –
- calliope.diff.compare.track_equal(a, b)¶
True if
a
andb
represent the same track on the same album.Considers
song_equal()
,album_equal()
, plus these properties:musicbrainz.track_id
trackNum
- Parameters
a (calliope.playlist.Item) –
b (calliope.playlist.Item) –