Mailing List Archive

Have duplicate channel entries in channel table
I killed mythfilldatabase and now I have multiple entries for each
channel in my "channel" table in SQL. The only difference seems to be
the chanid. How can I delete these multiple entries? I probably just
want to start over. I went to mythtv-setup and deleted my video source
and re-added it and that didn't solve the problem.

If there is an SQL solution where I can run SQL queries that is fine too
(I'm a computer scientist). Thanks.

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Have duplicate channel entries in channel table [ In reply to ]
On Sat, 10 Jul 2021 at 08:34, Scott Simpson <scottsimpson1240@comcast.net>
wrote:

> I killed mythfilldatabase and now I have multiple entries for each
> channel in my "channel" table in SQL. The only difference seems to be
> the chanid. How can I delete these multiple entries? I probably just
> want to start over. I went to mythtv-setup and deleted my video source
> and re-added it and that didn't solve the problem.
>
> I think that you do not have a problem. After deleting and re-adding the
video source you should be OK. Only channels that are attached to a video
source are used.
The reason that you see the old channels still being present in the channel
table is that they are not deleted immediately but they are marked for
deletion. The channels that are marked for deletion are deleted later by a
housekeeping task when there are no recordings anymore that have been
recorded from that channel.
This is done so that you still have the channel information when you play a
recording from a channel that does not exist anymore.
FYI, look at the field "deleted" and when that has a date/time then the
channel will be deleted in due course.

Hope this helps,
Klaas.
Re: Have duplicate channel entries in channel table [ In reply to ]
Yes. You are correct. Thanks for the clarification Klaas.

On 7/10/2021 1:40 AM, Klaas de Waal wrote:
>
>
> On Sat, 10 Jul 2021 at 08:34, Scott Simpson
> <scottsimpson1240@comcast.net <mailto:scottsimpson1240@comcast.net>>
> wrote:
>
> I killed mythfilldatabase and now I have multiple entries for each
> channel in my "channel" table in SQL. The only difference seems to be
> the chanid. How can I delete these multiple entries? I probably just
> want to start over. I went to mythtv-setup and deleted my video
> source
> and re-added it and that didn't solve the problem.
>
> I think that you do not have a problem. After deleting and re-adding
> the video source you should be OK. Only channels that are attached to
> a video source are used.
> The reason that you see the old channels still being present in the
> channel table is that they are not deleted immediately but they are
> marked for deletion. The channels that are marked for deletion are
> deleted later by a housekeeping task when there are no recordings
> anymore that have been recorded from that channel.
> This is done so that you still have the channel information when you
> play a recording from a channel that does not exist anymore.
> FYI, look at the field "deleted" and when that has a date/time then
> the channel will be deleted in due course.
>
> Hope this helps,
> Klaas.
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org