From patchwork Mon May 30 18:29:38 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ville_Skytt=C3=A4?= X-Patchwork-Id: 11896 Received: from smtp3.pp.htv.fi ([213.243.153.36]) by www.linuxtv.org with esmtp (Exim 4.34) id 1Dcp0t-0004Ip-Gu for vdr@linuxtv.org; Mon, 30 May 2005 20:29:23 +0200 Received: from cs78131082.pp.htv.fi (cs78131082.pp.htv.fi [62.78.131.82]) by smtp3.pp.htv.fi (Postfix) with ESMTP id F2E4727ACEE; Mon, 30 May 2005 21:29:21 +0300 (EEST) From: Ville =?ISO-8859-1?Q?Skytt=E4?= To: thomas@heiligenmann.de Date: Mon, 30 May 2005 21:29:38 +0300 Message-Id: <1117477778.4633.84.camel@bobcat.mine.nu> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-4) Cc: vdr@linuxtv.org Subject: [vdr] wapd patch for vdr 1.3.25 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2005 18:29:23 -0000 Status: O X-Status: X-Keywords: X-UID: 2609 Attached is a patch for wapd 0.7a, fixes build with VDR versions up to 1.3.25 + contains one WML escaping fix. diff -ru wapd-0.7a.orig/server.c wapd-0.7a/server.c --- wapd-0.7a.orig/server.c 2005-01-25 22:32:24.000000000 +0200 +++ wapd-0.7a/server.c 2005-05-30 21:22:38.000000000 +0300 @@ -229,7 +229,11 @@ if (Option("settings")) { unurilize(getopt); cChannel ch; +#if VDRVERSNUM > 10323 + if (ch.Parse(getopt)) { +#else if (ch.Parse(getopt, true)) { +#endif if (nr) { cChannel *channel = Channels.GetByNumber(nr); if (Channels.HasUniqueChannelID(&ch, channel)) { @@ -481,7 +485,11 @@ flags = timer->Active() ? 1 : 0; #endif channel_nr = timer->Channel()->Number(); +#if VDRVERSNUM > 10322 + day = strdup(timer->PrintDay(timer->Day(), 0)); +#else day = strdup(timer->PrintDay(timer->Day())); +#endif start = timer->Start(); stop = timer->Stop(); priority = timer->Priority(); @@ -505,7 +513,7 @@ wmltr("Stop"), base, stop / 100, stop %100, wmltr("Priority"), base, priority, wmltr("Lifetime"), base, lifetime, - wmltr("File"), base, file); + wmltr("File"), base, wmlescape(file)); if (timer) ReplyBuffer(WML_END(WML_DO("%s", URI_MAIN) WML_ENDDO() WML_DO("%s", URI_TIMERS) WML_ENDDO() @@ -545,8 +553,13 @@ int level = recording->HierarchyLevels(); char *title = wmlescape(strdup(recording->Title(' ', false, level))); ReplyBuffer("%s" WML_BR(), title); +#if VDRVERSNUM > 10324 + if (recording->Info()->Description()) { + char *sum = wmlescape(strdup(recording->Info()->Description())); +#else if (recording->Summary()) { char *sum = wmlescape(strdup(recording->Summary())); +#endif char *tok; char *subtitle = strtok_r(sum, "\n", &tok); subtitle = strtok_r(NULL, "\n", &tok); @@ -957,7 +970,11 @@ timer->Stop() % 100, timer->Channel()->Number(), #if VDRVERSNUM >= 10318 +#if VDRVERSNUM > 10322 + *timer->PrintDay(timer->Day(), 0), +#else *timer->PrintDay(timer->Day()), +#endif #else timer->PrintDay(timer->Day()), #endif