Loosing XMLTV mapping (1 Viewer)

gwatkins

Portal Pro
December 8, 2013
81
6
67
Richardson, Texas
Home Country
United States of America United States of America
I would like to know when you press Save on the xmltv plugin mapping page where is the channel mapping info stored? For some reason I periodically loose some (not all) of the channel mappings and have to re-assign them. I have exported them to a file but I don't see a way to import them back. How can I back up that info and then restore it?
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello

    I would like to know when you press Save on the xmltv plugin mapping page where is the channel mapping info stored?
    The mapping is saved in the TV Server database.

    For some reason I periodically loose some (not all) of the channel mappings and have to re-assign them.
    TV Server can't lose mappings unless some other plugin is clearing them or deleting and recreating the channels. IMHO that's very unlikely.
    I suspect that the real cause of what you're seeing is that your guide data provider is changing the channel IDs that it puts in the XMLTV file. If I'm right, there is no solution to the problem except to switch to a different data provider.

    I have exported them to a file but I don't see a way to import them back. How can I back up that info and then restore it?
    You can't restore a mapping. I have no idea why the export function exists, but there is certainly no import/restore function. Even if there was an import/restore function it wouldn't fix the mappings if your guide data provider is changing the channel IDs as I suspect. You'd either need to switch to a different provider or continue to fix the mappings when your provider changes the channel IDs.

    mm
     

    gwatkins

    Portal Pro
    December 8, 2013
    81
    6
    67
    Richardson, Texas
    Home Country
    United States of America United States of America
    The symptom that I see is that some of the channels in the guide will stop displaying shows after a certain day and time. Then when I go into the plugin and hit the Load/Refresh button those same channels show up as red, which I think means no match found. It always seems to be the same channels. I then re-assign them to the same channel map that they were before and save it and then everything is fine for a while, usually several months. I am using Microsoft as the guide provider. From what you are saying it sounds to me like the tvserver database may be getting corrupted.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    From what you are saying it sounds to me like the tvserver database may be getting corrupted.
    No, that is not what I'm saying. I'll try to explain again...

    The XMLTV files that you import contain guide data for a bunch of channels. Each of those channels has a unique identifier (AKA an ID) which is used to link each of the programs for the channel. For example, your XMLTV file might contain something like this (simplified!):

    <channel id="1234">
    <display-name>NBC</display-name>
    </channel>
    <programme start="20140925063000 +1200" stop="20140925073000 +1200" channel="1234">
    <title>NBC Show 1</title>
    <desc>Description of NBC show 1.</desc>
    </programme>
    <programme start="20140925073000 +1200" stop="20140925080000 +1200" channel="1234">
    <title>NBC Show 2</title>
    <desc>Description of NBC show 2.</desc>
    </programme>
    <channel id="1235">
    <display-name>CBS</display-name>
    </channel>
    <programme start="20140925063000 +1200" stop="20140925073000 +1200" channel="1235">
    <title>CBS Show 1</title>
    <desc>Description of CBS show 1.</desc>
    </programme>
    <programme start="20140925073000 +1200" stop="20140925080000 +1200" channel="1235">
    <title>CBS Show 2</title>
    <desc>Description of CBS show 2.</desc>
    </programme>

    Do you see how the channel ID on the programme is used to indicate which channel the program is linked to?

    When you save a mapping, TV Server stores the XMLTV channel IDs against the channels in the TV Server database. So for example, we'd save 1234 with your TV Server NBC channel and 1235 with your TV Server CBS channel.

    When a new XMLTV file becomes available for import, we compare the the channel ID for each program in the file against the mapped XMLTV channel ID for each of your TV Server channels. If we find a match, then we store the program details with our guide data; if we don't find a match then the program is ignored (not imported).

    Now, what I'm saying is happening is that the channel IDs that mc2xml (???) is putting into the XMLTV files are changing. For example, maybe the NBC ID changes from 1234 to 2345. What does that do? Well, it effectively breaks the saved mapping. In other words, when TV Server tries to import that XMLTV file it looks at the saved ID for NBC (which is 1234) and sees it doesn't match any of the NBC programs in the XMLTV file (which are linked to channel 2345), and so none of those programs are imported.

    This is not a TV Server error or mistake. TV Server is not deleting or corrupting anything. It is Microsoft/mc2xml that changes their ID, and that is what is breaking the mappings. There's nothing that TV Server can do to force Microsoft to keep using the same IDs, and unfortunately we're also unable to automatically match the new IDs with the old ones. So, if you want to keep getting your data from Microsoft then you're going to have to live with this problem.

    Regards,
    mm
     

    gwatkins

    Portal Pro
    December 8, 2013
    81
    6
    67
    Richardson, Texas
    Home Country
    United States of America United States of America
    I guess I understand what you are saying but it sure seems strange that Microsoft would randomly change the ID's. I used to use MCE for live tv and never had a problem with the guide and I assume it uses the Microsoft info as well. Do you have any recommendations for a better provider?
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I guess I understand what you are saying but it sure seems strange that Microsoft would randomly change the ID's.
    Sure, I understand... but I'm aware you're not the first person to report this, and MediaPortal is not the only software that is affected. For example:
    http://forums.gbpvr.com/showthread.php?55741-Changing-Channel-Mapping-Ids-Causing-Blank-Guide

    I used to use MCE for live tv and never had a problem with the guide and I assume it uses the Microsoft info as well.
    Yes, but MCE doesn't export to XMLTV before importing. In other words, this problem only affects people that use the MS data outside WMC.

    Do you have any recommendations for a better provider?
    Your options:
    https://forum.team-mediaportal.com/threads/setup-help.124506/#post-1061869
     

    Users who are viewing this thread

    Top Bottom