core/MPRIS: change track id to String

For some reason, the track id was a QDbusObjectPath, but somehow that
caused issues, so I'm breaking the spec and simply changing it to a
string. Now SailfishOS does display the MPRIS controls on the
lockscreen.
This commit is contained in:
Chris Josten 2024-01-02 20:09:23 +01:00
parent a66434afa8
commit 3c02985990
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ QVariantMap PlayerAdaptor::metadata() const
QSharedPointer<Model::Item> item = plybkMgr->dataItem();
if (!item.isNull()) {
map[QStringLiteral("mpris:trackid")] = QVariant::fromValue<QDBusObjectPath>(QDBusObjectPath(QStringLiteral("/nl/netsoj/chris/jellyfinqt/item/").append(item->jellyfinId())));
map[QStringLiteral("mpris:trackid")] = QVariant::fromValue<QString>(QStringLiteral("/nl/netsoj/chris/jellyfinqt/item/").append(item->jellyfinId()));
if (item->runTimeTicks().has_value()) {
map[QStringLiteral("mpris:length")] = item->runTimeTicks().value() / 10;
}