Re: [vdr] Channel wrapping in live-tv

2010-01-12 Thread Matti Lehtimäki

Timothy D. Lenz wrote:
Do you mean switching between the last channel viewed and the current 
channel? or channel.conf wrap around? Because last channel switch is 
already in by pressing the 0 key.


I mean channels.conf wrap around.

--
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [ANNOUNCE] noad-0.7.1

2010-03-14 Thread Matti Lehtimäki

the Noad wrote:
Hi, 


there is a new version of noad at

http://noad.heliohost.org

This Version handles also TS-Recordings.


Hi

Just a small problem I found in the new version. The script noadifnew 
does not recognize the new marks files (without the .vdr extension) 
produced for TS-files. This can be fixed with the attached patch. The 
patch also fixes a bug in the same file that prevents it from working 
with shells other than bash.


--
Matti
--- noad/noadifnew	2010-03-14 22:27:15.0 +0200
+++ noad-fix/noadifnew	2010-03-14 22:27:41.0 +0200
@@ -12,7 +12,8 @@
exit -1
 fi
 fil=$2/marks.vdr
-if  test -a $fil
+filts=$2/marks
+if [ -e $fil -o -e $filts ]
 then
   echo noad already done for $2
 else
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] [PATCH] Improved pause handling

2010-12-01 Thread Matti Lehtimäki

Hi,

Sometimes when you want to pause live video you are already recording 
the current channel. In such case it is not practical to start a new 
instant recording but it would be more practical to start replaying the 
recording already being made, jump to correct position in the recording 
and then pause. So I have implemented this for VDR-1.7.16 as a patch 
which adds two new options to Pause kay handling menu item to enable 
this behavior with or without confirmation.


Any improvements or suggestions are welcome.

--
Matti Lehtimäki
diff -Naur -x PLUGINS -x po vdr-1.7.16_orig/menu.c vdr-1.7.16_pause/menu.c
--- vdr-1.7.16_orig/menu.c	2010-06-06 12:56:16.0 +0300
+++ vdr-1.7.16_pause/menu.c	2010-11-30 21:09:07.0 +0200
@@ -3025,7 +3025,7 @@
 
 class cMenuSetupRecord : public cMenuSetupBase {
 private:
-  const char *pauseKeyHandlingTexts[3];
+  const char *pauseKeyHandlingTexts[5];
   const char *delTimeshiftRecTexts[3];
 public:
   cMenuSetupRecord(void);
@@ -3036,6 +3036,8 @@
   pauseKeyHandlingTexts[0] = tr(do not pause live video);
   pauseKeyHandlingTexts[1] = tr(confirm pause live video);
   pauseKeyHandlingTexts[2] = tr(pause live video);
+  pauseKeyHandlingTexts[3] = tr(confirm pause and switch to replay mode);
+  pauseKeyHandlingTexts[4] = tr(switch to replay mode);
   delTimeshiftRecTexts[0] = tr(no);
   delTimeshiftRecTexts[1] = tr(confirm);
   delTimeshiftRecTexts[2] = tr(yes);
@@ -3045,7 +3047,7 @@
   Add(new cMenuEditIntItem( tr(Setup.Recording$Primary limit), data.PrimaryLimit, 0, MAXPRIORITY));
   Add(new cMenuEditIntItem( tr(Setup.Recording$Default priority),  data.DefaultPriority, 0, MAXPRIORITY));
   Add(new cMenuEditIntItem( tr(Setup.Recording$Default lifetime (d)),  data.DefaultLifetime, 0, MAXLIFETIME));
-  Add(new cMenuEditStraItem(tr(Setup.Recording$Pause key handling),data.PauseKeyHandling, 3, pauseKeyHandlingTexts));
+  Add(new cMenuEditStraItem(tr(Setup.Recording$Pause key handling),data.PauseKeyHandling, 5, pauseKeyHandlingTexts));
   Add(new cMenuEditIntItem( tr(Setup.Recording$Pause priority),data.PausePriority, 0, MAXPRIORITY));
   Add(new cMenuEditIntItem( tr(Setup.Recording$Pause lifetime (d)),data.PauseLifetime, 0, MAXLIFETIME));
   Add(new cMenuEditBoolItem(tr(Setup.Recording$Use episode name),  data.UseSubtitle));
@@ -4207,6 +4209,19 @@
  AssertFreeDiskSpace(Timer-Priority(), !Timer-Pending());
  Timer-SetPending(true);
  }
