Opened 14 years ago
Closed 14 years ago
#2344 closed patch (fixed)
mythfilldatabase can't insert freqid's containing non-numeric data
Reported by: | Owned by: | danielk | |
---|---|---|---|
Priority: | minor | Milestone: | 0.21 |
Component: | mythtv | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
I'm trying to use mythfilldatababase --manual --preset to setup my channels. New entries get created in the channel table but without their freqid. I've experienced this issue with release-0.19-fixes and svn trunk.
Here's the log created with mythfilldatabase --manual --preset --max-days 1 --verbose database:
<snip> 2006-09-08 18:21:27.405 MSqlQuery: SELECT chanid,name,callsign,channum,finetune,icon,freqid,tvformat FROM channel WHERE xmltvid = 'C3sat.de' AND sourceid = 1; ### ### New channel found ### ### name = 3SAT ### callsign = ### channum = ### freqid = 0 ### finetune = ### tvformat = Default ### icon = /home/laga/.mythtv/channels/3sat.gif ### Choose a channel ID (positive integer) [0] 1 Choose a channel name (any string, long version) [3SAT] Choose a channel callsign (any string, short version) 3SAT Choose a channel preset (0..999) 3 Choose a frequency id (just like xawtv) E10 Choose a channel fine tune offset (just like xawtv) Choose a TV format (PAL/SECAM/NTSC/ATSC/Default) [Default] Choose a channel icon image (any path name) [http://www.tvtoday.de/tv/programm/bilder/senderlogos/3sat.gif] 2006-09-08 18:28:39.651 New DB connection, total: 5 2006-09-08 18:28:39.653 Connected to database 'mythconverg' at host: localhost 2006-09-08 18:28:39.657 MSqlQuery: INSERT INTO channel (chanid, channum, sourceid, callsign, name, mplexid, serviceid, atsc_major_chan, atsc_minor_chan, useonairguide, visible, freqid, tvformat, icon, xmltvid) VALUES (1, '3', 1, '3SAT', '3SAT', NULL, 0, 0, 0, 0, 1, NULL, 'Default', '/home/laga/.mythtv/channels/3sat.gif', 'C3sat.de') ### ### Channel inserted ###
As you can see in the mysql query, it'll insert "NULL" instead of "E10".
Interestingly enough, it works correctly in a second run:
### ### Existing channel found ### ### xmltvid = C3sat.de ### chanid = 1 ### name = 3SAT ### callsign = 3SAT ### channum = 3 ### freqid = ### finetune = 0 ### tvformat = Default ### icon = /home/laga/.mythtv/channels/3sat.gif ### Choose a channel name (any string, long version) [3SAT] Choose a channel callsign (any string, short version) [3SAT] Choose a channel preset (0..999) [3] Choose a frequency id (just like xawtv) E10 Choose a channel fine tune offset (just like xawtv) [0] Choose a TV format (PAL/SECAM/NTSC/ATSC/Default) [Default] Choose a channel icon image (any path name) [http://www.tvtoday.de/tv/programm/bilder/senderlogos/3sat.gif] 2006-09-08 18:43:40.440 New DB connection, total: 5 2006-09-08 18:43:40.444 Connected to database 'mythconverg' at host: localhost 2006-09-08 18:43:40.447 MSqlQuery: UPDATE channel SET chanid = '1', name = '3SAT', callsign = '3SAT', channum = '3', finetune = 0, icon = '/home/laga/.mythtv/channels/3sat.gif', freqid = 'E10', tvformat = 'Default' WHERE xmltvid = 'C3sat.de' AND sourceid = 1; ### ### Change performed
Of course I had to enter the freqid again during this second run.
Regards,
Michael
Attachments (1)
Change History (9)
comment:1 Changed 14 years ago by
Changed 14 years ago by
Attachment: | mfdb_preset_fix.diff added |
---|
comment:2 Changed 14 years ago by
mfdb_preset_fix.diff inserts the frequency ids.
Alphanumeric freqids won't work with datadirect, since I made only the minimal necessary changes to all other calls of CreateChannel?(), the ATSC stuff in filldata.cpp is untested, dvb channel seems to work
comment:4 Changed 14 years ago by
Owner: | changed from Isaac Richards to danielk |
---|---|
Type: | defect → patch |
comment:5 Changed 14 years ago by
Milestone: | unknown → 0.20 |
---|---|
Version: | head → 0.20 |
comment:6 Changed 14 years ago by
Summary: | mythfilldatabase --preset --manual won't insert the freqid properly → mythfilldatabase can't insert freqid's containing non-numeric data |
---|
comment:7 Changed 14 years ago by
comment:8 Changed 14 years ago by
Milestone: | 0.20 → 0.21 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Version: | 0.20 → head |
I've decided not to backport this fix to 0.20-fixes. I haven't gotten any feedback and it touches too many bits of code for me to casually backport it to the stable branch.
The freqid is only an int so alphanumeric frequency ids as used in europe will not work. This contradicts the help text of --preset which explicitly states alphanumeric freqids.