diff --git a/CHANGELOG.md b/CHANGELOG.md index a9b7761..cd3d681 100644 --- a/CHANGELOG.md +++ b/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 diff --git a/src/main.dev.js b/src/main.dev.js index fd4af7b..34e94b2 100644 --- a/src/main.dev.js +++ b/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,