summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2013-04-04 22:37:02 +0200
committerJochen Dolze <vdr@dolze.de>2013-04-04 22:37:02 +0200
commitb952e638c6eb2c56a6873fcbf40c78b86e6bccfd (patch)
tree525c57550b47af49ef88be01462838d654c22cf1
parentf68a8728b20301de5e92e3f58759b7ab664155aa (diff)
downloadvdr-plugin-markad-b952e638c6eb2c56a6873fcbf40c78b86e6bccfd.tar.gz
vdr-plugin-markad-b952e638c6eb2c56a6873fcbf40c78b86e6bccfd.tar.bz2
Added option to disable markad
Fixed option 'deferred shutdown'
-rw-r--r--plugin/markad.cpp1
-rw-r--r--plugin/po/de_DE.po5
-rw-r--r--plugin/po/es_ES.po5
-rw-r--r--plugin/po/fi_FI.po5
-rw-r--r--plugin/po/it_IT.po5
-rw-r--r--plugin/po/sk_SK.po5
-rw-r--r--plugin/setup.cpp57
-rw-r--r--plugin/setup.h4
-rw-r--r--plugin/status.cpp9
9 files changed, 60 insertions, 36 deletions
diff --git a/plugin/markad.cpp b/plugin/markad.cpp
index cf35156..e7ebfb0 100644
--- a/plugin/markad.cpp
+++ b/plugin/markad.cpp
@@ -200,6 +200,7 @@ bool cPluginMarkAd::SetupParse(const char *Name, const char *Value)
else if (!strcasecmp(Name,"Log2Rec")) setup.Log2Rec=atoi(Value);
else if (!strcasecmp(Name,"LogoOnly")) setup.LogoOnly=atoi(Value);
else if (!strcasecmp(Name,"SaveInfo")) setup.SaveInfo=atoi(Value);
+ else if (!strcasecmp(Name,"DeferredShutdown")) setup.DeferredShutdown=atoi(Value);
else return false;
return true;
}
diff --git a/plugin/po/de_DE.po b/plugin/po/de_DE.po
index 6c2a6e8..f5f9c84 100644
--- a/plugin/po/de_DE.po
+++ b/plugin/po/de_DE.po
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2012-05-17 12:42+0200\n"
+"POT-Creation-Date: 2013-04-01 12:17+0200\n"
"PO-Revision-Date: 2009-08-27 14:18+0200\n"
"Last-Translator: Jochen Dolze <vdr@dolze.de>\n"
"Language-Team: German <vdr@linuxtv.org>\n"
@@ -55,6 +55,9 @@ msgstr "danach"
msgid "during"
msgstr "während"
+msgid "never"
+msgstr "nie"
+
msgid "execution"
msgstr "Ausführung"
diff --git a/plugin/po/es_ES.po b/plugin/po/es_ES.po
index eee5681..d12277e 100644
--- a/plugin/po/es_ES.po
+++ b/plugin/po/es_ES.po
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2012-05-17 12:42+0200\n"
+"POT-Creation-Date: 2013-04-01 12:17+0200\n"
"PO-Revision-Date: 2011-02-12 11:30+0100\n"
"Last-Translator: Javier Bradineras <jbradi@hotmail.com>\n"
"Language-Team: Spanish <vdr@linuxtv.org>\n"
@@ -58,6 +58,9 @@ msgstr "Después"
msgid "during"
msgstr "Durante"
+msgid "never"
+msgstr ""
+
msgid "execution"
msgstr "Ejecución"
diff --git a/plugin/po/fi_FI.po b/plugin/po/fi_FI.po
index 57576b1..7ed6755 100644
--- a/plugin/po/fi_FI.po
+++ b/plugin/po/fi_FI.po
@@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2012-05-17 12:42+0200\n"
+"POT-Creation-Date: 2013-04-01 12:17+0200\n"
"PO-Revision-Date: 2011-02-27 02:27+0200\n"
"Last-Translator: Rolf Ahrenberg\n"
"Language-Team: Finnish <vdr@linuxtv.org>\n"
@@ -56,6 +56,9 @@ msgstr "jälkeen"
msgid "during"
msgstr "aikana"
+msgid "never"
+msgstr ""
+
msgid "execution"
msgstr "Suorita tehtävä tallennuksen"
diff --git a/plugin/po/it_IT.po b/plugin/po/it_IT.po
index 6d6403a..8e3465b 100644
--- a/plugin/po/it_IT.po
+++ b/plugin/po/it_IT.po
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2012-05-17 12:42+0200\n"
+"POT-Creation-Date: 2013-04-01 12:17+0200\n"
"PO-Revision-Date: 2011-07-10 00:56+0100\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: Italian <vdr@linuxtv.org>\n"
@@ -58,6 +58,9 @@ msgstr "dopo"
msgid "during"
msgstr "durante"
+msgid "never"
+msgstr ""
+
msgid "execution"
msgstr "Esecuzione"
diff --git a/plugin/po/sk_SK.po b/plugin/po/sk_SK.po
index 5bb67a9..9397d51 100644
--- a/plugin/po/sk_SK.po
+++ b/plugin/po/sk_SK.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: markad\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2012-05-17 12:42+0200\n"
+"POT-Creation-Date: 2013-04-01 12:17+0200\n"
"PO-Revision-Date: 2011-03-01 20:26+0100\n"
"Last-Translator: milan hrala <hrala.milan@gmail.com>\n"
"Language-Team: milan hrala <grala.milan@gmail.com>\n"
@@ -58,6 +58,9 @@ msgstr "po"
msgid "during"
msgstr "priebežne"
+msgid "never"
+msgstr ""
+
msgid "execution"
msgstr "vykonávať"
diff --git a/plugin/setup.cpp b/plugin/setup.cpp
index 8b54d54..8aad8f5 100644
--- a/plugin/setup.cpp
+++ b/plugin/setup.cpp
@@ -27,6 +27,7 @@ cSetupMarkAd::cSetupMarkAd(struct setup *Setup)
processTexts[0]=tr("after");
processTexts[1]=tr("during");
+ processTexts[2]=tr("never");
lpos=0;
@@ -37,33 +38,37 @@ void cSetupMarkAd::write(void)
{
int current=Current();
Clear();
- cMenuEditStraItem *first=new cMenuEditStraItem(tr("execution"),&processduring,2,processTexts);
+ cMenuEditStraItem *first=new cMenuEditStraItem(tr("execution"),&processduring,3,processTexts);
if (!first) return;
Add(first);
- if (!processduring)
- {
- Add(new cMenuEditBoolItem(tr(" during another recording"),&whilerecording));
- Add(new cMenuEditBoolItem(tr(" while replaying"),&whilereplaying));
- }
- Add(new cMenuEditBoolItem(tr("scan only channels with logo"),&logoonly),true);
- lpos=Current();
- Add(new cMenuEditBoolItem(tr("deferred shutdown"),&deferredshutdown));
- Add(new cMenuEditBoolItem(tr("ignore timer margins"),&nomargins));
- Add(new cMenuEditBoolItem(tr("detect overlaps"),&secondpass));
- Add(new cMenuEditBoolItem(tr("recreate index"),&genindex));
- Add(new cMenuEditBoolItem(tr("correct info file"),&saveinfo));
- Add(new cMenuEditBoolItem(tr("OSD message"),&osdmsg));
- Add(new cMenuEditBoolItem(tr("verbose logging"),&verbose));
- Add(new cMenuEditBoolItem(tr("log to recording directory"),&log2rec));
- Add(new cMenuEditBoolItem(tr("hide mainmenu entry"),&hidemainmenuentry));
-
- if (current==-1)
- {
- SetCurrent(first);
- }
- else
- {
- SetCurrent(Get(current));
+ if (processduring!=2) {
+ if (!processduring)
+ {
+ Add(new cMenuEditBoolItem(tr(" during another recording"),&whilerecording));
+ Add(new cMenuEditBoolItem(tr(" while replaying"),&whilereplaying));
+ }
+ Add(new cMenuEditBoolItem(tr("scan only channels with logo"),&logoonly),true);
+ lpos=Current();
+ Add(new cMenuEditBoolItem(tr("deferred shutdown"),&deferredshutdown));
+ Add(new cMenuEditBoolItem(tr("ignore timer margins"),&nomargins));
+ Add(new cMenuEditBoolItem(tr("detect overlaps"),&secondpass));
+ Add(new cMenuEditBoolItem(tr("recreate index"),&genindex));
+ Add(new cMenuEditBoolItem(tr("correct info file"),&saveinfo));
+ Add(new cMenuEditBoolItem(tr("OSD message"),&osdmsg));
+ Add(new cMenuEditBoolItem(tr("verbose logging"),&verbose));
+ Add(new cMenuEditBoolItem(tr("log to recording directory"),&log2rec));
+ Add(new cMenuEditBoolItem(tr("hide mainmenu entry"),&hidemainmenuentry));
+
+ if (current==-1)
+ {
+ SetCurrent(first);
+ }
+ else
+ {
+ SetCurrent(Get(current));
+ }
+ } else {
+ lpos=-1;
}
Display();
}
@@ -122,7 +127,7 @@ void cSetupMarkAd::Store(void)
SetupStore("SaveInfo",saveinfo);
SetupStore("DeferredShutdown",deferredshutdown);
- setup->ProcessDuring=(bool) processduring;
+ setup->ProcessDuring=(int) processduring;
setup->whileRecording=(bool) whilerecording;
setup->whileReplaying=(bool) whilereplaying;
setup->OSDMessage=(bool) osdmsg;
diff --git a/plugin/setup.h b/plugin/setup.h
index d22460a..6677d6f 100644
--- a/plugin/setup.h
+++ b/plugin/setup.h
@@ -11,7 +11,7 @@
struct setup
{
- bool ProcessDuring;
+ int ProcessDuring;
bool whileRecording;
bool whileReplaying;
bool OSDMessage;
@@ -31,7 +31,7 @@ struct setup
class cSetupMarkAd : public cMenuSetupPage
{
private:
- const char *processTexts[2];
+ const char *processTexts[3];
struct setup *setup;
int processduring;
int whilerecording;
diff --git a/plugin/status.cpp b/plugin/status.cpp
index b219385..4fdf1be 100644
--- a/plugin/status.cpp
+++ b/plugin/status.cpp
@@ -70,9 +70,7 @@ void cStatusMarkAd::Replaying(const cControl *UNUSED(Control), const char *UNUSE
bool cStatusMarkAd::Start(const char *FileName, const char *Name, const bool Direct)
{
if ((Direct) && (Get(FileName)!=-1)) return false;
- if (setup->OSDMessage) {
- }
cString cmd = cString::sprintf("\"%s\"/markad %s%s%s%s%s%s%s -l \"%s\" %s \"%s\"",
bindir,
setup->Verbose ? " -v " : "",
@@ -95,7 +93,7 @@ bool cStatusMarkAd::Start(const char *FileName, const char *Name, const bool Dir
int pos=Add(FileName,Name);
if (getPid(pos) && getStatus(pos))
{
- if (!setup->ProcessDuring)
+ if (setup->ProcessDuring==0)
{
if (!Direct)
{
@@ -211,6 +209,11 @@ void cStatusMarkAd::Recording(const cDevice *Device, const char *Name,
if (!bindir) return; // we cannot operate without bindir
if (!logodir) return; // we dont want to operate without logodir
+ if (setup->ProcessDuring==2) {
+ dsyslog("markad: deactivated by user");
+ return; // markad deactivated
+ }
+
if (On)
{
if (setup->LogoOnly && !LogoExists(Device,FileName)) {