+  else if (Setup.PauseKeyHandling  2  Pause) { // PauseLiveVideo  do not start recording
+ cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
+ for (cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
+ if ((t-Channel() == channel)  t-Recording()) {
+for (int i = 0; i  MAXRECORDCONTROLS; i++) {
+if (RecordControls[i]  RecordControls[i]-Timer()-Channel() == t-Channel()) {
+   cReplayControl::SetRecording(RecordControls[i]-FileName(), t-File());
+   return true;
+   }
+}
+}
+ }
+ }
   VideoDiskSpace(FreeMB);
   if (FreeMB  MINFREEDISK) {
  if (!Timer || time(NULL) - LastNoDiskSpaceMessage  NODISKSPACEDELTA) {
@@ -4274,11 +4289,23 @@
 {
   Skins.Message(mtStatus, tr(Pausing live video...));
   cReplayControl::SetRecording(NULL, NULL); // make sure the new cRecordControl will set cReplayControl::LastReplayed()
+  cTimer * timer = NULL;
+  if (Setup.PauseKeyHandling  2) {
+for (cTimer *t = Timers.First(); t; t = Timers.Next(t)) { // find timer of current recording
+  if ((t-Channel() == Channels.GetByNumber(cDevice::CurrentChannel()))  t-Recording())
+timer = t;
+}
+}
   if (Start(NULL, true)) {
  sleep(2); // allow recorded file to fill up enough to start replaying
  cReplayControl *rc = new cReplayControl;
  cControl::Launch(rc);
  cControl::Attach();
+ if (timer) { // if already recording current channel before pause jump to correct position of recording
+int Current, Total;
+rc-GetIndex(Current, Total, true);
+rc-Goto(SecondsToFrames((Total / rc-FramesPerSecond())-2), false);
+}
  sleep(1); // allow device to replay some frames, so we have a picture
  Skins.Message(mtStatus, NULL);
  rc-ProcessKey(kPause); // pause, allowing replay mode display
diff -Naur -x PLUGINS -x po vdr-1.7.16_orig/vdr.c vdr-1.7.16_pause/vdr.c
--- vdr-1.7.16_orig/vdr.c	2010-04-05 13:06:16.0 +0300
+++ vdr-1.7.16_pause/vdr.c	2010-11-30 20:00:48.0 +0200
@@ -1074,7 +1074,7 @@
if (!cControl::Control()) {
   DELETE_MENU;
   if (Setup.PauseKeyHandling) {
- if (Setup.PauseKeyHandling  1 || Interface-Confirm(tr(Pause live video?))) {
+ if ((Setup.PauseKeyHandling == 2 || Setup.PauseKeyHandling == 4) || ((Setup.PauseKeyHandling == 1

Re: [vdr] [PATCH] Improved pause handling

2010-12-02 Thread Matti Lehtimäki
2010/12/1 JJussi v...@jjussi.com
 Addition to that would be that (in same situation where there is recording 
 ongoing) if user presses backward () button or press jump backward little 
 (1) or jump backward big (green) it would work as expected... Jumping to 
 right place of recording.

This is not possible easily since those buttons have different use
when watching live tv compared to watching a recording and therefore
normal usage would be changed too much. But you could do this even
with the current patch, you just have to press pause first and when
replay mode is enabled press the desired button.

-- 
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [PATCH] Improved pause handling

2010-12-02 Thread Matti Lehtimäki
2010/12/1 Udo Richter udo_rich...@gmx.de:
 Nice idea, however I see one small drawback: Until now, a 'pause'
 instant recording lasts 3 hours (or whatever was set up). With your
 patch, this time shortens to the time of the recording, which might be
 rather short, for example if the timer actually records the previous
 show and overlaps for a few minutes.

I also thought about this problem and I now might have a solution which
I'll try tonight. This would add a check if the time left in timer is longer
than the margin at stop defined in setup and would start replaying only if
this is true. Otherwise it would start a new instant recording as usual.

 This, together with the fact that this is probably unexpected by the
 user, can lead to disaster: If he's time-shifting later on, he'll be
 quite surprised that the recording has stopped minutes ago and the
 in-between show is gone.

This is one reason why I added this as optional feature.

 A probable solution would be to extend the ongoing recording to the
 minimum time shift time, eg. Setup.InstantRecordTime.

This is one possible solution and I will consider this also. This could be
another way of solving the problem if time left in the timer is too short.

 However, I have no problem with the fact that the same show is recorded
 twice. This doesn't cause too much system load, and with today's disk
 sizes, it really doesn't hurt.

This is quite true, but it seems some people like the new feature and I
would give it as an option.

-- 
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [ANNOUNCE] VDR developer version 1.7.17

2011-03-13 Thread Matti Lehtimäki

On 2011-03-13 13:46, Klaus Schmidinger wrote:


- Changed the compiler optimization flag to -O3, which gives quite a performance
   boost in the AlphaBlend() function.


I noticed that this change was not made to Make.config.template as it 
should be since Make.config overrides CFLAGS and CXXFLAGS defined in 
Makefile.


-Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] epgsearch VS autotimer feature wish

2011-04-28 Thread Matti Lehtimäki

On 2011-04-28 22:51, Marco Göbenich wrote:

Hi!

In a very old installation of vdr I used the autotimer plugin to
generate some timers as following:
Search in EPG of channel 1 (ARD) for Tagesthemen and create a timer for
that with the title ARD Tagesthemen 2230-2300. the timevalues where
evaluated from EPG.

While autotimer does not work anymore, I tried epgsearch and read the
manual, but I think this is not possible at this moment.
Would be a nice feature: Something like title = ARD Tagesthemen
%starttime%-%endtime% and maybe some more variables as in the EPG menu
feature.


This can be done using epgsearch by adding a search entry and activating 
Use as search timer with Action: Record and then defining the desired 
title to Directory as something like %chsh% %title% %time%-%timeend%. 
Available variables can be found in epgsearch manual at 
http://winni.vdr-developer.org/epgsearch/en/epgsearch.4.html#10__customizing_the_epg_menus


-Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] vdr-prefermenu and vdr 1.7.21

2011-12-07 Thread Matti Lehtimäki

On 12/07/2011 01:01 PM, Arturo Martinez wrote:

Is there a patch for vdr-prefermenu to work with vdr 1.7.21 ?


If you prefer the small OSD of original prefermenu-plugin then there are 
3 patches in debian unstable so it works also with new versions of vdr 
(I tested it with 1.7.22). The patches are attached.


--
Matti Lehtimäki

#! /bin/sh /usr/share/dpatch/dpatch-run

## 01_Makefile-fPIC-fix.dpatch by Thomas Schmidt thomas.schm...@in.stud.tu-ilmenau.de
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Adds -fPIC to Makefile 

@DPATCH@
diff -urNad /usr/src/self-compiled/vdr/plugins/prefermenu/vdr-plugin-prefermenu-0.6.2/Makefile vdr-plugin-prefermenu-0.6.2/Makefile
--- /usr/src/self-compiled/vdr/plugins/prefermenu/vdr-plugin-prefermenu-0.6.2/Makefile	2004-08-05 22:48:29.0 +0200
+++ vdr-plugin-prefermenu-0.6.2/Makefile	2004-08-05 22:49:27.0 +0200
@@ -16,7 +16,7 @@
 ### The C++ compiler and options:
 
 CXX  ?= g++
-CXXFLAGS ?= -O2 -Wall -Woverloaded-virtual
+CXXFLAGS ?= -fPIC -O2 -Wall -Woverloaded-virtual
 
 ### The directory environment:
 
#!/bin/sh /usr/share/dpatch/dpatch-run

## makefile
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: add -D_GNU_SOURCE to enable GNU extensions

@DPATCH@
Index: vdr-plugin-prefermenu-0.6.6/Makefile
===
--- vdr-plugin-prefermenu-0.6.6.orig/Makefile	2011-04-09 13:51:33.0 +0200
+++ vdr-plugin-prefermenu-0.6.6/Makefile	2011-04-09 13:51:34.0 +0200
@@ -46,6 +46,7 @@
 endif
 
 DEFINES += -DPLUGIN_NAME_I18N='$(PLUGIN)'
+DEFINES += -D_GNU_SOURCE
 
 ### The object files (add further files here):
 
#! /bin/sh /usr/share/dpatch/dpatch-run
## 90_prefermenu-0.6.6-1.5.3+SetAreas-bugfix.dpatch by Thomas Günther t...@toms-cafe.de
## http://toms-cafe.de/vdr/download/prefermenu-0.6.6-1.5.3+SetAreas-bugfix.diff
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Changes for VDR = 1.5.3.

@DPATCH@
Index: vdr-plugin-prefermenu-0.6.6/prefermenu.c
===
--- vdr-plugin-prefermenu-0.6.6.orig/prefermenu.c	2005-01-11 20:09:40.0 +0100
+++ vdr-plugin-prefermenu-0.6.6/prefermenu.c	2011-04-09 13:51:46.0 +0200
@@ -75,6 +75,7 @@
   }
   // Clean up the file with current VDR channels.conf
   PreferedChannelsList.Save();
+  const int LINEHEIGHT = cFont::GetFont(fontOsd)-Height();
   config.height= (config.lines * (LINEHEIGHT+BORDERSIZE+2))+BORDERSIZE;
   return new cPreferOsd;
 }
Index: vdr-plugin-prefermenu-0.6.6/preferosd.c
===
--- vdr-plugin-prefermenu-0.6.6.orig/preferosd.c	2006-05-06 15:19:28.0 +0200
+++ vdr-plugin-prefermenu-0.6.6/preferosd.c	2011-04-09 13:51:46.0 +0200
@@ -60,7 +60,8 @@
   }
   osd=cOsdProvider::NewOsd(config.originx, config.originy);
   if (osd) {
-tArea Area = { 0, 0, config.width+LINEHEIGHT, config.height-1, 4};
+const int LINEHEIGHT = cFont::GetFont(fontOsd)-Height();
+tArea Area = { 0, 0, ((config.width+LINEHEIGHT)  ~0x01) - 1, config.height-1, 4};
 osd-SetAreas(Area, 1);
 DrawPreferMenu(0,0);
 DisplayPreferMenu();
@@ -168,6 +169,7 @@
 {
   if (current  1) {
 current -= 1;
+const int LINEHEIGHT = cFont::GetFont(fontOsd)-Height();
 DrawPreferMenu(-LINEHEIGHT,1);
 DisplayPreferMenu();
 //DrawPreferMneu(-10,1);
@@ -181,6 +183,7 @@
 {
   if (current  number) {
 current += 1; 
+const int LINEHEIGHT = cFont::GetFont(fontOsd)-Height();
 DrawPreferMenu(+LINEHEIGHT,-1);
 DisplayPreferMenu();
 //DrawPreferMenu(+10,-1);
@@ -315,6 +318,8 @@
 
 void cPreferOsd::DrawPreferMenu(int delta, int highlight)
 {
+  const cFont *font = cFont::GetFont(fontOsd);
+  const int LINEHEIGHT = font-Height();
   
   int middle = int(config.height/2) + config.height%2;
 
@@ -390,6 +395,8 @@
 
 void cPreferOsd::DrawChannelsNames(int delta)
 {
+  const cFont *font = cFont::GetFont(fontOsd);
+  const int LINEHEIGHT = font-Height();
 
   // XXX The margin is hardcoded for now
   // TODO: make it more flexible
Index: vdr-plugin-prefermenu-0.6.6/preferosd.h
===
--- vdr-plugin-prefermenu-0.6.6.orig/preferosd.h	2006-05-04 21:59:17.0 +0200
+++ vdr-plugin-prefermenu-0.6.6/preferosd.h	2011-04-09 13:51:46.0 +0200
@@ -4,8 +4,6 @@
 #include vdr/plugin.h
 
 static const int BORDERSIZE = 2;
-static const cFont *font = cFont::GetFont(fontOsd);
-static const int LINEHEIGHT = font-Height();
 
 
 class cPreferOsd : public cOsdObject {
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] [PATCH] Strip parental rating from title in EPG

2012-03-15 Thread Matti Lehtimäki

Hi

Finnish channels add parental rating to the end of title in EPG 
separated by parentheses, for example Program title (12), which in 
both annoying and also makes alphabetical sorting not function properly 
as different episodes may have different parental rating. The attached 
patch will remove the parental rating from the title and place it into 
correct EPG field.


If this is to be integrated into vdr-core it should be decided to which 
bugfix level it belongs. I added it to bugfix level 1 as it basically is 
misuse of EPG fields.


P.S. I have only tested this patch with 1.7.22 because my kernel is not 
supported anymore in most recent developer versions but it should not 
cause problems.


--
Matti
--- vdr-1.7.26/epg.c	2012-03-10 15:14:27.0 +0200
+++ vdr-1.7.26-epg/epg.c	2012-03-15 21:41:40.0 +0200
@@ -712,6 +712,22 @@
 }
  }
 
+  // Some channels put parental rating to the end of title in parentheses.
+  // In that case we move it to parental rating field:
+  if (title) {
+ int l = strlen(title);
+ if (l  5  (title[l - 1] == ')'  (title[l - 3] == '(' || title[l - 4] == '('))) {
+int pos = 3;
+if (title[l - 4] == '(')
+   pos = 4;
+SetParentalRating(atoi(title[l - pos + 1]));
+if (title[l - pos - 1] == ' ')
+   pos++;
+title[l - pos] = '\0';
+EpgBugFixStat(5, ChannelID());
+}
+ }
+
   if (Setup.EPGBugfixLevel = 1)
  goto Final;
 
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] [ANNOUNCE] New VDR plugin: epgfixer

2012-03-17 Thread Matti Lehtimäki

Hi

I made a new plugin to remove parental rating from the end of title in 
EPG when separated by parentheses, for example Program title (12). The 
obtained parental rating is then placed into correct EPG field. The 
feature can be activated/disabled from plugin setup.


Requirements:
VDR-1.7.26 or later

If there are other features related to handling of EPG data you would 
like to add please let me know. I'll be happy to integrate them to this 
plugin.


--
Matti


epgfixer-0.0.1.tar.gz
Description: GNU Zip compressed data
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [ANNOUNCE] New VDR plugin: epgfixer

2012-03-17 Thread Matti Lehtimäki

On 03/17/2012 09:37 PM, Antti Seppälä wrote:


Nice idea for a plugin.

How about adding the capability to define regular expressions to alter
the epg data? I think it would allow a great deal of flexibility as
practically anything can be done with regexes :)


I have already started to add preliminary support for regular 
expressions. Hopefully I'll manage to create support for at least simple 
regular expressions with PCRE soon. I'll look into more complex support 
later.



You'd need to work hard on the UI to make it user friendly though.


I have yet to decide how regular expressions are to be given by user. 
Especially if data is to be moved between EPG fields. Good ideas are 
welcome.


--
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] [ANNOUNCE] epgfixer-plugin 0.0.3

2012-03-25 Thread Matti Lehtimäki

New version of epgfixer-plugin

Features in 0.0.3:

- Regular expression support (requires PCRE).
- Editing of regular expressions through setup menu.
- Enabling/disabling individual regular expressions through
  setup menu.
- Individually selectable bug fixes from VDR core. (These should be
  rewritten as regular expressions if possible)

-Matti


epgfixer-0.0.3.tar.gz
Description: GNU Zip compressed data
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] [ANNOUNCE] epgfixer-plugin 0.0.4

2012-04-12 Thread Matti Lehtimäki

New features in 0.0.4:
- Allow enabling regular expressions for only selected channels.

Homepage for the plugin:
http://projects.vdr-developer.org/projects/plg-epgfixer

--
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [ANNOUNCE] epgfixer-plugin 0.0.4

2012-04-12 Thread Matti Lehtimäki

On 04/12/2012 10:14 PM, Christopher Reimer wrote:

OK, next feature request :-D

Using channel numbers for channel matching only works for one specific
channels.conf.

Could you please use unique IDs for every channel (e.g.
S19.2E-1-1089-12003-0)?


I'll add support for unique IDs soon. I think I'll also keep the option 
of using channel numbers since many people have some desired order of 
channels and in that case unique IDs are not necessary.


--
Matti


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] [ANNOUNCE] epgfixer-plugin 0.0.5

2012-04-13 Thread Matti Lehtimäki

New features in 0.0.5:
- Support using channel IDs in channel list in addition to channel numbers.

Homepage for the plugin:
http://projects.vdr-developer.org/projects/plg-epgfixer

--
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [ANNOUNCE] epgfixer-plugin 0.0.5

2012-04-13 Thread Matti Lehtimäki

On 04/14/2012 12:36 AM, Christopher Reimer wrote:

Hey, I found another bug. VDR crashes as soon as VDR receives EPG data.
Please try the following regex-pattern.

S19.2E-1-1057-61205:description=^(?shorttext.{5,15})[\.][
](?description.*)$


This problem is now fixed in git repository. The problem resulted from 
empty description or shorttext EPG fields.


--
Matti


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [ANNOUNCE] epgfixer-plugin 0.0.5

2012-04-28 Thread Matti Lehtimäki

On 04/26/2012 08:49 AM, Marx wrote:

Is this plugin able to fix bad codepage on EPG? Some polish channels
broadcast EPG in non-standard codepage and instead of patching VDR I
think about using this plugin
Marx


Not sure if this is possible with the current version since I'm not 
familiar with that problem. Could you send me some more information 
regarding this issue (including the patch you are currently using) and 
I'll look into it.


--
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] [ANNOUNCE] epgfixer-plugin 0.1.0

2012-05-05 Thread Matti Lehtimäki

New features in 0.1.0:
- Support for character set conversion for selected channels.
- Support for stripping HTML entities.
- Supply user with extra information for each setup menu option using 
Info key.


Homepage for the plugin:
http://projects.vdr-developer.org/projects/plg-epgfixer

--
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [ANNOUNCE] epgfixer-plugin 0.0.5

2012-05-05 Thread Matti Lehtimäki

On 05/04/2012 04:04 PM, Marx wrote:

Here is the patch and it's working, hovewer I don't like idea of
patching VDR source
http://px.wporzo.pl/stuff/epg.diff

As I understand it blindly convert all bad character which is probably
incompatible with other languages, so there is no sense to integrate it
with VDR and personally I would prefer having it in plugin.

The best of course would be to force broadcasters to fix codepage issue,
but... :)

Marx


The new version (0.1.0) of epgfixer-plugin should be able to fix this 
problem by defining character set conversion for those channels that 
need fixing. Please try the new version and inform me whether it works 
or not for your needs.


--
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [ANNOUNCE] epgfixer-plugin 0.1.0

2012-05-06 Thread Matti Lehtimäki

On 05/06/2012 03:00 PM, Marcel Witte wrote:

Hi,

thanks for the plugin, I started today to build openSUSE-packages for this
plugin in my repository, but for openSUSE Factory it is failing. Perhaps a
problem with gcc 4.7?


The problem seems to be related to gcc 4.7. Could you try the following 
patch.


diff --git a/tools.h b/tools.h
index dfcee30..bf49fac 100644
--- a/tools.h
+++ b/tools.h
@@ -57,7 +57,7 @@ protected:
   cReadLine ReadLine;
   while ((s = ReadLine.Read(f)) != NULL) {
 if (!isempty(s)) {
-   Add(new T());
+   this-Add(new T());
cListT::Last()-SetFromString(s, true);
}
 }

--
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [ANNOUNCE] epgfixer-plugin 0.1.0

2012-05-07 Thread Matti Lehtimäki

On 05/07/2012 01:22 AM, Marx wrote:

Hello
I'm tryin charset recoding but no luck.

1) I currently use VDR headless. It means I can't see OSD and so I don't
know if epgfixer needs some switching on causing some variables
written to VDR conf file?


There is no need to activate the plugin or fixes through OSD. Everything 
can be done also by just using config files.



2) Could you implement some log messages about conversion?
I know epgfixer starts, but I don't know if it has read configuration
files and tries to use them.
My configuration is in charset.conf:
1:iso6937
or
iso6937
I've tried also
iso8859-2
but it doesn't seem to recode anything.


I'll add some logging about active fixes to next version. One thing that 
comes to mind is the need to clear EPG data. The plugin only fixes new 
EPG data not the already existing data. So before you can see if the 
conversion works you need to clear old data. You can do that either by 
manually deleting epg.data, using VDR SVDRP command CLRE or by using 
this plugin's setup menu.



3)I test on one channel only:
:aa
TVP 2;CYFRA
+:10892:HC34M2S0:S13.0E:27500:167=2:108=pol@4:508:100,1813,500,B00,B01:4808:318:11900:0

