Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Elisa
Commits
b7e2590f
Commit
b7e2590f
authored
Nov 25, 2020
by
Sophie Kums
Committed by
Nate Graham
Nov 29, 2020
Browse files
call Q_EMIT Seeked less frequently to reduce MPRIS spamming
CCBUG: 428957
parent
5a542521
Pipeline
#42525
passed with stage
in 24 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/mpris2/mediaplayer2player.cpp
View file @
b7e2590f
...
...
@@ -208,14 +208,14 @@ void MediaPlayer2Player::setPropertyPosition(int newPositionInMs)
{
m_position
=
qlonglong
(
newPositionInMs
)
*
1000
;
Q_EMIT
Seeked
(
m_position
);
/* only sent new progress when it has advanced more than 1 %
* to limit DBus traffic
*/
const
auto
incrementalProgress
=
static_cast
<
double
>
(
newPositionInMs
-
mPreviousProgressPosition
)
/
m_audioPlayer
->
duration
();
if
(
mShowProgressOnTaskBar
&&
(
incrementalProgress
>
0.01
||
incrementalProgress
<
0
))
{
Q_EMIT
Seeked
(
m_position
);
mPreviousProgressPosition
=
newPositionInMs
;
QVariantMap
parameters
;
parameters
.
insert
(
QStringLiteral
(
"progress-visible"
),
true
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment