MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal TV-Server » Community Plugins


Community Plugins TV-Server Plugins created from users for users, can be found here.

Reply
 
Thread Tools Display Modes
Old 2007-10-05, 18:33   #101 (permalink)
Portal Member
 
dvdfreak's Avatar
 
Join Date: Jun 2006
Posts: 642
Thanks: 0
Thanked 49 Times in 32 Posts

Country:

My System

Default

And it works with TvScheduler just as well as with TVE3? Has Kev received positive feedback about this then?
dvdfreak is online now   Reply With Quote
Old 2007-10-05, 18:36   #102 (permalink)
Portal Developer
 
and-81's Avatar
 
Join Date: Mar 2005
Location: Melbourne
Age: 27
Posts: 2,251
Thanks: 30
Thanked 152 Times in 89 Posts

Country:

My System

Default

Sorry, I misread your last post.

I've used it with TVE3, but not with TvScheduler yet.

Sorry, my tired eyes skipped over your last post too quickly.

Cheers,
and-81 is offline   Reply With Quote
Old 2007-10-05, 18:43   #103 (permalink)
Portal Member
 
dvdfreak's Avatar
 
Join Date: Jun 2006
Posts: 642
Thanks: 0
Thanked 49 Times in 32 Posts

Country:

My System

Default

Quote:
Originally Posted by and-81 View Post
Sorry, I misread your last post.

I've used it with TVE3, but not with TvScheduler yet.

Sorry, my tired eyes skipped over your last post too quickly.
No problem, figured it was something like that since you gave so little information

Kev made a "TV Guide" test-page talking to TvScheduler instead of TVE3, so that's an important first step. And both he and I were of course wondering if this is working for everyone out there.
dvdfreak is online now   Reply With Quote
Old 2007-10-08, 00:00   #104 (permalink)
Portal Member
 
Join Date: Apr 2006
Posts: 70
Thanks: 3
Thanked 0 Times in 0 Posts


Default

Hi,
This looks great! Can it do the timezone offset the same as TVE3? My xmltv file has everything with GMT times and timezone but I'm in Australia so it's actually GMT +10. So when I dump the TVGuide.xml into the xmltv dir it get the guide listing fine but at the wrong time. The way the TVE3 xmltv import seems to work is that if you've got the adjust timezone flag set but the time zone compensation is set at 00 00 then it adjusts from whatever timezone is in the fill to you're local regional settings timezone, in my case GMT +10. What it was actually doing was taking 20 hours off for some reason so Sunday 0930 +0000 in the xmltv file (instead of becoming 1930 +1000) it was going backwards to display the program on Saturday at 2330 +1000.

Semm like the import is trying to so the right thing but instead of adding the 10 hours to become 1930 +10 is subtracting the 10 hours but setting it at +10.

If anyone else has already raised this I'm sorry.

Thank for working on this. Ever since I went to TVE3 I've missed the web scheduler and there was a brief momnet of sunshine with the webguide but now this looks like just what I was after.

Once again thanks for all the work you've put inot this.
__________________
Greg Steele
GSteele is offline   Reply With Quote
Old 2007-10-08, 08:54   #105 (permalink)
Portal Member
 
dvdfreak's Avatar
 
Join Date: Jun 2006
Posts: 642
Thanks: 0
Thanked 49 Times in 32 Posts

Country:

My System

Default

Quote:
Originally Posted by GSteele View Post
Hi,
This looks great!
Thanks!

Quote:
Originally Posted by GSteele View Post
Can it do the timezone offset the same as TVE3? My xmltv file has everything with GMT times and timezone but I'm in Australia so it's actually GMT +10. So when I dump the TVGuide.xml into the xmltv dir it get the guide listing fine but at the wrong time. The way the TVE3 xmltv import seems to work is that if you've got the adjust timezone flag set but the time zone compensation is set at 00 00 then it adjusts from whatever timezone is in the fill to you're local regional settings timezone, in my case GMT +10. What it was actually doing was taking 20 hours off for some reason so Sunday 0930 +0000 in the xmltv file (instead of becoming 1930 +1000) it was going backwards to display the program on Saturday at 2330 +1000.

Semm like the import is trying to so the right thing but instead of adding the 10 hours to become 1930 +10 is subtracting the 10 hours but setting it at +10.
You raise an interesting problem. The importer will indeed try to do the right thing on its own. Normally all dates and times in an XMLTV file include timezone information. The importer will match this timezone to your own, and do appropriate conversion if needed. For example, I import both a UK guide and a Belgian guide and both are nicely imported into my Belgian timezone.

But apparently this system doesn't always work, perhaps your guide data is missing the timezone information?

Actually, looking at your own example I see you mention "+0000" being in your guide while Australia is GMT+09:30 (Australia Central Standard), and judging from your posting you are in GMT+10:00. So there will indeed be a 10 hour error since the guide data appears to the importer to come from TV channels in the UK

So I guess what's basically needed is an offset-value that is added to (or subtracted from) all imported times? I can easily add that, will put it on my list of TODOs for the next version
dvdfreak is online now   Reply With Quote
Old 2007-10-08, 13:52   #106 (permalink)
Portal Member
 
Join Date: Apr 2006
Posts: 70
Thanks: 3
Thanked 0 Times in 0 Posts


Default XMLTV Timezone Import

Hi,
The xmltv importer seems to try to do the right thing but it's logic has the signs the wrong way round.

eg
<programme start="20071010093000 +0000" stop="20071010103000 +0000" channel="Nine">
<title>McLeod's Daughters</title>

This program is on at 1930 on the 10/10 in my local timezone of +10 GMT. 0930 GMT (+0000) is 1930 (+10 GMT). What the importer is doing is actually doing the conversion the wrong way round. It's subtracting 10 hours from the +0000 timezone rather than adding 10 hours. The program ends up in the guide at 23:30 on the 9/10 which is simply taking the 10 hours I'm ahead and subracting them rather than adding the 10 hours.

To get the GMT time (or any other guide timezone) to the local timezone you need to add to the base time what ever my regional timeoffset is minus the base guide timezone.

Sorry if I'm telling you something you already know but I'm not sure why your import works for 2 different Timezones but mine doesn't.

eg GuideTime = 0930
GuideDate = 10/10/2007
GuideTimeZoneOffset= +0000
LocalTimeZoneOffset = +1000

GuideTime +(LocalTimeZoneOffset - GuideTimeZoneOffet) = LocalTime
0930 + (1000 - 0000) = 0930 + 1000 = 1930 (+1000)

2nd eg GuideTime = 0930
GuideDate = 10/10/2007
GuideTimeZoneOffset= +0100
LocalTimeZoneOffset = -0400

GuideTime +(LocalTimeZoneOffset - GuideTimeZoneOffet) = LocalTime
0930 + (-0400 - +0100) = 0930 - 0500 = 0430 (-0400)


OK I conceed that I can't figure out any formula to explain how you can import GMT & GMT +0100 guides and get the right times when I get the wrong. As, if your guide data had a Program 0930 +0000 (which should display at 1030 (+0100) in belgium). If your's behaves the same way as mine it should import 0930 +0000 to 0830 in belgium. Unless your guide data has it's timezone localised when it's generated rather than when it's imported?

Thanks for any assistance you can give.
__________________
Greg Steele
GSteele is offline   Reply With Quote
Old 2007-10-08, 14:29   #107 (permalink)
Portal Member
 
dvdfreak's Avatar
 
Join Date: Jun 2006
Posts: 642
Thanks: 0
Thanked 49 Times in 32 Posts

Country:

My System

Default

Quote:
Originally Posted by GSteele View Post
Hi,
The xmltv importer seems to try to do the right thing but it's logic has the signs the wrong way round.
I'm not going to quote your detailed information, but it's very helpful.

Can you attach your guide so I can try this out myself? Obviously I'm in a different timezone, so I'll have to compensate for this. And I too can't explain why my UK imports seems to work fine, perhaps I am mistaken and only thought it worked fine. The more I look at your data, the more I'm convinced it is indeed a bug in the importer.

Need to investigate!

But I'll get to the bottom of this, and regardless of whether this is something I can fix, it's probably a good idea to add an "offset timezone" setting anyway.

Boy, this timezone stuff is guaranteed to give you headaches

Last edited by dvdfreak; 2007-10-08 at 14:32.
dvdfreak is online now   Reply With Quote
Old 2007-10-08, 15:04   #108 (permalink)
Portal Member
 
Join Date: Apr 2006
Posts: 70
Thanks: 3
Thanked 0 Times in 0 Posts


Default Australian TVGuide Data

Hi,

Here is my data file as requested. My current local time zone is set to GMT +10 Canberra, Sydney, Melbourne.

Thanks
Attached Files
File Type: rar tvguide.rar (96.9 KB, 3 views)
__________________
Greg Steele
GSteele is offline   Reply With Quote
Old 2007-10-08, 17:01   #109 (permalink)
Portal Member
 
dvdfreak's Avatar
 
Join Date: Jun 2006
Posts: 642
Thanks: 0
Thanked 49 Times in 32 Posts

Country:

My System

Default

I took a look at the code and it does indeed seem the logic is reversed! So this means I was mistaken, and my UK programs were wrong as well, something I completely overlooked. My belgian data turned out to be OK, simply because the +0200 in the guide data cancelled itself out with the +0200 timezone I'm in. All people testing so far probably also used guide data that was already set to their own timezone.

So: excellent find! Thanks!

This bug will be fixed in the next release!
dvdfreak is online now   Reply With Quote
This User Say Thank You:
Old 2007-10-09, 12:23   #110 (permalink)
Portal Member
 
Join Date: Apr 2006
Posts: 70
Thanks: 3
Thanked 0 Times in 0 Posts


Default

Ok Temp solution to the timezone issue. (only until next release)
If you double the timezone discrepancy - minus the original guide offset by a simple string replacement it works ok. In my case doubling the +1000 that was being subtracted due to my +1000. So I just ran a simple string replacement of all the +0000 to +2000 so +2000 - 1000 = the correct time compensation.
I'd guess changing your +0100 for UK Summer time (guessing Day light saving is still in) to +0300 (2 x +0200 - (+0100) would result in adding an additional 1 hour to get your UK guide to +0200 in Belgium. (This is a guess as mine was simple due to my guide bing in GMT)

Good Luck & Thanks
__________________
Greg Steele
GSteele is offline   Reply With Quote
Reply

Bookmarks

Tags
rulebased, service, tvscheduler

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rule Based Post Processing NewUser General Support 6 2008-02-27 14:37
First beta of rule-based scheduler has been uploaded dvdfreak Development 0 2007-09-19 15:05
One remote to rule them all? fathead General Support 5 2006-01-06 18:37
Cant record using the scheduling feature martyyn General Support 3 2005-12-26 14:32


All times are GMT +1. The time now is 11:31.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden