This automatizes the generation of logging categories so a
kdeconnect-kde.categories is generated and installed to
/usr/share/qlogging-categories5/ so kdebugsettings can use it.
Also, sets the default logging level to Warning. So now the logs
of users won't be filled with debug messages but they can
modify the configuration easily with kdebugsettings.
playerctld (https://github.com/altdesktop/playerctl/issues/161) is a proxy daemon for the currently active player by playerctl, which facilitates managing mpris players, forwarding requests to the currently active/last active player, and sorting out troubles with selecting the correct player manually.
Unfortunately, it also creates an annoying issue with kdeconnect: when playing media on the phone, kdeconnect publishes the state to the computer through the mprisremote plugin - then, playerctld picks it up as active player, and registers its own mpris media player. As a result, the mpriscontrol plugin sees this as a running media player, and in turn, publishes the state back to the phone, essentially creating another media session on the phone, resulting in two notifications. As playerctld is _always_ only a proxy to another media player (or kdeconnect), it can safely be ignored, just like kdeconnect itself already is. This commit adds an if check doing exactly that.
Summary:
The current behavior in plasma-workspace's mediacontroller is to get the
title and the album info from the URL contained in the MPRIS metadata,
if it is dealing with a local file and missing title and artist. This
commit aligns the behavior to the one mediacontroller has.
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella, kdeconnect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D26097
Summary: Added primitive support for the mpriscontrol plugin on Windows by simulating VK_MEDIA key presses. I took a look into `ISystemMediaTransportControls`, but there doesn't seem to query it since it's per app. Leaving simulating key presses our only option for now. Completes T10000
Reviewers: kdeconnect, #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka
Tags: #kde_connect, #windows
Maniphest Tasks: T10000
Differential Revision: https://phabricator.kde.org/D17702
Summary: If the android code sees a file url, and album art is needed, it will start a request to transfer the album art. This code does some sanity checks to prevent abuse and then transfers the album art.
Test Plan: Art is transferred succesfully.
Reviewers: #kde_connect, nicolasfella, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: nicolasfella, albertvaka
Differential Revision: https://phabricator.kde.org/D11017
Summary:
Not sure what operator+ overload has been used exactly for the int,
in any case it does not work as intended and needs e.g. an explicit
QString::number() invocation.
Also start with number 2 for duplicated instances.
Test Plan:
Start multiple instances of an MPRIS player (e.g. Gwenview). Before the
second instance would get labelled with "Name []", with this patch it is
labelled with "Name [2]".
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: mtijink, nicolasfella
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D11411
Summary:
Had slipped in from conversion of metadata in desktop file format,
but are of no use in the JSON variant.
Test Plan: Plugins load and work as before
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Differential Revision: https://phabricator.kde.org/D11417
Summary:
If MPRIS players were appearing and disappearing multiple times, the
OrgFreedesktopDBusPropertiesInterface & OrgMprisMediaPlayer2PlayerInterface
instances created for listening to the signals had been accumulating and
thus resulting in X signals per X restarted player, because the instances
were not deleted when a player disappeared.
Additionally were instances of them created on the fly on the stack in
some of the methods, instead of reusing the existing ones.
This patch changes that by introducing a class MprisPlayer which holds all
data & instances per player. This allows to look up the respective
interfaces instances to reuse them as well as properly controlling their
lifetime.
Test Plan:
Starting and restarting multiple MPRIS players (incl. multiple instances of
the same player app) works as expected as befire. They are listed on the
Android Media control as well as have proper states there when selected.
Additionally no longer multiple change signals are emitted if restarting a
player.
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: mtijink
Differential Revision: https://phabricator.kde.org/D11389
Summary: KDE Connect, now with correct naming!
Test Plan: It still builds.
Reviewers: #kde_connect, apol, nicolasfella
Reviewed By: #kde_connect, apol, nicolasfella
Subscribers: nicolasfella
Differential Revision: https://phabricator.kde.org/D11036
Summary: Sends the album art url, so that the android app can display the album art (by fetching it from the internet). Transferring local album art is not supported yet, but can be added in a future diff.
Test Plan: Works for me in players with/without album art and with/without local file album art.
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Differential Revision: https://phabricator.kde.org/D9563
Summary: This diff adds the title, artist and album to the MPRIS network packets. That's useful when you need more detail than just "artist - title", for example in the future media control notification. It also fixes weird song descriptions for empty artist strings (e.g. Spotify uses an empty (but present) artist when playing ads)
Reviewers: #kde_connect, apol
Reviewed By: #kde_connect, apol
Subscribers: nicolasfella, apol
Differential Revision: https://phabricator.kde.org/D8957
Summary:
Change all member variables to the form m_fooBar because it is the preferred form in Qt (it was half and half between this and mFooBar, and a minority didn't have anything).
Place all references and pointers on the side of the type since it is the majority.
Basically:
- mFoo -> m_foo
- foo -> m_foo (if it is a member variable)
- Type &ref -> Type& ref
- Type *ptr -> Type* ptr
Reviewers: #kde_connect, nicolasfella, albertvaka
Reviewed By: #kde_connect, nicolasfella, albertvaka
Subscribers: albertvaka, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D7312
Summary:
Add a number in brackets to distinguish different players with the same display name so that they can all be controlled.
See this task: https://phabricator.kde.org/T6500
Reviewers: #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D7017
Summary:
The use of Q_FOREACH is advised against (https://doc.qt.io/qt-5/qtglobal.html#Q_FOREACH) since Qt 5.7 and will eventually be removed from Qt.
I replaced all occurrences with the range-for loop introduced in C++11 (except for the one in daemon.cpp in deviceIdByName which might have a bug / typo in it).
I added const to the container or casted it with qAsConst when appropriate to avoid unnecessary copies.
(This is my first submission. I did all the unit tests, and they all passed but I don't know how to show it here.)
Reviewers: #kde_connect, nicolasfella, apol
Reviewed By: #kde_connect, nicolasfella, apol
Subscribers: albertvaka, apol, nicolasfella
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D6724
Summary:
Don't use QDBusConnection::ExportAllContents
No need to make connect and receivedPackage public slots (they're are the
parent's already)
Fixes T4975
Test Plan: Rough manual test
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Maniphest Tasks: T4975
Differential Revision: https://phabricator.kde.org/D3871
This was very poorly implemented and can't stay as it is right now:
- Every second or so the art image was being loaded from disk, scaled,
base64 encoded and sent over the freakin network!
- The Android interface didn't take into account small screens, and
adding the image would cut stuff out of the screen.
- Didn't manage "edge cases" like playing a song without cover after one
with cover (previous image was still being shown) or changing players.
This reverts commit e66096d05a.
# Conflicts:
# plugins/mpriscontrol/mpriscontrolplugin.cpp
Makes it possible to specify the different properties sent at once,
rather than one by one as we used to do.
Also port whenever possible to the initializer-list syntax.
REVIEW: 128269
Right now we only support album art if the player provides a local URL,
but some players provide a remote URL (spotify) I'll be adding support
for that in a later patch.
REVIEW: 128199
The previous used QDbusServiceWatcher doesn't work as it does only watch out
for specific services, but the players use different, unpredictable names, so
we need to check all service registrations for mpris players.
BUG: 361367
REVIEW: 127611
media player services are not registered as org.mpris.MediaPlayer2 just
use a service name that starts with that. We need to watch all services
and then filter.
BUG: 352529
Reviewed-by: Albert Vaca