NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 88 89 90 91 92 93 Next »
Anyone working on a RSS plugin

 
  • 0 Vote(s) - 0 Average
Anyone working on a RSS plugin
Guest

Unregistered
 
#11
2004-08-18, 01:53 PM
Well I added a bunch of sites. The following sites are currently hardcoded and seem to be working.

SlashDot
PC World
TechBargains
CNN
BBC
NY Times
SourceForge
Washington Post
Freshmeat

I did learn the hard way that if you hit slashdot more than once in 30 minutes you get banned. Not a wise site to test with. I have the code and the plugin. Does anyone have a location that I can post it too. Please send me an email address that I will send the stuff too.

I have done some basic testing but I am sure I will have other volunteers. [Image: smile.gif]

Sub, I had a question with the skin. I modified the skin and that worked. But how is that deployed. Do I just add the skin files to the post and each users downloads it and drops it in.

Also is there any way to get the current directory for the gbpvr such that I can remove the hardcoded sites and push it out to an xml config file.
colin
Offline

Senior Member

Posts: 683
Threads: 39
Joined: Nov 2003
#12
2004-08-18, 03:40 PM
[b Wrote:Quote[/b] ]I did learn the hard way that if you hit slashdot more than once in 30 minutes you get banned. Not a wise site to test with. I have the code and the plugin. Does anyone have a location that I can post it too. Please send me an email address that I will send the stuff too.

probably best to send it to support@devnz.com

[b Wrote:Quote[/b] ]
I have done some basic testing but I am sure I will have other volunteers.

volunteers will not be a problem [Image: smile.gif]

[b Wrote:Quote[/b] ]
Sub, I had a question with the skin. I modified the skin and that worked. But how is that deployed. Do I just add the skin files to the post and each users downloads it and drops it in.

most of us include the skin/<>/RSS/* in the zip file with the dll.

[b Wrote:Quote[/b] ]
Also is there any way to get the current directory for the gbpvr such that I can remove the hardcoded sites and push it out to an xml config file.

Take a look at the weather plugin and see how it does the configuration stuff. This will allow you to store the information in the config.xml file. Also it will show you how to retrieve the data back again.

Cheers,
Colin.
CodeMonkey
Offline

Senior Member

Posts: 389
Threads: 86
Joined: Apr 2004
#13
2004-08-18, 03:43 PM
For an example of how to make it configurable, look at how the weather plugin handles its configuration dialog.

I was going to do the same to the comic plugin, but now I can't install VS .NET because of a bad CD.  If it isn't one thing, it's another.
-CodeMonkey
Guest

Unregistered
 
#14
2004-08-18, 05:14 PM
Well I looked at the Weather plugin.  Did not look too bad.   However I am getting errors which my limited knowledge of C# I cant figure out how to debug or see the full stack trace.

This is actually a different plugin.  This is for an address book viewer.  Just the one I am playing with now.  Right now it looks for the address book xml in the C: I want to give the user an ability to specify it somewhere else.


When I click on settings I get the following stack trace.  Any thoughts or leads?

System.NullReferenceException: Object reference not set to an instance of an object.
  at AddressBookPlugin.AddressBookConfigForm.DiskSpaceConfigForm_Load(Object sender, EventArgs e)
  at System.Windows.Forms.Form.OnLoad(EventArgs e)
  at System.Windows.Forms.Form.OnCreateControl()


If I click continue and then ok I get this one

System.NullReferenceException: Object reference not set to an instance of an object.
  at AddressBookPlugin.AddressBookConfigForm.buttonOK_Click(Object sender, EventArgs e)
  at System.Windows.Forms.Control.OnClick(EventArgs e)
  at System.Windows.Forms.Button.OnClick(EventArgs e)


Obviously something is null.  However I have a catch all in the load just to see if that would catch it.  I do not see the line that the error actually occured on just the method.

private void DiskSpaceConfigForm_Load(object sender, System.EventArgs e)
{
areaCode = "c:/addressbookdb.xml";
if ( settings != null )
{
try
{
XmlNode node = settings.SelectSingleNode("/settings/AddressBookPlugin/filename&quotWink;

if (node != null)
{
// ... override with user's supplied setting
areaCode = node.InnerText;
}
      }
      catch
      {
      }
  }
  textBoxFilename.Text = areaCode;
}

private void buttonOK_Click(object sender, System.EventArgs e)
{
// First check that section exists in XML setting file
XmlNode node = settings.SelectSingleNode("/settings/AddressBookPlugin/filename&quotWink;
           if (node == null)
{
// ...if it doesnt, then create the correct nodes (with dummy values)
string newNodeXML = "<settings>\n" +
"  <AddressBookPlugin>\n" +
"    <filename>c:/addressbookdb.xml</filename>" +
"  </AddressBookPlugin>\n" +
"</settings>\n";

XmlDocument newDocument = new XmlDocument();
newDocument.LoadXml(newNodeXML);

XmlNode imported = settings.ImportNode(newDocument.DocumentElement.LastChild, true);
settings.DocumentElement.AppendChild(imported);

node = settings.SelectSingleNode("/settings/AddressBookPlugin/filename&quotWink;
       }

// save area code value in settings xml
node.InnerText = textBoxFilename.Text;

// .... file will be saved later by the config app, if the user presses the OK button
    }


You can use the same code for the plugin for any collection.
Just specify the xml.

<database>
<category name="Family">
<item name="Bill Gates" value="Home : 555-5555#Address : Washington #Office : 444-4444"/>
<item name="Ted Turner" value="This is a test#here"/>
</category>
<category name="Friends">
<item name="Sub" value="555-5555"/>
<item name="Mr T" value="This is a test#here"/>
</category>
</database>

It is layed out the same as comics.  The categories are in the top left box.  Selecting one of those shows the items in that category in the right box.  double clicking on that shows the multi line value in the bottom box.

The # are used to designate new lines.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP plugin for Kodi sgilani 2 2,882 2022-10-17, 12:44 AM
Last Post: sgilani
  New Systems Plugin kirschey 10 3,380 2020-11-14, 08:01 PM
Last Post: sub
  VIdeo playback from plugin mvallevand 5 3,489 2015-08-06, 10:43 PM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 2,919 2014-11-14, 02:05 AM
Last Post: Benoire
  API docs to help with plugin development? McBainUK 3 2,786 2013-06-08, 06:14 PM
Last Post: sub
  Refreshing TV Guide Data (after System plugin EPG update) imilne 13 6,136 2013-03-24, 08:03 PM
Last Post: imilne
  sabnzbd plugin to show processed files Wakalaka 1 1,963 2013-03-12, 06:48 AM
Last Post: psycik
  Plugin problems with started from the command line mvallevand 11 5,019 2012-08-12, 07:56 PM
Last Post: sub
  Get NextPVR data directory from outside a plugin McBainUK 3 2,257 2012-02-11, 05:42 PM
Last Post: mvallevand
  visible="!@hasImage & folder.jpg in Music not working Jaggy 0 1,217 2012-02-10, 10:29 PM
Last Post: Jaggy

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

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

Linear Mode
Threaded Mode