Browse Source

Add unknown check for mpris track id (#251)

master
jeffvli 2 years ago
parent
commit
645c2eb5b7
  1. 1
      CHANGELOG.md
  2. 2
      src/main.dev.js

1
CHANGELOG.md

@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed certain UI elements from being drag selectable (#350) (Thanks @GermanDarknes)
- Fixed application occasionally being invisible due to invalid persisted window settings (#278)
- Fixed spanish translation (#333) (Thanks @ami-sc)
- Fixed MPRIS Javascript error due to missing song id on Linux (#251)
[0.15.2] - 2022-06-02

2
src/main.dev.js

@ -251,7 +251,7 @@ if (isLinux()) {
}
mprisPlayer.metadata = {
'mpris:trackid': mprisPlayer.objectPath(`track/${arg.id?.replace('-', '')}`),
'mpris:trackid': arg?.id ? mprisPlayer.objectPath(`track/${arg.id?.replace('-', '')}`) : '',
'mpris:length': arg.duration ? Math.round((arg.duration || 0) * 1e6) : null,
'mpris:artUrl': arg.image.includes('placeholder') ? null : arg.image,
'xesam:title': arg.title || null,

Loading…
Cancel
Save