Skip to content

Commit a4ce975

Browse files
committed
Fix test failure
1 parent fd9a836 commit a4ce975

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

spotify_monitor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4365,7 +4365,7 @@ def spotify_normalize_web_playlist(playlist):
43654365
else:
43664366
playlist_image_url = max(sources, key=lambda s: s.get("width", 0)).get("url", "")
43674367

4368-
return {"sp_playlist_name": playlist.get("name", ""), "sp_playlist_owner": owner_data.get("name", "") or owner_data.get("username", ""), "sp_playlist_owner_uri": owner_uri, "sp_playlist_owner_url": spotify_get_web_entity_url(owner_data, owner_uri), "sp_playlist_url": spotify_get_web_entity_url(playlist, playlist_uri), "sp_playlist_url": playlist_image_url}
4368+
return {"sp_playlist_name": playlist.get("name", ""), "sp_playlist_owner": owner_data.get("name", "") or owner_data.get("username", ""), "sp_playlist_owner_uri": owner_uri, "sp_playlist_owner_url": spotify_get_web_entity_url(owner_data, owner_uri), "sp_playlist_url": spotify_get_web_entity_url(playlist, playlist_uri), "sp_playlist_image_url": playlist_image_url}
43694369

43704370

43714371
# Returns normalized public playlist metadata through Spotify's web-player service
@@ -4439,7 +4439,7 @@ def spotify_get_playlist_owner_and_image(access_token, playlist_uri, oauth_app=F
44394439

44404440
try:
44414441
info_web = spotify_get_playlist_info_web(playlist_uri)
4442-
playlist_image_url = info_web["sp_playlist_url"]
4442+
playlist_image_url = info_web["sp_playlist_image_url"]
44434443
debug_print(f"Playlist Image URL: {playlist_image_url}")
44444444
return info_web["sp_playlist_owner"], playlist_image_url
44454445
except Exception as web_error:

tests/test_webhook_notifications.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def test_notification_channels_are_independent(monkeypatch):
193193
email.reset_mock()
194194
assert monitor.send_notification_channels("song", "Title", "Body", email_enabled=False, webhook_enabled=True) == (False, True)
195195
email.assert_not_called()
196-
webhook.assert_called_once_with("Title", "Body", "song", force=True)
196+
webhook.assert_called_once_with("Title", "Body", "song", force=True, image_url='')
197197

198198

199199
# Verifies the recommended wizard preset stores the URL privately without contacting it

0 commit comments

Comments
 (0)