NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 31 32 33 34 35 … 93 Next »
A plugin to import channel information

 
  • 0 Vote(s) - 0 Average
A plugin to import channel information
Khurram
Offline

Member

Posts: 112
Threads: 19
Joined: May 2008
#1
2008-06-03, 07:44 PM
I want to try to build a plugin to import channel lists from a text (xml) file (to overcome my problem listed at http://forums.nextpvr.com/showthread.php?t=35522). Basically, I would like the plugin to do the folowing 3 functions:

1) The import file to populate all the columns in the channels grid in the "Edit Recording Source" dialog.
2) The import file to fill up the tv guide info.
3) To set the sequence numbers of all the channels (accessible from the Channels tab in the Config utility).

But I am having a hell of a time trying to understand it all. VS 2005 is not a problem, but GBPVR plugins are another matter Smile

For starters, I cant figure out the following 2 issues:

1) What interface to implement? I tried IMenuTask but this adds an item to the menu in PVRX2. I would like the plugin to be configured from the Config utility. I looked at the graph recorder plugin but it implements IRecordingSource and IRecordingSourceConfiguration which is not what I want.

2) I cant find anyway to display a windows form in the plugin. If I cant do that, how can I display the windows form contents thru the plugin?

I am sorry if these are basic question but as I mentioned above, I am stumped.

Thanks,
Khurram.
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#2
2008-06-03, 08:04 PM
Wouldn't you be better just to create a "nice" xmltv file? And let GBPVR worry about the rest?

Because even if you play with the channel names, I'm not sure if next time you have an epg update if the "old" names will come back. At least with an xmltv file you could bring that in everyday, or convert your existing epg to use the new names.

It would save you a heap of trouble.
Khurram
Offline

Member

Posts: 112
Threads: 19
Joined: May 2008
#3
2008-06-03, 08:53 PM
Well, I do have an xmltv file but it doesnt work correctly in my case because of channel numbers. If you see the thread referenced in my first post, you will see the problem. The xmltv file assumes channel numbers start from 1 (or is it 0) and increase linearly from there. This doesnt apply in my case as the numbers start from 36 and increase from there non-uniformly; for example, the first three channel numbers I have are 36, 38 and 41. I have tried using freq2reg and freq2xml but they dont work for me as GBPVR ignores the registry settings produced by freq2reg.

Thanks,
Khurram.
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#4
2008-06-03, 09:11 PM
When I used to run an aerial that used to use the frequencies that you are talking about mu xmltv file was similar Chan 1 = 1, Channel 2 = 2, prime = 5, but their frequencies were something like chan 1 = 2, channel 2 = 11, prime = 319.

So to do this I'd import the xmltv file to get the names, then in the channel screen (channel source) you choose the channel, say prime, and edit the 5 and make it 319 to set the frequency.

When I read your email the first time, it just sounded like you wanted to rename channels.
Khurram
Offline

Member

Posts: 112
Threads: 19
Joined: May 2008
#5
2008-06-04, 07:38 AM
Thanks for your reply. I know I can change the numbers in the channels grid (I can also enter the frequencies instead of the numbers), but there are 2 problems with this approach. First, I have 100+ channels and its not convenient to enter it in the grid. Second, the cable company has a nasty habit of switching channels around, so if BBC is on channel 45 today, it might be on channel 195 a few weeks from now.

To get around this, I have a little access database which matches channel names, numbers and frequencies. I use this to output text file for Dscaler channel list and to ouput xmltv compatible xml file. So far the xml file only lists channel names, no schedules. I can "extend" the xmltv file to output channel numbers also as I dont think the xmltv file structure caters for channel numbers. At a later stage, I would like to enhance it to pull program information for different channels through screen scraping (the WebEPG plugin for MediaPortal seems very promising in this regard).

I would like this plugin to import xmltv data from this file and also to set channel numbers from either from the "extended" xmltv file or another text file (output by the database). I hope this explains more thoroughly what I would like to do.

Thanks,
Khurram.
Khurram
Offline

Member

Posts: 112
Threads: 19
Joined: May 2008
#6
2008-06-04, 01:36 PM
I think there might be another way to accomplish this. By this, I mean by using an external program (easy enough to do in .net) and not by a plugin. I have googled for sqlite3 and have found many links to it. There is a wrapper to sqllite3 for ADO.Net, so accessing it thru the .net framework becomes a no-brainer. I dont know if I will have write access to gbpvr.db3 and how will the locking issues be handled. But its worth a try.

If GBPVR supports this, maybe the .net program can respond to events raised by GBPVR after channels are added, modified, etc. Time to dive into GBPVR docs once again Smile

Khurram.
Khurram
Offline

Member

Posts: 112
Threads: 19
Joined: May 2008
#7
2008-06-04, 06:28 PM
Well I have made an access database to do what I wanted. Just linked to 3 tables in gbpvr.db3 and made the changes according to what I wanted. I am happy now Smile
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  API channel.stream.start mvallevand 2 1,337 2023-05-07, 09:40 PM
Last Post: mvallevand
  PIP plugin for Kodi sgilani 2 2,850 2022-10-17, 12:44 AM
Last Post: sgilani
  Way to tell programmatically if channel load in from NPVR has finished... gdogg371 3 2,380 2021-03-11, 03:59 PM
Last Post: mvallevand
  New Systems Plugin kirschey 10 3,365 2020-11-14, 08:01 PM
Last Post: sub
  What is being sent when using /live?channel=3.1 scJohn 2 1,911 2020-01-30, 04:51 PM
Last Post: sub
  m3u Import mvallevand 3 2,531 2019-04-05, 02:21 AM
Last Post: sub
  Import/export recordings via API? whurlston 4 3,801 2019-02-19, 11:48 AM
Last Post: Graham
  Web command to create recurring any channel mvallevand 2 2,590 2019-02-04, 03:09 PM
Last Post: mvallevand
  XMLTV Channel Number Option gdogg371 12 6,749 2018-07-18, 04:32 PM
Last Post: sub
  Channels List by Channel Group Name scJohn 1 2,774 2018-01-05, 10:45 PM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode