Skip to content

Commit

Permalink
some minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Oct 3, 2024
1 parent 6b5d45c commit a65616a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion music_assistant/server/helpers/ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ async def _feed_stdin(self) -> None:
return
self.logger.error(
"Stream error: %s",
str(err),
str(err) or err.__class__.__name__,
exc_info=err if self.logger.isEnabledFor(VERBOSE_LOG_LEVEL) else None,
)
finally:
Expand Down
24 changes: 24 additions & 0 deletions tests/server/test_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,30 @@ def test_compare_artist() -> None:
artist_b.name = artist_a.name
artist_b.external_ids = {(media_items.ExternalID.MB_ARTIST, "1234")}
assert compare.compare_artist(artist_a, artist_b) is False
# test on external id mismatch while name matches
artist_a = media_items.Artist(
item_id="1",
provider="test1",
name="Artist A",
external_ids={(media_items.ExternalID.MB_ARTIST, "123")},
provider_mappings={
media_items.ProviderMapping(
item_id="1", provider_domain="test", provider_instance="test1"
)
},
)
artist_b = media_items.Artist(
item_id="1",
provider="test2",
name="Artist A",
external_ids={(media_items.ExternalID.MB_ARTIST, "abc")},
provider_mappings={
media_items.ProviderMapping(
item_id="2", provider_domain="test", provider_instance="test2"
)
},
)
assert compare.compare_artist(artist_a, artist_b) is False


def test_compare_album() -> None:
Expand Down

0 comments on commit a65616a

Please sign in to comment.