LinuxTV Patchwork Channel wrapping in live-tv

login
register
mail settings
Submitter Matti Lehtimäki
Date Jan. 11, 2010, 6:23 p.m.
Message ID <4B4B6C84.1080408@gmail.com>
Download mbox | patch
Permalink /patch/12774/
State New
Headers show

Comments

Matti Lehtimäki - Jan. 11, 2010, 6:23 p.m.
Hi,

One small feature I find is missing from vdr is to have the possibility 
to go from the last channel to the first channel and vice versa when 
changing channel to next/previous channel in live-tv mode. This is the 
normal behaviour in most TVs. So I made a small patch for vdr-1.7.11 
(can be applied also to vdr-1.6.0) to make this possible with a menu 
option to enable/disable the feature. Would it be possible to have this 
feature included in future releases of vdr?
Ville Skyttä - Jan. 11, 2010, 7:36 p.m.
On Monday 11 January 2010, Matti Lehtimäki wrote:
> Hi,
> 
> One small feature I find is missing from vdr is to have the possibility
> to go from the last channel to the first channel and vice versa when
> changing channel to next/previous channel in live-tv mode. This is the
> normal behaviour in most TVs. So I made a small patch for vdr-1.7.11
> (can be applied also to vdr-1.6.0) to make this possible with a menu
> option to enable/disable the feature. Would it be possible to have this
> feature included in future releases of vdr?

I haven't tested the patch, but it sounds useful to me.  I wonder if it's 
really necessary to make this configurable though - why not just go ahead and 
do the wrap-around unconditionally?  VDR has more than enough config options 
already...
Petri Helin - Jan. 11, 2010, 7:48 p.m.
On Mon, Jan 11, 2010 at 9:36 PM, Ville Skyttä <ville.skytta@iki.fi> wrote:
> On Monday 11 January 2010, Matti Lehtimäki wrote:
>> Hi,
>>
>> One small feature I find is missing from vdr is to have the possibility
>> to go from the last channel to the first channel and vice versa when
>> changing channel to next/previous channel in live-tv mode. This is the
>> normal behaviour in most TVs. So I made a small patch for vdr-1.7.11
>> (can be applied also to vdr-1.6.0) to make this possible with a menu
>> option to enable/disable the feature. Would it be possible to have this
>> feature included in future releases of vdr?
>
> I haven't tested the patch, but it sounds useful to me.  I wonder if it's
> really necessary to make this configurable though - why not just go ahead and
> do the wrap-around unconditionally?  VDR has more than enough config options
> already...
>

Well, I for one would prefer to current behaviour over wrapping.

-Petri
Timothy D. Lenz - Jan. 12, 2010, 6:43 p.m.
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.

On 1/11/2010 11:23 AM, Matti Lehtimäki wrote:
> Hi,
>
> One small feature I find is missing from vdr is to have the possibility
> to go from the last channel to the first channel and vice versa when
> changing channel to next/previous channel in live-tv mode. This is the
> normal behaviour in most TVs. So I made a small patch for vdr-1.7.11
> (can be applied also to vdr-1.6.0) to make this possible with a menu
> option to enable/disable the feature. Would it be possible to have this
> feature included in future releases of vdr?
>
>
>
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Matti Lehtimäki - Jan. 12, 2010, 7:55 p.m.
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.
Udo Richter - Jan. 16, 2010, 11:56 a.m.
Am 11.01.2010 20:36, schrieb Ville Skyttä:
> I haven't tested the patch, but it sounds useful to me.  I wonder if it's 
> really necessary to make this configurable though - why not just go ahead and 
> do the wrap-around unconditionally?  VDR has more than enough config options 
> already...

Finally an one-click way to directly go to channel 1431 (BFM TV, yet
another french news channel) - that's what I was waiting for. vote++ for
an option to disable this behavior.


Cheers,

