Skip to content

Commit

Permalink
Add album info to notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
rcalixte committed Sep 27, 2022
1 parent bf02269 commit a269be5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pithos/plugins/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ def send_notification(self, window, *ignore):
self._app.withdraw_notification(self._app_id)
else:
song = window.current_song
album = '\n' + song.album if song.album else ''
# This matches GNOME-Shell's format
notification = Gio.Notification.new(song.artist)
# GNOME focuses the application by default, we want to match that behavior elsewhere such as on KDE.
notification.set_default_action('app.activate')
notification.set_body(song.title)
notification.set_body(song.title + album)

if song.artUrl:
icon = Gio.FileIcon.new(Gio.File.new_for_uri(song.artUrl))
Expand Down

0 comments on commit a269be5

Please sign in to comment.