Unfortunatelly this channel is encrypted.

VDR alone produces sth like this:
May 6 23:52:53 wuwek vdr: [29565] EPG bugfix statistics
May 6 23:52:53 wuwek vdr: [29565] =
May 6 23:52:53 wuwek vdr: [29565] IF SOMEBODY WHO IS IN CHARGE OF THE
EPG DATA FOR ONE OF THE LISTED
May 6 23:52:53 wuwek vdr: [29565] CHANNELS READS THIS: PLEASE TAKE A
LOOK AT THE FUNCTION cEvent::FixEpgBugs()
May 6 23:52:53 wuwek vdr: [29565] IN VDR/epg.c TO LEARN WHAT'S WRONG
WITH YOUR DATA, AND FIX IT!
May 6 23:52:53 wuwek vdr: [29565] =
May 6 23:52:53 wuwek vdr: [29565] Fix Hits Channels
May 6 23:52:53 wuwek vdr: [29565] 7 5 TVP 2
It's sign that charset of epg is broken.
I would like to know if this messages is produced after or before
epgfixer work.


If I read the source of VDR correctly EPG fix 7 has nothing to do with 
character sets. That message is produced after the plugin since it gives 
also other plugins and VDR chance to fix EPG. The same fixes can also be 
activated inside the plugin in VDR's setup.conf to make the basic fixes 
before the plugin does any user defined fixes. Basically you could 
disable VDR's EPG fixes and activate them in the plugin to prevent 
occasional breaking of VDR's EPG fixes. This breaking is caused by the 
fact that VDR's own fixes are run after the plugin's.



