NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 10 11 12 13 14 … 93 Next »
Helper functions and objects

 
  • 0 Vote(s) - 0 Average
Helper functions and objects
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,940
Threads: 956
Joined: May 2006
#1
2012-02-21, 11:17 PM
In troubleshooting this problem http://forums.nextpvr.com/showthread.php...post431876 I was wondering what happens when a plugin isn't updated when structures change? The EPG objects changed quite a bit in 2.3.6 but how does NextPVR keep in sync with an outdated TVListings for scheduling using the API?

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,708
Threads: 767
Joined: Nov 2003
#2
2012-02-21, 11:29 PM
I'm careful to never change existing methods or behaviour, but instead only add new new additonal methods and attributes, so it should be fully backward compatible. ie, In this case, none of the methods to get those EPG objects have changed, but the EPG objects returned have additional attributes that aren't yet being used by TVListings.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,940
Threads: 956
Joined: May 2006
#3
2012-02-21, 11:42 PM
Thanks, that's good to know. So if fields like Genres, UniqueID aren't being populated that would be your problem?

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,708
Threads: 767
Joined: Nov 2003
#4
2012-02-22, 12:06 AM
The app wouldn't care if those fields aren't populated.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,940
Threads: 956
Joined: May 2006
#5
2012-02-22, 12:28 AM
So, I am still a little confused. If I understand correctly if the old code calls

ScheduleHelperFactory.GetScheduleHelper().ScheduleRecording(epgEvent, RecordingQuality.QUALITY_BEST);

using an old style epgEvent you will use old and new fields to schedule the event, carrying across what you can. I noticed sometimes FirstRun was true, is that the constructor? Are the fields in the source epgEvent.OID record in EPG_EVENT used at all?

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,708
Threads: 767
Joined: Nov 2003
#6
2012-02-22, 12:39 AM
When that call is made, some of the basic attributes of the epgEvent are used, like the channel, the title, the start time and the end time. The app doesnt care about other informational attributes like genre etc. It does however call epgEvent.ToString() to serialize the event and it's attributes to xml for storing a copy of with the recording. If some attributes like Genre etc weren't set, then they wont be in the xml, and will ultimately be missing when the recording is later displayed in the Recordings screen (meaning the skin wouldn't be able to show this information).

If TV Listings was using the supplied APIs for loading the EPG events, then it should already contain all the new attributes. They'd only be missing if he'd rolled his only routines which were bypassing the built in api and querying directly from the database (and not knowing to look for these new fields).

As long as the basic attributes are present, then it shouldn't cause any issues.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,940
Threads: 956
Joined: May 2006
#7
2012-02-22, 01:10 AM
From what you have written it sounds like the plugin doesn't really need to care about the changes in the API unless of course a name or calling logic changes.

To test this I loaded the other user's database cancelled Lost Girl and rescheduled it and got this which is what I expect

Code:
<Event>
  <OID>18371725</OID>
  <Title>Lost Girl</Title>
  <SubTitle>Food for Thought</SubTitle>
  <Description>Lauren tends to a sick Aswang; Dyson&apos;s relationship with Kenzi becomes stronger.</Description>
  <ChannelOID>7663</ChannelOID>
  <StartTime>2012-02-23T07:00:00.0000000Z</StartTime>
  <EndTime>2012-02-23T08:01:00.0000000Z</EndTime>
  <FirstRun>false</FirstRun>
  <OriginalAirDate>2010-10-24T00:00:00.0000000</OriginalAirDate>
  <Season>1</Season>
  <Episode>6</Episode>
  <Rating>TV-MA</Rating>
  <Audio>stereo</Audio>
  <Aspect>16:9</Aspect>
  <Quality>HDTV</Quality>
  <Genres>
    <Genre>Action/Adventure</Genre>
    <Genre>Drama</Genre>
    <Genre>Episodic</Genre>
    <Genre>Series</Genre>
  </Genres>
  <UniqueID>EP01304253.0006</UniqueID>
</Event>

instead of

Code:
<Event>
  <OID>18371725</OID>
  <Title>Lost Girl</Title>
  <SubTitle>Food for Thought</SubTitle>
  <Description>Lauren tends to a sick Aswang; Dyson&apos;s relationship with Kenzi becomes stronger.</Description>
  <ChannelOID>7663</ChannelOID>
  <StartTime>2012-02-23T07:00:00.0000000Z</StartTime>
  <EndTime>2012-02-23T08:01:00.0000000Z</EndTime>
  <FirstRun>true</FirstRun>
  <Season>1</Season>
  <Episode>6</Episode>
  <Rating>TV-MA</Rating>
</Event>

Can I assume this is because alibert not loading the EPGEvent with the API and not because he is hasn't rebuilt the plugin with the new functions?

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,708
Threads: 767
Joined: Nov 2003
#8
2012-02-22, 01:12 AM
mvallevand Wrote:Can I assume this is because alibert not loading the EPGEvent with the API and not because he is hasn't rebuilt the plugin with the new functions?
Yes, I think that is the most likely cause.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Script Helper Utility JavaWiz 2 2,341 2020-05-25, 11:00 AM
Last Post: Graham
  Skins - sizes of fonts and UI objects etc? bgowland 4 2,067 2011-08-12, 04:05 AM
Last Post: sub
  (Yet Another) Rename Helper script for GBPVR & NPVR pvruser 2 2,730 2011-07-22, 01:27 AM
Last Post: pvruser
  Recording Editing Functions blackpaw 5 1,999 2008-04-03, 12:11 PM
Last Post: McBainUK
  Plugin Helper GetSkinRootDirectory() McBainUK 1 1,389 2006-05-21, 10:24 PM
Last Post: bgowland
  External Recording Manger Helper Classes KingArgyle 2 1,489 2005-01-25, 01:23 AM
Last Post: KingArgyle
  GBPVR Plugin Helper DLL KingArgyle 6 2,964 2004-12-15, 11:27 PM
Last Post: reven

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

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

Linear Mode
Threaded Mode