mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 18:01:06 +02:00
Merge remote-tracking branch 'check/cst-next'
*needs buildfixing*
Conflicts:
src/daemonc/Makefile.am
src/daemonc/remotecontrol.cpp
src/driver/Makefile.am
src/driver/audiodec/Makefile.am
src/driver/pictureviewer/Makefile.am
src/driver/vfd.cpp
src/gui/bedit/Makefile.am
src/gui/components/Makefile.am
src/gui/luainstance.cpp
src/gui/widget/Makefile.am
src/nhttpd/tuxboxapi/coolstream/Makefile.am
src/system/Makefile.am
Origin commit data
------------------
Branch: ni/coolstream
Commit: b5a64e6887
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2015-01-26 (Mon, 26 Jan 2015)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -73,7 +73,7 @@ CControlAPI::CControlAPI(CNeutrinoAPI *_NeutrinoAPI)
|
||||
//-----------------------------------------------------------------------------
|
||||
void CControlAPI::init(CyhookHandler *hh)
|
||||
{
|
||||
if(PLUGIN_DIRS[0] == "")
|
||||
if(PLUGIN_DIRS[0].empty())
|
||||
{ // given in nhttpd.conf
|
||||
PLUGIN_DIRS[0]=PLUGIN_DIRS[1]=hh->WebserverConfigList["WebsiteMain.override_directory"];
|
||||
PLUGIN_DIRS[1].append("/scripts");
|
||||
@@ -255,10 +255,10 @@ void CControlAPI::Execute(CyhookHandler *hh)
|
||||
}
|
||||
|
||||
// send header
|
||||
else if(std::string(yCgiCallList[index].mime_type) == "") // decide in function
|
||||
else if(std::string(yCgiCallList[index].mime_type).empty()) // decide in function
|
||||
;
|
||||
else if(std::string(yCgiCallList[index].mime_type) == "+xml") // Parameter xml?
|
||||
if ((hh->ParamList["xml"] != "") ||(hh->ParamList["format"] == "xml"))
|
||||
if ((!hh->ParamList["xml"].empty()) ||(hh->ParamList["format"] == "xml"))
|
||||
hh->SetHeader(HTTP_OK, "text/xml; charset=UTF-8");
|
||||
else
|
||||
hh->SetHeader(HTTP_OK, "text/html; charset=UTF-8");
|
||||
@@ -295,7 +295,7 @@ void CControlAPI::TimerCGI(CyhookHandler *hh)
|
||||
NeutrinoAPI->Timerd->removeTimerEvent(removeId);
|
||||
hh->SendOk();
|
||||
}
|
||||
else if(hh->ParamList["get"] != "")
|
||||
else if(!hh->ParamList["get"].empty())
|
||||
{
|
||||
int pre=0,post=0;
|
||||
NeutrinoAPI->Timerd->getRecordingSafety(pre,post);
|
||||
@@ -697,11 +697,11 @@ void CControlAPI::RCEmCGI(CyhookHandler *hh) {
|
||||
#if 0
|
||||
unsigned int repeat = 1;
|
||||
unsigned int delay = 250;
|
||||
if (hh->ParamList["delay"] != "")
|
||||
if (!hh->ParamList["delay"].empty())
|
||||
delay = atoi(hh->ParamList["delay"].c_str());
|
||||
if (hh->ParamList["duration"] != "")
|
||||
if (!hh->ParamList["duration"].empty())
|
||||
repeat = atoi(hh->ParamList["duration"].c_str()) * 1000 / delay;
|
||||
if (hh->ParamList["repeat"] != "")
|
||||
if (!hh->ParamList["repeat"].empty())
|
||||
repeat = atoi(hh->ParamList["repeat"].c_str());
|
||||
#endif
|
||||
int evd = open(EVENTDEV, O_RDWR);
|
||||
@@ -797,7 +797,7 @@ void CControlAPI::VolumeCGI(CyhookHandler *hh)
|
||||
else if (hh->ParamList["1"].compare("status") == 0) { // Mute status
|
||||
(NeutrinoAPI->Zapit->getMuteStatus()) ? hh->Write("1") : hh->Write("0");
|
||||
}
|
||||
else if(hh->ParamList["1"]!="") { //set volume
|
||||
else if(!hh->ParamList["1"].empty()) { //set volume
|
||||
char vol = atol( hh->ParamList["1"].c_str() );
|
||||
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::EVT_SET_VOLUME, CEventServer::INITID_HTTPD, (void *)&vol, sizeof(char));
|
||||
hh->SendOk();
|
||||
@@ -857,11 +857,11 @@ std::string CControlAPI::_GetBouquetActualEPGItem(CyhookHandler *hh, CZapitChann
|
||||
}
|
||||
}
|
||||
|
||||
result += hh->outPair("isActiveChannel", (channel->channel_id == current_channel) ? "true" : "false", (firstEPG != ""));
|
||||
if(firstEPG != "") {
|
||||
result += hh->outPair("isActiveChannel", (channel->channel_id == current_channel) ? "true" : "false", (!firstEPG.empty()));
|
||||
if(!firstEPG.empty()) {
|
||||
result += hh->outCollection("firstEPG", firstEPG);
|
||||
}
|
||||
if(secondEPG != "") {
|
||||
if(!secondEPG.empty()) {
|
||||
result += hh->outNext();
|
||||
result += hh->outCollection("secondEPG", secondEPG);
|
||||
}
|
||||
@@ -1001,7 +1001,7 @@ void CControlAPI::GetBouquetCGI(CyhookHandler *hh) {
|
||||
int BouquetNr = -1; // -1 = all bouquets
|
||||
int startBouquet = 0;
|
||||
int bsize = (int) g_bouquetManager->Bouquets.size();
|
||||
if (hh->ParamList["bouquet"] != "") {
|
||||
if (!hh->ParamList["bouquet"].empty()) {
|
||||
// list for given bouquet
|
||||
BouquetNr = atoi(hh->ParamList["bouquet"].c_str());
|
||||
if (BouquetNr > 0)
|
||||
@@ -1404,7 +1404,7 @@ void CControlAPI::EpgSearchCGI(CyhookHandler *hh, bool xml_forat )
|
||||
hh->printf("\t\t<info2>%s</info2>\n",ZapitTools::UTF8_to_UTF8XML(epg.info2.c_str()).c_str());
|
||||
if (CEitManager::getInstance()->getEPGid(eventIterator->eventID, eventIterator->startTime, &longepg)) {
|
||||
hh->printf("\t\t<fsk>%u</fsk>\n", longepg.fsk);
|
||||
if (longepg.contentClassification.length()> 0){
|
||||
if (!longepg.contentClassification.empty()){
|
||||
genere = GetGenre(longepg.contentClassification[0]);
|
||||
genere = ZapitTools::UTF8_to_UTF8XML(genere.c_str());
|
||||
hh->printf("\t\t<genre>%s</genre>\n", genere.c_str());
|
||||
@@ -1438,7 +1438,7 @@ void CControlAPI::EpgSearchCGI(CyhookHandler *hh, bool xml_forat )
|
||||
hh->WriteLn(epg.info2);
|
||||
if (CEitManager::getInstance()->getEPGid(eventIterator->eventID, eventIterator->startTime, &longepg)) {
|
||||
hh->printf("fsk:%u\n", longepg.fsk);
|
||||
if (longepg.contentClassification.length()> 0){
|
||||
if (!longepg.contentClassification.empty()){
|
||||
genere = GetGenre(longepg.contentClassification[0]);
|
||||
genere = ZapitTools::UTF8_to_UTF8XML(genere.c_str());
|
||||
hh->WriteLn(genere);
|
||||
@@ -1507,7 +1507,7 @@ void CControlAPI::EpgCGI(CyhookHandler *hh) {
|
||||
}
|
||||
}
|
||||
// query details for given eventid
|
||||
else if (hh->ParamList["eventid"] != "") {
|
||||
else if (!hh->ParamList["eventid"].empty()) {
|
||||
//special epg query
|
||||
uint64_t epgid = 0;
|
||||
sscanf(hh->ParamList["eventid"].c_str(), "%" SCNu64 "", &epgid);
|
||||
@@ -1518,8 +1518,8 @@ void CControlAPI::EpgCGI(CyhookHandler *hh) {
|
||||
hh->WriteLn(epg.info2);
|
||||
}
|
||||
}
|
||||
else if (hh->ParamList["eventid2fsk"] != "") {
|
||||
if (hh->ParamList["starttime"] != "") {
|
||||
else if (!hh->ParamList["eventid2fsk"].empty()) {
|
||||
if (!hh->ParamList["starttime"].empty()) {
|
||||
uint64_t epgid = 0;
|
||||
time_t starttime = 0;
|
||||
sscanf(hh->ParamList["fskid"].c_str(), "%" SCNu64 "", &epgid);
|
||||
@@ -1586,7 +1586,7 @@ void CControlAPI::ScreenshotCGI(CyhookHandler *hh)
|
||||
enableOSD = false;
|
||||
if(hh->ParamList["video"] == "0")
|
||||
enableVideo = false;
|
||||
if(hh->ParamList["name"] != "")
|
||||
if(!hh->ParamList["name"].empty())
|
||||
filename = hh->ParamList["name"];
|
||||
|
||||
CScreenShot * sc = new CScreenShot("/tmp/" + filename + ".png", (CScreenShot::screenshot_format_t)0 /*PNG*/);
|
||||
@@ -1686,7 +1686,7 @@ void CControlAPI::ZaptoCGI(CyhookHandler *hh)
|
||||
else
|
||||
hh->SendError();
|
||||
}
|
||||
else if (hh->ParamList["name"] != "")
|
||||
else if (!hh->ParamList["name"].empty())
|
||||
{
|
||||
t_channel_id channel_id;
|
||||
channel_id = NeutrinoAPI->ChannelNameToChannelId(hh->ParamList["name"]);
|
||||
@@ -1716,7 +1716,7 @@ void CControlAPI::StartPluginCGI(CyhookHandler *hh)
|
||||
std::string pluginname;
|
||||
if (!(hh->ParamList.empty()))
|
||||
{
|
||||
if (hh->ParamList["name"] != "")
|
||||
if (!hh->ParamList["name"].empty())
|
||||
{
|
||||
pluginname = hh->ParamList["name"];
|
||||
//pluginname=decodeString(pluginname);
|
||||
@@ -2212,7 +2212,7 @@ void CControlAPI::SendTimersXML(CyhookHandler *hh)
|
||||
void CControlAPI::YWebCGI(CyhookHandler *hh)
|
||||
{
|
||||
bool status=true;
|
||||
if (hh->ParamList["video_stream_pids"] != "")
|
||||
if (!hh->ParamList["video_stream_pids"].empty())
|
||||
{
|
||||
int para=0;
|
||||
sscanf( hh->ParamList["video_stream_pids"].c_str(), "%d", ¶);
|
||||
@@ -2239,7 +2239,7 @@ void CControlAPI::YWeb_SendVideoStreamingPids(CyhookHandler *hh, int apid_no)
|
||||
apid_idx=apid_no;
|
||||
if(!pids.APIDs.empty())
|
||||
apid = pids.APIDs[apid_idx].pid;
|
||||
if(hh->ParamList["no_commas"] != "")
|
||||
if(!hh->ParamList["no_commas"].empty())
|
||||
{
|
||||
hh->printf("0x%04x 0x%04x 0x%04x",pids.PIDs.pmtpid,pids.PIDs.vpid,apid);
|
||||
if (pids.PIDs.pcrpid != pids.PIDs.vpid)
|
||||
@@ -2337,17 +2337,17 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
|
||||
int alHour=0;
|
||||
|
||||
// if alarm given then in parameters im time_t format
|
||||
if(hh->ParamList["alarm"] != "")
|
||||
if(!hh->ParamList["alarm"].empty())
|
||||
{
|
||||
alarmTimeT = atoi(hh->ParamList["alarm"].c_str());
|
||||
if(hh->ParamList["stop"] != "")
|
||||
if(!hh->ParamList["stop"].empty())
|
||||
stopTimeT = atoi(hh->ParamList["stop"].c_str());
|
||||
if(hh->ParamList["announce"] != "")
|
||||
if(!hh->ParamList["announce"].empty())
|
||||
announceTimeT = atoi(hh->ParamList["announce"].c_str());
|
||||
else
|
||||
announceTimeT = alarmTimeT;
|
||||
}
|
||||
else if(hh->ParamList["alDate"] != "") //given formatted
|
||||
else if(!hh->ParamList["alDate"].empty()) //given formatted
|
||||
{
|
||||
// Alarm Date - Format exact! DD.MM.YYYY
|
||||
tnull = time(NULL);
|
||||
@@ -2360,7 +2360,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
|
||||
}
|
||||
|
||||
// Alarm Time - Format exact! HH:MM
|
||||
if(hh->ParamList["alTime"] != "")
|
||||
if(!hh->ParamList["alTime"].empty())
|
||||
sscanf(hh->ParamList["alTime"].c_str(),"%2d.%2d",&(alarmTime->tm_hour), &(alarmTime->tm_min));
|
||||
alHour = alarmTime->tm_hour;
|
||||
correctTime(alarmTime);
|
||||
@@ -2369,11 +2369,11 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
|
||||
struct tm *stopTime = localtime(&alarmTimeT);
|
||||
stopTime->tm_sec = 0;
|
||||
// Stop Time - Format exact! HH:MM
|
||||
if(hh->ParamList["stTime"] != "")
|
||||
if(!hh->ParamList["stTime"].empty())
|
||||
sscanf(hh->ParamList["stTime"].c_str(),"%2d.%2d",&(stopTime->tm_hour), &(stopTime->tm_min));
|
||||
|
||||
// Stop Date - Format exact! DD.MM.YYYY
|
||||
if(hh->ParamList["stDate"] != "")
|
||||
if(!hh->ParamList["stDate"].empty())
|
||||
if(sscanf(hh->ParamList["stDate"].c_str(),"%2d.%2d.%4d",&(stopTime->tm_mday), &(stopTime->tm_mon), &(stopTime->tm_year)) == 3)
|
||||
{
|
||||
stopTime->tm_mon -= 1;
|
||||
@@ -2381,7 +2381,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
|
||||
}
|
||||
correctTime(stopTime);
|
||||
stopTimeT = mktime(stopTime);
|
||||
if(hh->ParamList["stDate"] == "" && alHour > stopTime->tm_hour)
|
||||
if(hh->ParamList["stDate"].empty() && alHour > stopTime->tm_hour)
|
||||
stopTimeT += 24* 60 * 60; // add 1 Day
|
||||
}
|
||||
else // alarm/stop time given in pieces
|
||||
@@ -2389,15 +2389,15 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
|
||||
// alarm time
|
||||
time_t now = time(NULL);
|
||||
struct tm *alarmTime=localtime(&now);
|
||||
if(hh->ParamList["ad"] != "")
|
||||
if(!hh->ParamList["ad"].empty())
|
||||
alarmTime->tm_mday = atoi(hh->ParamList["ad"].c_str());
|
||||
if(hh->ParamList["amo"] != "")
|
||||
if(!hh->ParamList["amo"].empty())
|
||||
alarmTime->tm_mon = atoi(hh->ParamList["amo"].c_str())-1;
|
||||
if(hh->ParamList["ay"] != "")
|
||||
if(!hh->ParamList["ay"].empty())
|
||||
alarmTime->tm_year = atoi(hh->ParamList["ay"].c_str())-1900;
|
||||
if(hh->ParamList["ah"] != "")
|
||||
if(!hh->ParamList["ah"].empty())
|
||||
alarmTime->tm_hour = atoi(hh->ParamList["ah"].c_str());
|
||||
if(hh->ParamList["ami"] != "")
|
||||
if(!hh->ParamList["ami"].empty())
|
||||
alarmTime->tm_min = atoi(hh->ParamList["ami"].c_str());
|
||||
alarmTime->tm_sec = 0;
|
||||
correctTime(alarmTime);
|
||||
@@ -2406,15 +2406,15 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
|
||||
|
||||
// stop time
|
||||
struct tm *stopTime = alarmTime;
|
||||
if(hh->ParamList["sd"] != "")
|
||||
if(!hh->ParamList["sd"].empty())
|
||||
stopTime->tm_mday = atoi(hh->ParamList["sd"].c_str());
|
||||
if(hh->ParamList["smo"] != "")
|
||||
if(!hh->ParamList["smo"].empty())
|
||||
stopTime->tm_mon = atoi(hh->ParamList["smo"].c_str())-1;
|
||||
if(hh->ParamList["sy"] != "")
|
||||
if(!hh->ParamList["sy"].empty())
|
||||
stopTime->tm_year = atoi(hh->ParamList["sy"].c_str())-1900;
|
||||
if(hh->ParamList["sh"] != "")
|
||||
if(!hh->ParamList["sh"].empty())
|
||||
stopTime->tm_hour = atoi(hh->ParamList["sh"].c_str());
|
||||
if(hh->ParamList["smi"] != "")
|
||||
if(!hh->ParamList["smi"].empty())
|
||||
stopTime->tm_min = atoi(hh->ParamList["smi"].c_str());
|
||||
stopTime->tm_sec = 0;
|
||||
correctTime(stopTime);
|
||||
@@ -2425,22 +2425,22 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
|
||||
announceTimeT -= 60;
|
||||
|
||||
CTimerd::CTimerEventTypes type;
|
||||
if(hh->ParamList["type"] != "")
|
||||
if(!hh->ParamList["type"].empty())
|
||||
type = (CTimerd::CTimerEventTypes) atoi(hh->ParamList["type"].c_str());
|
||||
else // default is: record
|
||||
type = CTimerd::TIMER_RECORD;
|
||||
|
||||
// repeat
|
||||
if(hh->ParamList["repcount"] != "")
|
||||
if(!hh->ParamList["repcount"].empty())
|
||||
{
|
||||
repCount = atoi(hh->ParamList["repcount"].c_str());
|
||||
}
|
||||
CTimerd::CTimerEventRepeat rep;
|
||||
if(hh->ParamList["rep"] != "")
|
||||
if(!hh->ParamList["rep"].empty())
|
||||
rep = (CTimerd::CTimerEventRepeat) atoi(hh->ParamList["rep"].c_str());
|
||||
else // default: no repeat
|
||||
rep = (CTimerd::CTimerEventRepeat)0;
|
||||
if(((int)rep) >= ((int)CTimerd::TIMERREPEAT_WEEKDAYS) && hh->ParamList["wd"] != "")
|
||||
if(((int)rep) >= ((int)CTimerd::TIMERREPEAT_WEEKDAYS) && !hh->ParamList["wd"].empty())
|
||||
NeutrinoAPI->Timerd->getWeekdaysFromStr(&rep, hh->ParamList["wd"]);
|
||||
|
||||
// apids
|
||||
@@ -2478,7 +2478,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
|
||||
eventinfo.recordingSafety = (hh->ParamList["rs"] == "1");
|
||||
|
||||
// channel by Id or name
|
||||
if(hh->ParamList["channel_id"] != "")
|
||||
if(!hh->ParamList["channel_id"].empty())
|
||||
sscanf(hh->ParamList["channel_id"].c_str(),
|
||||
SCANF_CHANNEL_ID_TYPE,
|
||||
&eventinfo.channel_id);
|
||||
@@ -2499,7 +2499,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
|
||||
data= &eventinfo;
|
||||
else if (type==CTimerd::TIMER_RECORD)
|
||||
{
|
||||
if(_rec_dir == "")
|
||||
if(_rec_dir.empty())
|
||||
{
|
||||
// get Default Recordingdir
|
||||
CConfigFile *Config = new CConfigFile(',');
|
||||
@@ -2530,7 +2530,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
|
||||
// update or add timer
|
||||
if(hh->ParamList["update"]=="1")
|
||||
{
|
||||
if(hh->ParamList["id"] != "")
|
||||
if(!hh->ParamList["id"].empty())
|
||||
{
|
||||
unsigned modyId = atoi(hh->ParamList["id"].c_str());
|
||||
if(type == CTimerd::TIMER_RECORD)
|
||||
@@ -2574,7 +2574,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
|
||||
//-------------------------------------------------------------------------
|
||||
void CControlAPI::setBouquetCGI(CyhookHandler *hh)
|
||||
{
|
||||
if (hh->ParamList["selected"] != "") {
|
||||
if (!hh->ParamList["selected"].empty()) {
|
||||
int selected = atoi(hh->ParamList["selected"].c_str());
|
||||
if(hh->ParamList["action"].compare("hide") == 0)
|
||||
NeutrinoAPI->Zapit->setBouquetHidden(selected - 1,true);
|
||||
@@ -2599,7 +2599,7 @@ void CControlAPI::saveBouquetCGI(CyhookHandler *hh)
|
||||
//-------------------------------------------------------------------------
|
||||
void CControlAPI::moveBouquetCGI(CyhookHandler *hh)
|
||||
{
|
||||
if (hh->ParamList["selected"] != "" && (
|
||||
if (!hh->ParamList["selected"].empty() && (
|
||||
hh->ParamList["action"] == "up" ||
|
||||
hh->ParamList["action"] == "down"))
|
||||
{
|
||||
@@ -2619,7 +2619,7 @@ void CControlAPI::moveBouquetCGI(CyhookHandler *hh)
|
||||
//-------------------------------------------------------------------------
|
||||
void CControlAPI::deleteBouquetCGI(CyhookHandler *hh)
|
||||
{
|
||||
if (hh->ParamList["selected"] != "") {
|
||||
if (!hh->ParamList["selected"].empty()) {
|
||||
int selected = atoi(hh->ParamList["selected"].c_str());
|
||||
NeutrinoAPI->Zapit->deleteBouquet(selected - 1);
|
||||
hh->SendOk();
|
||||
@@ -2645,9 +2645,9 @@ void CControlAPI::addBouquetCGI(CyhookHandler *hh)
|
||||
//-------------------------------------------------------------------------
|
||||
void CControlAPI::renameBouquetCGI(CyhookHandler *hh)
|
||||
{
|
||||
if (hh->ParamList["selected"] != "")
|
||||
if (!hh->ParamList["selected"].empty())
|
||||
{
|
||||
if (hh->ParamList["nameto"] != "")
|
||||
if (!hh->ParamList["nameto"].empty())
|
||||
{
|
||||
if (NeutrinoAPI->Zapit->existsBouquet((hh->ParamList["nameto"]).c_str()) == -1)
|
||||
{
|
||||
@@ -2688,7 +2688,7 @@ void CControlAPI::changeBouquetCGI(CyhookHandler *hh)
|
||||
|
||||
NeutrinoAPI->Zapit->renumChannellist();
|
||||
NeutrinoAPI->UpdateBouquets();
|
||||
if(hh->ParamList["redirect"] != "")
|
||||
if(!hh->ParamList["redirect"].empty())
|
||||
hh->SendRewrite(hh->ParamList["redirect"]);
|
||||
else
|
||||
hh->SendOk();
|
||||
@@ -2716,7 +2716,7 @@ void CControlAPI::build_live_url(CyhookHandler *hh)
|
||||
int apid=0,apid_no=0,apid_idx=0;
|
||||
pids.PIDs.vpid=0;
|
||||
|
||||
if(hh->ParamList["audio_no"] !="")
|
||||
if(!hh->ParamList["audio_no"].empty())
|
||||
apid_no = atoi(hh->ParamList["audio_no"].c_str());
|
||||
NeutrinoAPI->Zapit->getPIDS(pids);
|
||||
|
||||
@@ -2744,7 +2744,7 @@ void CControlAPI::build_live_url(CyhookHandler *hh)
|
||||
hh->SendError();
|
||||
// build url
|
||||
std::string url = "";
|
||||
if(hh->ParamList["host"] !="")
|
||||
if(!hh->ParamList["host"].empty())
|
||||
url = "http://"+hh->ParamList["host"];
|
||||
else
|
||||
url = "http://"+hh->HeaderList["Host"];
|
||||
@@ -2757,7 +2757,7 @@ void CControlAPI::build_live_url(CyhookHandler *hh)
|
||||
url += xpids;
|
||||
|
||||
// response url
|
||||
if(hh->ParamList["vlc_link"] !="")
|
||||
if(!hh->ParamList["vlc_link"].empty())
|
||||
{
|
||||
write_to_file("/tmp/vlc.m3u", url);
|
||||
hh->SendRedirect("/tmp/vlc.m3u");
|
||||
@@ -2849,7 +2849,7 @@ void CControlAPI::ConfigCGI(CyhookHandler *hh) {
|
||||
else if (configFileName == "yweb")
|
||||
config_filename = YWEB_CONFIGFILE;
|
||||
|
||||
if (config_filename != "") {
|
||||
if (!config_filename.empty()) {
|
||||
Config->loadConfig(config_filename);
|
||||
|
||||
if (load) { // get and output list
|
||||
@@ -2879,19 +2879,19 @@ void CControlAPI::ConfigCGI(CyhookHandler *hh) {
|
||||
Config->setString(key, it->second);
|
||||
}
|
||||
}
|
||||
if (config_filename != "")
|
||||
if (!config_filename.empty())
|
||||
Config->saveConfig(config_filename);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(configFileName != "")
|
||||
if(!configFileName.empty())
|
||||
error = string_printf("no config defined for: %s", (hh->ParamList["config"]).c_str());
|
||||
else
|
||||
error = "no config given";
|
||||
}
|
||||
|
||||
// write footer
|
||||
if (error == "") {
|
||||
if (error.empty()) {
|
||||
if (outType == json) {
|
||||
hh->WriteLn(json_out_success(result));
|
||||
}
|
||||
|
@@ -171,7 +171,7 @@ std::string CNeutrinoYParser::func_mount_get_list(CyhookHandler *, std::string)
|
||||
yip = Config->getString("network_nfs_ip_"+ynr,"");
|
||||
ydir = Config->getString("network_nfs_dir_"+ynr,"");
|
||||
ylocal_dir = Config->getString("network_nfs_local_dir_"+ynr,"");
|
||||
if(ydir != "")
|
||||
if(!ydir.empty())
|
||||
ydir="("+ydir+")";
|
||||
|
||||
yresult += string_printf("<input type='radio' name='R1' value='%d' %s />%d %s - %s %s %s<br/>",
|
||||
@@ -215,7 +215,7 @@ std::string CNeutrinoYParser::func_get_bouquets_as_dropdown(CyhookHandler *, st
|
||||
int nr=1;
|
||||
|
||||
ySplitString(para," ",nr_str, do_show_hidden);
|
||||
if(nr_str != "")
|
||||
if(!nr_str.empty())
|
||||
nr = atoi(nr_str.c_str());
|
||||
|
||||
int mode = NeutrinoAPI->Zapit->getMode();
|
||||
@@ -286,7 +286,7 @@ std::string CNeutrinoYParser::func_get_channels_as_dropdown(CyhookHandler *, st
|
||||
int mode = NeutrinoAPI->Zapit->getMode();
|
||||
|
||||
ySplitString(para," ",abouquet, achannel_id);
|
||||
if(abouquet != "")
|
||||
if(!abouquet.empty())
|
||||
bnumber = atoi(abouquet.c_str());
|
||||
if(bnumber > 0) {
|
||||
bnumber--;
|
||||
@@ -323,7 +323,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std:
|
||||
int mode = NeutrinoAPI->Zapit->getMode();
|
||||
|
||||
ySplitString(para," ",abnumber, tmp);
|
||||
if(abnumber != "")
|
||||
if(!abnumber.empty())
|
||||
BouquetNr = atoi(abnumber.c_str());
|
||||
if (BouquetNr > 0) {
|
||||
BouquetNr--;
|
||||
@@ -351,7 +351,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std:
|
||||
std::string timestr;
|
||||
bool have_logos = false;
|
||||
|
||||
if(hh->WebserverConfigList["Tuxbox.LogosURL"] != "")
|
||||
if(!hh->WebserverConfigList["Tuxbox.LogosURL"].empty())
|
||||
have_logos = true;
|
||||
for(int j = 0; j < (int) channels.size(); j++)
|
||||
{
|
||||
@@ -526,7 +526,7 @@ std::string CNeutrinoYParser::func_get_video_pids(CyhookHandler *, std::string
|
||||
int apid=0,apid_no=0,apid_idx=0;
|
||||
pids.PIDs.vpid=0;
|
||||
|
||||
if(para != "")
|
||||
if(!para.empty())
|
||||
apid_no = atoi(para.c_str());
|
||||
NeutrinoAPI->Zapit->getPIDS(pids);
|
||||
|
||||
@@ -714,7 +714,7 @@ std::string CNeutrinoYParser::func_get_partition_list(CyhookHandler *, std::str
|
||||
in >> ymtd >> dummy >> dummy; //format: mtd# start end "name "
|
||||
in.getline(ytmp, 200); // Rest of line is the mtd description
|
||||
yname = ytmp;
|
||||
if((j>0) && (ymtd != ""))// iggnore first line
|
||||
if((j>0) && (!ymtd.empty()))// iggnore first line
|
||||
{
|
||||
ysel = ((j==1) ? "checked=\"checked\"" : "");
|
||||
yresult += string_printf("<input type='radio' name='R1' value='%d' %s title='%s' />%d %s<br/>",
|
||||
@@ -976,7 +976,7 @@ std::string CNeutrinoYParser::func_set_timer_form(CyhookHandler *hh, std::strin
|
||||
if(cmd != "new")
|
||||
{
|
||||
// init timerid
|
||||
if(stimerid != "")
|
||||
if(!stimerid.empty())
|
||||
timerId = (unsigned)atoi(stimerid.c_str());
|
||||
|
||||
NeutrinoAPI->Timerd->getTimer(timer, timerId);
|
||||
@@ -1119,7 +1119,7 @@ std::string CNeutrinoYParser::func_bouquet_editor_main(CyhookHandler *hh, std::
|
||||
if (hh->ParamList["saved"] == "1")
|
||||
hh->ParamList["have_saved"]="true";
|
||||
|
||||
if (hh->ParamList["selected"] != "")
|
||||
if (!hh->ParamList["selected"].empty())
|
||||
selected = atoi(hh->ParamList["selected"].c_str());
|
||||
|
||||
int bouquetSize = (int) g_bouquetManager->Bouquets.size();
|
||||
|
Reference in New Issue
Block a user