#include "music/tags/MusicInfoTag.h"
#include "guilib/GUIWindowManager.h"
#include "playlists/PlayList.h"
+#include "profiles/ProfilesManager.h"
#include "utils/TuxBoxUtil.h"
#include "windowing/WindowingFactory.h"
#include "powermanagement/PowerManager.h"
{ "alarmpos", SYSTEM_ALARM_POS },
{ "isinhibit", SYSTEM_ISINHIBIT },
{ "hasshutdown", SYSTEM_HAS_SHUTDOWN },
- { "haspvr", SYSTEM_HAS_PVR }};
+ { "haspvr", SYSTEM_HAS_PVR },
+ { "startupwindow", SYSTEM_STARTUP_WINDOW }};
const infomap system_param[] = {{ "hasalarm", SYSTEM_HAS_ALARM },
{ "hascoreid", SYSTEM_HAS_CORE_ID },
{ "season", VIDEOPLAYER_SEASON },
{ "rating", VIDEOPLAYER_RATING },
{ "ratingandvotes", VIDEOPLAYER_RATING_AND_VOTES },
+ { "votes", VIDEOPLAYER_VOTES },
{ "tvshowtitle", VIDEOPLAYER_TVSHOW },
{ "premiered", VIDEOPLAYER_PREMIERED },
{ "studio", VIDEOPLAYER_STUDIO },
{ "size", LISTITEM_SIZE },
{ "rating", LISTITEM_RATING },
{ "ratingandvotes", LISTITEM_RATING_AND_VOTES },
+ { "votes", LISTITEM_VOTES },
{ "programcount", LISTITEM_PROGRAM_COUNT },
{ "duration", LISTITEM_DURATION },
{ "isselected", LISTITEM_ISSELECTED },
case SYSTEM_SCREEN_RESOLUTION:
if(g_Windowing.IsFullScreen())
strLabel.Format("%ix%i@%.2fHz - %s (%02.2f fps)",
- CDisplaySettings::Get().GetResolutionInfo(g_guiSettings.m_LookAndFeelResolution).iScreenWidth,
- CDisplaySettings::Get().GetResolutionInfo(g_guiSettings.m_LookAndFeelResolution).iScreenHeight,
- CDisplaySettings::Get().GetResolutionInfo(g_guiSettings.m_LookAndFeelResolution).fRefreshRate,
+ CDisplaySettings::Get().GetCurrentResolutionInfo().iScreenWidth,
+ CDisplaySettings::Get().GetCurrentResolutionInfo().iScreenHeight,
+ CDisplaySettings::Get().GetCurrentResolutionInfo().fRefreshRate,
g_localizeStrings.Get(244), GetFPS());
else
strLabel.Format("%ix%i - %s (%02.2f fps)",
- CDisplaySettings::Get().GetResolutionInfo(g_guiSettings.m_LookAndFeelResolution).iScreenWidth,
- CDisplaySettings::Get().GetResolutionInfo(g_guiSettings.m_LookAndFeelResolution).iScreenHeight,
+ CDisplaySettings::Get().GetCurrentResolutionInfo().iScreenWidth,
+ CDisplaySettings::Get().GetCurrentResolutionInfo().iScreenHeight,
g_localizeStrings.Get(242), GetFPS());
return strLabel;
break;
case SYSTEM_CURRENT_WINDOW:
return g_localizeStrings.Get(g_windowManager.GetFocusedWindow());
break;
+ case SYSTEM_STARTUP_WINDOW:
+ strLabel.Format("%i", g_guiSettings.GetInt("lookandfeel.startupwindow"));
+ break;
case SYSTEM_CURRENT_CONTROL:
{
CGUIWindow *window = g_windowManager.GetWindow(g_windowManager.GetFocusedWindow());
}
break;
case SYSTEM_PROFILENAME:
- strLabel = g_settings.GetCurrentProfile().getName();
+ strLabel = CProfilesManager::Get().GetCurrentProfile().getName();
break;
case SYSTEM_PROFILECOUNT:
- strLabel.Format("%i", g_settings.GetNumProfiles());
+ strLabel.Format("%i", CProfilesManager::Get().GetNumberOfProfiles());
break;
case SYSTEM_LANGUAGE:
strLabel = g_guiSettings.GetString("locale.language");
return GetMultiInfoBool(m_multiInfo[condition - MULTI_INFO_START], contextWindow, item);
}
else if (condition == SYSTEM_HASLOCKS)
- bReturn = g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE;
+ bReturn = CProfilesManager::Get().GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE;
else if (condition == SYSTEM_HAS_PVR)
bReturn = true;
else if (condition == SYSTEM_ISMASTER)
- bReturn = g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && g_passwordManager.bMasterUser;
+ bReturn = CProfilesManager::Get().GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && g_passwordManager.bMasterUser;
else if (condition == SYSTEM_ISFULLSCREEN)
bReturn = g_Windowing.IsFullScreen();
else if (condition == SYSTEM_ISSTANDALONE)
else if (condition == SYSTEM_SHOW_EXIT_BUTTON)
bReturn = g_advancedSettings.m_showExitButton;
else if (condition == SYSTEM_HAS_LOGINSCREEN)
- bReturn = g_settings.UsingLoginScreen();
+ bReturn = CProfilesManager::Get().UsingLoginScreen();
else if (condition == WEATHER_IS_FETCHED)
bReturn = g_weatherManager.IsFetched();
else if (condition >= PVR_CONDITIONS_START && condition <= PVR_CONDITIONS_END)
if (info.GetData1() == 1)
{ // relative index
if (g_playlistPlayer.GetCurrentPlaylist() != PLAYLIST_MUSIC)
- return false;
+ {
+ bReturn = false;
+ break;
+ }
index += g_playlistPlayer.GetCurrentSong();
}
- if (index >= 0 && index < g_playlistPlayer.GetPlaylist(PLAYLIST_MUSIC).size())
- return true;
- return false;
+ bReturn = (index >= 0 && index < g_playlistPlayer.GetPlaylist(PLAYLIST_MUSIC).size());
}
break;
}
return g_weatherManager.GetInfo(WEATHER_IMAGE_CURRENT_ICON);
else if (info == SYSTEM_PROFILETHUMB)
{
- CStdString thumb = g_settings.GetCurrentProfile().getThumb();
+ CStdString thumb = CProfilesManager::Get().GetCurrentProfile().getThumb();
if (thumb.IsEmpty())
thumb = "unknown-user.png";
return thumb;
return strRatingAndVotes;
}
break;
+ case VIDEOPLAYER_VOTES:
+ return m_currentFile->GetVideoInfoTag()->m_strVotes;
case VIDEOPLAYER_YEAR:
{
CStdString strYear;
}
}
break;
+ case LISTITEM_VOTES:
+ if (item->HasVideoInfoTag())
+ return item->GetVideoInfoTag()->m_strVotes;
+ break;
case LISTITEM_PROGRAM_COUNT:
{
CStdString count;