Custom Data Grabber including Sky UK Channel/EPG Grabber (2 Viewers)

DJBlu

Portal Pro
August 14, 2007
1,670
813
Llanelli
United Kingdom United Kingdom
Country flag
For What/Why/When and How open the spolier
What is this?

This is a patch and plugin I have created for Media Portal TV Server which allows you to create a plugin that can request raw data from the TV Server.

Why did I write this?

Simple, the code changes required for the TSWriter and TVLibrary to include new features was becoming really difficult. I thought to myself what is required? And my answer was a Pid Filter system.

How does it work?

At the moment any plugin that you write will need a TV/Radio channel that is created and stored in the Database. The Custom Data Grabber is then able to timeshift this channel whilst grabbing RAW section data from the TSWriter. All you need to do is tell the Custom Data Grabber which channel, what pids and for how long? It is then up to you as to what you do with this section data.

I want to write a plugin what do I do?

Download the SVN files and Custom Data Grabber down below. Install them over the top of a MediaPortal 1.2.0 beta installation. Copy the Custom Data Grabber.dll to the TV Server directory. Start your project as you would normally do in C# or Vb.net. Add a reference to the Custom Data Grabber.dll Create a new instance of the Custom Data Grabber.

Public CustomDataGrabber as CustomDataGrabber = new CustomDataGrabber()
You now need to add handlers for OnPacket and OnComplete to your subroutines Raised everytime a new Data Section Arrives.
Public Sub OnTSPacket(ByVal Pid As Integer, ByVal Length As Integer, ByVal Data As Section) Handles CustomDataGrabber.OnPacket
'Your Code
End Sub
Raised when the Custom Data Grabber has finished

Sub OnComplete(ByVal err As Boolean, ByVal errormessage As String) Handles CustomDataGrabber.OnComplete

'Your Code

End Sub
To start the Grab Create a channel for the grabber to use or get the channel from the TV Database. Create a List of Pids to send

Dim DataBaseChannel as Channel = _layer.GetChannelbyName("Sample Channel")
Dim Pids as List(of integer) = new List(of Integer)
Dim Seconds as Integer = 60
Pids.Add(&H10) ' Nit
Pids.Add(&H11) ' SDT/BAT

CustomDataGrabber.grab(DatabaseChannel.ChannelId, SecondsToGrab, Pids)
CustomDataGrabber.SendComplete(ErrorCode)
ErrorCode of 0 means no errors and the OnComplete event will be raised ErrorCode of 1 means an error occured and the OnComplete event will NOT be raised

Try
'Code
CustomDataGrabber.SendComplete(0)
Catch
CustomDataGrabber.SendComplete(1)
End Try​

What are the posibilities with this?

Many, I have already created 2 plugins which are below to show what is capable. EPG systems, Channel Scanning and updating. Interactive Services.

The major advantage over this is if it was implemented into TV Server then you only change 1 plugin file instead of changing several in the core of the TVServer.

I know this is a long guide but if you give it a try you will see the concept is rather simple and it opens the TVServer to new and exciting features.
PLEASE DOWNLOAD AND READ THE INSTALL INSTRUCTIONS ON POST #2.
If you find it is not working, Delete your database and run the Installer again.

Install the following in order.

Media Portal 1.3.0 Alpha
  • MediaPortal SVN Installer with Series Link - Click Here
  • TvServer SVN Installer with patch - Click Here
Media Portal 1.3.0 RC
  • MediaPortal SVN Installer with Series Link - Click Here
  • TvServer SVN Installer with patch - Click Here

Media Portal 1.3.0 Final
  • MediaPortal SVN Installer with Series Link - Click Here
  • TvServer SVN Installer with patch - Click Here
Media Portal 1.4.0 Final
  • MediaPortal SVN Installer with Series Link - Click Here
  • TvServer SVN Installer with patch - Click Here
Mediaportal 1.5.0 Final
  • MediaPortal SVN Installer with Series Link - Click Here
  • TvServer SVN Installer with patch - Click Here
Mediaportal 1.6.0 Final
Mediaportal 1.15.0 Final (added by @Brownard)

The following is necessary for all installations and must be placed in the TV Server directory.
The following are used as required

For 1.3.0 Beta and onwards
For 1.3.0 Alpha and earlier
ChangeLog (Open Spoiler)


Sky NZ Plugin 1.4.0.6

Fixed: Default Grabber channel settings.

Sky UK Plugin 1.4.0.6

Added: New settings method to reduce calls to database.
Added: New throttling method to reduce stuttering on slower systems.

Sky UK plugin 1.4.0.5

Fixed: Update every x hours settings fixed.

Sky UK Plugin - 1.4.0.4

Added: Logos are centred.

Sky UK Plugin - 1.4.0.3

Fixed : Logo name issue
Added : Throttler to prevent CPU starvation

Sky UK Plugin - 1.4.0.2

Fixed: Channel.Persist error(s)
Re-added Logo downloader

Sky IT Plugin - 1.4.0.1

Re-released with mods from other plugins and updated to TVServer 1.4.0

Sky NZ Plugin - 1.4.0.4

Fixed Bouquet ID and Network ID error
 

Attachments

Last edited by a moderator:

DJBlu

Portal Pro
August 14, 2007
1,670
813
Llanelli
United Kingdom United Kingdom
Country flag
Sky UK Channel and EPG Grabber Instructions
Below

Freesat Channel Grabber
Coming Soon, Similar to the Sky UK so you can take a read of those until then.

Plan of Action

1. Series Link - Added
2. Sky Italy Plugin - Added
3. Foxtel Australia Plugin - Added
4. Freesat EPG and series link into Scanner - Channel Scanner working, EPG to come[WIP]
5. EIT Scanner Plugin, series link where available(freeview)
5. Sky New Zealand Plugin. Added
6. Scan() method into Custom Data Grabber, instead of having to tune to a channel.
7. MHW1/MHW2 guide plugin.
8. NagraGuide Plugin.
9. MHEG5/Red Button, will need help with the MediaPortal and the Overlay, volunteers to my PM please :D
10. Irradicate need for Custom Data Grabber plugin by adding code to TVServer.

If you have a request then please ask in the forum and I'll see what I can do. Any bugs no matter how small please let me know. Thanks.
 

Attachments

Last edited:

bob808

MP Donator
  • Premium Supporter
  • June 14, 2008
    295
    32
    Hampshire
    United Kingdom United Kingdom
    Thanks djblu seems to work great again here. Assuming this holds up for everyone will series link be added shortly?

    Edit1: Hmm might have spoken too soon... Trying it card by card and on the hauppague hd-s2 it doesn't add all channels... Says 88 transponders found then adds anywhere between 300 and 500 channels out of 966 and seems to be a different number each time...

    Will complete the test on my 2 tbs cards and let you know what they do.

    Thanks

    Bob

    Edit 2: Same happening on my tbs cards... Different number of channels created each time it runs but always around the 400 Mark despite the counter showing xxx/966 on each grab attempt the number never counts up to 966 logs added


    Edit 3: Desite ticking the tbs cards and retrying, the manual control shows it is the haupague card that is still doing the grabbing... will try again and restart the tv service between grabs...
     

    icam2

    Portal Pro
    March 7, 2011
    204
    68
    United Kingdom United Kingdom
    Just given it a good run. No bugs left from what i can see DJBlu (apart from the small cosmetic channel groups default order eg "music" being to far down by default nothing a manual change cant fix its not even worth noting as a bug). I'll monitor the plugin all day mate and if i spot anything i'll let you know. Cheers

    Way faster the than the old versions mate like it.

    Thanks djblu seems to work great again here. Assuming this holds up for everyone will series link be added shortly?

    Hmm might have spoken too soon... Trying it card by card and on the hauppague hd-s2 it doesn't add all channels... Says 88 transponders found then adds anywhere between 300 and 500 channels out of 966 and seems to be a different number each time...

    Will complete the test on my 2 tbs cards and let you know what they do.

    Thanks

    Bob

    Same happening on my tbs cards... Different number of channels created each time it runs but always around the 400 Mark despite the counter showing xxx/966 on each grab attempt the number never counts up to 966
    I had the same problem bob808. i fixed mine by dropping my settings restarting the pc and rescanning. working fine now
     

    bob808

    MP Donator
  • Premium Supporter
  • June 14, 2008
    295
    32
    Hampshire
    United Kingdom United Kingdom
    Bob808 have you increased the grab time?
    I tried it at 60 and 120 but no difference on the hauppague card... have just reset the database and the tbs cards work perfect - will do the same again and try the hauppague again..

    Edit 1: ok, seems to work with hauppague now... will try with all 4 tuners enabled...

    Edit 2: aargh - the haupague card adds channels and epg, but gives a no signal error when tuning to any of them!

    Edit 3: Working perfect with my TBS 6981 and 8920 tuners - but not on my haup hd-s2 card
     

    icam2

    Portal Pro
    March 7, 2011
    204
    68
    United Kingdom United Kingdom
    Bob808 have you increased the grab time?
    I tried it at 60 and 120 but no difference on the hauppague card... have just reset the database and the tbs cards work perfect - will do the same again and try the hauppague again..

    Edit 1: ok, seems to work with hauppague now... will try with all 4 tuners enabled...

    Edit 2: aargh - the haupague card adds channels and epg, but gives a no signal error when tuning to any of them!

    Edit 3: Working perfect with my TBS 6981 and 8920 tuners - but not on my haup hd-s2 card
    Sounds Like the haupague is locking up after the first scan. Do you have it setup to preload? i used to have problems with an old card doing that. 8920 are the best ones i've ever had.
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 2)

    OP Similar threads Forum Replies Date
    da3dsoul [Request] An MVP Plugin example for custom settings in MP2 Plugin Development 2
    DHosein Adding Custom Artwork? My TVSeries 3
    ajs [solved] Latest Media Handler - Skin settings - Custom latests items number Fanart Handler 27
    SpudR Custom filter for partially watched movies Moving Pictures 5
    toricred Using TMM, How to Stop Importer From Going to The Movie Database for Data General 1
    D EPG No Data General Support 2
    D [solved] EPG Data off by -20 hours? General 10
    W Setup data connection - mySQL connection failed Installation, configuration support 1
    emphatic How to get the right data for War Of The Worlds? My TVSeries 1
    T Freeview EPG-Anyone know what channel sends the guide data? Electronic Program Guide 10
    F No data in "File Details" Moving Pictures 2
    G Newb trying MP2, trouble with guide data General 5
    J EPG data recheck? Feature Requests 0
    B [solved] Where is the satellite data now? General 10
    T No data available using xmltv and mc2xml xmlTV 2
    M Importing movie data General 38
    T Media Portal 2 EPG data missing General 16
    P Multiple clients - share resume/watched data General 1
    M Add Radio channels and EPG to Mediaportal xmlTV 2
    J Help with new grabber file. WebEPG 1
    A 1.24.0 CD art grabber not working in Shares view 1.24-1.26 Pre Release 17
    geotwticher TV Guide EPG Grabber for Australia 2020 RIP freepg.tv General 4
    C Grabbers broken General Support 24
    F My Films and .nfo grabber don't grab all the covers Newcomers Forum 0
    vuego Updated WebEPG grabber - Dagenstv.com Submit: EPG-Grabbers and tuningdetails 1
    Top Bottom