Skip to content

Commit

Permalink
added: boolean info labels 'Library.IsScanningVideo' and 'Library.IsS…
Browse files Browse the repository at this point in the history
…canningMusic'
  • Loading branch information
mkortstiege committed Jul 26, 2011
1 parent 86898b3 commit 96881a3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions xbmc/GUIInfoManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,8 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
else if (strTest.Equals("library.hascontent(tvshows)")) ret = LIBRARY_HAS_TVSHOWS;
else if (strTest.Equals("library.hascontent(musicvideos)")) ret = LIBRARY_HAS_MUSICVIDEOS;
else if (strTest.Equals("library.isscanning")) ret = LIBRARY_IS_SCANNING;
else if (strTest.Equals("library.isscanningvideo")) ret = LIBRARY_IS_SCANNING_VIDEO;
else if (strTest.Equals("library.isscanningmusic")) ret = LIBRARY_IS_SCANNING_MUSIC;
}
else if (strTest.Left(8).Equals("isempty("))
{
Expand Down Expand Up @@ -1762,6 +1764,16 @@ bool CGUIInfoManager::GetBool(int condition1, int contextWindow, const CGUIListI
else
bReturn = false;
}
else if (condition == LIBRARY_IS_SCANNING_VIDEO)
{
CGUIDialogVideoScan *videoScanner = (CGUIDialogVideoScan *)g_windowManager.GetWindow(WINDOW_DIALOG_VIDEO_SCAN);
bReturn = (videoScanner && videoScanner->IsScanning());
}
else if (condition == LIBRARY_IS_SCANNING_MUSIC)
{
CGUIDialogMusicScan *musicScanner = (CGUIDialogMusicScan *)g_windowManager.GetWindow(WINDOW_DIALOG_MUSIC_SCAN);
bReturn = (musicScanner && musicScanner->IsScanning());
}
else if (condition == SYSTEM_PLATFORM_LINUX)
#if defined(_LINUX) && !defined(__APPLE__)
bReturn = true;
Expand Down
2 changes: 2 additions & 0 deletions xbmc/GUIInfoManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,8 @@ class CDateTime;
#define LIBRARY_HAS_TVSHOWS 723
#define LIBRARY_HAS_MUSICVIDEOS 724
#define LIBRARY_IS_SCANNING 725
#define LIBRARY_IS_SCANNING_VIDEO 726
#define LIBRARY_IS_SCANNING_MUSIC 727

#define SYSTEM_PLATFORM_XBOX 740
#define SYSTEM_PLATFORM_LINUX 741
Expand Down

0 comments on commit 96881a3

Please sign in to comment.