mirror of
				https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
				synced 2023-10-10 17:16:51 +00:00 
			
		
		
		
	dropped "Synchronize EPG" feature
Modified Files: Tag: v0_4 HISTORY README i18n.c streamdev-client.c streamdev-client.h client/device.c client/setup.c client/setup.h client/socket.c client/socket.h
This commit is contained in:
		| @@ -1,5 +1,5 @@ | ||||
| /* | ||||
|  *  $Id: device.c,v 1.18.2.2 2009/01/29 07:49:05 schmirl Exp $ | ||||
|  *  $Id: device.c,v 1.18.2.3 2010/06/08 05:56:15 schmirl Exp $ | ||||
|  */ | ||||
|   | ||||
| #include "client/device.h" | ||||
| @@ -33,9 +33,6 @@ cStreamdevDevice::cStreamdevDevice(void) { | ||||
| 	m_Device = this; | ||||
| 	m_Pids = 0; | ||||
| 	m_DvrClosed = true; | ||||
|  | ||||
| 	if (StreamdevClientSetup.SyncEPG)	 | ||||
| 		ClientSocket.SynchronizeEPG(); | ||||
| } | ||||
|  | ||||
| cStreamdevDevice::~cStreamdevDevice() { | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| /* | ||||
|  *  $Id: setup.c,v 1.5.2.3 2009/09/18 10:41:11 schmirl Exp $ | ||||
|  *  $Id: setup.c,v 1.5.2.4 2010/06/08 05:56:15 schmirl Exp $ | ||||
|  */ | ||||
|   | ||||
| #include <vdr/menuitems.h> | ||||
| @@ -14,7 +14,6 @@ cStreamdevClientSetup::cStreamdevClientSetup(void) { | ||||
| 	StartClient   = false; | ||||
| 	RemotePort    = 2004; | ||||
| 	StreamFilters = false; | ||||
| 	SyncEPG       = false; | ||||
| 	HideMenuEntry = false; | ||||
| 	MinPriority   = -1; | ||||
| 	MaxPriority   = MAXPRIORITY; | ||||
| @@ -31,7 +30,6 @@ bool cStreamdevClientSetup::SetupParse(const char *Name, const char *Value) { | ||||
| 	} | ||||
| 	else if (strcmp(Name, "RemotePort") == 0)    RemotePort = atoi(Value); | ||||
| 	else if (strcmp(Name, "StreamFilters") == 0) StreamFilters = atoi(Value); | ||||
| 	else if (strcmp(Name, "SyncEPG") == 0)       SyncEPG = atoi(Value); | ||||
| 	else if (strcmp(Name, "HideMenuEntry") == 0) HideMenuEntry = atoi(Value); | ||||
| 	else if (strcmp(Name, "MinPriority") == 0)   MinPriority = atoi(Value); | ||||
| 	else if (strcmp(Name, "MaxPriority") == 0)   MaxPriority = atoi(Value); | ||||
| @@ -47,7 +45,6 @@ cStreamdevClientMenuSetupPage::cStreamdevClientMenuSetupPage(void) { | ||||
| 	Add(new cMenuEditIpItem  (tr("Remote IP"),            m_NewSetup.RemoteIp)); | ||||
| 	Add(new cMenuEditIntItem (tr("Remote Port"),         &m_NewSetup.RemotePort, 0, 65535)); | ||||
| 	Add(new cMenuEditBoolItem(tr("Filter Streaming"),    &m_NewSetup.StreamFilters)); | ||||
| 	Add(new cMenuEditBoolItem(tr("Synchronize EPG"),     &m_NewSetup.SyncEPG)); | ||||
| 	Add(new cMenuEditIntItem (tr("Minimum Priority"),    &m_NewSetup.MinPriority, -1, MAXPRIORITY)); | ||||
| 	Add(new cMenuEditIntItem (tr("Maximum Priority"),    &m_NewSetup.MaxPriority, -1, MAXPRIORITY)); | ||||
| 	SetCurrent(Get(0)); | ||||
| @@ -69,7 +66,6 @@ void cStreamdevClientMenuSetupPage::Store(void) { | ||||
| 		SetupStore("RemoteIp",    m_NewSetup.RemoteIp); | ||||
| 	SetupStore("RemotePort",    m_NewSetup.RemotePort); | ||||
| 	SetupStore("StreamFilters", m_NewSetup.StreamFilters); | ||||
| 	SetupStore("SyncEPG",       m_NewSetup.SyncEPG); | ||||
| 	SetupStore("HideMenuEntry", m_NewSetup.HideMenuEntry); | ||||
| 	SetupStore("MinPriority",   m_NewSetup.MinPriority); | ||||
| 	SetupStore("MaxPriority",   m_NewSetup.MaxPriority); | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| /* | ||||
|  *  $Id: setup.h,v 1.4.2.2 2009/09/18 10:41:11 schmirl Exp $ | ||||
|  *  $Id: setup.h,v 1.4.2.3 2010/06/08 05:56:15 schmirl Exp $ | ||||
|  */ | ||||
|   | ||||
| #ifndef VDR_STREAMDEV_SETUPCLIENT_H | ||||
| @@ -16,7 +16,6 @@ struct cStreamdevClientSetup { | ||||
| 	char RemoteIp[20]; | ||||
| 	int  RemotePort; | ||||
| 	int  StreamFilters; | ||||
| 	int  SyncEPG; | ||||
| 	int  HideMenuEntry; | ||||
| 	int  MinPriority; | ||||
| 	int  MaxPriority; | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| /* | ||||
|  *  $Id: socket.c,v 1.11 2008/04/07 14:40:40 schmirl Exp $ | ||||
|  *  $Id: socket.c,v 1.11.2.1 2010/06/08 05:56:15 schmirl Exp $ | ||||
|  */ | ||||
|   | ||||
| #include <tools/select.h> | ||||
| @@ -301,52 +301,6 @@ bool cClientSocket::CloseDvr(void) { | ||||
| 	return true; | ||||
| } | ||||
|  | ||||
| bool cClientSocket::SynchronizeEPG(void) { | ||||
| 	std::string buffer; | ||||
| 	bool result; | ||||
| 	FILE *epgfd; | ||||
|  | ||||
| 	if (!CheckConnection()) return false; | ||||
|  | ||||
| 	isyslog("Streamdev: Synchronizing EPG from server\n"); | ||||
|  | ||||
| 	CMD_LOCK; | ||||
|  | ||||
| 	if (!Command("LSTE")) | ||||
| 		return false; | ||||
|  | ||||
| 	if ((epgfd = tmpfile()) == NULL) { | ||||
| 		esyslog("ERROR: Streamdev: Error while processing EPG data: %s",  | ||||
| 				strerror(errno)); | ||||
| 		return false; | ||||
| 	} | ||||
|  | ||||
| 	while ((result = Expect(215, &buffer))) { | ||||
| 		if (buffer[3] == ' ') break; | ||||
| 		fputs(buffer.c_str() + 4, epgfd); | ||||
| 		fputc('\n', epgfd); | ||||
| 	} | ||||
|  | ||||
| 	if (!result) { | ||||
| 		if (errno == 0) | ||||
| 			esyslog("ERROR: Streamdev: Couldn't fetch EPG data from %s:%d", | ||||
| 			        RemoteIp().c_str(), RemotePort()); | ||||
| 		fclose(epgfd); | ||||
| 		return false; | ||||
| 	} | ||||
|  | ||||
| 	rewind(epgfd); | ||||
| 	if (cSchedules::Read(epgfd)) | ||||
| 		cSchedules::Cleanup(true); | ||||
| 	else { | ||||
| 		esyslog("ERROR: Streamdev: Parsing EPG data failed"); | ||||
| 		fclose(epgfd); | ||||
| 		return false; | ||||
| 	} | ||||
| 	fclose(epgfd); | ||||
| 	return true; | ||||
| } | ||||
|  | ||||
| bool cClientSocket::Quit(void) { | ||||
| 	bool res; | ||||
|  | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| /* | ||||
|  *  $Id: socket.h,v 1.6 2008/04/07 14:40:40 schmirl Exp $ | ||||
|  *  $Id: socket.h,v 1.6.2.1 2010/06/08 05:56:15 schmirl Exp $ | ||||
|  */ | ||||
|   | ||||
| #ifndef VDR_STREAMDEV_CLIENT_CONNECTION_H | ||||
| @@ -48,7 +48,6 @@ public: | ||||
| 	bool SetPid(int Pid, bool On); | ||||
| 	bool SetFilter(ushort Pid, uchar Tid, uchar Mask, bool On); | ||||
| 	bool CloseDvr(void); | ||||
| 	bool SynchronizeEPG(void); | ||||
| 	bool SuspendServer(void); | ||||
| 	bool Quit(void); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user