mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
- yweb: remove delivery_system from boxtype tank
and avoid duplicate code
This commit is contained in:
@@ -600,55 +600,13 @@ void CControlAPI::InfoCGI(CyhookHandler *hh)
|
||||
|
||||
void CControlAPI::HWInfoCGI(CyhookHandler *hh)
|
||||
{
|
||||
unsigned int system_rev = cs_get_revision();
|
||||
std::string boxname = "CST ";
|
||||
std::string boxname = NeutrinoAPI->NeutrinoYParser->func_get_boxtype(hh, "");
|
||||
|
||||
static CNetAdapter netadapter;
|
||||
std::string eth_id = netadapter.getMacAddr();
|
||||
std::transform(eth_id.begin(), eth_id.end(), eth_id.begin(), ::tolower);
|
||||
|
||||
#if HAVE_TRIPLEDRAGON
|
||||
boxname = "Armas ";
|
||||
#endif
|
||||
|
||||
switch(system_rev)
|
||||
{
|
||||
case 1:
|
||||
if( boxname == "Armas ")
|
||||
boxname += "TripleDragon";
|
||||
break;
|
||||
case 6:
|
||||
boxname += "HD1";
|
||||
break;
|
||||
case 7:
|
||||
boxname += "BSE";
|
||||
break;
|
||||
case 8:
|
||||
boxname += "Neo";
|
||||
if (CFEManager::getInstance()->getFrontendCount() > 1)
|
||||
boxname += " Twin";
|
||||
break;
|
||||
case 9:
|
||||
boxname += "Tank";
|
||||
break;
|
||||
case 10:
|
||||
boxname += "Zee";
|
||||
break;
|
||||
case 11:
|
||||
boxname += "Trinity";
|
||||
break;
|
||||
|
||||
default:
|
||||
char buffer[10];
|
||||
snprintf(buffer, sizeof(buffer), "%u\n", system_rev);
|
||||
boxname += "Unknown nr. ";
|
||||
boxname += buffer;
|
||||
break;
|
||||
}
|
||||
|
||||
boxname += (g_info.delivery_system == DVB_S || (system_rev == 1)) ? " SAT":" CABLE";
|
||||
hh->printf("%s\nMAC:%s\n", boxname.c_str(),eth_id.c_str());
|
||||
|
||||
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void CControlAPI::ShutdownCGI(CyhookHandler *hh)
|
||||
|
@@ -729,7 +729,8 @@ std::string CNeutrinoYParser::func_get_boxtype(CyhookHandler *, std::string)
|
||||
break;
|
||||
}
|
||||
|
||||
boxname += (g_info.delivery_system == DVB_S || (system_rev == 1)) ? " SAT":" CABLE";
|
||||
if (system_rev != 9) // don't add delivery_system for Tank
|
||||
boxname += (g_info.delivery_system == DVB_S || (system_rev == 1)) ? " SAT":" CABLE";
|
||||
return boxname;
|
||||
}
|
||||
//-------------------------------------------------------------------------
|
||||
|
@@ -43,7 +43,6 @@ private:
|
||||
std::string func_get_audio_pids_as_dropdown(CyhookHandler *hh, std::string para);
|
||||
std::string func_unmount_get_list(CyhookHandler *hh, std::string para);
|
||||
std::string func_get_partition_list(CyhookHandler *hh, std::string para);
|
||||
std::string func_get_boxtype(CyhookHandler *hh, std::string para);
|
||||
std::string func_get_current_stream_info(CyhookHandler *hh, std::string para);
|
||||
std::string func_get_timer_list(CyhookHandler *hh, std::string para);
|
||||
std::string func_set_timer_form(CyhookHandler *hh, std::string para);
|
||||
@@ -65,6 +64,9 @@ public:
|
||||
virtual std::string getHookVersion(void) {return std::string("$Revision$");}
|
||||
virtual THandleStatus Hook_SendResponse(CyhookHandler *hh);
|
||||
virtual THandleStatus Hook_ReadConfig(CConfigFile *Config, CStringList &ConfigList);
|
||||
|
||||
// func TUXBOX
|
||||
std::string func_get_boxtype(CyhookHandler *hh, std::string para);
|
||||
};
|
||||
|
||||
#endif /*__nhttpd_neutrinoyparser_h__*/
|
||||
|
@@ -508,13 +508,12 @@ start-block~remote
|
||||
{=if-equal:{=var-get:boxtype=}~CST Zee CABLE~ {=include-block:Y_Blocks.txt;rc_cst_v3=}~
|
||||
{=if-equal:{=var-get:boxtype=}~CST Neo Twin SAT~ {=include-block:Y_Blocks.txt;rc_cst_v4=}~
|
||||
{=if-equal:{=var-get:boxtype=}~CST Neo Twin CABLE~ {=include-block:Y_Blocks.txt;rc_cst_v4=}~
|
||||
{=if-equal:{=var-get:boxtype=}~CST Tank SAT~ {=include-block:Y_Blocks.txt;rc_cst_v5=}~
|
||||
{=if-equal:{=var-get:boxtype=}~CST Tank CABLE~ {=include-block:Y_Blocks.txt;rc_cst_v5=}~
|
||||
{=if-equal:{=var-get:boxtype=}~CST Tank~ {=include-block:Y_Blocks.txt;rc_cst_v5=}~
|
||||
{=if-equal:{=var-get:boxtype=}~CST Trinity SAT~ {=include-block:Y_Blocks.txt;rc_cst_v6=}~
|
||||
{=if-equal:{=var-get:boxtype=}~CST Trinity CABLE~ {=include-block:Y_Blocks.txt;rc_cst_v6=}~
|
||||
|
||||
{=comment:fallback~=} {=include-block:Y_Blocks.txt;rc_cst_v1=}
|
||||
=}=}=}=}=}=}=}=}=}=}
|
||||
=}=}=}=}=}=}=}=}=}
|
||||
=}=}
|
||||
~
|
||||
{=if-equal:{=var-get:yfbtype=}~-2~ {=include-block:Y_Blocks.txt;rc_dbox_philips=}~
|
||||
|
Reference in New Issue
Block a user