infoviewer_bb: don't start HDD percent thread once per second

Only start the HDD percent determination once per infobar display


Origin commit data
------------------
Branch: ni/coolstream
Commit: 19c754b5b9
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-02-17 (Sun, 17 Feb 2013)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2013-02-17 18:06:29 +01:00
parent 42cb91e883
commit fbd8630e41

View File

@@ -114,6 +114,13 @@ void CInfoViewerBB::Init()
tmp_bbButtonInfoText[i] = "";
}
// get HDD info in a separate thread
if (g_settings.infobar_show_sysfs_hdd && !hddperTflag) {
hddperTflag=true;
pthread_create(&hddperT, NULL, hddperThread, (void*) this);
pthread_detach(hddperT);
}
InfoHeightY_Info = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() + 5;
setBBOffset();
@@ -602,13 +609,6 @@ void CInfoViewerBB::showSysfsHdd()
percent = (u * 100ULL) / t;
showBarSys(percent);
//HDD info in a seperate thread
if(!hddperTflag) {
hddperTflag=true;
pthread_create(&hddperT, NULL, hddperThread, (void*) this);
pthread_detach(hddperT);
}
if (check_dir(g_settings.network_nfs_recordingdir) == 0)
showBarHdd(hddpercent);
else