1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2024-12-22 14:05:18 +00:00

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

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;
}