[Bug] Problem with DVB-IP channels with changed SID or PID (1 Viewer)

georgius

Retired Team Member
  • Premium Supporter
  • October 31, 2010
    1,376
    654
    Bratislava
    Home Country
    Slovakia Slovakia
    Hi,

    I've compiled latest SVN version (27971) with combined patch (compiled CoreCpp, DirectShowFilters, MPC_HC_subs, MediaPortal and TvServer), uninstalled previous version of MP 1.2.0 Beta and installed new version of MediaPortal with TvServer. When I try to scan for channels, scanning stopped on first channel. Because my provider has ONID and SID for all channels same, I've checked Provider doesn't uniquely identify channels option.

    I think that problem is in these lines:
    Code:
    currentDetail = layer.GetTuningDetail(channel.Url, TvBusinessLayer.GetChannelType(channel));
    currentDetail.ServiceId = 0;

    If channel is not in database, than GetTuningDetail() returns null and on second line you get exception. Logs attached.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Georgius - you're absolutely right!

    :D:D:D

    I'm surprised that Andrusha777 didn't encounter this problem - I guess he just rescanned without deleting the original channels.
    The solution is very simple: change the "currentDetail.ServiceId = 0; to "channel.ServiceId = 0;".
    Patches and binaries in the original post updated.

    felix_clerc: My apologies for wasting your time - completely my fault. If you have some time on your hand please try the updated binaries.

    mm
     

    georgius

    Retired Team Member
  • Premium Supporter
  • October 31, 2010
    1,376
    654
    Bratislava
    Home Country
    Slovakia Slovakia
    Hi,

    I've made change as you proposed, but I have serious issue. I scanned all channels successfully, but I can't watch any of them. I found that service ID for channel doesn't have to be changed (at least for me). Can you explain me why is necessary to set channel.ServiceId to 0?

    When I removed the line with setting service ID I found that with re-scanning of channels with specified network interface leads to creating new channels instead of updating existing channels. It's because url is changed from 'udp://@233.62.90.3:2314' to '<Interface=Local Area Connection 2>udp://@233.62.90.3:2314'.

    So I propose these changes:

    In CardDvbIp.cs:
    Code:
    //Find the current tuningdetail if we have that.
    String channelBaseUrl = channel.Url;
    // remove network interface (if any)
    if (channelBaseUrl.StartsWith("<"))
    {
      int length = channelBaseUrl.IndexOf('>');
      if (length < 0)
        length = channelBaseUrl.Length;
      length++;
      channelBaseUrl = channelBaseUrl.Remove(0, length);
    }
    currentDetail = layer.GetTuningDetail(channelBaseUrl, TvBusinessLayer.GetChannelType(channel));
    And in BusinessLayer.cs:
    Code:
    sb.AddConstraint(Operator.Like, "url", String.Format("%{0}", url));
     

    felix_clerc

    Portal Pro
    October 28, 2009
    82
    6
    Home Country
    Switzerland Switzerland
    Hello,

    I successfully imported all my channels using the patch, but had very long switch time - about 30 seconds to zap from one channel to the other.
    Sorry, I didn't catched logs, and reverted with the original .ax that's included with 1.2b - and now channels switching is taking about 1 second.
    I'll try to reinstall the patch and catch logs if I found time to play with tv server while wifey and kids are not willing to watch TV.

    I however confirm that even with the patch, I had to manually create each entry, then scanning for channels updated it.
    I'll export my conf and will try a scan with "standard" .ax file to see if the behaviour is different and will post feedback.

    Anyway, thanks for the excellent work on iptv!

    Felix
     

    Andrusha777

    Portal Pro
    December 3, 2009
    132
    3
    Home Country
    Russian Federation Russian Federation
    Georgius - you're absolutely right!

    :D:D:D

    I'm surprised that Andrusha777 didn't encounter this problem - I guess he just rescanned without deleting the original channels.
    The solution is very simple: change the "currentDetail.ServiceId = 0; to "channel.ServiceId = 0;".
    Patches and binaries in the original post updated.

    @felix_clerc: My apologies for wasting your time - completely my fault. If you have some time on your hand please try the updated binaries.

    mm

    you are absolutely right - i have not deleted old channels! :oops:
     

    Andrusha777

    Portal Pro
    December 3, 2009
    132
    3
    Home Country
    Russian Federation Russian Federation
    Hi all! As I think, soon we will have a new version of MP. I wonder, will this patch (with tv library) will work with new version, or it will be integrated to new version or need to make another patch for new version of MP? This patch works great about 2+ months on my system with occasionally switching SID on IPTV channels (provider translate same channels to network from different satellites, changing SID time to time). So with this patch channels stays working without rescanning.
     

    mm1352000

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

    Parts of the patch have been included in 1.2.0rc, but the code that handles the changing SID has not. A new patch would be required. We'd need to consider how to handle this in future versions of MP as I can't keep providing patches forever.

    mm
     

    Andrusha777

    Portal Pro
    December 3, 2009
    132
    3
    Home Country
    Russian Federation Russian Federation
    So, may be the best way is to make any option in tv server for that? Any type of checkbox or smth?
     

    mm1352000

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

    I think we'll have to think *very* carefully. TV Server configuration is already very complex so we want to avoid adding more options than necessary. Also this problem only affects DVB-IP so far, and DVB-IP seems to only provide one channel per stream. Maybe it could be automatically used for DVB-IP without an option...

    mm
     

    Andrusha777

    Portal Pro
    December 3, 2009
    132
    3
    Home Country
    Russian Federation Russian Federation
    Hi again! Today I have found, that MP 1.2.0 RC was released. But i'm afraid to install it because of IPTV channels. Is it possible to make same patch to new version of MP? Or should I create a new thread?
     

    Users who are viewing this thread

    Top Bottom