summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--global.h2
-rw-r--r--infosatepg.cpp22
-rw-r--r--po/it_IT.po67
-rw-r--r--status.cpp20
4 files changed, 86 insertions, 25 deletions
diff --git a/global.h b/global.h
index 0201758..e7a4810 100644
--- a/global.h
+++ b/global.h
@@ -125,9 +125,9 @@ public:
cGlobalInfosatepg();
~cGlobalInfosatepg();
cGlobalInfosatdata Infosatdata[EPG_DAYS+1];
- cDevice *dev;
void SetWakeupTime(int Time)
{
+ dsyslog("infosatepg: time=%i",Time);
if (Time==-1) return;
if (wakeuptime!=-1) return; // already set
int hour,minute;
diff --git a/infosatepg.cpp b/infosatepg.cpp
index 60a07a9..16a56e5 100644
--- a/infosatepg.cpp
+++ b/infosatepg.cpp
@@ -157,7 +157,6 @@ void cPluginInfosatepg::MainThreadHook(void)
{
// ok -> use this device
dsyslog("infosatepg: found free device %i (live)",dev->DeviceNumber()+1);
- global->dev=dev;
if (global->LastCurrentChannel==-1) global->LastCurrentChannel=
cDevice::PrimaryDevice()->CurrentChannel();
cDevice::PrimaryDevice()->SwitchChannel(chan,true);
@@ -178,7 +177,6 @@ void cPluginInfosatepg::MainThreadHook(void)
{
// just use this device
dsyslog("infosatepg: found already switched device %i",dev->DeviceNumber()+1);
- global->dev=dev;
if (cDevice::ActualDevice()->CardIndex()==i)
cDevice::PrimaryDevice()->SwitchChannel(chan,true);
else
@@ -193,7 +191,6 @@ void cPluginInfosatepg::MainThreadHook(void)
// ok -> use this device
dsyslog("infosatepg: found free device %i",dev->DeviceNumber()+1);
- global->dev=dev;
dev->SwitchChannel(chan,false);
global->SetWaitTimer();
return;
@@ -215,11 +212,12 @@ cString cPluginInfosatepg::Active(void)
if (cDevice::PrimaryDevice()->CurrentChannel()==global->Channel)
{
// we are still on infosatepg channel
- cChannel *chan=Channels.GetByNumber(global->Channel);
+ cChannel *chan=Channels.GetByNumber(global->LastCurrentChannel);
if (chan)
{
// switch back to users last viewed channel
cDevice::PrimaryDevice()->SwitchChannel(chan,true);
+ global->LastCurrentChannel=-1;
}
}
}
@@ -298,24 +296,22 @@ cString cPluginInfosatepg::SVDRPCommand(const char *Command, const char *Option,
else
asprintf(&output,"%s Received all: no",output);
asprintf(&output,"%s Processed all: %s",output,global->ProcessedAll ? "yes" : "no");
- if (global->Switched())
+ asprintf(&output,"%s Switched: %s\n",output,global->Switched() ? "yes" : "no");
+ if (global->WakeupTime()!=-1)
{
- asprintf(&output,"%s Switched: yes (%i)\n",output,global->dev->DeviceNumber()+1);
+ asprintf(&output,"%s WakeupTime: %04i ", global->WakeupTime());
}
else
{
- asprintf(&output,"%s Switched: no\n",output);
+ asprintf(&output,"%s WakeupTime: unset ", output);
}
- if (global->WakeupTime()!=-1)
+ if (global->LastCurrentChannel!=-1)
{
- int hour,minute;
- hour=(int) (global->WakeupTime()/100);
- minute=global->WakeupTime()-(hour*100);
- asprintf(&output,"%s WakeupTime: %02i:%02i\n", output,hour,minute);
+ asprintf(&output,"%s Switchback to: %i\n", output, global->LastCurrentChannel);
}
else
{
- asprintf(&output,"%s WakeupTime: unset\n", output);
+ asprintf(&output,"%s Switchback to: unset\n",output);
}
for (int mac=EPG_FIRST_DAY_MAC; mac<=EPG_LAST_DAY_MAC; mac++)
{
diff --git a/po/it_IT.po b/po/it_IT.po
new file mode 100644
index 0000000..1974c4a
--- /dev/null
+++ b/po/it_IT.po
@@ -0,0 +1,67 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the infosatepg package.
+# Jochen Dolze <infosatepg@dolze.de>, 2008
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: vdr-1.6.0\n"
+"Report-Msgid-Bugs-To: <see README>\n"
+"POT-Creation-Date: 2009-01-06 16:10+0100\n"
+"PO-Revision-Date: 2008-12-24 19:16+0100\n"
+"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Italian\n"
+"X-Poedit-Country: ITALY\n"
+
+msgid "Infosat plugin still working"
+msgstr "Il plugin Infosat รจ ancora in funzione"
+
+msgid "Infosat channellist available"
+msgstr "Lista canale Infosat disponibile"
+
+msgid "Scan parameter"
+msgstr "Parametri scansione"
+
+msgid "Channel"
+msgstr "Canale"
+
+msgid "Pid"
+msgstr "PID"
+
+msgid "Event options"
+msgstr "Opzioni evento"
+
+msgid "Wait time [s]"
+msgstr "Tempo di attesa [s]"
+
+msgid "Time difference [min]"
+msgstr "Differenza tempo [min]"
+
+msgid "Infosat channels"
+msgstr "Canali Infosat"
+
+msgid "no"
+msgstr "no"
+
+msgid "short text"
+msgstr "testo breve"
+
+msgid "short/long text"
+msgstr "testo breve/lungo"
+
+msgid "short text/extEPG"
+msgstr "testo breve/extEPG"
+
+msgid "intelligent"
+msgstr "intelligente"
+
+msgid "complete"
+msgstr "completa"
+
+msgid "Read EPG info from infosat"
+msgstr "Legge info EPG da Infosat"
+
diff --git a/status.cpp b/status.cpp
index 9f02ef8..3b51370 100644
--- a/status.cpp
+++ b/status.cpp
@@ -23,27 +23,26 @@ cStatusInfosatepg::~cStatusInfosatepg(void)
void cStatusInfosatepg::ChannelSwitch(const cDevice *Device, int ChannelNumber)
{
+ if (!ChannelNumber) return;
+ if (!Device) return; // just to be safe
+
bool bAddFilter=false;
// just add filter if we aren't locked
if (ChannelNumber==global->Channel)
{
- if (Device!=global->dev) return; // don't use virtual devices (they will switch too)
+ cChannel *chan=Channels.GetByNumber(global->Channel);
+ if (!chan) return;
+ if (!Device->ProvidesTransponder(chan)) return; // ignore virtual devices
+ if (Device==myFilterDevice) return; // already attached to this device
if (!global->ReceivedAll()) bAddFilter=true;
}
if (bAddFilter)
{
+ if (myFilterDevice) return; // already attached to another device
- if ((myFilterDevice) && (myFilter))
- {
- if (myFilterDevice==Device) return; // already attached -> bail out
- dsyslog("infosatepg: detach previously attached filter");
- myFilterDevice->Detach(myFilter);
- }
-
- myFilterDevice = Device->GetDevice(Device->DeviceNumber());
- if (!myFilterDevice) return;
+ myFilterDevice = (cDevice *) Device;
dsyslog("switching device %i to channel %i (infosatepg)",
Device->DeviceNumber()+1,ChannelNumber);
@@ -59,7 +58,6 @@ void cStatusInfosatepg::ChannelSwitch(const cDevice *Device, int ChannelNumber)
dsyslog("infosatepg: detach filter");
myFilterDevice->Detach(myFilter);
myFilterDevice=NULL;
- global->dev=NULL;
global->SetWaitTimer();
global->SetSwitched(false);
}