Opened 13 years ago

Closed 13 years ago

#2344 closed patch (fixed)

mythfilldatabase can't insert freqid's containing non-numeric data

Reported by: hansi.urpils@… 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)

mfdb_preset_fix.diff (5.7 KB) - added by Janne <janne-mythtv@…> 13 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 13 years ago by Janne <janne-mythtv@…>

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.

Changed 13 years ago by Janne <janne-mythtv@…>

Attachment: mfdb_preset_fix.diff added

comment:2 Changed 13 years ago by Janne <janne-mythtv@…>

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:3 Changed 13 years ago by hansi.urpils@…

Thanks, this fixed it.

comment:4 Changed 13 years ago by danielk

Owner: changed from Isaac Richards to danielk
Type: defectpatch

comment:5 Changed 13 years ago by danielk

Milestone: unknown0.20
Version: head0.20

comment:6 Changed 13 years ago by danielk

Summary: mythfilldatabase --preset --manual won't insert the freqid properlymythfilldatabase can't insert freqid's containing non-numeric data

comment:7 Changed 13 years ago by danielk

(In [11370]) Refs #2344. Applies patch from Janne to allow European non-numeric freqid's to be added by mythfilldatabase.

Keeping ticket open for possible backport to 0.20-fixes.

comment:8 Changed 13 years ago by danielk

Milestone: 0.200.21
Resolution: fixed
Status: newclosed
Version: 0.20head

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.

Note: See TracTickets for help on using tickets.