4) I use UTF-8 in system. I have problem how to recognize charset of epg
on this channel. I was trying to parse /var/cache/vdr/epg.data but it
seems that encoding is broken. Seems like some polish characters are
saved on 2 chars (UTF), but it's not proper pair to create polish
character.
So instead of:
100 tysięcy bocianów
I'm getting:
100 tysiЮecy bocianТow


I don't know anything about that kind of problem.

--
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [ANNOUNCE] epgfixer-plugin 0.1.0

2012-05-08 Thread Matti Lehtimäki

On 05/08/2012 07:30 PM, Marx wrote:

VDR isn't as popular here in Poland as in Germany, so I doubt anyone in
Cyfra+ know what VDR is.
Anyway I've tried ISO-8859-9 in epgfixer, but nothing has changed.
Next is ISO-8859-2 but I'm afraid that I'm configuring something bad
because I see no changes in EPG whatever I put in
/etc/vdr/plugins/charset.conf
Marx


I don't know why you don't see any changes in EPG data if you change the 
config since I do, although not the correct characters. I just noticed 
that due to internal conversion from assumed ISO6937 to whatever your 
VDR is using causes problem, but these can be circumvented by first 
reverting VDR's conversion i.e back to ISO6937 and then from for example 
ISO-8859-9 to VDR's charset. Unfortunately this is not yet possible in 
the plugin but I have already made the necessary code to fix the problem.


I will try to release a new version hopefully tomorrow. I have also 
found several other bugs which I will fix before a new release. I have 
also some new features that I try to include.


--
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [ANNOUNCE] epgfixer-plugin 0.1.0

2012-05-10 Thread Matti Lehtimäki

On 05/10/2012 06:47 PM, Marx wrote:

it didn' work
I made subderictory and put in
/etc/vdr/plugins/epgfixer/regexp.conf
text:
title=xxx
but it didn't change title in any item to xxx
Marx


That is incorrect regexp for the plugin. At the moment all data has to 
be assigned to EPG fields using regexp backreferences as shown in 
examples in epgfixer/regexp.conf located in the plugin's source directory.


--
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] [ANNOUNCE] epgfixer-plugin 0.2.0

2012-05-13 Thread Matti Lehtimäki

New features in 0.2.0:
- Support for ignoring EPG data for selected channels.
- Support for copying EPG data from one channel to another.

Bug fixes:
- Fix character set conversion for selected channels.
- Fix and improve Makefile (thanks to Ville Skyttä and Rolf Ahrenberg).
- Fix compiling with g++-4.7.
- Improve example configuration files.

Homepage for the plugin:
http://projects.vdr-developer.org/projects/plg-epgfixer

--
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] [ANNOUNCE] epgfixer-plugin 0.2.1

2012-05-13 Thread Matti Lehtimäki

Bug fix release 0.2.1:

- Fix linking when --as-needed is used.

Homepage for the plugin:
http://projects.vdr-developer.org/projects/plg-epgfixer

--
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [ANNOUNCE] epgfixer-plugin 0.2.1

2012-05-14 Thread Matti Lehtimäki

On 05/14/2012 03:36 PM, Marx wrote:

I don't see more logs then previously:
vdr: [17701] initializing plugin: epgfixer (0.2.1): Fix bugs in EPG
(...)
[17701] starting plugin: epgfixer

Is that mean that i didn't configure it correctly?
I have:
# ls /etc/vdr/plugins/epgfixer/
blacklist.conf charset.conf epgclone.conf regexp.conf

Is there anything I missed?
Marx


The amount of log messages depends on log level setting of VDR the same 
way as in VDR core:


Level  0: Errors only
Level  1: Errors and info (active lines in each configure file)

--
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] [PATCH] Allow instant recording to record only present event

2012-05-20 Thread Matti Lehtimäki

Hi

I made a patch to allow special case for instant recordings to only 
record the present event. This is done by defining Instant rec. time to 0.


There is still the question what should be done if event is non-existent 
or otherwise not obtained? Should the VDR default Instant rec. time be 
used or not?


