/*
* Copyright (C) 2013 Team XBMC
- * http://www.xbmc.org
+ * http://xbmc.org
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include "MediaSettings.h"
#include "Application.h"
+#include "PlayListPlayer.h"
#include "Util.h"
#include "dialogs/GUIDialogContextMenu.h"
#include "dialogs/GUIDialogFileBrowser.h"
#include "interfaces/Builtins.h"
#include "music/MusicDatabase.h"
#include "profiles/ProfilesManager.h"
-#include "settings/Setting.h"
+#include "settings/lib/Setting.h"
#include "storage/MediaManager.h"
#include "threads/SingleLock.h"
#include "utils/log.h"
m_defaultVideoSettings.m_SubtitleDelay = 0.0f;
XMLUtils::GetBoolean(pElement, "autocrop", m_defaultVideoSettings.m_Crop);
XMLUtils::GetBoolean(pElement, "nonlinstretch", m_defaultVideoSettings.m_CustomNonLinStretch);
+ if (!XMLUtils::GetInt(pElement, "stereomode", m_defaultVideoSettings.m_StereoMode))
+ m_defaultVideoSettings.m_StereoMode = 0;
m_defaultVideoSettings.m_SubtitleCached = false;
}
return true;
}
+void CMediaSettings::OnSettingsLoaded()
+{
+ g_playlistPlayer.SetRepeat(PLAYLIST_MUSIC, m_musicPlaylistRepeat ? PLAYLIST::REPEAT_ALL : PLAYLIST::REPEAT_NONE);
+ g_playlistPlayer.SetShuffle(PLAYLIST_MUSIC, m_musicPlaylistShuffle);
+ g_playlistPlayer.SetRepeat(PLAYLIST_VIDEO, m_videoPlaylistRepeat ? PLAYLIST::REPEAT_ALL : PLAYLIST::REPEAT_NONE);
+ g_playlistPlayer.SetShuffle(PLAYLIST_VIDEO, m_videoPlaylistShuffle);
+}
+
bool CMediaSettings::Save(TiXmlNode *settings) const
{
if (settings == NULL)
XMLUtils::SetFloat(pNode, "subtitledelay", m_defaultVideoSettings.m_SubtitleDelay);
XMLUtils::SetBoolean(pNode, "autocrop", m_defaultVideoSettings.m_Crop);
XMLUtils::SetBoolean(pNode, "nonlinstretch", m_defaultVideoSettings.m_CustomNonLinStretch);
+ XMLUtils::SetInt(pNode, "stereomode", m_defaultVideoSettings.m_StereoMode);
// mymusic
pNode = settings->FirstChild("mymusic");