[mythtv] Why MythTV didn't handle the UK Freeview lineup change

John Barberio barberio at lineone.net
Sun Jul 26 17:02:15 UTC 2009

Stuart Auchterlonie wrote:
> John Barberio wrote:
> > Gareth Glaccum wrote:
> >> > why  MythTV
> >> > > couldn't cope with the lineup change moving 'Virgin 1' to a new
> >> > mux, and
> >> > > a 'new' channel created for 'Virgin +1'.
> >>
> >> Neither of my other STB/freeview decoders worked this out either. I
> >> had to
> >> perform full scans on both of them to 'fix' things.
> >
> > That's normal behaviour, and rescan after a lineup change is a  
> routine
> > operation now.
> >
> > The problem here is that on MythTV, a rescan didn't work.
> >
> > Deleting the channel, and doing a rescan didn't work.
> >
> > Deleting all the channels, and doing a rescan didn't work.
> >
> I'd be interested to know how this didn't work for you.
> That is *exactly* what i did, and virgin1 and +1 were
> working correctly.
> > The only way to get 'Virgin 1' and 'Virgin +1' in the right  
> channels was
> > to delete all channels, force a database sync by running
> > mythfilldatabase from the command line, and then do a rescan.
> >
> Again, what do you mean by forcing a database sync with MFDB?
> Deleting the channels (using mythtv-setup) automatically removes
> them from the DB which is why i'm struggling to work out why
> you need to use MFDB to "sync" the channels.

Okay, let's step through this again...

After the Virgin1 lineup change, doing a rescan did not make the  
correct changes.

Deleting the channel and doing a rescan did not make the correct  

Deleting all the channels and doing a full rescan did not make the  
correct changes.

It was only till after I had searched for other people having this  
problem that I found this thread on the user mailing list,
where users had the same issue, and found it only worked after the  
channels had been left deleted, and a mythfilldatabase run had happened.

As well as the various other things mythfilldatabase does, it also  
prompts a database sync. This ensures the deletes are all consistently  
written in. It appears that the channel data isn't fully deleted till  
a database sync happens, so doing a rescan just recreated the old  
Virgin1 channel data.

So the way to get the channel in properly was to channel delete, run  
mythfilldatabase to sync up the all the database tables, then run the  
channel scan. After that, the channel was properly set.

Now, if your own system runs with all database operations happening  
synchronously, this problem wouldn't happen since the channel delete  
would happen fully and immediately. But you'd also have a big  
performance hit, which is why it's not something I'd recommend for end- 

There's a simple solution there to allow a 'delete all channels and  
rescan' function that deletes all channels, performs a sync on the  
database, and then performs a channel scan.

Additionally, it may be wise to look into what should happen when the  
a service id has it's LCN and/or channel name changed, and a new  
service id is created using the old LCN and/or channel name.

   - John

More information about the mythtv-dev mailing list