--
Matti
diff -Naur vdr-1.7.27-orig/menu.c vdr-1.7.27-inst-rec/menu.c
--- vdr-1.7.27-orig/menu.c	2012-03-13 15:14:38.0 +0200
+++ vdr-1.7.27-inst-rec/menu.c	2012-04-27 00:50:35.0 +0300
@@ -3114,7 +3114,7 @@
   Add(new cMenuEditIntItem( tr(Setup.Recording$VPS margin (s)),data.VpsMargin, 0));
   Add(new cMenuEditBoolItem(tr(Setup.Recording$Mark instant recording),data.MarkInstantRecord));
   Add(new cMenuEditStrItem( tr(Setup.Recording$Name instant recording), data.NameInstantRecord, sizeof(data.NameInstantRecord)));
-  Add(new cMenuEditIntItem( tr(Setup.Recording$Instant rec. time (min)),   data.InstantRecordTime, 1, MAXINSTANTRECTIME));
+  Add(new cMenuEditIntItem( tr(Setup.Recording$Instant rec. time (min)),   data.InstantRecordTime, 0, MAXINSTANTRECTIME, tr(Setup.Recording$present event)));
   Add(new cMenuEditIntItem( tr(Setup.Recording$Max. video file size (MB)), data.MaxVideoFileSize, MINVIDEOFILESIZE, MAXVIDEOFILESIZETS));
   Add(new cMenuEditBoolItem(tr(Setup.Recording$Split edited files),data.SplitEditedFiles));
   Add(new cMenuEditStraItem(tr(Setup.Recording$Delete timeshift recording),data.DelTimeshiftRec, 3, delTimeshiftRecTexts));
diff -Naur vdr-1.7.27-orig/po/fi_FI.po vdr-1.7.27-inst-rec/po/fi_FI.po
--- vdr-1.7.27-orig/po/fi_FI.po	2012-03-11 12:44:43.0 +0200
+++ vdr-1.7.27-inst-rec/po/fi_FI.po	2012-04-27 00:52:40.0 +0300
@@ -1071,6 +1071,9 @@
 msgid Setup.Recording$Instant rec. time (min)
 msgstr Pikatallennuksen kesto (min)
 
+msgid Setup.Recording$present event
+msgstr nykyinen ohjelma
+
 msgid Setup.Recording$Max. video file size (MB)
 msgstr Suurin tiedostokoko (Mt)
 
diff -Naur vdr-1.7.27-orig/timers.c vdr-1.7.27-inst-rec/timers.c
--- vdr-1.7.27-orig/timers.c	2012-02-27 11:38:41.0 +0200
+++ vdr-1.7.27-inst-rec/timers.c	2012-04-27 00:49:40.0 +0300
@@ -41,8 +41,26 @@
   day = SetTime(t, 0);
   weekdays = 0;
   start = now-tm_hour * 100 + now-tm_min;
-  stop = now-tm_hour * 60 + now-tm_min + Setup.InstantRecordTime;
-  stop = (stop / 60) * 100 + (stop % 60);
+  stop = 0;
+  if (!Setup.InstantRecordTime) {
+ cSchedulesLock SchedulesLock;
+ const cSchedules *Schedules = cSchedules::Schedules(SchedulesLock);
+ if (Schedules  channel) {
+const cSchedule *Schedule = Schedules-GetSchedule(channel);
+if (Schedule) {
+   const cEvent *Event = Schedule-GetPresentEvent();
+   if (Event) {
+  time_t tstop = Event-StartTime() + Event-Duration() + Setup.MarginStop * 60;
+  struct tm *time = localtime_r(tstop, tm_r);
+  stop = time-tm_hour * 100 + time-tm_min;
+  }
+   }
+}
+ }
+  if (!stop) {// @todo should we fix the instant record time for non-existent events?
+ stop = now-tm_hour * 60 + now-tm_min + Setup.InstantRecordTime;
+ stop = (stop / 60) * 100 + (stop % 60);
+ }
   if (stop = 2400)
  stop -= 2400;
   priority = Pause ? Setup.PausePriority : Setup.DefaultPriority;
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [PATCH] Allow instant recording to record only present event

2012-05-20 Thread Matti Lehtimäki

On 05/20/2012 12:37 PM, Klaus Schmidinger wrote:

Nice idea.
However, please also take VPS into account.
If Setup.UseVps is set, and the event has a VPS time, the timer's
start time should be set to the VPS time, and the timer's ttVps
flag should be set.


Hi

Attached is a new version of the patch with support for VPS. I also 
changed the behavior of the patch in case no event is found so that 
recording will succeed even in that situation. In previous version of 
patch the recording length would have been zero but now it becomes VDR 
default Instant rec. time (180 min) if no event is obtained.


--
Matti
diff -Naur vdr-1.7.27-orig/menu.c vdr-1.7.27-inst-rec/menu.c
--- vdr-1.7.27-orig/menu.c	2012-03-13 15:14:38.0 +0200
+++ vdr-1.7.27-inst-rec/menu.c	2012-04-27 00:50:35.0 +0300
@@ -3114,7 +3114,7 @@
   Add(new cMenuEditIntItem( tr(Setup.Recording$VPS margin (s)),data.VpsMargin, 0));
   Add(new cMenuEditBoolItem(tr(Setup.Recording$Mark instant recording),data.MarkInstantRecord));
   Add(new cMenuEditStrItem( tr(Setup.Recording$Name instant recording), data.NameInstantRecord, sizeof(data.NameInstantRecord)));
-  Add(new cMenuEditIntItem( tr(Setup.Recording$Instant rec. time (min)),   data.InstantRecordTime, 1, MAXINSTANTRECTIME));
+  Add(new cMenuEditIntItem( tr(Setup.Recording$Instant rec. time (min)),   data.InstantRecordTime, 0, MAXINSTANTRECTIME, tr(Setup.Recording$present event)));
   Add(new cMenuEditIntItem( tr(Setup.Recording$Max. video file size (MB)), data.MaxVideoFileSize, MINVIDEOFILESIZE, MAXVIDEOFILESIZETS));
   Add(new cMenuEditBoolItem(tr(Setup.Recording$Split edited files),data.SplitEditedFiles));
   Add(new cMenuEditStraItem(tr(Setup.Recording$Delete timeshift recording),data.DelTimeshiftRec, 3, delTimeshiftRecTexts));
diff -Naur vdr-1.7.27-orig/po/fi_FI.po vdr-1.7.27-inst-rec/po/fi_FI.po
--- vdr-1.7.27-orig/po/fi_FI.po	2012-03-11 12:44:43.0 +0200
+++ vdr-1.7.27-inst-rec/po/fi_FI.po	2012-04-27 00:52:40.0 +0300
@@ -1071,6 +1071,9 @@
 msgid Setup.Recording$Instant rec. time (min)
 msgstr Pikatallennuksen kesto (min)
 
+msgid Setup.Recording$present event
+msgstr nykyinen tapahtuma
+
 msgid Setup.Recording$Max. video file size (MB)
 msgstr Suurin tiedostokoko (Mt)
 
diff -Naur vdr-1.7.27-orig/timers.c vdr-1.7.27-inst-rec/timers.c
--- vdr-1.7.27-orig/timers.c	2012-02-27 11:38:41.0 +0200
+++ vdr-1.7.27-inst-rec/timers.c	2012-05-20 14:01:01.0 +0300
@@ -41,8 +41,33 @@
   day = SetTime(t, 0);
   weekdays = 0;
   start = now-tm_hour * 100 + now-tm_min;
