Commit 7ea91f5d authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

Do not change current volume level when switching between sources

parent c5c26aa1
......@@ -372,10 +372,14 @@ bool MPDCli::restoreState(const MpdState& st)
random(st.status.random);
single(st.status.single);
consume(st.status.consume);
#if 0
// Do not restore the volume level, we want to keep whatever the user set
m_cachedvolume = st.status.volume;
//no need to set volume if it is controlled external
if (!m_externalvolumecontrol)
mpd_run_set_volume(m_conn, st.status.volume);
#endif
if (st.status.state == MpdStatus::MPDS_PAUSE ||
st.status.state == MpdStatus::MPDS_PLAY) {
......@@ -386,8 +390,6 @@ bool MPDCli::restoreState(const MpdState& st)
seek(st.status.songelapsedms/1000);
if (st.status.state == MpdStatus::MPDS_PAUSE)
pause(true);
if (!m_externalvolumecontrol)
mpd_run_set_volume(m_conn, st.status.volume);
}
openconn();
return true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment