diff -Nru vdr-plugin-epgsync-1.0.0/debian/changelog vdr-plugin-epgsync-1.0.1/debian/changelog --- vdr-plugin-epgsync-1.0.0/debian/changelog 2014-07-23 20:17:21.000000000 +0000 +++ vdr-plugin-epgsync-1.0.1/debian/changelog 2014-07-23 20:17:21.000000000 +0000 @@ -1,8 +1,38 @@ +vdr-plugin-epgsync (1.0.1-0yavdr1~precise) precise; urgency=medium + + * automatic rebuild + + -- Alexander Grothe Wed, 23 Jul 2014 22:16:07 +0200 + +vdr-plugin-epgsync (1.0.1-0yavdr0~precise) precise; urgency=medium + + * new upstream version + + -- Alexander Grothe Fri, 11 Apr 2014 22:35:57 +0200 + +vdr-plugin-epgsync (1.0.0-1yavdr3~precise) precise; urgency=medium + + * automatic rebuild + + -- yavdr package builder Wed, 02 Apr 2014 22:02:05 +0200 + +vdr-plugin-epgsync (1.0.0-1yavdr1~precise) precise; urgency=medium + + * automatic rebuild + + -- yavdr package builder Sun, 23 Mar 2014 15:56:10 +0100 + +vdr-plugin-epgsync (1.0.0-1yavdr0~precise) precise; urgency=medium + + * add vdr-abi dependency + + -- Lars Hanisch Fri, 24 Jan 2014 16:20:11 +0100 + vdr-plugin-epgsync (1.0.0-0yavdr2~precise) precise; urgency=medium * automatic rebuild - -- yavdr package builder Thu, 24 Oct 2013 22:12:39 +0200 + -- yavdr package builder Sat, 26 Oct 2013 10:34:40 +0200 vdr-plugin-epgsync (1.0.0-0yavdr1~precise) precise; urgency=medium diff -Nru vdr-plugin-epgsync-1.0.0/debian/rules vdr-plugin-epgsync-1.0.1/debian/rules --- vdr-plugin-epgsync-1.0.0/debian/rules 2014-07-23 20:17:21.000000000 +0000 +++ vdr-plugin-epgsync-1.0.1/debian/rules 2014-07-23 20:17:21.000000000 +0000 @@ -4,6 +4,10 @@ .PHONY: override_dh_strip override_dh_auto_install +override_dh_gencontrol: + sh /usr/share/vdr-dev/dependencies.sh + dh_gencontrol + override_dh_strip: dh_strip --dbg-package=vdr-plugin-epgsync-dbg diff -Nru vdr-plugin-epgsync-1.0.0/epgsync.c vdr-plugin-epgsync-1.0.1/epgsync.c --- vdr-plugin-epgsync-1.0.0/epgsync.c 2013-06-07 19:58:06.000000000 +0000 +++ vdr-plugin-epgsync-1.0.1/epgsync.c 2014-04-11 20:00:04.000000000 +0000 @@ -11,7 +11,7 @@ #include "setup.h" #include "thread.h" -static const char *VERSION = "1.0.0"; +static const char *VERSION = "1.0.1"; static const char *DESCRIPTION = trNOOP("Import EPG of an other VDR"); static const char *MAINMENUENTRY = trNOOP("Synchronize EPG"); @@ -91,6 +91,11 @@ void cPluginEpgsync::Housekeeping(void) { // Perform any cleanup or other regular tasks. + if (EpgSyncSetup.everyHours && !EpgSyncThread->Active() && + time(NULL) - EpgSyncThread->LastRun() > EpgSyncSetup.everyHours * 3600) { + isyslog("Starting scheduled EpgSync"); + EpgSyncThread->Start(); + } } void cPluginEpgsync::MainThreadHook(void) @@ -133,12 +138,26 @@ const char **cPluginEpgsync::SVDRPHelpPages(void) { // Return help text for SVDRP commands this plugin implements - return NULL; + static const char *HelpPages[] = { + "SYNC\n Start EpgSync\n", + NULL + }; + return HelpPages; } cString cPluginEpgsync::SVDRPCommand(const char *Command, const char *Option, int &ReplyCode) { // Process SVDRP commands this plugin implements + if (!strcasecmp(Command, "SYNC")) { + if (EpgSyncThread->Active()) { + ReplyCode = 950; + return "EpgSync already active"; + } + else { + EpgSyncThread->Start(); + return "EpgSync started"; + } + } return NULL; } diff -Nru vdr-plugin-epgsync-1.0.0/HISTORY vdr-plugin-epgsync-1.0.1/HISTORY --- vdr-plugin-epgsync-1.0.0/HISTORY 2013-06-07 19:56:01.000000000 +0000 +++ vdr-plugin-epgsync-1.0.1/HISTORY 2014-03-13 21:38:00.000000000 +0000 @@ -1,6 +1,10 @@ VDR Plugin 'epgsync' Revision History ----------------------------------------- +- Updated Slovak translation (thanks to Milan Hrala) +- New option for periodic sync (suggested by GTRDRIVER@vdrportal) +- Added SVDRP command to trigger sync (suggested by no sleep@vdrportal) + 2013-06-07: Version 1.0.0 - Updated Makefile for VDR 1.7.36 and dropped compatibility with older VDR diff -Nru vdr-plugin-epgsync-1.0.0/po/de_DE.po vdr-plugin-epgsync-1.0.1/po/de_DE.po --- vdr-plugin-epgsync-1.0.0/po/de_DE.po 2013-06-07 19:58:08.000000000 +0000 +++ vdr-plugin-epgsync-1.0.1/po/de_DE.po 2014-04-11 20:00:18.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: VDR 1.5.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-05-01 00:01+0200\n" +"POT-Creation-Date: 2014-03-13 10:47+0100\n" "PO-Revision-Date: 2009-02-03 11:23+0100\n" "Last-Translator: Frank Schmirler \n" "Language-Team: \n" @@ -52,6 +52,9 @@ msgid "EPG sync on startup" msgstr "EPG sync beim Starten" +msgid "EPG sync timeout (h)" +msgstr "Zeit bis zum EPG sync (h)" + msgid "Map channels by" msgstr "Kanäle zuordnen nach" diff -Nru vdr-plugin-epgsync-1.0.0/po/it_IT.po vdr-plugin-epgsync-1.0.1/po/it_IT.po --- vdr-plugin-epgsync-1.0.0/po/it_IT.po 2013-06-07 19:58:08.000000000 +0000 +++ vdr-plugin-epgsync-1.0.1/po/it_IT.po 2014-04-11 20:00:18.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: VDR 1.5.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-05-01 00:01+0200\n" +"POT-Creation-Date: 2014-03-13 10:47+0100\n" "PO-Revision-Date: 2009-02-09 19:54+0100\n" "Last-Translator: Diego Pierotto \n" "Language-Team: \n" @@ -52,6 +52,9 @@ msgid "EPG sync on startup" msgstr "Sincronizza EPG all'avvio" +msgid "EPG sync timeout (h)" +msgstr "" + msgid "Map channels by" msgstr "Mappa canali per" diff -Nru vdr-plugin-epgsync-1.0.0/po/sk_SK.po vdr-plugin-epgsync-1.0.1/po/sk_SK.po --- vdr-plugin-epgsync-1.0.0/po/sk_SK.po 2013-06-07 19:58:08.000000000 +0000 +++ vdr-plugin-epgsync-1.0.1/po/sk_SK.po 2014-04-11 20:00:18.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: vdr-epgsync 0.0.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-05-01 00:01+0200\n" +"POT-Creation-Date: 2014-03-13 10:47+0100\n" "PO-Revision-Date: 2013-03-12 23:39+0100\n" "Last-Translator: Milan Hrala \n" "Language-Team: Slovak\n" @@ -55,6 +55,9 @@ msgid "EPG sync on startup" msgstr "Synchronizovať EPG pri štarte" +msgid "EPG sync timeout (h)" +msgstr "Interval EPG synchronizácie (h)" + msgid "Map channels by" msgstr "Mapovať kanály podľa" diff -Nru vdr-plugin-epgsync-1.0.0/README vdr-plugin-epgsync-1.0.1/README --- vdr-plugin-epgsync-1.0.0/README 2013-04-30 22:07:36.000000000 +0000 +++ vdr-plugin-epgsync-1.0.1/README 2014-03-13 10:15:11.000000000 +0000 @@ -32,7 +32,7 @@ on the commandline. It will then serve as the default for all plugins using svdrpservice: - -P remoteosd -P 'svdrpservice 192.0.2.1:6419' + -P epgsync -P 'svdrpservice 192.0.2.1:6419' Check the svdrphosts.conf (or streamdevhosts.conf) file on the remote VDR: The IP of the VDR running epgsync must be listed or otherwise the @@ -40,39 +40,66 @@ Configuration: -------------- -Before you can connect you have to configure the IP address of the -remote VDR. So you have to enter the plugin's setup menu first. It -offers the following options: - -- Hide mainmenu entry: The mainmenu entry of epgsync allows you to -trigger an epgsync at any time. If you don't need this or if you are -using a keymakro to call the mainmenu entry you can hide it with this -option. -- Server IP: Enter the IP of the remote VDR -- Server port: Since VDR 1.7.15 the default port is 6419, before it -was 2001. If you prefer VTP, its default port is 2004. The default -value 0 uses the port configured in svdrpservice. -- Connection attempts: Defines how often epgsync will try to establish -the connection to the server. For most users the default 1 should be -sufficient. However if e.g. the client uses WOL to wake the server it -might not be available immediately. The first retry will be after 1 -second. The delay will be doubled after each attempt. -- Update "now" and "next" first: Enable this option if you want to -import the "What's on now/next" entries first. It uses the SVDRP -commands "LSTE now" and "LSTE next". Especially useful for those who -start with an empty epg.data file. -- Sync channel by channel: Determines how the EPG is downloaded. See -notes below. -- EPG sync on startup: Start syncing when the plugin is started. -- Map channels by: mode "ID", the default, simply copies the EPG data -it receives, effectively mapping channels by their channel ID. In -"ID, Name" mode, if no local channel corresponds to a channel ID from -EPG, an attempt is made to find the channel by name. Finally in -"Name, ID" mode, epgsync searches for a channel by name, prefering -channels with a different ID. You can use this mode to copy EPG to -analogue channels. Note: When looking up a channel by name, case is -ignored. Both, the long and the short channel names are considered. -- Target channels: Restrict the EPG import to certain channel types. +Before you can connect, your local VDR must know the IP address of the +remote VDR. Either configure a default IP in the svdrpservice plugin or +enter it in epgsync's setup. + +The plugin setup offers the following options: + +- Hide mainmenu entry +The mainmenu entry of epgsync allows you to trigger an epgsync at any +time. If you don't need this or if you are using a keymakro to call the +mainmenu entry you can hide it with this option. + +- Server IP +P address of SVDRP server. Leave empty or enter "0.0.0.0" if you want +to use the default IP configured in the svdrpservice plugin. + +- Server port +SVDRP port on server. Since VDR 1.7.15 the default port is 6419, before +it was 2001. If you prefer VTP, its default port is 2004. The special +value 0 uses the default port configured in svdrpservice. + +- Connection attempts +Defines how often epgsync will try to establish the connection to the +server. For most users the default 1 should be sufficient. However if +e.g. the client uses WOL to wake the server it might not be available +immediately. The first retry will be after 1 second. The delay will be +doubled after each attempt. + +- Update "now" and "next" first +Enable this option if you want to import the "What's on now/next" +entries first. It uses the SVDRP commands "LSTE now" and "LSTE next". +Especially useful for those who start with an empty epg.data file. + +- Sync channel by channel +Determines how the EPG is downloaded. See notes below. + +- EPG sync on startup +Start syncing when the plugin is started. + +- EPG sync timeout (h) +Perform an epgsync regularely when enabled. You will need this option +only in special cases. As long as your client syncs on startup +regularely and receives EPG information via DVB stream (e.g. using +streamdev's "Filter Streaming" option) you should be fine without this +option. This is not an exact timeout but a minimum delay in hours +between two syncs. Every successful manually or SVDRP triggered sync +will reset the timeout. This setting won't trigger a sync right after +plugin start. Use the previous option instead. + +- Map channels by +Mode "ID", the default, simply copies the EPG data it receives, +effectively mapping channels by their channel ID. In "ID, Name" mode, +if no local channel corresponds to a channel ID from EPG, an attempt +is made to find the channel by name. Finally in "Name, ID" mode, +epgsync searches for a channel by name, prefering channels with a +different ID. You can use this mode to copy EPG to analogue channels. +Note: When looking up a channel by name, case is ignored. Both, the +long and the short channel names are considered. + +- Target channels +Restrict the EPG import to certain channel types. Recommended settings -------------------- @@ -122,3 +149,8 @@ sends an "LSTE ", processes the reply and sleeps for a few millis. So in the end epgsync imports the EPG of all remote channels. It is not necessary to enable "Update now and next first". + +SVDRP +----- +You can trigger an EPG sync with the following SVDRP command: + PLUG epgsync SYNC diff -Nru vdr-plugin-epgsync-1.0.0/setup.c vdr-plugin-epgsync-1.0.1/setup.c --- vdr-plugin-epgsync-1.0.0/setup.c 2013-04-30 22:07:36.000000000 +0000 +++ vdr-plugin-epgsync-1.0.1/setup.c 2014-03-13 09:44:51.000000000 +0000 @@ -20,6 +20,7 @@ nowNext = 0; channelByChannel = 0; syncOnStart = 0; + everyHours = 0; redirectChannels = rcmId; channelTypes = ctAll; } @@ -32,6 +33,7 @@ nowNext = Setup.nowNext; channelByChannel = Setup.channelByChannel; syncOnStart = Setup.syncOnStart; + everyHours = Setup.everyHours; redirectChannels = Setup.redirectChannels; channelTypes = Setup.channelTypes; return *this; @@ -52,6 +54,8 @@ channelByChannel = atoi(Value); else if (!strcasecmp(Name, "SyncOnStart")) syncOnStart = atoi(Value); + else if (!strcasecmp(Name, "EveryHours")) + everyHours = atoi(Value); else if (!strcasecmp(Name, "RedirectChannels")) redirectChannels = atoi(Value); else if (!strcasecmp(Name, "ChannelTypes")) @@ -69,6 +73,7 @@ SetupStore("NowNext", setupTmp.nowNext); SetupStore("ChannelByChannel", setupTmp.channelByChannel); SetupStore("SyncOnStart", setupTmp.syncOnStart); + SetupStore("EveryHours", setupTmp.everyHours); SetupStore("RedirectChannels", setupTmp.redirectChannels); SetupStore("ChannelTypes", setupTmp.channelTypes); EpgSyncSetup = setupTmp; @@ -94,6 +99,7 @@ Add(new cMenuEditBoolItem(tr("Update \"now\" and \"next\" first"), &setupTmp.nowNext)); Add(new cMenuEditBoolItem(tr("Sync channel by channel"), &setupTmp.channelByChannel)); Add(new cMenuEditBoolItem(tr("EPG sync on startup"), &setupTmp.syncOnStart)); + Add(new cMenuEditIntItem(tr("EPG sync timeout (h)"), &setupTmp.everyHours, 0, INT_MAX, trVDR("off"))); Add(new cMenuEditStraItem(tr("Map channels by"), &setupTmp.redirectChannels, rcm_Count, redirectChannelsTexts)); Add(new cMenuEditStraItem(tr("Target channels"), &setupTmp.channelTypes, ct_Count, channelTypeTexts)); } diff -Nru vdr-plugin-epgsync-1.0.0/setup.h vdr-plugin-epgsync-1.0.1/setup.h --- vdr-plugin-epgsync-1.0.0/setup.h 2013-04-30 22:07:36.000000000 +0000 +++ vdr-plugin-epgsync-1.0.1/setup.h 2014-03-13 09:34:06.000000000 +0000 @@ -26,6 +26,7 @@ int nowNext; int channelByChannel; int syncOnStart; + int everyHours; int redirectChannels; int channelTypes; diff -Nru vdr-plugin-epgsync-1.0.0/thread.c vdr-plugin-epgsync-1.0.1/thread.c --- vdr-plugin-epgsync-1.0.0/thread.c 2013-04-30 22:07:36.000000000 +0000 +++ vdr-plugin-epgsync-1.0.1/thread.c 2014-03-13 09:46:12.000000000 +0000 @@ -151,6 +151,7 @@ plugin->Service("SvdrpConnection-v1.0", &svdrp); cSchedules::Cleanup(true); + last = time(NULL); } bool cEpgSyncThread::CmdLSTE(FILE *f, const char *Arg) { @@ -239,6 +240,9 @@ cEpgSyncThread::cEpgSyncThread(): cThread("epgsync") { plugin = NULL; + // initialized to "now", so no scheduled sync right after VDR start + // use syncOnStart option instead + last = time(NULL); } cEpgSyncThread::~cEpgSyncThread() { diff -Nru vdr-plugin-epgsync-1.0.0/thread.h vdr-plugin-epgsync-1.0.1/thread.h --- vdr-plugin-epgsync-1.0.0/thread.h 2013-04-30 21:19:13.000000000 +0000 +++ vdr-plugin-epgsync-1.0.1/thread.h 2014-03-13 09:47:08.000000000 +0000 @@ -11,16 +11,19 @@ #include #include #include "svdrpservice.h" +#include class cEpgSyncThread: public cThread { private: cPlugin *plugin; SvdrpConnection_v1_0 svdrp; + time_t last; protected: virtual void Action(); bool CmdLSTE(FILE *f, const char *Arg = NULL); void AddSchedule(FILE *f); public: + time_t LastRun() const { return last; }; cEpgSyncThread(); virtual ~cEpgSyncThread(); };