[RELEASE] TV Guide - with XMLTV and streaming support

  Thread Rating:
  • 10 Votes - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Lunatixz Online
Posting Freak
Posts: 2,437
Joined: May 2011
Reputation: 44
Location: New York
Post: #91
I agree that the EPG does load faster, but after using for the weekend IMO it's not worth the bugs... Which to date are:
EPG channel selection button doesn't load...
Channel Icon issues...
and not sure but I've noticed issues with the EPG not updated to the current time after 3hrs and epg reload...

Going back to original build, and I'm suspending my skin releases to see if changes are pulled to twinthers master build...
I will let you know when the new skins are coming...
find quote
timpinkawa Offline
Junior Member
Posts: 11
Joined: Feb 2012
Reputation: 1
Post: #92
grope Wrote:If I change the xml, nothing happens no matter if I remove the cache or restart xbmc, it just loads the first xml i put in

Also, if I don't put the logo folder in at the same time as the initial xml file straight after install then it won't display any logos (no matter how many times I try and delete the cache/change xml)

Thanks, grope. I think I was able to pinpoint both issues you (and others) were having. Try updating to the latest version on Github and let me know if that solves the problems.

Balthazar, I think this may fix your problem too.

So far I've tested PNGs and JPEGs successfully, GIFs seem to crash XBMC 11.0 RC1 Eek (unrelated to the add-on).

For now, make sure your processor/disk settles down before going into the EPG. As I mentioned before, a better solution has been devised (not yet implemented), but I'd like to squash any showstopping bugs before refining other issues. Should only be noticeable if you have a really slow computer or a really large XMLTV file (15-150MB).
(This post was last modified: 2012-02-29 05:12 by timpinkawa.)
find quote
grope Offline
Member
Posts: 53
Joined: Feb 2012
Reputation: 0
Post: #93
Thanks tim, the new changes seemed to fix the xml problem. When I change the xml, I have to restart xbmc for the changes to take effect, which isn't a problem as the speed of loading a new uncached xml is almost immediate

The speed of this is amazing, brilliant work tim
find quote
timpinkawa Offline
Junior Member
Posts: 11
Joined: Feb 2012
Reputation: 1
Post: #94
grope Wrote:Thanks tim, the new changes seemed to fix the xml problem. When I change the xml, I have to restart xbmc for the changes to take effect, which isn't a problem as the speed of loading a new uncached xml is almost immediate

The speed of this is amazing, brilliant work tim

Thanks again for the feedback. The latest version has support for reloading the cache from within the settings dialog, so you don't need to restart XBMC.
find quote
Lunatixz Online
Posting Freak
Posts: 2,437
Joined: May 2011
Reputation: 44
Location: New York
Post: #95
timpinkawa Wrote:Thanks again for the feedback. The latest version has support for reloading the cache from within the settings dialog, so you don't need to restart XBMC.

Latest git solved my problems... Running very smooth
find quote
Balthazar Offline
Member
Posts: 97
Joined: Oct 2010
Reputation: 0
Location: Salina, KS
Post: #96
Tim - Is the latest version on github compatible with Eden RC1? I instantly get a "script.addon.py failed" error when I try to run it.

**Edit 1 - If I had read a little better I would have seen that you have tested it with RC1. I'll try to figure it out tomorrow, working on too little sleep is making me loopy Smile

**Edit 2 - Started going to bed and realized how I didn't install it properly. The new version is working great and my logos are working. Thanks Tim!
(This post was last modified: 2012-03-01 07:27 by Balthazar.)
find quote
rogerzees Offline
Junior Member
Posts: 39
Joined: Feb 2011
Reputation: 15
Thumbs Up   
Post: #97
Exellent work Timpinkawa,working here too
Now this is a perfect epg-addon.
find quote
wolfodeiwolfy Offline
Senior Member
Posts: 239
Joined: Mar 2011
Reputation: 3
Location: France
Post: #98
error

[Image: bannirew2w.jpg]
(This post was last modified: 2012-03-05 17:04 by wolfodeiwolfy.)
find quote
bry- Offline
Donor
Posts: 946
Joined: Jan 2011
Reputation: 10
Post: #99
looking fwd to testing this once I get tvheadend up and running
find quote
twinther Offline
Fan
Posts: 308
Joined: Sep 2004
Reputation: 10
Location: Denmark
Post: #100
hey, I've been working on integrating some of timpinkawa's changes and adding some new features. I have just pushed a new feature that adds the option to change channel order and visibility - I think it turned out pretty sweet, but it's not ready for day-to-day use yet. The push also contains caching to database based on timpinkawa's work, but it's not compatible though.

Next I will try to port timpinkawa's xml parsing which looks to be faster than mine.
If anyone could send me a huge xmltv file that would be great Smile

I also have a goal of removing the "clear cache" functionality and instead make it intelligent, so it can detect changes in settings, etc.

btw timpinkawa, please remove the buggalo.SUBMIT_URL or change it to 'http://buggalo.xbmc.info/submit.php' - I'm getting a few bug reports from your code and it's difficult enough to keep track of them as it is :-)

