Sort or restrict channels by group in mapping dialog (1 Viewer)

RobW

New Member
August 25, 2020
4
2
Home Country
Great Britain (UK) Great Britain (UK)
Started on: 2020-08-25
last update: 2020-08-25

Summary:
Add the ability to sort or restrict channels by group in mapping dialog?

Area:
TV Server

Description:
According to Wiki guide, TV Mapping page, "... it can be useful at times to do manual mappings. For example, if you have 2 TV cards that are the same (such as DVB-S) the first TV card might find some channels that the second might miss when scanning. This will enable you to map the missed channels found by the first TV card to the TV card that missed them."

That's entirely correct, but what if you tune multiple satellites but not all cards can receive all satellites. In this case the list still presents channels from all satellites as available for mapping. I only want to see the channels that I know ought to be available on that card.

My example - fours cards, all connected via simple A/B diseqc switches. On A of two cards is Hotbird 13. On A of the other two is Astra 19.2. On B of all four is Astra 28.2. I'd like to be able to - for example - see if any channels are missing on 28.2 after re-tuning all cards. Or, for another example, copy the 28.2 re-tuning on one card to all 3 others. But if I try to do any of this without deleting all channels first (and therefore losing my bespoke channel numbering etc.) then I can't see the wood for the trees because all the channels for Hotbird and Astra 19.2 are there too.

A filter button to allow the set-up to show channels only from a chosen group would address this, assuming I do a scan that creates or adds to a 'satellite group'.
 

CyberSimian

Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    In the six years that I have used MP, I have not once used the "Channel Mapping" panel. It is far simpler to select each tuner in turn and perform a scan. I would make these points:

    (1) Scanning each tuner checks that the tuner and all of its cable connections are working correctly. This does not result in multiple occurrences of each channel: MP recognises the equivalence of channels received by the different tuners, and creates only one entry in the EPG for each channel. (y)

    (2) If you have tuners with different capabilities, you don't have to work out which channels can be received by which tuner. I think that this is your case.

    I have six terrestrial tuners in my HTPC -- four DVB-T2 tuners, and two DVB-T tuners. By scanning each tuner in turn, I don't have to worry about which channels can be received by which tuners. And with our half-assed half-donkeyed terrestrial system that we have in the UK, there are some standard-definition channels which are carried in the DVB-T2 MUXes, and hence not receivable by my DVB-T tuners. MP works all that out for me when I scan each tuner in turn, and I don't have to bother identifying which channel can be received by which tuner. (y)

    (3) Some tuners may have similar capability, but different sensitivity. My DVB-T and DVB-T2 tuners can both receive the channels in the DVB-T MUXes, but my DVB-T tuners are significantly less sensitive than the DVBT-T2 tuners. So there are some DVB-T MUXes that my DVB-T2 tuners can receive, but which my DVB-T tuners cannot. Again, by scanning each tuner in turn, MP works all that out for me. (y)

    (4) I have not used satellite, so perhaps the considerations are different for satellite. :confused:

    (5) MP currently does not have an active team member who is knowledgeable about the TV Server code, so the probability that any change will be made in the near future is slim. :(

    -- from CyberSimian in the UK
     

    RobW

    New Member
    August 25, 2020
    4
    2
    Home Country
    Great Britain (UK) Great Britain (UK)
    Many thanks CyberSimian for taking the time and trouble to reply to this. Much appreciated!

    Taking your last point first, I did suspect what you have confirmed, that this being a mature product with very little if any rough edges, there were not likely to be programmers around willing to have a look. Well, I can always work around it by analysing the data using a safe copy of the MySQL database, or the xml export of MP, imported into Access or Excel and processed so I can identify those missing channels by hand every time I do an update scan. I was just hoping not to, but it was a long shot.

    As to the rest of your message and why I would even want this improvement suggestion, well here is an explanation. Sorry about the length of it!

    In my experience, satellite is different from terrestrial. Firstly because there are many hundred channels on a satellite and often about 120 muxes, as opposed to only 5 or 6 for terrestrial. There are also loads of encrypted channels. Scanning can take 30 minutes or more. Then, one is faced with a smorgasbord of channels, many of which are not of interest, and many are virtual duplicates e.g. here in the UK, all the regional versions of the BBC, ITV and Channel 4 transmissions are present on the same satellite. Some rationalisation is virtually essential, and rather time consuming. For example for UK channels I locate all the programmes for my region and number them according to the FreeSat numbering, then create a group "UKTV" for them in order to produce a rational TV listing, while keeping those other channels available in the backgound via an "Astra 28.2" Group. This is useful because occasionally I might want to watch, say, something exclusive to BBC1 Scotland, rather than my local channel. So you can see why, although I'm happy to delete and then refresh the tuner mappings, I don't want to interfere with the channel set up itself unless a channel is actually moved in the frequencies or taken off air altogether.

    The second point about satellite receivers is that, in my experience, they don't always tune to all the channels they are capable of receiving. I'm sure that is the thought behind the comment I quoted from the wiki. This can be for various reasons, but I have a very specific example with my equipment, if you will indulge me a few minutes further ...

    As I said in the first post, all my tuners are attached to a diseqc A/B switch to choose between satellites. Two of my tuners (DVBSky) are as good as gold with that, and if they were the only ones I had, I'd just re-scan as you describe every 6 months or so to catch any frequency changes, and that would be that. Unfortunately however my other two tuners (TBS) don't play fair with this arrangement, and it took me much head-scratching before I found out what was really going on. These tuners don't seem to cope well with diseqc switching during scanning, even though in normal use they can tune to the required channels without batting an eyelid. I've worked out that during scanning, if satellite A and satellite B have a closely similar or identical tuning frequency for a particular mux, these cards will always go for A even though they are supposed to be scanning B at the time. The result, during a B scan, is that the system thinks the channels found or updated on A are actually on B, and re-marks them as such. Resulting in neither Mux A nor Mux B for that frequency being correctly recorded in MP, a confusion of channels and the loss of those channels on A across all tuners, because they are now marked incorrectly as B so become untunable.

    Once I'd figured out what was going on, the fix was obvious. I merely have to get the required scan on one of the "well behaved" tuners and apply it to the others, since they all work OK in actual use, some just fall down in scanning, and I'm sure this isn't a problem with MP. But how to be sure I had identified all the correct channels to map? Within over 1500 channels, there is plenty to confuse - there are channels marked "Sky ..." or "BBC ..." on the non-UK satellites, for example. If only I could limit it to groups and map the right groups to the right cards ...

    And now you hopefully understand where I was coming from!
     

    RobW

    New Member
    August 25, 2020
    4
    2
    Home Country
    Great Britain (UK) Great Britain (UK)
    In lieu of a likely modification to TV Setup module, I have devised my own workaround, using SQL. Here is a quick resume. Should be safe but make sure you have a backup before you try this!

    Simple scenario to demonstrate. 2 cards both on A/B diseqc switches. In each case A connects to LNB pointed at Satelite 1, and B to Sat 2. Ticking "Create groups for each satellite", scan card 1 to Satellite 1 only. Similarly scan card 2 to satellite 2 only. After the scan, need to map Sat 2 to card 1 and Sat 1 to card 2. Of course, normally you could just copy the missing channels in such a simple arrangement. But this 'hiding channels' illustration is intended to be extrapolated to a more complex case.

    With MP TV Server setup closed, search for MySQL and open link to command line client – default installed with MP. (If you use MS SQL instead you may have to adapt this according to your knowledge of that DB).

    Login on with "MediaPortal" (case sensitive)

    Connect to database with
    SQL:
    use mptvdb;

    List the groups to get the group IDs
    SQL:
    select * from channelgroup;

    Let's say the groups IDs MP has constructed from your scan are 5 for satellite 1 and 6 for satellite 2.

    We now hide all the channels from satellite 1 (Group 5):
    SQL:
    update channel ch
    inner join groupmap gm
    on ch.idchannel = gm.idChannel
    set ch.isTv = 0x0
    where gm.idgroup = 5
    ;

    Leaving the MySQL window open, we now open MP TV Server Setup. It will only show TV channels from satellite 2 because we have temporarily marked the channels from satellite 1 as not TV channels. Map all these channels to Card 1 and close setup.

    We can now reset the TV channels:
    SQL:
    update channel
    set isTv = 0x1
    where isRadio = 0x0
    ;

    This simply goes through the whole dataset and, wherever a channel is not marked as Radio, marks it as TV. Thus all the previously unmarked TV channels are restored.

    Repeat the temporary channel hiding for group 6 (i.e. change the above line WHERE gm.idgroup = 6) which will only show TV channels from Satellite 1 to map to card 2. Remember to reset all channels again before leaving the MySQL command line.

    Of course, this is just a simple illustration done the manual way. Clearly it can be scripted. I leave it to anyone needing this to make their own arrangements. In a situation with multiple satellites, you would sequentially hide the TV channels for each satellite group until only the ones you want to map remain. A single reset SQL will then restore status quo for the lot.
     

    Users who are viewing this thread

    Top Bottom