-  stop = now-tm_hour * 60 + now-tm_min + Setup.InstantRecordTime;
-  stop = (stop / 60) * 100 + (stop % 60);
+  stop = 0;
+  if (!Setup.InstantRecordTime) {
+ cSchedulesLock SchedulesLock;
+ const cSchedules *Schedules = cSchedules::Schedules(SchedulesLock);
+ if (Schedules  channel) {
+const cSchedule *Schedule = Schedules-GetSchedule(channel);
+if (Schedule) {
+   const cEvent *Event = Schedule-GetPresentEvent();
+   if (Event) {
+  time_t tstart = Event-StartTime();
+  if (Event-Vps()  Setup.UseVps) {
+ SetFlags(tfVps);
+ tstart = Event-Vps();
+ struct tm *time = localtime_r(tstart, tm_r);
+ start = time-tm_hour * 100 + time-tm_min;
+ }
+  time_t tstop = tstart + Event-Duration() + Setup.MarginStop * 60;
+  struct tm *time = localtime_r(tstop, tm_r);
+  stop = time-tm_hour * 100 + time-tm_min;
+  }
+   }
+}
+ }
+  if (!stop) {
+ stop = now-tm_hour * 60 + now-tm_min + (Setup.InstantRecordTime ? Setup.InstantRecordTime : 180);
+ stop = (stop / 60) * 100 + (stop % 60);
+ }
   if (stop = 2400)
  stop -= 2400;
   priority = Pause ? Setup.PausePriority : Setup.DefaultPriority;
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [PATCH] Allow instant recording to record only present event

2012-05-20 Thread Matti Lehtimäki

On 05/20/2012 02:15 PM, Klaus Schmidinger wrote:

One more thing comes to mind: you also need to make sure that
the 'day' is set to the day of the EPG event. Just in case it
is past midnight already and the event started yesterday ;-)


Indeed that was missing. I think setting the day is relevant only if VPS 
is used since in otherwise the start time is the current time not the 
start time of the event. Or should the start time be set to that of the 
event if VPS is not used?


--
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [PATCH] Allow instant recording to record only present event

2012-05-20 Thread Matti Lehtimäki

On 05/20/2012 02:45 PM, Klaus Schmidinger wrote:

On 20.05.2012 13:41, Matti Lehtimäki wrote:

On 05/20/2012 02:15 PM, Klaus Schmidinger wrote:

One more thing comes to mind: you also need to make sure that
the 'day' is set to the day of the EPG event. Just in case it
is past midnight already and the event started yesterday ;-)


Indeed that was missing. I think setting the day is relevant only if
VPS is used since in otherwise the start time is the current time not
the start time of the event. Or should the start time be set to that
of the event if VPS is not used?


Well, that's a matter of taste.
For VPS it is relevant, otherwise it's up to you.


Attached is a new version of the patch with correct day always set when 
VPS is used. Could this patch be included in next version of VDR?


--
Matti
diff -Naur vdr-1.7.27-orig/menu.c vdr-1.7.27-inst-rec/menu.c
--- vdr-1.7.27-orig/menu.c	2012-03-13 15:14:38.0 +0200
+++ vdr-1.7.27-inst-rec/menu.c	2012-04-27 00:50:35.0 +0300
@@ -3114,7 +3114,7 @@
   Add(new cMenuEditIntItem( tr(Setup.Recording$VPS margin (s)),data.VpsMargin, 0));
   Add(new cMenuEditBoolItem(tr(Setup.Recording$Mark instant recording),data.MarkInstantRecord));
   Add(new cMenuEditStrItem( tr(Setup.Recording$Name instant recording), data.NameInstantRecord, sizeof(data.NameInstantRecord)));
-  Add(new cMenuEditIntItem( tr(Setup.Recording$Instant rec. time (min)),   data.InstantRecordTime, 1, MAXINSTANTRECTIME));
+  Add(new cMenuEditIntItem( tr(Setup.Recording$Instant rec. time (min)),   data.InstantRecordTime, 0, MAXINSTANTRECTIME, tr(Setup.Recording$present event)));
   Add(new cMenuEditIntItem( tr(Setup.Recording$Max. video file size (MB)), data.MaxVideoFileSize, MINVIDEOFILESIZE, MAXVIDEOFILESIZETS));
   Add(new cMenuEditBoolItem(tr(Setup.Recording$Split edited files),data.SplitEditedFiles));
   Add(new cMenuEditStraItem(tr(Setup.Recording$Delete timeshift recording),data.DelTimeshiftRec, 3, delTimeshiftRecTexts));
diff -Naur vdr-1.7.27-orig/po/fi_FI.po vdr-1.7.27-inst-rec/po/fi_FI.po
--- vdr-1.7.27-orig/po/fi_FI.po	2012-03-11 12:44:43.0 +0200
+++ vdr-1.7.27-inst-rec/po/fi_FI.po	2012-04-27 00:52:40.0 +0300
@@ -1071,6 +1071,9 @@
 msgid Setup.Recording$Instant rec. time (min)
 msgstr Pikatallennuksen kesto (min)
 
+msgid Setup.Recording$present event
+msgstr nykyinen tapahtuma
+
 msgid Setup.Recording$Max. video file size (MB)
 msgstr Suurin tiedostokoko (Mt)
 
diff -Naur vdr-1.7.27-orig/timers.c vdr-1.7.27-inst-rec/timers.c
--- vdr-1.7.27-orig/timers.c	2012-02-27 11:38:41.0 +0200
+++ vdr-1.7.27-inst-rec/timers.c	2012-05-20 14:32:35.0 +0300
@@ -41,8 +41,34 @@
   day = SetTime(t, 0);
   weekdays = 0;
   start = now-tm_hour * 100 + now-tm_min;
-  stop = now-tm_hour * 60 + now-tm_min + Setup.InstantRecordTime;
-  stop = (stop / 60) * 100 + (stop % 60);
+  stop = 0;
+  if (!Setup.InstantRecordTime) {
+ cSchedulesLock SchedulesLock;
+ const cSchedules *Schedules = cSchedules::Schedules(SchedulesLock);
+ if (Schedules  channel) {
+const cSchedule *Schedule = Schedules-GetSchedule(channel);
+if (Schedule) {
+   const cEvent *Event = Schedule-GetPresentEvent();
+   if (Event) {
+  time_t tstart = Event-StartTime();
+  if (Event-Vps()  Setup.UseVps) {
+ SetFlags(tfVps);
+ tstart = Event-Vps();
+ day = SetTime(tstart, 0);
+ struct tm *time = localtime_r(tstart, tm_r);
+ start = time-tm_hour * 100 + time-tm_min;
+ }
+  time_t tstop = tstart + Event-Duration() + Setup.MarginStop * 60;
+  struct tm *time = localtime_r(tstop, tm_r);
+  stop = time-tm_hour * 100 + time-tm_min;
+  }
+   }
+}
+ }
+  if (!stop) {
+ stop = now-tm_hour * 60 + now-tm_min + (Setup.InstantRecordTime ? Setup.InstantRecordTime : 180);
+ stop = (stop / 60) * 100 + (stop % 60);
+ }
   if (stop = 2400)
  stop -= 2400;
   priority = Pause ? Setup.PausePriority : Setup.DefaultPriority;
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [PATCH] Allow instant recording to record only present event

2012-09-15 Thread Matti Lehtimäki

On 09/15/2012 04:57 PM, Klaus Schmidinger wrote:

While adopting this patch I found that we need to set the timer's 'event'
pointer to the actual event here, and that the start time should always be
set to the event's start time (even if VPS is not used) in order to keep
the event from getting reassigned to a different one later on.

I have attached a revised version of your patch (against VDR 1.7.30).
Please take a look and let me know whether it is still OK for you.


The revised version of the patch works the way I want so it's OK for me. 
Thanks.


--
Matti Lehtimäki

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] Changing recording name before starting

2012-10-01 Thread Matti Lehtimäki

On 10/01/2012 11:04 PM, Manuel Reimer wrote:

Kartsa wrote:

So what I would like to do is to strip the ending of the names. I
created a very
simple script to changes the name when the recording ends using
recording hooks
but seems that if the recording stops for any reason and then starts
again there
will be problems.