Br.
Tommy
find quote
timpinkawa Offline
Junior Member
Posts: 11
Joined: Feb 2012
Reputation: 1
Post: #101
twinther Wrote:btw timpinkawa, please remove the buggalo.SUBMIT_URL or change it to 'http://buggalo.xbmc.info/submit.php' - I'm getting a few bug reports from your code and it's difficult enough to keep track of them as it is :-)

Done.

Current users should update and spare Tommy's bug report server any more traffic. Laugh

I have a 150MB (7.3MB compressed) XMLTV file I've been testing with. If you're interested I can get you a copy one way or another.
(This post was last modified: 2012-03-08 04:10 by timpinkawa.)
find quote
twinther Offline
Fan
Posts: 308
Joined: Sep 2004
Reputation: 10
Location: Denmark
Post: #102
timpinkawa Wrote:I have a 150MB (7.3MB compressed) XMLTV file I've been testing with. If you're interested I can get you a copy one way or another.

Yeah, that would be great. can you upload to dropbox or some other place?
You can PM me the link if it's private, otherwise I think my mailbox should accept 7 mb

Br.
Tommy
find quote
spoyser Offline
Donor
Posts: 299
Joined: Oct 2011
Reputation: 21
Post: #103
@twinther

Great plugin! I've been using it in the UK with data from the RadioTimes web site (via a third party app to create the XMLTV file and it works great)

I've also been looking into optimising the speed (on top of the changes from timpinkawa) it and have a few comments.

In the getProgramList() you can make use of a member variable dictionary to cache the program lists to memory giving virtually instant (< 0.1sec) retrieval of the program list (although obviously this could potentially use a lot of memory, in the UK 14 days of 50 channels is about 18000 programs which increases memory usage of XBMC by about 12MB, so not a big deal for this size of data)

(I've just noticed you make use of the start and end dates in the latest code when querying the database, I haven't found that necessary when caching the data to memory)

You've updated the code quite a lot but something like this should do the trick:

Code:
#in Source __init__
self.cache = dict()


#in _retrieveProgramListFromDatabase(self, channel, startTime):
key = '%s-%s' % (self.KEY, channel.id.replace('/', ''))
if key in self.cache:
    return self.cache[key]

programList = list()        
c = self.conn.cursor()        
c.execute('SELECT * FROM programs WHERE channel=? AND source=?', [channel.id, self.KEY])        
for row in c:
    program = Program(channel, row['title'], row['start_date'], row['end_date'], row['description'], row['image_large'], row['image_small'])
    programList.append(program)

self.cache[key] = programList
return programList

#the appropriate key in self.cache will also need to be cleared whenever the database is updated

Also just a couple of minor bugs, in gui.py when you set the position of the current time you don't take into account the day so you get the line at the "NOW" time regardless of the day;

Code:
# move timebar to current time
timeDelta = datetime.datetime.today() - self.viewStartDate
c = self.getControl(4100)
(x, y) = c.getPosition()
if timeDelta.days == 0:
    c.setPosition(self._secondsToXposition(timeDelta.seconds), y)
else:
    c.setPosition(-100, y)

In _scheduleNotification in notification.py again you ignore the day so the notification can appear 24 hours early;

Code:
t = self._timeToNotification(program)
timeToNotification = ((t.days * 86400) + t.seconds) / 60
if timeToNotification < 0:
     return

Also in the Notification class in the scheduleNotifications function you can grab the channel list just once and then
pass it into _processSingleNotification function (even better is to have the list as a member variable)


And in the onAction() of the TVGuide class, if you add this

Code:
elif action.getId() == 159: #KEY_HOME
    self.viewStartDate = datetime.datetime.today()
    self.viewStartDate -= datetime.timedelta(minutes = self.viewStartDate.minute % 30)
    self.onRedrawEPG(self.page, self.viewStartDate)

Then pressing the Home key will return the guide to the current time, which I use a lot!

HTH
(This post was last modified: 2012-03-09 17:26 by spoyser.)
find quote
shaktoo Offline
Posting Freak
Posts: 830
Joined: Mar 2010
Reputation: 6
Location: Surrey
Post: #104
@ Spoyser, Could you help out a little bit if possible. I have been trying to make the XMLTV file so I can get this working but so far have been unable to . I think you are talking about using mc2xml ... Could you do a step by step tut if possible or just PM me
find quote
spoyser Offline
Donor
Posts: 299
Joined: Oct 2011
Reputation: 21
Post: #105
shaktoo Wrote:@ Spoyser, Could you help out a little bit if possible. I have been trying to make the XMLTV file so I can get this working but so far have been unable to . I think you are talking about using mc2xml ... Could you do a step by step tut if possible or just PM me

Actually I've been using XMLTV GUI Grabber (see here http://www.birtles.org.uk/xmltv/). Is is fairly straight forward to use but if you get stuck let me know via PM

(And for the freeview channel logos you can grab them from here: http://www.freeview.co.uk/Channels )
find quote
Post Reply