Changeset View
Changeset View
Standalone View
Standalone View
src/manageaudioplayer.cpp
Show First 20 Lines • Show All 318 Lines • ▼ Show 20 Line(s) | 314 | if (mPlayerError != QMediaPlayer::NoError) { | |||
---|---|---|---|---|---|
319 | if (currentSource.isLocalFile()) { | 319 | if (currentSource.isLocalFile()) { | ||
320 | Q_EMIT displayTrackError(currentSource.toLocalFile()); | 320 | Q_EMIT displayTrackError(currentSource.toLocalFile()); | ||
321 | } else { | 321 | } else { | ||
322 | Q_EMIT displayTrackError(currentSource.toString()); | 322 | Q_EMIT displayTrackError(currentSource.toString()); | ||
323 | } | 323 | } | ||
324 | } | 324 | } | ||
325 | } | 325 | } | ||
326 | 326 | | |||
327 | void ManageAudioPlayer::ensurePause() | ||||
328 | { | ||||
329 | if (mPlayingState) { | ||||
330 | mPlayingState = false; | ||||
broulik: MPris Pause should just Pause not PlayPause | |||||
It will only trigger pause and change the mPlayingState variable, if it is playing. This way, it should have the correct behavior with respect to the mpris2 interface. mgallien: It will only trigger pause and change the mPlayingState variable, if it is playing.
This way… | |||||
331 | triggerPause(); | ||||
332 | } | ||||
333 | } | ||||
334 | | ||||
327 | void ManageAudioPlayer::ensurePlay() | 335 | void ManageAudioPlayer::ensurePlay() | ||
328 | { | 336 | { | ||
329 | if (!mPlayingState) { | 337 | if (!mPlayingState) { | ||
330 | playPause(); | 338 | mPlayingState = true; | ||
339 | triggerPlay(); | ||||
331 | } | 340 | } | ||
332 | } | 341 | } | ||
333 | 342 | | |||
334 | void ManageAudioPlayer::playPause() | 343 | void ManageAudioPlayer::playPause() | ||
335 | { | 344 | { | ||
336 | mPlayingState = !mPlayingState; | 345 | mPlayingState = !mPlayingState; | ||
337 | 346 | | |||
338 | switch (mPlayerStatus) { | 347 | switch (mPlayerStatus) { | ||
▲ Show 20 Lines • Show All 230 Lines • Show Last 20 Lines |
MPris Pause should just Pause not PlayPause