MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal TV-Server » Help on Development » Development


Development You want to code something for the TV-Server? Share it in here!

Reply
 
Thread Tools Display Modes
Old 2008-05-07, 23:32   #851 (permalink)
Portal Member
 
dvdfreak's Avatar
 
Join Date: Jun 2006
Posts: 527
Thanks: 0
Thanked 29 Times in 16 Posts

Country:

My System

Default

Actually, if this is a common problem I can make "the new TV Scheduler" handle this situation automatically. If I understand correctly, this is what you did: if the previously-shown date matches the date of the program itself you remove the previously-shown tag, right?

So what I could change is that in this case I do not mark the program as being a repeat, only when the previously-shown date is in the past...
dvdfreak is offline   Reply With Quote
Old 2008-05-07, 23:56   #852 (permalink)
Portal Member
 
Join Date: Mar 2008
Posts: 35
Thanks: 1
Thanked 1 Time in 1 Post

Country:


Default

It's slightly more complicated than that. For whatever reason, most of my first-run programs have a "previously-shown" date that's about a day and 3 hours earlier than the actual run time (time zone issue?). Not even the 1 day 3hr difference is a constant, however... sometimes it's 1 day 4hrs earlier, and a few programs are a full 1 day, 23hrs earlier! I'm on Pacific Standard Time, btw.

Also, sometimes the "previously-shown" date is *in* the previously-shown tag, like:
<previously-shown start="20080207000000" />)

Other times the previously-shown tag is reduced to "<previously-shown />" and there's a <date></date> tag with the earlier runtime in it, minus the 6 trailing zeros. So my script checks for a full date in either place ("full date" because for movies the <date> tag often just has the release year of the movie in it), and removes any existing previously-shown tag if the broadcast date is 1 day, 23hrs after the "previously shown" date or closer.

Hope that was clear... and hopefully my code's legible enough to explain better!

Last edited by mrbenji; 2008-05-08 at 00:07.
mrbenji is offline   Reply With Quote
Old 2008-05-08, 00:05   #853 (permalink)
Portal Member
 
Join Date: Mar 2008
Posts: 35
Thanks: 1
Thanked 1 Time in 1 Post

Country:


Default

Here's part of my original XMLTV output file, downloaded using the tv_grab_na_dd grabber.
Attached Files
File Type: zip tvguide_sample.zip (58.1 KB, 0 views)
mrbenji is offline   Reply With Quote
Old 2008-05-08, 12:12   #854 (permalink)
Portal Member
 
dvdfreak's Avatar
 
Join Date: Jun 2006
Posts: 527
Thanks: 0
Thanked 29 Times in 16 Posts

Country:

My System

Default

Quote:
Originally Posted by mrbenji View Post
Hope that was clear... and hopefully my code's legible enough to explain better!
Perfectly clear!

But what's also clear after your explanation is that this seems to be a very specific tweak to your XMLTV source, so it wouldn't make much sense to add it directly into my code.
dvdfreak is offline   Reply With Quote
Old 2008-05-08, 17:09   #855 (permalink)
Portal Member
 
Join Date: Mar 2008
Posts: 35
Thanks: 1
Thanked 1 Time in 1 Post

Country:


Default

Quote:
Originally Posted by dvdfreak View Post
...what's also clear after your explanation is that this seems to be a very specific tweak to your XMLTV source
If you mean that mine is a unique situation, I doubt it... this is the default output from XMLTV's Schedules Direct plugin, i.e. the #1 (I believe) TV grabbing tool's output from the best source of US TV listings. But maybe other users can weigh in on whether they have the same problem?

The only thing I suspect could be specific to my timezone is the permissible delta between the provided dates, but if that's the case then setting a delta of, say, 1 day, 7 hrs should work for 99% of the shows out there, for any user in any U.S. state. Hopefully some users in Hawaii or on the East Coast can confirm/disprove this theory?

Quote:
Originally Posted by dvdfreak View Post
, so it wouldn't make much sense to add it directly into my code.
Well, you definitely wouldn't want to add it in except as a non-default option with adjustable delta... but hopefully we can get the XMLTV developers to look into why this is happening in the first place, in which case changes to TvScheduler wouldn't be needed.
mrbenji is offline   Reply With Quote
Old 2008-05-08, 18:23   #856 (permalink)
Portal Member
 
dvdfreak's Avatar
 
Join Date: Jun 2006
Posts: 527
Thanks: 0
Thanked 29 Times in 16 Posts

Country:

My System

Default

Quote:
Originally Posted by mrbenji View Post
Quote:
Originally Posted by dvdfreak View Post
...what's also clear after your explanation is that this seems to be a very specific tweak to your XMLTV source
If you mean that mine is a unique situation, I doubt it... this is the default output from XMLTV's Schedules Direct plugin, i.e. the #1 (I believe) TV grabbing tool's output from the best source of US TV listings. But maybe other users can weigh in on whether they have the same problem?
OK, interesting, so I should perhaps reconsider this and add it as a standard feature after all.

Quote:
Originally Posted by mrbenji View Post
Well, you definitely wouldn't want to add it in except as a non-default option with adjustable delta... but hopefully we can get the XMLTV developers to look into why this is happening in the first place, in which case changes to TvScheduler wouldn't be needed.
I'm note so sure it shouldn't be the default. I hate it when programs have too many settings myself, so I try to avoid the situation of "a setting for this, a setting for that,..." as much as possible

Feedback from other users, especially about this strange time-offset, would be most interesting.

And also, has anyone mentioned this to the author of the Schedules Direct plugin? Could there be something he can do to improve this? The closer to the source you fix a problem, the better of course.
dvdfreak is offline   Reply With Quote
Old 2008-05-09, 20:57   #857 (permalink)
Portal Member
 
sunsetdk's Avatar
 
Join Date: Oct 2005
Location: Nordborg
Age: 28
Posts: 109
Thanks: 4
Thanked 2 Times in 2 Posts

Country:

My System

Send a message via MSN to sunsetdk
Default

Quote:
Originally Posted by dvdfreak View Post

I'm note so sure it shouldn't be the default. I hate it when programs have too many settings myself, so I try to avoid the situation of "a setting for this, a setting for that,..." as much as possible
Sorry for butting in. I do agree with you on the settings, but you could put those setting in an advanced tab/form/thing.

Just an idea
sunsetdk is offline   Reply With Quote
Old 2008-05-12, 16:51   #858 (permalink)
Portal Member
 
Join Date: Mar 2008
Posts: 35
Thanks: 1
Thanked 1 Time in 1 Post

Country:


Default

Quote:
Originally Posted by dvdfreak View Post
has anyone mentioned this to the author of the Schedules Direct plugin? Could there be something he can do to improve this? The closer to the source you fix a problem, the better of course.
Sure, I'll figure out the best way to contact the XMLTV developers and describe the issue. Maybe there's an easy fix from the XMLTV side of things.
mrbenji is offline   Reply With Quote
Old 2008-05-13, 10:52   #859 (permalink)
Portal Member
 
dvdfreak's Avatar
 
Join Date: Jun 2006
Posts: 527
Thanks: 0
Thanked 29 Times in 16 Posts

Country:

My System

Default

Quote:
Originally Posted by mrbenji View Post
Quote:
Originally Posted by dvdfreak View Post
has anyone mentioned this to the author of the Schedules Direct plugin? Could there be something he can do to improve this? The closer to the source you fix a problem, the better of course.
Sure, I'll figure out the best way to contact the XMLTV developers and describe the issue. Maybe there's an easy fix from the XMLTV side of things.
Just to make sure I don't misunderstand: where does your actual XMLTV file come from? Is it written by the Schedules Direct plugin or not?

Because if that's the case there's no need to go and talk to the people behind the official XMLTV distribution, because all they did is define the spec. If's the Schedules Direct plugin that actually writes the data, things could possibly be fixed there. But the problem could very easily lie with the source of the data, the site where the Schedules Direct gets the data from...
dvdfreak is offline   Reply With Quote
Old 2008-05-13, 17:27   #860 (permalink)
Portal Member
 
Join Date: Mar 2008
Posts: 35
Thanks: 1
Thanked 1 Time in 1 Post

Country:


Default Getting closer...

Quote:
Originally Posted by dvdfreak View Post
Just to make sure I don't misunderstand: where does your actual XMLTV file come from? Is it written by the Schedules Direct plugin or not?
Are you talking about the Mediaportal Schedules Direct plugin? If so the answer is no. That plugin doesn't generate an XML at all... it simply updates MediaPortal's EPG data directly. My XML file is generated by XMLTV's official utility suite (homepage here)... specifically by the tv_grab_na_dd grabber.

Quote:
Originally Posted by dvdfreak View Post
Because if that's the case there's no need to go and talk to the people behind the official XMLTV distribution, because all they did is define the spec.
Well, they defined the spec and developed the utility suite that creates and works with files in the XMLTV format.

Quote:
Originally Posted by dvdfreak View Post
...the problem could very easily lie with the source of the data, the site where the Schedules Direct gets the data from...
This could very well be the case. I spent some time yesterday skimming the tv_grab_na_dd perl script (the actual code is in a file called tv_grab_na_dd.in). The logic seems simple enough: If there's no "new" data attribute it embeds the "original air date" attribute (plus 6 zeros) into a previously-shown tag and writes it to the XML. If there is a "new" attribute it doesn't write out a previously-shown tag.

This does explain why the deltas varied by a few hours: the "programme start" value is in the format YYYYMMDDHHMMSS, while the embedded original air date is YYYYMMDD plus 6 added zeros for HHMMSS. Most of the first run shows I was looking at were Prime Time shows starting at 8:00 or 9:00, and (since I mistakedly considered hours & minutes instead of just y/m/d) the delta was different for 8:00 shows vs. 9:00 shows.

Another factor: my timezone was set for UTC, which is what XMLTV recommends. The XMLTV configuration script says: "It is better to specify +0000 and let the final application deal with a local conversion (helps with DST issues), but you can specify a Time Offset if desired."

However, if I manually specify my timezone as -0700 (Pacific Daylight Time) and ignore the hours & minutes part of the embedded date, the delta is completely gone... i.e. the y/m/d part of the "programme start" tag matches the embedded "original air date".

So it seems I've boiled down the issue to one thing: it seems the tv_grab_na_dd grabber doesn't see "new" attributes for first run shows, so no matter what my timezone offset these shows always have previously-shown tags.

My next stop is the Schedules Direct forum... hopefully they can determine whether my issue's caused by an error in the data they get from Tribune Media or an error in the way the XMLTV tv_grab_na_dd grabber queries or interprets that data. I've also posted to the XMLTV bug tracker for good measure.

Last edited by mrbenji; 2008-05-13 at 17:32.
mrbenji 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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug Report: Error when editing logo rule ccMatrix My TVSeries 1 2007-05-09 09:29
One remote to rule them all? fathead General Support 5 2006-01-06 17:37
Media Portal Developers Rule! Jaguarius MediaPortal 1 Talk 1 2005-11-11 16:00


All times are GMT +1. The time now is 02:28.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress