NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 5 6 7 8 9 … 93 Next »
xbmc python

 
  • 0 Vote(s) - 0 Average
xbmc python
chris0147
Offline

Junior Member

Posts: 4
Threads: 1
Joined: Feb 2014
#1
2014-02-16, 10:21 PM
Hi all

I'm looking for someone who has experienced with xbmc python.

Are there anyone on here who does know how to code the xbmc python because i need some help with the tv guide and xml data?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,932
Threads: 956
Joined: May 2006
#2
2014-02-17, 05:37 AM
I have some of that but you'd need to be more specific about what you are looking to do.

Martin
chris0147
Offline

Junior Member

Posts: 4
Threads: 1
Joined: Feb 2014
#3
2014-02-22, 10:12 PM
mvallevand Wrote:I have some of that but you'd need to be more specific about what you are looking to do.

Martin

Right, I need some help with the tv guide. I'm making my own tv guide addon which looks like this:

[Image: 900x900px-LL-e0740580_yfvr.jpeg]



As you said you have some of that, I want to know how do you scraping the tv data to store them into sql lite3 database before you could output them in the tv guide?

I've tried this:

Code:
import xbmc
import xbmcgui
import xbmcaddon
import urllib2

ADDON = xbmcaddon.Addon(id = 'script.myaddon')

class MyScript(xbmcgui.WindowXML):

def __new__(cls):
         return super(MyScript, cls).__new__(cls, 'script-menu.xml', ADDON.getAddonInfo('path'))

def onInit(self):
url = ADDON.getSetting('url')
req = urllib2.Request(url)
response = urllib2.urlopen(req)
data = response.read()
response.close()
profilePath = xbmc.translatePath(os.path.join('special://userdata/addon_data/script.tvguide', ''))

if os.path.exists(profilePath):
   profilePath = profilePath + 'source.db'
   con = lite.connect(profilePath)
   cur = con.cursor()
   cur.execute('CREATE TABLE IF NOT EXISTS data (channels, programme_title, programme_time, description, logo_url)')
   cur.close()



I can be able to read the xml and create the database, but I have no idea how to store the xml into the database and also I have no idea how to output them in the tv guide.

Can you help?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,932
Threads: 956
Joined: May 2006
#4
2014-02-22, 10:43 PM
It's not really scraping there are lots of tools out there using something called XMLTV that provide the EPG. Reading those is s the "some of it" I don't need to do as sub's backend does that and then there are easy to use json and xml interfaces to the get in the date to plugins and also to XBMC PVR.

Martin
chris0147
Offline

Junior Member

Posts: 4
Threads: 1
Joined: Feb 2014
#5
2014-02-23, 02:02 PM
Oh right, if you do know how I can get the xmltv that provide the EPG to work with my own addon using json and xml, why cant you help me?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,932
Threads: 956
Joined: May 2006
#6
2014-02-23, 03:46 PM
chris0147 Wrote:Oh right, if you do know how I can get the xmltv that provide the EPG to work with my own addon using json and xml, why cant you help me?

I still don't understand what you want. Are you having trouble loading the xmltv into NextPVR's database?

Martin
chris0147
Offline

Junior Member

Posts: 4
Threads: 1
Joined: Feb 2014
#7
2014-02-23, 04:40 PM
mvallevand Wrote:I still don't understand what you want. Are you having trouble loading the xmltv into NextPVR's database?

Martin

No, I have told you what I want. I want to run the xmltv in my own addon for xbmc.

You said that there are alot of tools out there using something called XMLTV that provide the EPG which it can be easy to use json and xml interfaces.

I want to know how I can run them in each image when I press it so I could run xmltv to display the epg?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,932
Threads: 956
Joined: May 2006
#8
2014-02-23, 05:52 PM
chris0147 Wrote:No, I have told you what I want. I want to run the xmltv in my own addon for xbmc.

You said that there are alot of tools out there using something called XMLTV that provide the EPG which it can be easy to use json and xml interfaces.

I said NextPVR provides the json and xml interfaces, after he has done the hard work of downloading, parsing creating channels and normalizing everything into the database. Based and what you have explained I am no longer interested in helping with your project but good luck anyway.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  How does NextPVR group recordings for XBMC? spinnaker 2 2,298 2013-11-21, 01:33 AM
Last Post: spinnaker
  GB-PVR XBMC Script jangeador 4 6,171 2008-05-31, 05:30 PM
Last Post: jangeador

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

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

Linear Mode
Threaded Mode