What you want to do is to fix the EPG. This plugin may help you with that:

http://projects.vdr-developer.org/projects/plg-epgfixer


EPGFixer plugin already includes a example for removing parental rating 
from the title, which actually was the original reason why I created the 
plugin.


--
Matti Lehtimäki

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] Changing recording name before starting

2012-10-01 Thread Matti Lehtimäki

On 10/01/2012 11:33 PM, Kartsa wrote:


On 01.10.2012 23:18, Matti Lehtimäki wrote:

EPGFixer plugin already includes a example for removing parental
rating from the title, which actually was the original reason why I
created the plugin.


Is this plugin on any repo? I have installed the whole vdr stuff from
repos. It is easier to update but at the same time some plugins are hard
or impossible to find :| I've chosen to install from repos because I
must maintain 4 installations which are not identical.


It is included at least in yaVDR, which is based on Ubuntu and repos of 
which can used also in Ubuntu (https://launchpad.net/~yavdr/). As far as 
I know it is not yet in other linux distros.


--
Matti Lehtimäki


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] Polish EPG problems

2012-10-07 Thread Matti Lehtimäki

On 10/07/2012 09:59 PM, Mariusz Bialonczyk wrote:

Hi,
I've been using vdr for very long time (since 1.2.1 afair), but the
polish epg problem is unfortunately still here in recent versions.
I made a deep analysis of the problem and here are the details.
Polish broadcasters are ignorants regarding dvb standards!
It's very sad but it's true :(
Of course e-mails to them about it doesn't give an any effect...
There are two kind of problems with polish providers on HotBird 13E:
First problem is that similar to one handled by CharsetOverride:
Part of the channels are encoded in ISO-8859-2 while not announce that,
this can be handled with VDR_CHARSET_OVERRIDE correctly.
The other part cannot be currently handled correctly in vdr without patching:
Some channels are using ISO6937 while announcing ISO-8859-5! (sic!)

There are also providers which are respecting standards,
but the above bad cases are for two main polish digital platforms,
so it would be great if vdr finally would handle it correctly.


The EPGFixer-plugin has the capability to fix character set problem you 
have described. It can be found at 
http://projects.vdr-developer.org/projects/plg-epgfixer.


--
Matti Lehtimäki

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] [ANNOUNCE] epgfixer-plugin 0.3.0

2012-10-11 Thread Matti Lehtimäki

New features in 0.3.0:
- Enable JIT compiling in PCRE if supported.
- Support for channel intervals for channel numbers.
- Support search-and-replace using Perl-style 's///' operator.
- Support Perl-style modifiers when using 's///' or 'm//' operators.
- Support stripping control characters from EPG data as in VDR-1.7.31.

Bug fixes:
- Fix appending and prepending to empty EPG fields.

Homepage for the plugin:
http://projects.vdr-developer.org/projects/plg-epgfixer

--
Matti Lehtimäki

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] half-viewed recordings, can they be moved at the top of the list?

2013-01-06 Thread Matti Lehtimäki

On 01/06/2013 12:31 PM, cedric.dew...@telfort.nl wrote:

Sometimes I watch a TV show halfway. Then I let VDR shutdown my PC. Then
I would like to watch the rest of the show. Then I have to go to the list
of TV shows, and find the correct one again.


Hi

I have made a small plugin to keep history of replayed recording to help 
find recently watched recordings. This is not exactly what you were 
looking for but might be useful.


Latest version of the plugin is attached. I think I'll add the plugin to 
vdr-developer.org.


--
Matti



vdr-history-0.0.3.tgz
Description: application/compressed-tar
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] half-viewed recordings, can they be moved at the top of the list?

2013-01-06 Thread Matti Lehtimäki

On 01/06/2013 10:07 PM, VDR User wrote:

On Sun, Jan 6, 2013 at 11:23 AM, Dominiqued...@free.fr  wrote:

Hi

After reading all response, there is still an open question : why vdr do not
simply store inside setup.conf the latest path of played recording ?
As long it keep it in memory (press play resume the replay of records) ...

You will say : what about removed records outside vdr program ? it allready
does by not playing them even if on the list , in my system, I read from a vdr
client under smb vdr tree of a server and remove records from client, vdr
server list is not allways up to date (a touch .update fix that)

It should be nice to have this feature in the system like the xineliboutput
player plugin do


What about when a guy watches his recording but can't finish so he
stops it and will return later. Before he can return, his wife comes
and watches her recording. The last recording will now be the one the
wife watched and not the guy. Many VDR systems are used by multiple
people, not just one person only. I think 3 viewed flags are fine to
keep track of unviewed/partial viewed/complete viewed.


The History-plugin I posted to this thread remembers user defined number 
of replayed recordings so it probably easier than searching through the 
recording list for partially watched recordings. Replaying can be easily 
started from the list. The plugin also handles removed recordings 
appropriately.


The plugin also stores history of replayed files using xineliboutput's 
Media Player. Replay of these can also be started from the plugin menu.


--
Matti


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] vdr-prefermenu and vdr 1.7.21

2013-09-27 Thread Matti Lehtimäki

Hi

There is an additional patch for prefermenu plugin in debian unstable 
which should fix the problem your describe. The patch is attached.


-Matti

On 09/27/2013 09:54 PM, Karim wrote:

Hi,

I tried to compil vdr-prefermenu-0.6.6 ant theses patches under vdr-2.0.3.
Unfortunately, compilation failed. Is there any more recent patch, or could
you help me to fix ?


*** Plugin prefermenu:
WARNING: plugin prefermenu is using an old Makefile!
g++ -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -I/usr/include/linux/dvb -c
-DPLUGIN_NAME_I18N='prefermenu' -D_GNU_SOURCE
-I/usr/local/src/vdr-2.0.3/include prefermenu.c
In file included from prefermenu.c:14:0:
i18n.h:14:14: error: ‘tI18nPhrase’ does not name a type
prefermenu.c: In member function ‘virtual bool cPluginPrefermenu::Start()’:
prefermenu.c:52:16: error: ‘Phrases’ was not declared in this scope
prefermenu.c:52:23: error: ‘RegisterI18n’ was not declared in this scope
make[1]: *** [prefermenu.o] Erreur 1


Thank you.
Karim








-Message d'origine-
De : vdr-boun...@linuxtv.org [mailto:vdr-boun...@linuxtv.org] De la part de
Matti Lehtimäki
Envoyé : mercredi 7 décembre 2011 17:01
À : vdr@linuxtv.org
Objet : Re: [vdr] vdr-prefermenu and vdr 1.7.21

On 12/07/2011 01:01 PM, Arturo Martinez wrote:

Is there a patch for vdr-prefermenu to work with vdr 1.7.21 ?


If you prefer the small OSD of original prefermenu-plugin then there are
3 patches in debian unstable so it works also with new versions of vdr (I
tested it with 1.7.22). The patches are attached.

--
Matti Lehtimäki



___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr



