RC4 : bug "restore" from ChannelList.xml (1 Viewer)

mjsystem

Portal Member
April 18, 2006
11
0
Area: Media Portal Program
MP Version: RC4
Windows Version: Windows XP pro SP2
CPU Type: P4 HT 2,6GHz
Memory: 1Go
Motherboard Chipset: Asus P4P800 (i865)
Video Card: Radeon 9550
Video Card Driver: 8.241.0.0
Video Card Resolution: 1024x768
Video Render Type: VMR9
Video Codec Type & Version: MPV codec
Audio Codec Type & Version: MPA cedec
TV Card: Pinnacle MediaCenter 200i and Hauppauge Nova-T PCI
TV Card Driver: Pinnacle 1.3.2 (03/12/2004) Hauppauge 2.114.24090 (11/03/2006)

hi,

When you backup channel list, ChannelList.xml seems to be good : Right channel name with right dvb-t data.

but when you want restore ChannelList.xml to a clean install, each channel is stored with wrong data.

I tried this :

I backup my channel list to ChannelList.xml

With a clean install, I restore channel and immediatly after I backup to ChannelList_After.xml

==> The dvb-t data are not the same for each channel.

:?:

Thanks for your help
 

infinite.loop

Retired Team Member
  • Premium Supporter
  • December 26, 2004
    16,154
    4,133
    127.0.0.1
    Home Country
    Austria Austria
    its seems that are some issues with restoring the channellist.xml at the moment.

    thank you for the report :)

    btw. if you want to backup your channelinformations you can also copy the database folder to a safe place.
     

    mjsystem

    Portal Member
    April 18, 2006
    11
    0
    [RESOLVED ?]

    I think I find the bug :

    in : TVDatabase.cs

    static public int AddChannel(TVChannel channel)
    ...
    ...
    strSQL = String.Format("insert into channel (idChannel, strChannel,iChannelNr ,frequency,iSort, bExternal, ExternalChannel,standard, Visible, Country, scrambled,grabEpg,epgHours,epgLastUpdate) values ( NULL, '{0}', {1}, {2}, {3}, {4},'{5}', {6}, {7}, {8}, {9},{10},{11},'{12}' )",
    strChannel, channel.Number, channel.Frequency.ToString(),
    totalchannels + 1, iExternal, strExternal, (int)channel.TVStandard, iVisible, channel.Country, scrambled, grabepg, channel.EpgHours,
    Utils.datetolong(channel.LastDateTimeEpgGrabbed));
    ...

    This don't use channed.ID if channel.ID != -1 (no channel.ID)

    But, in ChannelList.xml, this ID is stored and use to re-create DVB-T table. So the ID of channel table and DVB-T don't match :

    So I try this:

    if (channel.ID > 0 )
    {
    strSQL = String.Format("insert into channel (idChannel, strChannel,iChannelNr ,frequency,iSort, bExternal, ExternalChannel,standard, Visible, Country, scrambled,grabEpg,epgHours,epgLastUpdate) values ( {13}, '{0}', {1}, {2}, {3}, {4},'{5}', {6}, {7}, {8}, {9},{10},{11},'{12}' )",
    strChannel, channel.Number, channel.Frequency.ToString(),
    totalchannels + 1, iExternal, strExternal, (int)channel.TVStandard, iVisible, channel.Country, scrambled, grabepg, channel.EpgHours,
    Utils.datetolong(channel.LastDateTimeEpgGrabbed), channel.ID);
    }
    else
    {
    strSQL = String.Format("insert into channel (idChannel, strChannel,iChannelNr ,frequency,iSort, bExternal, ExternalChannel,standard, Visible, Country, scrambled,grabEpg,epgHours,epgLastUpdate) values ( NULL, '{0}', {1}, {2}, {3}, {4},'{5}', {6}, {7}, {8}, {9},{10},{11},'{12}' )",
    strChannel, channel.Number, channel.Frequency.ToString(),
    totalchannels + 1, iExternal, strExternal, (int)channel.TVStandard, iVisible, channel.Country, scrambled, grabepg, channel.EpgHours,
    Utils.datetolong(channel.LastDateTimeEpgGrabbed));
    }

    And it works fine !!

    I try to create, delete, import... All is OK
     

    mjsystem

    Portal Member
    April 18, 2006
    11
    0
    I modify TVChannels.cs, the function Import_From_XML and Export_To_XML, to correct problem loosing one group and one recorded:

    you can download TVChannels.cs here

    I wrote "//mjsystem" after modification. You can find this quickly.

    for group, in export, the index began at 0 but in import at 1. This was the same for recorded.

    I try a lot of time and all is OK for me.

    In this file, i wrote the modification of "giovortu" about DVB-S.[/url]
     

    mjsystem

    Portal Member
    April 18, 2006
    11
    0
    Oups, i find another bugs in import/export...

    - After clear all channels and a channel scan, all groups were not exported :

    the variable "sort" of group table was not set and the export bugged ==> I modified export of group ==> Configuration\Sections\TVChannels.cs

    - The ID of group, recorded and recording were not saved. This was the same problem that channel ==> Databases\TV\TVDatabase.cs

    I hope this time will be OK !
     

    Marcusb

    Retired Team Member
  • Premium Supporter
  • February 16, 2005
    1,994
    29
    Melbourne
    Welcome to the Forums mjsystem :)

    I'm sure you will be a very useful member.
    This has been a fault for a very long time.
     

    mjsystem

    Portal Member
    April 18, 2006
    11
    0
    no, how can I do to add this patch in sourceforge ?

    thanks for your help.
     

    mjsystem

    Portal Member
    April 18, 2006
    11
    0
    OK, I found.

    I posted the patch 1500879.
     

    Users who are viewing this thread

    Top Bottom