Update
This commit is contained in:
@@ -16,7 +16,7 @@ def get_current_song():
|
||||
)
|
||||
|
||||
data = result.json()
|
||||
radio_tracks = data["data"]["radio_track_plays"]["data"][0]["radio_tracks"]
|
||||
radio_tracks = data["data"]["radioTrackPlays"]["data"][0]["radioTracks"]
|
||||
track = RadioTrack(radio_tracks)
|
||||
return track
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class SongNotification(UserNotification):
|
||||
|
||||
url = NSURL.URLWithString_(f"file://{song.cover_path}")
|
||||
err = None
|
||||
atachement = (
|
||||
attachment = (
|
||||
UNNotificationAttachment.attachmentWithIdentifier_URL_options_error_(
|
||||
"",
|
||||
url,
|
||||
@@ -68,7 +68,7 @@ class SongNotification(UserNotification):
|
||||
|
||||
if err:
|
||||
print(err)
|
||||
atachement = None
|
||||
attachment = None
|
||||
|
||||
if top2000:
|
||||
title = f"{top2000.position}: {song.title}"
|
||||
@@ -78,5 +78,5 @@ class SongNotification(UserNotification):
|
||||
self.create_notification(
|
||||
title,
|
||||
song.artist,
|
||||
attachments=[atachement],
|
||||
attachments=[attachment],
|
||||
)
|
||||
|
||||
@@ -14,7 +14,7 @@ class RadioTrack:
|
||||
|
||||
self.artist = data["artist"]
|
||||
self.title = data["name"]
|
||||
self.cover = data["cover_url"]
|
||||
self.cover = data["coverUrl"]
|
||||
self.cover_path: Optional[str] = None
|
||||
|
||||
def save_image(self):
|
||||
|
||||
Reference in New Issue
Block a user