Fixed bugs when Artist or Album not supplied for song
This commit is contained in:
@@ -761,9 +761,14 @@ class LibremsonicApp(Gtk.Application):
|
||||
self.window.present()
|
||||
|
||||
try:
|
||||
notification_lines = []
|
||||
if song.album:
|
||||
notification_lines.append(f'<i>{song.album}</i>')
|
||||
if song.artist:
|
||||
notification_lines.append(song.artist)
|
||||
song_notification = Notify.Notification.new(
|
||||
song.title,
|
||||
f'<i>{song.album}</i>\n{song.artist}',
|
||||
'\n'.join(notification_lines),
|
||||
)
|
||||
song_notification.add_action(
|
||||
'clicked',
|
||||
|
@@ -265,9 +265,9 @@ class DBusManager:
|
||||
'mpris:trackid': '/song/' + song.id,
|
||||
'mpris:length': duration,
|
||||
'mpris:artUrl': CacheManager.get_cover_art_url(song.id, 1000),
|
||||
'xesam:album': song.album,
|
||||
'xesam:albumArtist': [song.artist],
|
||||
'xesam:artist': [song.artist],
|
||||
'xesam:album': song.album or '',
|
||||
'xesam:albumArtist': [song.artist or ''],
|
||||
'xesam:artist': [song.artist or ''],
|
||||
'xesam:title': song.title,
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user