summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2007-12-25 16:38:56 +0000
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2007-12-25 16:38:56 +0000
commitd70243c63f52bdffa922bd8cefa8d0cbbca335f5 (patch)
treeb303a09bcd161a5583a61ed7da5f7b60a6915f9e
parent00934e5559ed3b6f15be79d953f3fd3a19b66cff (diff)
downloadvdr-plugin-live-d70243c63f52bdffa922bd8cefa8d0cbbca335f5.tar.gz
vdr-plugin-live-d70243c63f52bdffa922bd8cefa8d0cbbca335f5.tar.bz2
- Presence of IMDb URLs is now configurable. Closes bug #401.
-rw-r--r--doc/ChangeLog7
-rw-r--r--i18n-generated.h35
-rw-r--r--live/js/live/browserwin.js10
-rw-r--r--pages/pageelems.ecpp2
-rw-r--r--pages/recordings.ecpp21
-rw-r--r--pages/setup.ecpp9
-rw-r--r--po/.cvsignore1
-rw-r--r--po/ca_ES.po3
-rw-r--r--po/cs_CZ.po3
-rw-r--r--po/da_DK.po3
-rw-r--r--po/de_DE.po3
-rw-r--r--po/el_GR.po3
-rw-r--r--po/es_ES.po3
-rw-r--r--po/et_EE.po3
-rw-r--r--po/fi_FI.po3
-rw-r--r--po/fr_FR.po3
-rw-r--r--po/hr_HR.po3
-rw-r--r--po/hu_HU.po3
-rw-r--r--po/it_IT.po3
-rw-r--r--po/nl_NL.po3
-rw-r--r--po/nn_NO.po3
-rw-r--r--po/pl_PL.po3
-rw-r--r--po/pt_PT.po3
-rw-r--r--po/ro_RO.po3
-rw-r--r--po/ru_RU.po3
-rw-r--r--po/sl_SI.po3
-rw-r--r--po/sv_SE.po3
-rw-r--r--po/tr_TR.po3
-rw-r--r--setup.cpp5
-rw-r--r--setup.h3
30 files changed, 142 insertions, 14 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index d57f2b4..c7eef04 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,10 @@
+2007-12-25 Dieter Hametner <dh+vdr at gekrumbel dot de>
+
+ - Added configuration option to disable the creation of IMDb URLs
+ in the epg-info sections. This was done upon of feature
+ reqest (Bug #401).
+ Some minor fixes for the IMDb URLs in recordings.
+
2007-12-23 Dieter Hametner <dh+vdr at gekrumbel dot de>
* po/*.po
diff --git a/i18n-generated.h b/i18n-generated.h
index 510744b..438d1e9 100644
--- a/i18n-generated.h
+++ b/i18n-generated.h
@@ -7571,6 +7571,41 @@ const tI18nPhrase Phrases[] = {
"",
#endif
},
+ { "Add links to IMDb",
+ "Füge Links zur IMDb hinzu",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+#if VDRVERSNUM >= 10302
+ "",
+#endif
+#if VDRVERSNUM >= 10307
+ "",
+#endif
+#if VDRVERSNUM >= 10313
+ "",
+#endif
+#if VDRVERSNUM >= 10316
+ "",
+#endif
+#if VDRVERSNUM >= 10342
+ "",
+#endif
+#if VDRVERSNUM >= 10502
+ "",
+#endif
+ },
{ "additional fixed times in 'What's on?'",
"zusätzliche Zeitpunkte in 'Was läuft?'",
"",
diff --git a/live/js/live/browserwin.js b/live/js/live/browserwin.js
index 79058b7..7a908c6 100644
--- a/live/js/live/browserwin.js
+++ b/live/js/live/browserwin.js
@@ -39,7 +39,7 @@ var BrowserWin = new Class({
},
create: function(url){
- winOpts = "height=" + this.options.size.height;
+ winOpts = "height=" + this.options.size.height;
winOpts += ",width=" + this.options.size.width;
winOpts += ",toolbar=" + this.options.toolbar;
winOpts += ",location=" + this.options.toolbar;
@@ -55,6 +55,10 @@ var BrowserWin = new Class({
winOpts += ",left=" + this.options.left;
}
this.$winRef = window.open(url, this.id, winOpts);
+ },
+
+ close: function(){
+ this.wm.unregister(this);
}
});
@@ -75,8 +79,8 @@ BrowserWin.Manager = new Class({
this.unregister(browserWin);
browserWin.create(url);
- this.fireEvent('onRegister', [browserWin]);
this.hashTab.set(browserWin.id, browserWin);
+ this.fireEvent('onRegister', [browserWin]);
},
unregister: function(browserWin){
@@ -84,8 +88,8 @@ BrowserWin.Manager = new Class({
winRef = this.hashTab.get(browserWin.id);
winRef.$winRef.close();
this.fireEvent('onUnregister', [winRef]);
+ this.hashTab.remove(browserWin.id);
}
- this.hashTab.remove(browserWin.id);
}
});
diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp
index de828e4..b61e663 100644
--- a/pages/pageelems.ecpp
+++ b/pages/pageelems.ecpp
@@ -96,7 +96,7 @@ int update_status(1);
<%args>
string title;
</%args>
-<%cpp> { </%cpp> <a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>" target="_blank"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a> <%cpp> } </%cpp>
+<%cpp> if (LiveSetup().GetShowIMDb()) { </%cpp> <a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>" target="_blank"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a> <%cpp> } </%cpp>
</%def>
<# ---------------------------------------------------------------------- #>
diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp
index 67f9e01..2acfdc4 100644
--- a/pages/recordings.ecpp
+++ b/pages/recordings.ecpp
@@ -86,12 +86,14 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) {
recItemParams.add("level", lexical_cast<string, int>(level + 1));
</%cpp>
<ul class="recordingslist" style="display: none;">
-% callComp("recordings.recordings_item", request, reply, recItemParams);
+<%cpp>
+ callComp("recordings.recordings_item", request, reply, recItemParams);
+</%cpp>
</ul>
</li>
-% }
-%}
<%cpp>
+ }
+}
for (iter = recordingsTree->begin(path); iter != end; ++iter) {
RecordingsItemPtr recItem = iter->second;
if (!recItem->IsDir()) {
@@ -141,11 +143,11 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) {
string folderimg = "folder_closed.png";
</%args>
<div class="recording_item" onclick="Toggle(this)">
- <div class="recording_imgs"><%cpp> reply.out() << StringRepeat(level, "<img src=\"/img/transparent.png\" alt=\"\" width=\"16px\" height=\"16px\" />"); </%cpp><img class="recording_expander" src="<$ LiveSetup().GetThemedLink("img", collapseimg) $>" alt="" /><img class="recording_folder" src="<$ LiveSetup().GetThemedLink("img", folderimg) $>" alt="" /></div>
- <div class="recording_spec">
- <div class="recording_name"><$ name $></div>
- </div>
- <div class="recording_actions">&nbsp;</div>
+ <div class="recording_imgs"><%cpp> reply.out() << StringRepeat(level, "<img src=\"/img/transparent.png\" alt=\"\" width=\"16px\" height=\"16px\" />"); </%cpp><img class="recording_expander" src="<$ LiveSetup().GetThemedLink("img", collapseimg) $>" alt="" /><img class="recording_folder" src="<$ LiveSetup().GetThemedLink("img", folderimg) $>" alt="" /></div>
+ <div class="recording_spec">
+ <div class="recording_name"><$ name $></div>
+ </div>
+ <div class="recording_actions">&nbsp;</div>
</div>
</%def>
@@ -164,7 +166,7 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) {
string archived;
</%args>
<div class="recording_item">
- <div class="recording_imgs"><%cpp> reply.out() << StringRepeat(level + 1, "<img src=\"/img/transparent.png\" alt=\"\" width=\"16px\" height=\"16px\" />"); </%cpp><%cpp> if (!archived.empty()) { </%cpp><& archived_disc archived=(archived) &><%cpp> } else { </%cpp><img src="<$ LiveSetup().GetThemedLink("img", "movie.png") $>" alt="movie" /><%cpp> } </%cpp></div>
+ <div class="recording_imgs"><%cpp> reply.out() << StringRepeat(level + 1, "<img src=\"/img/transparent.png\" alt=\"\" width=\"16px\" height=\"16px\" />"); </%cpp><%cpp> if (!archived.empty()) { </%cpp><img src="<$ LiveSetup().GetThemedLink("img", "on_dvd.png") $>" alt="on_dvd" <& tooltip.hint text=(archived) &> /><%cpp> } else { </%cpp><img src="<$ LiveSetup().GetThemedLink("img", "movie.png") $>" alt="movie" /><%cpp> } </%cpp></div>
<div class="recording_spec">
<div class="recording_day" style="width: <$ dayLen $>"><$ day $></div>
<div class="recording_date"><$ FormatDateTime(tr("%b %d %y"), startTime) $></div>
@@ -181,6 +183,7 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) {
else {
</%cpp>
<img src="/img/transparent.png" alt="" width="16px" height="16px" />
+ <& pageelems.imdb_info_href title=(name) &>
<%cpp>
}
</%cpp>
diff --git a/pages/setup.ecpp b/pages/setup.ecpp
index 548846f..d89acf0 100644
--- a/pages/setup.ecpp
+++ b/pages/setup.ecpp
@@ -22,6 +22,7 @@ using namespace std;
string useAjax;
string showInfoBox;
string useStreamdev;
+ string showIMDb;
string streamdevport;
string streamdevtype;
int authchanged = 0;
@@ -63,6 +64,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
LiveSetup().SetUseStreamdev(!useStreamdev.empty());
LiveSetup().SetStreamdevPort(streamdevport.empty() ? 3000 : lexical_cast<int>(streamdevport));
LiveSetup().SetStreamdevType(streamdevtype.empty() ? "PES" : streamdevtype);
+ LiveSetup().SetShowIMDb(!showIMDb.empty());
LiveSetup().SaveSetup();
message = tr("Setup saved.");
}
@@ -86,6 +88,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
useStreamdev = LiveSetup().GetUseStreamdev() ? "1" : "";
streamdevport = lexical_cast<std::string, int>(LiveSetup().GetStreamdevPort());
streamdevtype = LiveSetup().GetStreamdevType();
+ showIMDb = LiveSetup().GetShowIMDb() ? "1" : "";
</%cpp>
<& pageelems.doc_type &>
@@ -203,6 +206,12 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
</td>
</tr>
<tr>
+ <td class="label leftcol"><div class="withmargin"><$ tr("Add links to IMDb") $>:</div></td>
+ <td class="rightcol">
+ <input type="checkbox" name="showIMDb" id="showIMDb" value="1" <%cpp> CHECKIF(!showIMDb.empty()); </%cpp>/>
+ </td>
+ </tr>
+ <tr>
<td class="label leftcol"><div class="withmargin"><$ tr("additional fixed times in 'What's on?'") $>:</div></td>
<td class="rightcol"><input type="text" name="times" value="<$ times $>" id="times" />
<& tooltip.help text=(tr("Format is HH:MM. Separate multiple times with a semicolon")) &></td>
diff --git a/po/.cvsignore b/po/.cvsignore
index cd1f2c9..bff5c13 100644
--- a/po/.cvsignore
+++ b/po/.cvsignore
@@ -1 +1,2 @@
*.mo
+live.pot \ No newline at end of file
diff --git a/po/ca_ES.po b/po/ca_ES.po
index a86b70a..0550b9b 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.po
@@ -664,6 +664,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
index 50a13f0..eac3ec5 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -662,6 +662,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/da_DK.po b/po/da_DK.po
index 1a9d1ad..493269c 100644
--- a/po/da_DK.po
+++ b/po/da_DK.po
@@ -662,6 +662,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/de_DE.po b/po/de_DE.po
index 8ce6ad0..027c1f9 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -664,6 +664,9 @@ msgstr "Streamdev Server Port"
msgid "Streamdev stream type"
msgstr "Streamdev Stream Typ"
+msgid "Add links to IMDb"
+msgstr "Füge Links zur IMDb hinzu"
+
msgid "additional fixed times in 'What's on?'"
msgstr "zusätzliche Zeitpunkte in 'Was läuft?'"
diff --git a/po/el_GR.po b/po/el_GR.po
index 02781e4..bdd434b 100644
--- a/po/el_GR.po
+++ b/po/el_GR.po
@@ -662,6 +662,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/es_ES.po b/po/es_ES.po
index 842e4b7..8c5b283 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -662,6 +662,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/et_EE.po b/po/et_EE.po
index 220e94e..f397711 100644
--- a/po/et_EE.po
+++ b/po/et_EE.po
@@ -662,6 +662,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/fi_FI.po b/po/fi_FI.po
index 0ec4a91..c6c7acd 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -662,6 +662,9 @@ msgstr "Streamdev-palvelimen portti"
msgid "Streamdev stream type"
msgstr "Streamdev-lähetteen tyyppi"
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr "Lisäajankohdat 'Menossa?'-sivulle"
diff --git a/po/fr_FR.po b/po/fr_FR.po
index 45aeda0..50c41c8 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -666,6 +666,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr "périodes fixes additionnelles dans 'actuellement?'"
diff --git a/po/hr_HR.po b/po/hr_HR.po
index 5b38a44..5747739 100644
--- a/po/hr_HR.po
+++ b/po/hr_HR.po
@@ -663,6 +663,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/hu_HU.po b/po/hu_HU.po
index 9b283f0..88095e4 100644
--- a/po/hu_HU.po
+++ b/po/hu_HU.po
@@ -663,6 +663,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/it_IT.po b/po/it_IT.po
index 56f0c87..c31ee1a 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -665,6 +665,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/nl_NL.po b/po/nl_NL.po
index 6b4f0c7..971c65d 100644
--- a/po/nl_NL.po
+++ b/po/nl_NL.po
@@ -665,6 +665,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/nn_NO.po b/po/nn_NO.po
index d6e14ff..49e8364 100644
--- a/po/nn_NO.po
+++ b/po/nn_NO.po
@@ -663,6 +663,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/pl_PL.po b/po/pl_PL.po
index 037a403..35b36e6 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -662,6 +662,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/pt_PT.po b/po/pt_PT.po
index 7d13abf..ad1849e 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -662,6 +662,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/ro_RO.po b/po/ro_RO.po
index 92264d4..613f83b 100644
--- a/po/ro_RO.po
+++ b/po/ro_RO.po
@@ -663,6 +663,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/ru_RU.po b/po/ru_RU.po
index 6e1bc0c..38bf7e6 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -662,6 +662,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/sl_SI.po b/po/sl_SI.po
index ce673d6..b098bf9 100644
--- a/po/sl_SI.po
+++ b/po/sl_SI.po
@@ -663,6 +663,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/sv_SE.po b/po/sv_SE.po
index 3f82f7e..261fe07 100644
--- a/po/sv_SE.po
+++ b/po/sv_SE.po
@@ -663,6 +663,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/po/tr_TR.po b/po/tr_TR.po
index 1331580..a9fd8eb 100644
--- a/po/tr_TR.po
+++ b/po/tr_TR.po
@@ -662,6 +662,9 @@ msgstr ""
msgid "Streamdev stream type"
msgstr ""
+msgid "Add links to IMDb"
+msgstr ""
+
msgid "additional fixed times in 'What's on?'"
msgstr ""
diff --git a/setup.cpp b/setup.cpp
index bc024af..543b5c3 100644
--- a/setup.cpp
+++ b/setup.cpp
@@ -35,7 +35,8 @@ Setup::Setup():
m_showInfoBox(1),
m_useStreamdev(1),
m_streamdevPort(3000),
- m_streamdevType()
+ m_streamdevType(),
+ m_showIMDb(1)
{
m_adminPasswordMD5 = "4:" + MD5Hash("live");
liveplugin = cPluginManager::GetPlugin("live");
@@ -101,6 +102,7 @@ bool Setup::ParseSetupEntry( char const* name, char const* value )
else if ( strcmp( name, "StreamdevPort" ) == 0 ) { m_streamdevPort = atoi(value); }
else if ( strcmp( name, "StreamdevType" ) == 0 ) { m_streamdevType = value; }
else if ( strcmp( name, "ScreenShotInterval" ) == 0 ) { m_screenshotInterval = atoi(value); }
+ else if ( strcmp( name, "ShowIMDb" ) == 0 ) { m_showIMDb = atoi(value); }
else return false;
return true;
}
@@ -231,6 +233,7 @@ bool Setup::SaveSetup()
liveplugin->SetupStore("StreamdevPort", m_streamdevPort);
liveplugin->SetupStore("StreamdevType", m_streamdevType.c_str());
liveplugin->SetupStore("ScreenShotInterval", m_screenshotInterval);
+ liveplugin->SetupStore("ShowIMDb", m_showIMDb);
return true;
}
diff --git a/setup.h b/setup.h
index 039df04..6fffa80 100644
--- a/setup.h
+++ b/setup.h
@@ -51,6 +51,7 @@ class Setup
bool GetUseStreamdev() const { return m_useStreamdev != 0; }
int GetStreamdevPort() const { return m_streamdevPort; }
std::string const GetStreamdevType() const { return m_streamdevType; }
+ bool GetShowIMDb() const { return m_showIMDb != 0; }
std::string const GetEpgImageDir() { return m_epgimagedir; }
void SetLastChannel(int lastChannel) { m_lastChannel = lastChannel; }
@@ -70,6 +71,7 @@ class Setup
void SetUseStreamdev(bool use) { m_useStreamdev = use ? 1 : 0; }
void SetStreamdevPort(int port) { m_streamdevPort = port; }
void SetStreamdevType(std::string const & type) { m_streamdevType = type; }
+ void SetShowIMDb(bool show) { m_showIMDb = show ? 1 : 0; }
bool SaveSetup();
@@ -114,6 +116,7 @@ class Setup
int m_useStreamdev;
int m_streamdevPort;
std::string m_streamdevType;
+ int m_showIMDb;
bool CheckServerPort();
bool CheckServerIps();