mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 01:41:23 +02:00
infoviewer_bb: don't start HDD percent thread once per second
Only start the HDD percent determination once per infobar display Signed-off-by: Jacek Jendrzej <crashdvb@googlemail.com>
This commit is contained in:
committed by
Jacek Jendrzej
parent
0042ad1e7f
commit
d78bb41e3b
@@ -108,6 +108,13 @@ void CInfoViewerBB::Init()
|
|||||||
tmp_bbButtonInfoText[i] = "";
|
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;
|
InfoHeightY_Info = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() + 5;
|
||||||
setBBOffset();
|
setBBOffset();
|
||||||
|
|
||||||
@@ -614,13 +621,6 @@ void CInfoViewerBB::showSysfsHdd()
|
|||||||
percent = (u * 100ULL) / t;
|
percent = (u * 100ULL) / t;
|
||||||
showBarSys(percent);
|
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)
|
if (check_dir(g_settings.network_nfs_recordingdir) == 0)
|
||||||
showBarHdd(hddpercent);
|
showBarHdd(hddpercent);
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user