- rename COVERDIR => COVERDIR_TMP

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2018-09-18 21:18:40 +02:00
committed by Thilo Graf
parent 5db053cbc2
commit 4f911979e0
5 changed files with 27 additions and 12 deletions

View File

@@ -169,7 +169,22 @@ void* CScreenSaver::ScreenSaverPrg(void* arg)
bool CScreenSaver::ReadDir()
{
string d = g_settings.screensaver_dir;
bool show_audiocover = false;
if (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_audio && g_settings.audioplayer_cover_as_screensaver)
{
if (access(COVERDIR_TMP, F_OK) == 0)
{
struct dirent **coverlist;
int n = scandir(COVERDIR_TMP, &coverlist, 0, alphasort);
if (n > 2) // we always have the "." and ".." entrys
show_audiocover = true;
}
}
string d;
if (show_audiocover)
d = COVERDIR_TMP;
if (d.length() > 1)
{
//remove trailing slash