Ticket #12061: 0001-Music-Mini-Player-does-not-need-to-reposition-on-re-.patch

File 0001-Music-Mini-Player-does-not-need-to-reposition-on-re-.patch, 1.9 KB (added by angela.schmid@…, 6 years ago)
  • mythplugins/mythmusic/mythmusic/musiccommon.cpp

    From 44650dbfcdec9f3f5ddc5d9b982a0f1d82f023af Mon Sep 17 00:00:00 2001
    From: angelaschmid <angela.schmid@wolke7.net>
    Date: Sun, 16 Feb 2014 14:36:43 +0100
    Subject: [PATCH] Music Mini Player does not need to reposition on re-play.
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Music Mini Player restarts playback on an old saved position
    MusicPlayer saves positions only on a complete stop in the music dialogs or upon destroy.
    When in the music dialog exit is pressed with further play option, the MusicPlayer does not save its position.
    When the MiniPlayer dialog is opened, the player stopped and the MiniPlayer dialog is closed, then when the MiniPlayer dialog is opened again MusicCommon::CreateCommon is called and !gPlayer->isPlaying() is true, an old saved position is restored.
    !gPlayer->isPlaying() is normally used to start playback on entry of the music dialogs.
    With the “further play option” there exists a MusicPlayer instance and holds during all times a valid position, therefor when opening the MiniPlayer dialog (see MusicCommon::CreateCommon) does not have to reposition.
     mythplugins/mythmusic/mythmusic/musiccommon.cpp |    2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
     mode change 100644 => 100755 mythplugins/mythmusic/mythmusic/musiccommon.cpp
    diff --git a/mythplugins/mythmusic/mythmusic/musiccommon.cpp b/mythplugins/mythmusic/mythmusic/musiccommon.cpp
    old mode 100644
    new mode 100755
    index 2292d39..6a26e56
    a b bool MusicCommon::CreateCommon(void) 
    168168    gPlayer->addListener(this);
    170     if (!gPlayer->isPlaying())
     170    if (m_currentView != MV_MINIPLAYER && !gPlayer->isPlaying())
    171171    {
    172172        bool isRadioView = (m_currentView == MV_RADIO);
    173173        if (isRadioView)