[mythtv-users] Changing cardid for tuners
Nick Morrott
knowledgejunkie at gmail.com
Sat Feb 3 23:36:57 UTC 2007
On 03/02/07, Rich West <Rich.West at wesmo.com> wrote:
> Rich West wrote:
> > Steven Adeff wrote:
> >
> >> On 2/3/07, Bob O'Shaughnessy <oshaug at gmail.com> wrote:
> >>
> >>
> >>> This mostly a cosmetic issue, as everything seems to be working properly.
> >>>
> >>> I've got an 0.20-151 running on FC6 with a PVR-150 and a PVR-500. After the
> >>> FC6 upgrade I removed and added the cards, and then had to do it again a few
> >>> times to play with prioritizing them.
> >>>
> >>> The result is that Myth lists the cards as encoder 15, 16, and 17, and that
> >>> has raised eyebrows from my wife, the main Mythweb user.
> >>>
> >>> Is there any way to set these back to 1, 2, and 3? From what I've read, I'm
> >>> expecting that the solution will involve editing the database.
> >>>
> >>>
> >> use "Delete All" and then add them new, this should restart the count at 1.
> >>
> >
> > Actually, that won't help. The field in the database is set to
> > auto_increment. So, yes, you have to edit some entries in the database.
> >
> > The only way around this is to update the entries in the "capturecard"
> > table and the corresponding entries in the "cardinput" table. The
> > element you want to update is the "cardid" field in both tables. It
> > does work, too.. I did this for one of my cards only because I was being
> > retentive about it. :) ONLY make these changes with mythbacked stopped
> > (it is safest that way!).
> >
> > Truly, though, the numbering is entirely semantic. It doesn't impact
> > the functionality.
> >
> > -Rich
> In reference to "Steven Adeff"s respond, Bob O'Shaughnessy wrote:
> > That did it. Could have sworn that that I'd done that, but I guess I
> > hadn't.
> >
> > Thanks,!
>
> Well.. guess I was wrong. :)
When you "Delete all capture cards" in mythtv-setup, the deletion code
TRUNCATEs the capturecard and cardinput tables, which resets any
auto-increment fields - this is why the count starts again from the
beginning. When you delete single capture cards, and even if you
delete all cards one-by-one, this reset does not happen as the table
is not 'completely' empty, even though it contains no records.
http://dev.mysql.com/doc/refman/5.0/en/truncate.html
Nick
--
MythTV Official wiki:
http://mythtv.org/wiki/
MythTV users list archive:
http://www.gossamer-threads.com/lists/mythtv/users
"An investment in knowledge always pays the best interest." - Benjamin Franklin
More information about the mythtv-users
mailing list