LinHES Forums
http://forums.linhes.org/

External channel change command not passing arg
http://forums.linhes.org/viewtopic.php?f=17&t=9416
Page 1 of 1

Author:  mac [ Fri Mar 31, 2006 9:43 pm ]
Post subject:  External channel change command not passing arg

I just got my irblaster today.. and got it setup and working. It was painless with
lirc 0.8.0 and the handy irblaster.sh script. But, alas, I have a problem!

my change_channel.sh script works from the command line but not when called by mythtv.

After a little bit of debugging I found that mythtv is not passing the channel to channel script
as an argument.

Changing my "External Channel Change Command:" script to just this:

===
#!/bin/sh
echo change_chan.sh $1 >> /tmp/command
==

Showed me that its not getting $1

I dug and from what I could find, all I need is the name of script -- not an extra %1 or $1
or whatever at the end of the command in the mythtv-setup.. though I did try both of
those and neither has made a difference! What am I missing?


thanks ---

Author:  mac [ Sat Apr 01, 2006 9:36 pm ]
Post subject: 

Me being the impatient dude I am -- came up my own solution, its one of joys
of open source.. I don't know why I am having this problem and other folks using irblasters
for changing channels with 0.19 are not, but.. so is life eh..

If anyone can tell me what is was that I probably messed up in my configuration, please do!

My solution was to recompile libmythtv-0.19.so.0.19.0 after making a minor modification
to channel.cpp

diff mythtv/libs/libmythtv/channel.cpp mythtv/libs/libmythtv/channel.cpp.original
532c532
< else if (!ChangeExternalChannel(chan))
---
> else if (!ChangeExternalChannel(freqid))

Author:  mac [ Sun Apr 02, 2006 8:38 am ]
Post subject: 

I knew that there had to be better solution than mucking around with the source!

After digging around in the source a bit more, I found that it gets freqid from channel
table. I added all of my channels by hand and when I did, I left the "Frequency or Channel"
field on "Channel Options - Video 4 Linux" page of the channel editor in mythtv-setup, empty..
There is already a field for the channel on first page of the channel editors - add channel
page.

I must have gone into the channel editor a half dozen times when trying to debug this
and I never noticed that field at the top of second page! It is a strange place for it.

Oh well, hope my short lived saga helps someone out in the future..

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/