[mythtv-users] How do i update the database to change all references to "Tuner 0" to "Tuner 1"?

Keith Hanlan mythtvuser at hanlan.ca
Sun Sep 17 14:10:41 UTC 2006

My recordings have stopped working. When I first investigated, I 
discovered that my Input Connections were "disconnected" as "Tuner 1" 
was not connected to my video source. The default input for the video 
device was previously called "Tuner 0". Well, I updated the connection 
but it seems that my database is still messed up. Looking a bit further, 
I discovered the following logs:

  |Input #0: 'Tuner 1' schan(11) tun(50) v4l1(NTSC) v4l2(NTSC)
  |Input #1: 'S-Video 1' schan() tun() v4l1(NTSC) v4l2(NTSC)
  |Input #2: 'Composite 1' schan() tun() v4l1(NTSC) v4l2(NTSC)
  |Input #3: 'S-Video 2' schan() tun() v4l1(NTSC) v4l2(NTSC)
  |Input #4: 'Composite 2' schan() tun() v4l1(NTSC) v4l2(NTSC)
  |Input #5: 'Composite 3' schan() tun() v4l1(NTSC) v4l2(NTSC)
  |Channel(/dev/video0): SetFormat(Default) fmt(NTSC) input(0)
  |ChannelBase: Could not find input: Tuner 0 on card when setting 
channel 50
  |TVRec(1) Error: Failed to set channel to 50. Reverting to kState_None

So, my video card no longer has a "Tuner 0"; I think that the root cause 
might have been some unnoticed change to the ivtv driver.

However, my database still has references to Tuner 0:

  |mysql> select cardinputid,cardid,sourceid,inputname from cardinput;
  || cardinputid | cardid | sourceid | inputname |
  ||           1 |      1 |        1 | Tuner 0   |
  ||           2 |      1 |        1 | Tuner 1   |
  |2 rows in set (0.00 sec)

I'm fearful of simply deleting the "Tuner 0" row as I'm sure that there 
are other tables referring to it.

How can I update my database properly so that all references to "Tuner 
0" are changed to "Tuner 1"?

Thank you,
Keith Hanlan
Ottawa, Canada

More information about the mythtv-users mailing list