[Pending] TvPlugin ZapOsd Patch (1 Viewer)

Neos

Portal Member
February 14, 2008
18
15
Home Country
Netherlands Netherlands
This patch includes one improvement and one bug fix:
  • Feat: Zapping to channels by using the numeric keys (1-9) now only selects a channel that is visible in the TvGuide.
  • Fix: When having both radio and TV channels the previous and next channel methods would select TV and Radio channels causing several an exception and strange zap behavior.

Select channels by their index in the TV Guide / current channel group is in my opinion the way how selecting by index should work. In the current implantation you could a) accidentally select a radio channel or b) select a channel which was hidden in the TV guide because you don't have a subscription for it or you simply don't ever want to view that channel.

When zapping to the next or previous channel the ZapOsd threats TV and Radio channels equally, if your DVB provider mixes TV and radio channels on one transponder after scanning your tuning-details would internally look like this:

  1. TV Channel 1
  2. TV Channel 2
  3. Radio Channel 1
  4. TV Channel 3
  5. Radio Channel 2
  6. Radio Channel 3
  7. TV Channel 4

If you start the TVPlugin and start viewing TV channel 2, then you one channel up. You would expect to see channel 3, but instead the ZapOsd, threating radio and tv channels equally, sends a request to view radio channel 1. The result is a black screen and 2 seconds of radio after which you will be left with just a black screen, not really the behavior we'r looking for I think. This patch fixes the issue by only allowing the ZapOsd to tune in to TV channels.

Edit: The current previous patch breaks broke zapping by channel number because this method relies on the zapping by channel index method, I am currently testing a version which calls ZapToChannel with an instance of a Channel class instead. PS: Who in gods name made zapping by channel number depend on zapping by channel index :confused:

Update: the new patch fixes the zap by channal number issue I introduced in the previous patch. It also removes the GetChannels(bool refresh) method which was already obsolete since revision 26014. This improves the performance of the method because by calling GetChannels(true) on each attempt to zap by channel number a new list<T> was made and populated with all channels available (this resource probably entered gen2 and hench added pressure to the GC while being a completely useless).
 

Attachments

  • zaposd_patch.patch
    1.9 KB
  • zaposd_patch_v2.patch
    5.7 KB

jameson_uk

Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    until recently I think TV Navigator was being used for radio (albeit not very well) and this does need cleaning up.

    What I am struggling to do though is replicate the issue you mention. I have radio and TV channels on the same DVB-T transponders but when I scan the TV channels are allocated to TV groups and the Radio to radio groups.

    Can you explain how to replicate this error (it is possible errors will get fixed now where as improvements will have to wait until 1.2 is release)
     

    Neos

    Portal Member
    February 14, 2008
    18
    15
    Home Country
    Netherlands Netherlands
    This behavior was simply present after installation and scanning for channels on my virtual DVBLink tuners. Note: all the radio channels are marked as visible in guide in the TV Service config.

    To replicate the error I just had to go to fullscreen TV and use my remote's (RC6) previous and next channel buttons. If you are interested I can provided you with a dump of the relevant database tables.
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    This behavior was simply present after installation and scanning for channels on my virtual DVBLink tuners. Note: all the radio channels are marked as visible in guide in the TV Service config.

    To replicate the error I just had to go to fullscreen TV and use my remote's (RC6) previous and next channel buttons. If you are interested I can provided you with a dump of the relevant database tables.

    Please do.

    Edit: I have DVB-T cards, so there are radio and TV channels on the same transponder.

    If I am in the TV EPG with the all channels group enabled (radio and TV both have the 'all channels' group), and I select the first channel, then use channel up to cycle through the channels in the zapOSD, I do not see any radio channels or get any indication that it will zap to a radio channel.

    Are you saying that if you have a TV channel playing, you can hit 'channel up' and get a radio channel?

    Mark
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    No comments from anyone?

    Is this actually a problem (with latest SVN)? It would be a shame to spend time working on/testing a fix for a problem that no-longer exists.

    I'd like to try to help you reproduce the problem and verify the fix, but I can't reproduce the problem without guidance.

    Mark
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    AW: TvPlugin ZapOsd Patch

    @eliot
    i'm sorry i don't use readio. I was just happy about the "feature": (# Feat: Zapping to channels by using the numeric keys (1-9) now only selects a channel that is visible in the TvGuide.).
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    I am working away from home so it makes debugging and working this through a little difficult but I am struggling to see how the zap could jump between TV and Radio.

    The first line of ZapToChannelNumber is
    Code:
    IList<GroupMap> channels = CurrentGroup.ReferringGroupMap();
    in the database even "all channels" groups for radio and TV will have different IDs so this will always return only the channels in the current group (ie. either TV or radio)

    also there already was a check in GetChannels that you are removing
    Code:
    if (ch.VisibleInGuide && ch.IsTv)

    Just looking to be able to reproduce the error so we can test it is actually fixed.

    Edit: Just seen your other patch
    https://forum.team-mediaportal.com/...c-325/tve-dvblink-scanning-tuner-patch-94259/
    This would explain the issue you are seeing and why I can't reproduce it.
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    I am working away from home so it makes debugging and working this through a little difficult but I am struggling to see how the zap could jump between TV and Radio.

    The first line of ZapToChannelNumber is
    Code:
    IList<GroupMap> channels = CurrentGroup.ReferringGroupMap();
    in the database even "all channels" groups for radio and TV will have different IDs so this will always return only the channels in the current group (ie. either TV or radio)

    also there already was a check in GetChannels that you are removing
    Code:
    if (ch.VisibleInGuide && ch.IsTv)

    Just looking to be able to reproduce the error so we can test it is actually fixed.

    Edit: Just seen your other patch
    https://forum.team-mediaportal.com/...c-325/tve-dvblink-scanning-tuner-patch-94259/
    This would explain the issue you are seeing and why I can't reproduce it.

    So, do you have radio channels in your TV channels group in SetupTV Neos? If so, could you just delete them? I am not familiar with DVBLink, so I have no idea how it works.

    Best wishes,

    Mark
     

    Neos

    Portal Member
    February 14, 2008
    18
    15
    Home Country
    Netherlands Netherlands
    I do not see any radio channels in the TV channels list (SetupTV), nor do I see any TV channels in the radio channels list. I did not group my channels and use the default all channels group.

    So you will probably be able to reproduce this by installing the TV server scanning for channels and NOT checking Create "XXX" channel group. After the scanning is completed start mediaportal and select the all channels group and view a channel after which the next logical tuning detail is from a radio channel.

    The bug probably occurs because mediaportal uses two tables for channel groups (radio and tv) both have one default group called All Channels, if you do manually regroup the channels and hide the all channels group in the TV Client mediaportal will only loop over the tuning details of the TV channels. But in case you do not regroup your channels mediaportal will simply loop over all the channels, which includes radio channels.

    I have also attached a dump of the relevant TV database tables (MySql).

    Note: I see now both my channel groups for radio and TV have group id 1... but why are there two tables it's confusing and error-prone if these tables can't share ids.

    Update: I just did a clean install of the TV server, checked the database there was one group for tv channels in the database: All Channels (ID:1). And no groups for radio channels (not even the All Channels group). I added one internetradio stream, as expected it now created an All Channels group in the radiochannelgroup database: All Channels (ID:1). Clearly this group also had ID 1 which it should NOT, from this little expirence I conclude that TV and Radio channel groups do not have mutually exclusive ID's.
     

    Users who are viewing this thread

    Top Bottom