Udo
Ville Skyttä - Jan. 17, 2010, 9:39 a.m.
On Saturday 16 January 2010, Udo Richter wrote:

> Finally an one-click way to directly go to channel 1431 (BFM TV, yet
> another french news channel) - that's what I was waiting for.

Exactly, me too.  Because new channels added by VDR tend to end up at the end 
of the channels list.

Patch

diff -Nur vdr-1.7.11-vanilla/config.c vdr-1.7.11-channeswrap/config.c
--- vdr-1.7.11-vanilla/config.c	2009-12-05 17:30:30.000000000 +0200
+++ vdr-1.7.11-channeswrap/config.c	2010-01-08 23:23:20.000000000 +0200
@@ -299,6 +299,7 @@ 
   CurrentDolby = 0;
   InitialChannel = 0;
   InitialVolume = -1;
+  ChannelsWrap = 0;
   EmergencyExit = 1;
 }
 
@@ -486,6 +487,7 @@ 
   else if (!strcasecmp(Name, "CurrentDolby"))        CurrentDolby       = atoi(Value);
   else if (!strcasecmp(Name, "InitialChannel"))      InitialChannel     = atoi(Value);
   else if (!strcasecmp(Name, "InitialVolume"))       InitialVolume      = atoi(Value);
+  else if (!strcasecmp(Name, "ChannelsWrap"))        ChannelsWrap       = atoi(Value);
   else if (!strcasecmp(Name, "EmergencyExit"))       EmergencyExit      = atoi(Value);
   else
      return false;
@@ -578,6 +580,7 @@ 
   Store("CurrentDolby",       CurrentDolby);
   Store("InitialChannel",     InitialChannel);
   Store("InitialVolume",      InitialVolume);
+  Store("ChannelsWrap",       ChannelsWrap);
   Store("EmergencyExit",      EmergencyExit);
 
   Sort();
diff -Nur vdr-1.7.11-vanilla/config.h vdr-1.7.11-channeswrap/config.h
--- vdr-1.7.11-vanilla/config.h	2009-11-22 21:55:04.000000000 +0200
+++ vdr-1.7.11-channeswrap/config.h	2010-01-08 23:24:34.000000000 +0200
@@ -272,6 +272,7 @@ 
   int CurrentDolby;
   int InitialChannel;
   int InitialVolume;
+  int ChannelsWrap;
   int EmergencyExit;
   int __EndData__;
   cSetup(void);
diff -Nur vdr-1.7.11-vanilla/menu.c vdr-1.7.11-channeswrap/menu.c
--- vdr-1.7.11-vanilla/menu.c	2009-12-06 13:29:05.000000000 +0200
+++ vdr-1.7.11-channeswrap/menu.c	2010-01-08 23:31:37.000000000 +0200
@@ -2746,6 +2746,7 @@ 
   Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Channel entry timeout (ms)"), &data.ChannelEntryTimeout, 0));
   Add(new cMenuEditChanItem(tr("Setup.Miscellaneous$Initial channel"),            &data.InitialChannel, tr("Setup.Miscellaneous$as before")));
   Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Initial volume"),             &data.InitialVolume, -1, 255, tr("Setup.Miscellaneous$as before")));
+  Add(new cMenuEditBoolItem(tr("Setup.Miscellaneous$Channels wrap"),              &data.ChannelsWrap));
   Add(new cMenuEditBoolItem(tr("Setup.Miscellaneous$Emergency exit"),             &data.EmergencyExit));
 }
 
@@ -3245,6 +3246,8 @@ 
   if (Direction) {
      while (Channel) {
            Channel = Direction > 0 ? Channels.Next(Channel) : Channels.Prev(Channel);
+           if (Setup.ChannelsWrap && !Channel)
+              Channel = Direction > 0 ? Channels.First() : Channels.Last();
            if (Channel && !Channel->GroupSep() && cDevice::GetDevice(Channel, 0, true))
               return Channel;
            }

Privacy Policy