From d70243c63f52bdffa922bd8cefa8d0cbbca335f5 Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Tue, 25 Dec 2007 16:38:56 +0000 Subject: - Presence of IMDb URLs is now configurable. Closes bug #401. --- doc/ChangeLog | 7 +++++++ i18n-generated.h | 35 +++++++++++++++++++++++++++++++++++ live/js/live/browserwin.js | 10 +++++++--- pages/pageelems.ecpp | 2 +- pages/recordings.ecpp | 21 ++++++++++++--------- pages/setup.ecpp | 9 +++++++++ po/.cvsignore | 1 + po/ca_ES.po | 3 +++ po/cs_CZ.po | 3 +++ po/da_DK.po | 3 +++ po/de_DE.po | 3 +++ po/el_GR.po | 3 +++ po/es_ES.po | 3 +++ po/et_EE.po | 3 +++ po/fi_FI.po | 3 +++ po/fr_FR.po | 3 +++ po/hr_HR.po | 3 +++ po/hu_HU.po | 3 +++ po/it_IT.po | 3 +++ po/nl_NL.po | 3 +++ po/nn_NO.po | 3 +++ po/pl_PL.po | 3 +++ po/pt_PT.po | 3 +++ po/ro_RO.po | 3 +++ po/ru_RU.po | 3 +++ po/sl_SI.po | 3 +++ po/sv_SE.po | 3 +++ po/tr_TR.po | 3 +++ setup.cpp | 5 ++++- setup.h | 3 +++ 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 + + - 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 * po/*.po diff --git a/i18n-generated.h b/i18n-generated.h index 510744b..438d1e9 100644 --- a/i18n-generated.h +++ b/i18n-generated.h @@ -7567,6 +7567,41 @@ const tI18nPhrase Phrases[] = { #if VDRVERSNUM >= 10342 "", #endif +#if VDRVERSNUM >= 10502 + "", +#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 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; -<%cpp> { " alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>> <%cpp> } +<%cpp> if (LiveSetup().GetShowIMDb()) { " alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>> <%cpp> } <# ---------------------------------------------------------------------- #> 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(level + 1)); -% } -%} <%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";
-
<%cpp> reply.out() << StringRepeat(level, "\"\""); " alt="" />" alt="" />
-
-
<$ name $>
-
-
 
+
<%cpp> reply.out() << StringRepeat(level, "\"\""); " alt="" />" alt="" />
+
+
<$ name $>
+
+
 
@@ -164,7 +166,7 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) { string archived;
-
<%cpp> reply.out() << StringRepeat(level + 1, "\"\""); <%cpp> if (!archived.empty()) { <& archived_disc archived=(archived) &><%cpp> } else { " alt="movie" /><%cpp> }
+
<%cpp> reply.out() << StringRepeat(level + 1, "\"\""); <%cpp> if (!archived.empty()) { " alt="on_dvd" <& tooltip.hint text=(archived) &> /><%cpp> } else { " alt="movie" /><%cpp> }
<$ day $>
<$ FormatDateTime(tr("%b %d %y"), startTime) $>
@@ -181,6 +183,7 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) { else { + <& pageelems.imdb_info_href title=(name) &> <%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(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(LiveSetup().GetStreamdevPort()); streamdevtype = LiveSetup().GetStreamdevType(); + showIMDb = LiveSetup().GetShowIMDb() ? "1" : ""; <& pageelems.doc_type &> @@ -202,6 +205,12 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
+ +
<$ tr("Add links to IMDb") $>:
+ + CHECKIF(!showIMDb.empty()); /> + +
<$ tr("additional fixed times in 'What's on?'") $>:
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(); -- cgit v1.2.3