mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
l4l: force update of output files if ...
lcd4linux is not running and display is changed in automatic mode
Origin commit data
------------------
Branch: ni/coolstream
Commit: 03281f959c
Author: GetAway <get-away@t-online.de>
Date: 2019-01-20 (Sun, 20 Jan 2019)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -251,6 +251,8 @@ void CLCD4l::Init()
|
|||||||
|
|
||||||
if (!access(LCD_DATADIR, F_OK) == 0)
|
if (!access(LCD_DATADIR, F_OK) == 0)
|
||||||
mkdir(LCD_DATADIR, 0755);
|
mkdir(LCD_DATADIR, 0755);
|
||||||
|
|
||||||
|
wait4lcd = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void* CLCD4l::LCD4lProc(void* arg)
|
void* CLCD4l::LCD4lProc(void* arg)
|
||||||
@@ -275,9 +277,13 @@ void* CLCD4l::LCD4lProc(void* arg)
|
|||||||
{
|
{
|
||||||
if (g_settings.lcd4l_support == 1) // automatic
|
if (g_settings.lcd4l_support == 1) // automatic
|
||||||
{
|
{
|
||||||
//printf("[CLCD4l] %s: waiting for lcd4linux\n", __FUNCTION__);
|
if (PLCD4l->GetWaitStatus()) {
|
||||||
sleep(10);
|
//printf("[CLCD4l] %s: waiting for lcd4linux\n", __FUNCTION__);
|
||||||
continue;
|
sleep(10);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
PLCD4l->SetWaitStatus(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -52,6 +52,7 @@ class CLCD4l
|
|||||||
void StartLCD4l();
|
void StartLCD4l();
|
||||||
void StopLCD4l();
|
void StopLCD4l();
|
||||||
void SwitchLCD4l();
|
void SwitchLCD4l();
|
||||||
|
void ForceRun() { wait4lcd = false; }
|
||||||
|
|
||||||
int CreateFile(const char *file, std::string content = "", bool convert = false);
|
int CreateFile(const char *file, std::string content = "", bool convert = false);
|
||||||
int RemoveFile(const char *file);
|
int RemoveFile(const char *file);
|
||||||
@@ -65,6 +66,7 @@ class CLCD4l
|
|||||||
static void* LCD4lProc(void *arg);
|
static void* LCD4lProc(void *arg);
|
||||||
|
|
||||||
struct tm *tm_struct;
|
struct tm *tm_struct;
|
||||||
|
bool wait4lcd;
|
||||||
|
|
||||||
// Functions
|
// Functions
|
||||||
void Init();
|
void Init();
|
||||||
@@ -78,6 +80,9 @@ class CLCD4l
|
|||||||
void strReplace(std::string &orig, const std::string &fstr, const std::string &rstr);
|
void strReplace(std::string &orig, const std::string &fstr, const std::string &rstr);
|
||||||
bool WriteFile(const char *file, std::string content = "", bool convert = false);
|
bool WriteFile(const char *file, std::string content = "", bool convert = false);
|
||||||
|
|
||||||
|
void SetWaitStatus(bool wait) { wait4lcd = wait; }
|
||||||
|
bool GetWaitStatus() { return wait4lcd; }
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
uint64_t m_ParseID;
|
uint64_t m_ParseID;
|
||||||
int m_Mode;
|
int m_Mode;
|
||||||
|
@@ -250,6 +250,9 @@ int CLCD4lSetup::show()
|
|||||||
if (initlcd4l)
|
if (initlcd4l)
|
||||||
LCD4l->InitLCD4l();
|
LCD4l->InitLCD4l();
|
||||||
|
|
||||||
|
if (g_settings.lcd4l_support == 1 ) // automatic
|
||||||
|
LCD4l->ForceRun();
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user