For The Record - The rule-based scheduling suite (4 Viewers)

dvdfreak

Portal Pro
June 13, 2006
979
178
Home Country
Belgium Belgium
As I just promised on the IRC channel I'm uploading the TvScheduler guide and scheduling APIs. And I'm also uploading the source to the TVE3 plugin I wrote, to make it clear how this API is used in practice.

As you'll be able to see the API is very use-case-driven, very functional on a high-level. This is done to both improve performance of the API and also the usability/user-friendlyness. Clients talking to TvScheduler can therefore concentrate on what's important in their domain, and let TvScheduler deal with all the guide- and schedule-related problems and logic.

BTW, If you want to recompile the plugin you'll have to add the appropriate TvScheduler assemblies from the first posting as references.

I hope this makes the real-world usage of TvScheduler a bit clearer to the MP devs. If the API methods are not clear on their own, by their name, please do tell me. I should do my best to add comments to the API, I know, but I've been busy developing first :) And as they say: good code needs little to no comments (cfr Extreme Programming) ;)
 

The_Stig

Retired Team Member
  • Premium Supporter
  • April 5, 2005
    2,175
    428
    Hey dvdfreak,

    gotta a little issue here: I tried to import the 3rd tvguide.xml and it got moved to rejected folder. Log shows the following:

    View attachment 12797

    Dunno whats wrong there, I played around with the channels, newer .xml has less channels. Maybe this triggered the error?
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Home Country
    Belgium Belgium
    Hey dvdfreak,

    gotta a little issue here: I tried to import the 3rd tvguide.xml and it got moved to rejected folder. Log shows the following:

    View attachment 12797

    Dunno whats wrong there, I played around with the channels, newer .xml has less channels. Maybe this triggered the error?

    Can you send me the file? Does it always fail to import? Perhaps send me yesterday's XML as well?
     

    The_Stig

    Retired Team Member
  • Premium Supporter
  • April 5, 2005
    2,175
    428
    They are pretty large (both around 70 mb). Currently trying another import. So lets wait if it happens again... BTW: Import takes ages, around 30-40 minutes for my TVGuide.xml (even on a dualcore cpu). Seems that my EPG is very detailed. Any chance to speed this up?
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Home Country
    Belgium Belgium
    They are pretty large (both around 70 mb). Currently trying another import. So lets wait if it happens again... BTW: Import takes ages, around 30-40 minutes for my TVGuide.xml (even on a dualcore cpu). Seems that my EPG is very detailed. Any chance to speed this up?

    I'm testing with your test-files as I type this :) So far, all is going OK, hope to reproduce your error though.

    As far as the speed is concerned, I notice that SQL Express eats up over 50% of the CPU time and the TvScheduler service is only using 3% CPU or so. I guess that's more or less normal since most of the work going on is querying/updating the database.

    A good tip would be to schedule a guide update to be done at night. I can try to see how I could optimize the importing, perhaps there are some possibilities there. But I did write it to be very "friendly", meaning it looks in the database to see what's already (possiblly) there and acts accordingly, and I wouldn't want to take that out again.
     

    Ernie-c

    Portal Member
    July 31, 2007
    42
    5
    Belgium
    Home Country
    Belgium Belgium
    Hey dvdfreak,

    gotta a little issue here: I tried to import the 3rd tvguide.xml and it got moved to rejected folder. Log shows the following:

    View attachment 12797

    Dunno whats wrong there, I played around with the channels, newer .xml has less channels. Maybe this triggered the error?

    Can you send me the file? Does it always fail to import? Perhaps send me yesterday's XML as well?

    I have the same kind of problem here, so I'll debug with my file to see what exactly happens.
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Home Country
    Belgium Belgium
    The_Stig: I did some initial optimizing and importing the guide you sent me is down to 5.5 minutes here. After I upload a new version, let me know how this works out for you...

    [size=+1]UPDATE ALERT[/size]

    Beta release (November 3rd, 2007)

    Changes since the previous release:

    • Added and implemented IsActive flag on schedules, and an "Active" column to the management console.
    • Added NewEpisodesOnly rule. This will automatically skip previously recorded programs, as long as you have guide data that also contains either the episode title or the episode number.
    • Added "Record This Program" to popup window in Upcoming Suggestions/Alerts.
    • When creating/editing a schedule the Description rule may now also contain a ";" separator, in which case all of the substrings need to be present in the description.
    • Changed Sub-title to Episode and Episode to Number.
    • Changed the way transactions are handled for guide importing.
    • Pass on original exception message to FaultException thrown in service layer now.
    • Bug fix: Fixed problem with Open/Delete buttons in Recordings panel when no recordings were available.
    Make sure you upgrade everything, don't forget the TVE3 plugin if you are using that :)
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Home Country
    Belgium Belgium
    Here is a modified TV Movie ClickFinder plugin for TVE3. Just overwrite the TVMovie.dll in the plugins folder.

    IMPORTANT: you must also have my own TVE3 plugin installed!

    I also included the modified source. I kept the modification simple, it will only synchronize the same channels with TvScheduler as set up for TVE3.

    If there's enough interest I could modify the plugin so it synchronizes with TvScheduler separately from the TVE3 channel mappings.

    Or perhaps the original author 'rtv' could have a look? The modifications I made are really very very simple.
     

    The_Stig

    Retired Team Member
  • Premium Supporter
  • April 5, 2005
    2,175
    428
    With your newest files nearly nothing works here:

    1. Clickfinder plugin doesnt import my Data at all now. It clears the TVE3-Table and doesnt import after that.
    2. I cannot access the Management Console. Sometimes it shows the app, but shows a timeout when hitting on "Upcoming Recordings" or anything else. Sometimes its stuck on startup and asking for the connection.
    3. I get on a restart a "Critical Plugin Error", but that happened with older versions too, I forgot to mention that here. I guess its related to your TVPlugin.
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Home Country
    Belgium Belgium
    This is suprising news :( I have the versions I uploaded installed myself on my server. Or did I upload a bad version?

    You upgraded everything? TvScheduler service and the TVE3 plugin?

    PS: anything in the TV Server's logs? Or in the eventviewer?

    With your newest files nearly nothing works here:

    1. Clickfinder plugin doesnt import my Data at all now. It clears the TVE3-Table and doesnt import after that.
    2. I cannot access the Management Console. Sometimes it shows the app, but shows a timeout when hitting on "Upcoming Recordings" or anything else. Sometimes its stuck on startup and asking for the connection.
    3. I get on a restart a "Critical Plugin Error", but that happened with older versions too, I forgot to mention that here. I guess its related to your TVPlugin.

    Considering all the errors you describe, it seems there is a basic problem with the TvScheduler service not running. The management console, as well as my plugin and the clickfinder plugin are all clients of the service.

    So hopefully the error logs will clarify things. Otherwise, as a last measure, try deleting the TvScheduler database and re-install TvScheduler. Perhaps something went wrong in the database upgrade...
     

    Users who are viewing this thread

    Top Bottom