- lcd4l: fix moviebrowser handling ...

* use Movieplayer/Moviebrowser logos
* remove RemoveEventFile()
* rename NewParseID => new_ParseID

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2022-09-13 22:48:35 +02:00
committed by Thilo Graf
parent c5125aee61
commit 01c0e1086e
2 changed files with 13 additions and 15 deletions

View File

@@ -244,11 +244,6 @@ int CLCD4l::CreateEventFile(std::string content, bool convert)
return CreateFile(EVENT, content, convert); return CreateFile(EVENT, content, convert);
} }
int CLCD4l::RemoveEventFile()
{
return RemoveFile(EVENT);
}
int CLCD4l::CreateMenuFile(std::string content, bool convert) int CLCD4l::CreateMenuFile(std::string content, bool convert)
{ {
return CreateFile(MENU, content, convert); return CreateFile(MENU, content, convert);
@@ -347,7 +342,7 @@ void *CLCD4l::LCD4lProc(void *arg)
static bool FirstRun = true; static bool FirstRun = true;
uint64_t p_ParseID = 0; uint64_t p_ParseID = 0;
bool NewParseID = false; bool new_ParseID = false;
//printf("[CLCD4l] %s: starting loop\n", __FUNCTION__); //printf("[CLCD4l] %s: starting loop\n", __FUNCTION__);
while (!PLCD4l->exit_proc) while (!PLCD4l->exit_proc)
@@ -370,13 +365,13 @@ void *CLCD4l::LCD4lProc(void *arg)
for (int i = 0; i < 10; i++) for (int i = 0; i < 10; i++)
{ {
usleep(5 * 100 * 1000); // 0.5 sec usleep(5 * 100 * 1000); // 0.5 sec
NewParseID = PLCD4l->CompareParseID(p_ParseID); new_ParseID = PLCD4l->CompareParseID(p_ParseID);
if (NewParseID || p_ParseID == NeutrinoModes::mode_audio) if (new_ParseID || p_ParseID == NeutrinoModes::mode_audio || p_ParseID == NeutrinoModes::mode_moviebrowser)
break; break;
} }
//printf("[CLCD4l] %s: m_ParseID: %llx (NewParseID: %d)\n", __FUNCTION__, p_ParseID, NewParseID ? 1 : 0); //printf("[CLCD4l] %s: m_ParseID: %llx (new_ParseID: %d)\n", __FUNCTION__, p_ParseID, new_ParseID ? 1 : 0);
PLCD4l->ParseInfo(p_ParseID, NewParseID, FirstRun); PLCD4l->ParseInfo(p_ParseID, new_ParseID, FirstRun);
if (FirstRun) if (FirstRun)
{ {
@@ -793,7 +788,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
} }
else if (parseID == NeutrinoModes::mode_moviebrowser) else if (parseID == NeutrinoModes::mode_moviebrowser)
{ {
Logo = ICONSDIR "/" NEUTRINO_ICON_MOVIEPLAYER ICONSEXT; g_PicViewer->GetLogoName(0, "Moviebrowser", Logo, &dummy, &dummy, CPictureViewer::LCD4LINUX, true);
Service = g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD); Service = g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD);
} }
else if (parseID == NeutrinoModes::mode_ts) else if (parseID == NeutrinoModes::mode_ts)
@@ -831,8 +826,8 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
else /* show play-icon */ else /* show play-icon */
Logo = ICONSDIR "/" NEUTRINO_ICON_PLAY ICONSEXT; Logo = ICONSDIR "/" NEUTRINO_ICON_PLAY ICONSEXT;
break; break;
default: /* show movieplayer-icon */ default: /* show movieplayer-logo */
Logo = ICONSDIR "/" NEUTRINO_ICON_MOVIEPLAYER ICONSEXT; g_PicViewer->GetLogoName(0, "Movieplayer", Logo, &dummy, &dummy, CPictureViewer::LCD4LINUX, true);
} }
} }
else if (parseID == NeutrinoModes::mode_upnp) else if (parseID == NeutrinoModes::mode_upnp)
@@ -971,6 +966,8 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
char Start[6] = {0}; char Start[6] = {0};
char End[6] = {0}; char End[6] = {0};
bool writeEvent = true;
if (m_ModeChannel) if (m_ModeChannel)
{ {
if (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webtv || CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webradio) if (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webtv || CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webradio)
@@ -1094,6 +1091,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
else if (parseID == NeutrinoModes::mode_moviebrowser) else if (parseID == NeutrinoModes::mode_moviebrowser)
{ {
// do nothing; Event is processed in moviebrowser // do nothing; Event is processed in moviebrowser
writeEvent = false;
} }
else if (parseID == NeutrinoModes::mode_ts) else if (parseID == NeutrinoModes::mode_ts)
{ {
@@ -1152,6 +1150,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
if (m_Event.compare(Event)) if (m_Event.compare(Event))
{ {
if (writeEvent)
WriteFile(EVENT, Event, g_settings.lcd4l_convert); WriteFile(EVENT, Event, g_settings.lcd4l_convert);
m_Event = Event; m_Event = Event;

View File

@@ -66,7 +66,6 @@ class CLCD4l
int RemoveFile(const char *file); int RemoveFile(const char *file);
int CreateEventFile(std::string content = "", bool convert = false); int CreateEventFile(std::string content = "", bool convert = false);
int RemoveEventFile();
int CreateMenuFile(std::string content = "", bool convert = false); int CreateMenuFile(std::string content = "", bool convert = false);
int RemoveMenuFile(); int RemoveMenuFile();