Opened 2 years ago

Closed 23 months ago

Last modified 16 months ago

#13131 closed Bug Report - General (fixed)

mythtv-setup channel editor

Reported by: blm-ubunet@… Owned by: Peter Bennett
Priority: minor Milestone: 29.1
Component: MythTV - Mythtv-setup Version: Master Head
Severity: medium Keywords: scan, channel editor
Cc: Ticket locked: no

Description

The channel editor in mythtv-setup is overwriting channel.freqid with the channel number. For DVB this is wrong. Every time you edit the channel number it overwrites the Freq/Channel?.

Typically, the default post-scan channel numbers & channel order are not acceptable so some post scan editing is required.

So now.. User has to note the existing freq channel (DVB multiplex channel) before changing channel number & then edit the Freq/Channel? (channel.freqid) back to a meaningful working value.

It is possible that scanning tuners & selecting manual updates is inserting garbage into freqid column.

Attachments (1)

20170926_ticket_13131_chaneditor.patch (1.5 KB) - added by Peter Bennett 2 years ago.
Remove code that sets freqid to channel number

Download all attachments as: .zip

Change History (14)

comment:1 Changed 2 years ago by blm-ubunet@…

Please close/ignore this ticket Tuning is failing for some other reason.

Now remember the channel.freqid is not used for DVB. But I have been in habit of putting the allocated channel number into that field to make note of which channels are on each mux.

The channel.mplexid links to another table for actual tuning data. That data seems okay.

comment:2 Changed 2 years ago by Peter Bennett

Resolution: Invalid
Status: newclosed

comment:3 Changed 2 years ago by blm-ubunet@…

Actually, the problem is in master mythtv-setup dvb scanner. The dvb scanner is not setting the networkid in dB table dtv_multiplex. Or it is setting it to zero.

After directly inserting the correct (non-zero) networkid , the problem channels (all on new freq/mux) work fine.

Once the backend is free to be stopped, I'll re-scan with debug logging etc. Thanks.

comment:4 Changed 2 years ago by Peter Bennett

In "Video sources" in setup there is a place to enter the network id. You should probably enter it there before scanning. Does that solve the problem?

comment:5 Changed 2 years ago by blm-ubunet@…

Is that right.. I'm pretty sure under normal usage, we're meant to leave that setting at value -1.

In 10 yrs of mythtv & using dvb-t, I don't recall ever having to enter the networkID. The correct value for networkID is plastered all over the mythtv-setup output logs. The mythtv-setup output logging detail for tuner scanning, is excellent.

Seems networkID issue is same as 6 yr old ticket 10217.

Full scan (tuned) does not work either - error parsing command options - or similar. Sure that worked before the GUI change.

comment:6 Changed 2 years ago by J.Pilk@…

In the recent past I have tuned boxes running 0.29-fixes or 30-Pre in locations served by 3 different masts in the UK, and I haven't had to enter any netids manually. But most of my recordings are SD from DVB-T. A few months ago 'roger' stated on the dev list that, IIRC, mux parameters cannot be signalled for DVB-T2 muxes. I used to be able to use the BBC DVB-T2 mux as the starter and get almost everything else automatically. Now my home mast transmits 3 DVB-T2 muxes and the new ones are only found by a full scan or by entering freq, BW and 'DVB-T2' via the editor.

comment:7 Changed 2 years ago by Roger Siddons

Resolution: Invalid
Status: closednew

Different 'roger' but re-opening for further review. This is a consequence of 65f99284fc68da0446dbdf711b6ee9bee6fd4ddf

Historically freqid has been either a channel number or a kHz frequency. Why is a mystery, but there's plenty of old code that interprets it as a frequency (Frequency Tables) https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythtv/recorders/dtvchannel.cpp#L239

grepping "freqid" finds plenty.

As per #comment:1 DVB-T tuning still works (for me) by using the multiplex data. However it seems dangerous for the UI to start clobbering settings that have a dubious usage. Note it is clobbered merely by entry to the Edit Channel screen, not by actually changing the channel number. #13046#comment:32

This is my database after viewing Edit Channel for channels 1 & 2:

mysql> SELECT chanid,channum,freqid,sourceid,callsign FROM channel ORDER BY chanidLIMIT 10;

chanid channum freqid callsign
1001 1 1 BBC ONE N West
1002 2 2 BBC TWO
1003 3 59 ITV
1004 4 59 Channel 4
1005 5 59 Channel 5
1006 6 59 ITV2
1009 9 50 BBC FOUR
1010 10 58 ITV3
1011 11 49 Pick
1012 12 49 Dave

The previous freqids appear to be transport "friendly numbers" being set at https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythtv/frequencytables.cpp#L95 Possibly they're linked to the connected muxes #comment:6

OTOH maybe frequency usage is redundant now. An opportunity to comment it all out & see what breaks ?

comment:8 Changed 2 years ago by Peter Bennett

Ticket #10994 may be related. Freqid is used when tuning firewire, ceton, hdhomerun prime, and I added a setting for it, because any channel added manually for these types could not be tuned as the freqid was not being set. Freqid allows you to have one channel number that is tuned by the firewire or ceton box and another number visible to the MythTV user. Not a great feature in my opinion, but unless freqid was set the channel could not be tuned.

Perhaps the code is now changing the value, which would not be good. Only when adding a channel should it default to the channel number.

comment:9 Changed 2 years ago by Peter Bennett

Owner: changed from JYA to Peter Bennett
Status: newassigned

Changed 2 years ago by Peter Bennett

Remove code that sets freqid to channel number

comment:10 Changed 2 years ago by Peter Bennett

Milestone: needs_triage29.1
Status: assignedaccepted

The code that defaults freqid to channel number is incorrect and is setting freqid on editing of an existing channel.

Attached patch removes this code. Users will have to manually set freqid as needed when adding a channel with the channel editor.

comment:11 Changed 23 months ago by Peter Bennett <pbennett@…>

Resolution: fixed
Status: acceptedclosed

In 39b649d459793005fdc1932c14475f354c310441/mythtv:

Fixes #13131 - Channel editor overwriting freqid with channel number.

comment:12 Changed 23 months ago by Peter Bennett <pbennett@…>

In d13b81788c276e3aa56de66ac1774d1b5a49e5b6/mythtv:

Fixes #13131 - Channel editor overwriting freqid with channel number.

(cherry picked from commit 39b649d459793005fdc1932c14475f354c310441)

comment:13 Changed 16 months ago by Peter Bennett

Owner: changed from Peter Bennett to Peter Bennett
Note: See TracTickets for help on using tickets.