Index: vdr-plugin-prefermenu/i18n.c
===
--- vdr-plugin-prefermenu.orig/i18n.c	2012-04-22 13:57:40.0 +0200
+++ /dev/null	1970-01-01 00:00:00.0 +
@@ -1,268 +0,0 @@
-/*
- * PreferMenu plugin to VDR (C++)
- *
- * (C) 2004,2005,2006 Olivier Jacques olivier...@free.fr
- *
- * This code is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This code is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
- */
-
-#include i18n.h
-
-const tI18nPhrase Phrases[] = {
-/*
- * French  translations provided by Maxime Guilbot maxime.guil...@orange.fr
- */
-  { Channel, // ENGLISH
-Kanal, // GERMAN
-, // TODO
-Canale, // ITALIAN
-Kanaal, // NL
-, // TODO
-Chaînes, // FR
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-Czatoma, // HU
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-  },
-  { Origin X, // EN
-Position X, // GERMAN
-, // TODO
-Origine X, // ITALIAN
-X positie, // NL
-, // TODO
-Origine X, // FR
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-X helyzet, // HU
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-  },
-  { Origin Y, // EN
-Position Y, // GERMAN
-, // TODO
-Origine Y, // ITALIAN 
-Y positie, // NL
-, // TODO
-Origine Y, // FR
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-Y helyzet, // HU
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-  },
-  { Width, //EN
-Breite, // GER
-, // TODO
-Larghezza, // ITALIAN
-Breedte, // NL
-,
-Largeur, 
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-Szélesség, // HU
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
- // TODO
-  },
-  { AddChannel,
-Kanal hinzufügen, // GER
-, // TODO
-Aggiungi Canale, // ITALIAN
-iKanaal bijdoen, // NL
-, // TODO
-Nouvelle chaîne,  // FR
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-Adj csatornát hozza, // HU
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
-, // TODO
- // TODO
-  },
-  { RemoveChannel,
-Kanal löschen, // GER
-, // TODO
-Rimuovi

Re: [vdr] skipping 5/10 seconds

2014-04-07 Thread Matti Lehtimäki
On 04/07/2014 12:20 PM, Klaus Schmidinger wrote:
 Well, that's something we can talk about. You could make it so that during
 replay the Left and Right keys perform 5s skips, and the FastForward/-Rewind
 keys (if present on the user's remote control) still retain their normal
 function.

This kind of behavior sounds like a good compromise and no new keys
are needed. I also currently use a patch that adds shorter skips to
keys 1 and 3 and there I see no reason why Left and Right would not be
equally as good. I rarely use FastForward/-Rewind anyway. For those
who prefer FastForward/-Rewind and have no separate keys available the
setup option would make it possible.

-Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] still image at end of replay

2014-04-09 Thread Matti Lehtimäki

On 04/09/2014 08:53 PM, Peter Münster wrote:

Hi,

Here a little feature request:

Problem: the children are watching a recording, and at the end VDR
switches to normal live TV, that can be anything. I have to be there at
the right moment to turn off the screen and the sound, in order to bring
them to leave the tv-room.

I would be nice, if VDR could turn off the sound at the end of a replay
and show a still image (e.g. Children, go to bed now!).

What do you think about that?



It should be possible to make a quite simple plugin which would do this. The 
cStatus-class in status.h has a function Replaying which is called when replaying 
starts or stops. Implementing this function in a plugin would allow to do the 
necessary things i.e. turning off the sound with 
cDevice::PrimaryDevice()-ToggleMute() and using something derived from for 
example the pictures-plugin to show a still image. As this should be rather simple 
I'll look into it during the weekend and see if I'll manage to make a working 
plugin.

-Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] still image at end of replay

2014-04-10 Thread Matti Lehtimäki
There is also another option for those using jumpplay-patch in which you
can have the replay paused at the last cut mark. This option naturally
requires to have cut marks in all recordings which most likely is not the
case for most people. As for displaying the last image of the recording it
would be easier to have only a blank image as a default. Additional thing
to consider is the possibility call an external script after the end of
replay to shutdown the system and/or display (through hdmi-cec for example)
or whatever the user wants.


2014-04-10 12:50 GMT+02:00 Peter Münster pmli...@free.fr:

 On Wed, Apr 09 2014, Matti Lehtimäki wrote:

  As this should be rather simple I'll look into it during the weekend
  and see if I'll manage to make a working plugin.

 Thanks, that's fine.
 Just a suggestion: it would be nice, if the plugin could take a
 parameter for providing an image file to display. And the default would
 be the last image of the recording.

 --
Peter


 ___
 vdr mailing list
 vdr@linuxtv.org
 http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] still image at end of replay

2014-04-10 Thread Matti Lehtimäki
This is indeed a quite simple and reasonable option. I have not used iptv
plugin so I was unaware of such a possibility.


2014-04-10 14:02 GMT+02:00 Peer Oliver Schmidt p...@theinternet.de:

 Hello,

  Problem: the children are watching a recording, and at the end VDR
  switches to normal live TV, that can be anything. I have to be there at
  the right moment to turn off the screen and the sound, in order to bring
  them to leave the tv-room.
 
  I would be nice, if VDR could turn off the sound at the end of a replay
  and show a still image (e.g. Children, go to bed now!).
 
  What do you think about that?

 You can do that already. Use the iptv plugin, create a channel that
 shows a static picture, define that channel as the starting channel of
 VDR. Now each time you start VDR it will show that picture. You go into
 the recordings menu, and select the recording to playback. At the end,
 playback stops, and the original channel showing the static picture is
 displayed.
 --
 Best regards

 Peer Oliver Schmidt
 the internet company
 PGP Key ID: 0x83E1C2EA

 ___
 vdr mailing list
 vdr@linuxtv.org
 http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] EIT related crash with 2.0.6

2014-04-17 Thread Matti Lehtimäki

On 04/17/2014 01:01 PM, Ville Skyttä wrote:

On Thu, Apr 17, 2014 at 10:56 AM, Klaus Schmidinger
klaus.schmidin...@tvdr.de wrote:

Well, maybe epgsearch or epgfixer is messing something up?
Does the problem happen if these plugins are not in use?


It happens so rarely that it's most likely very hard to tell. I'll
give it a shot without epgfixer but epgsearch is such an essential
feature for this box that I don't think I'll be trying without it any
time soon. I skimmed through both epgfixer and epgsearch sources
quickly but didn't notice an obvious unlocked schedules access; it's
entirely possible that I missed something though.


I will go through the source of epgfixer thoroughly to see if any unlocked 
access to schedules can be found.

--
Matti

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] EIT related crash with 2.0.6

2014-04-17 Thread Matti Lehtimäki

On 04/17/2014 08:06 PM, Matti Lehtimäki wrote:

On 04/17/2014 01:01 PM, Ville Skyttä wrote:

On Thu, Apr 17, 2014 at 10:56 AM, Klaus Schmidinger
klaus.schmidin...@tvdr.de wrote:

Well, maybe epgsearch or epgfixer is messing something up?
Does the problem happen if these plugins are not in use?


It happens so rarely that it's most likely very hard to tell. I'll
give it a shot without epgfixer but epgsearch is such an essential
feature for this box that I don't think I'll be trying without it any
time soon. I skimmed through both epgfixer and epgsearch sources
quickly but didn't notice an obvious unlocked schedules access; it's
entirely possible that I missed something though.


I will go through the source of epgfixer thoroughly to see if any unlocked 
access to schedules can be found.


I could not find any unlocked use of schedules in epgfixer, so it should not be 
the cause of problems. There is actually only one situation where schedules are 
modified and that happens only if epg data is cloned.

--
Matti


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] 1-2 second gaps in recordings from Finnish YLE channels

2014-10-12 Thread Matti Lehtimäki

On 10/12/2014 08:36 PM, j...@mbnet.fi wrote:


In at least some of the recordings I've made from the Finnish YLE-
channels there is a small gap at the start of the actual program and
VDR has chosen to record the rest of the program in a new file.

This is also visible in live viewing and lately I noticed that this
seems to occur pretty much every time at the start of the news, so
today I recorded a small sample while saving the same channel on
another, identical, adapter using:

I know there are several other Finns lurking around on this list, but
as far as I know no-one else has reported this.

I'm guessing that the problem has something to do with subtitles and/or
audio tracks, but I'm certainly no expert.


Hi

I believe this is a known issue with YLE and if I remember correctly the
reason is that they always change PIDs when a new program starts and
this causes a small gap due to how VDR handles this situation i.e. it
changes the channel to the same channel but with the new PIDs.

--
Matti Lehtimäki

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr