NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 42 43 44 45 46 … 93 Next »
Storing data

 
  • 0 Vote(s) - 0 Average
Storing data
Obsidian
Offline

Member

Posts: 77
Threads: 13
Joined: May 2007
#1
2007-06-16, 08:41 AM
I was having a chat with JavaWiz on the wishlist about my idea for writing a plugin for rating TV Movies with data from IMDB.COM. In order to do this, I believe I will need to pull down the data for the movies in a batch, as doing it live for a search would be prohibitively slow. My question is, where can I store this data? JavaWiz made the comment below, I just wanted to check that this is what people do, or if there are any "neater" ways of doing it.

Thanks for any help/comments!

JavaWiz Wrote:I believe as a rule plugin developers are not to add tables to the GBPVR.db3 database. If you have persistent storage requirements, I believe the best thing to do is create a new db and store your data in it.
cameluk
Offline

Senior Member

Posts: 255
Threads: 13
Joined: Oct 2004
#2
2007-06-16, 10:21 AM
You cant add any custom tables to the main gbpvr.db3 database, others use their own databases, the old My Music had is own access db, and Jeff uses his own database for the Video Archive plugin
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#3
2007-06-16, 10:57 AM
Db or xml file are the two most common methods of persistant data storage.

There are a couple of helper methods available for plugins (getting a connection, accessing dbProviderFactory), but not much else. Its all up to the developer.
Obsidian
Offline

Member

Posts: 77
Threads: 13
Joined: May 2007
#4
2007-06-16, 11:28 AM
Thanks for that. I'm hope I'm not being thick, but I can't seem to find anything about DatabaseHelperFactory in the documentation. When I call getconnectionstring it returns null.

I have got database access going in a program using ADO.NET and hard coded values, but it'd be nice to do it "properly"!
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#5
2007-06-16, 04:30 PM
The DatabaseHelperFactory is only really intended to provide connection info for those wanting to read data from the GB-PVR database. I ask that developers dont create or alter tables in this database, but instead create their own separate data stores, either xml files or their own databases.

Quote:I have got database access going in a program using ADO.NET and hard coded values, but it'd be nice to do it "properly"!
Hardcoded can be ok if you know your plugin is always going have a certain name etc, which is likely to be the case with a plugin.
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#6
2007-06-16, 06:38 PM
I think you might consider using SQLite3, which is the db that GBPVR uses. It is open source and seems to be quite stable.

The dll is already included in GBPVR (System.Data.SQLite.dll) but here is the url to the site: http://sqlite.phxsoftware.com/ which is an enhanced version of the original product, fully API compatible.

Documentation for the database and API can be found at the official SQLite site here: http://www.sqlite.org/

There are a couple GUI clients that make creating and viewing the db's easier, two that I use are:

SQLite Database Browser (http://sqlitebrowser.sourceforge.net/)
SQLite Spy (http://www.yunqa.de/delphi/sqlitespy/)
Obsidian
Offline

Member

Posts: 77
Threads: 13
Joined: May 2007
#7
2007-06-16, 09:24 PM
Thanks for the replies.

I've got SQLite up and running fine, and I can read data from the GB-PVR database. IS this how I should read information from the EPG? Or should I be using some pre-defined classes? Sub mentions the DatabaseHelperFactory class, but does that just provide the connection string?

Also, it terms of creating my own database for a plugin, should I be distributing an empty database with the schema set up in it? Or is it more common to create the database programmatically?
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#8
2007-06-16, 09:39 PM
Distribution of a db is only required if NOT using sql-lite. When we used to use access you had to provide a base db to play with. SQL-lite you can generate a file and create tables on the fly. (See create table sql syntax).

I've never looked into the epg api stuff, but I have played with the get scheduled recordings.....this is all the scheduled recordings, where I guess you want to return information for unscheduled programmes?? So if there is no api then there is nothing stopping you doing what you are doing...just don't change anything,.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  How to extract M3U8 and get matching XMLTV guide data from NPVR almightyj 0 3,346 2018-10-23, 07:24 AM
Last Post: almightyj
  Getting more than 24 hours of Guide Data scJohn 4 3,555 2018-05-16, 04:20 AM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 2,856 2014-11-14, 02:05 AM
Last Post: Benoire
  Merge xmltv data with xslt Graham 4 3,410 2014-01-02, 12:45 PM
Last Post: Graham
  Refreshing TV Guide Data (after System plugin EPG update) imilne 13 6,027 2013-03-24, 08:03 PM
Last Post: imilne
  Get NextPVR data directory from outside a plugin McBainUK 3 2,210 2012-02-11, 05:42 PM
Last Post: mvallevand
  Extracting data from XML files ACTCMS 4 2,308 2012-01-24, 12:16 AM
Last Post: sub
  C# code to get data directory? McBainUK 2 2,756 2011-09-19, 07:57 PM
Last Post: McBainUK
  Data binding imilne 2 1,957 2011-07-20, 08:57 AM
Last Post: imilne
  XMLTV data mvallevand 6 2,586 2011-04-16, 03:08 AM
Last Post: sub

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

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

Linear Mode
Threaded Mode