[Pending] - TvPlugin ZapOsd Patch

Discussion in 'Submit: code patches (MediaPortal/TV-Server/etc.)' started by Neos, March 6, 2011.

  1. Neos

    Neos Portal Member

    Joined:
    February 14, 2008
    Messages:
    18
    Likes Received:
    15
    Ratings:
    +15 / 0
    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).
     

    Attached Files:

    • Like Like x 5
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. disaster123
    • Premium Supporter

    disaster123 MP Donator

    Joined:
    May 14, 2008
    Messages:
    3,546
    Likes Received:
    417
    Ratings:
    +431 / 2
    Home Country:
    Germany Germany
    AW: TvPlugin ZapOsd Patch

    this one is really great - thanks!
     
  4. jameson_uk
    • Premium Supporter

    jameson_uk Retired Team Member

    Joined:
    January 27, 2005
    Messages:
    7,258
    Likes Received:
    2,228
    Gender:
    Male
    Occupation:
    Data Warehousing Consultant
    Location:
    Birmingham
    Ratings:
    +2,405 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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)
     
  5. Neos

    Neos Portal Member

    Joined:
    February 14, 2008
    Messages:
    18
    Likes Received:
    15
    Ratings:
    +15 / 0
    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.
     
  6. elliottmc
    • Premium Supporter

    elliottmc Retired Team Member

    Joined:
    August 7, 2005
    Messages:
    14,927
    Likes Received:
    4,011
    Gender:
    Male
    Location:
    Cardiff, UK
    Ratings:
    +5,503 / 13
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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
     
  7. elliottmc
    • Premium Supporter

    elliottmc Retired Team Member

    Joined:
    August 7, 2005
    Messages:
    14,927
    Likes Received:
    4,011
    Gender:
    Male
    Location:
    Cardiff, UK
    Ratings:
    +5,503 / 13
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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
     
  8. disaster123
    • Premium Supporter

    disaster123 MP Donator

    Joined:
    May 14, 2008
    Messages:
    3,546
    Likes Received:
    417
    Ratings:
    +431 / 2
    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.).
     
  9. jameson_uk
    • Premium Supporter

    jameson_uk Retired Team Member

    Joined:
    January 27, 2005
    Messages:
    7,258
    Likes Received:
    2,228
    Gender:
    Male
    Occupation:
    Data Warehousing Consultant
    Location:
    Birmingham
    Ratings:
    +2,405 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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 (Text):
    1. 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 (Text):
    1. 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.
     
  10. elliottmc
    • Premium Supporter

    elliottmc Retired Team Member

    Joined:
    August 7, 2005
    Messages:
    14,927
    Likes Received:
    4,011
    Gender:
    Male
    Location:
    Cardiff, UK
    Ratings:
    +5,503 / 13
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    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
     
  11. Neos

    Neos Portal Member

    Joined:
    February 14, 2008
    Messages:
    18
    Likes Received:
    15
    Ratings:
    +15 / 0
    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.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!