[Evaluate] - New Feature - TvEngine: Can restrict series schedules to programs that start within a time window

Discussion in 'Submit: Code Patches' started by Tuggax, June 28, 2017.

  1. Tuggax

    Tuggax Portal Member

    Joined:
    June 16, 2017
    Messages:
    5
    Likes Received:
    3
    Ratings:
    +6 / 0
    Home Country:
    Australia Australia
    I've been testing changes I made to MP2's TvEngine that allows the user to have more control on how the three series schedule types work (i.e EveryTimeOnThisChannel, EveryTimeOnEveryChannel, WeeklyEveryTimeOnThisChannel).

    I've added a new column/property to the TvDatabase.Schedule table/class that can be configured to further restrict the programs that get recorded for the three schedules above.

    Now instead of recording ALL programs in the TV guide that match a schedule's criteria I've extended the functionality to include a time window based on the schedule's start time.

    When enabled, only matching programs that fall within the schedule's time window will get recorded (and all other occurrences skipped).

    This has the following benefits:

    1) Can set up a single schedule to record TV programs that are first aired *around* the same time (for example 19:00 on Sunday nights and 19:30 on weekdays), and

    2) Avoids recording repeats that often air late at night or lunchtime (especially important if the TV guide has limited information like in Australia)

    3) Being implemented within the TvEngine (rather than a plugin) makes for a better UI experience in both MP2 and Kodi as the series schedules display the matching programs when viewed in the UI (much easier to manage than having many "Once" schedules as I assume TvWishList would produce).

    upload_2017-6-28_17-52-18.png

    upload_2017-6-28_17-52-56.png

    4) Being implemented in the TvEngine (rather than a plugin) means Kodi can use this new feature with only a few lines of code added to the Kodi plugin (which I have also done)

    *PLEASE NOTE*, by default the new property is set to a default value of 0 which indicates there is no time restrictions for these three types (to keep the existing functionality in MP).



    Furthermore, a user can add multiple time window series schedules to selectively choose which programs to record within a single day (while avoiding others).

    I've also added a new entry into the TvDatabase.Settings table/class to define this new setting and updated the SetupTV application to allow users to set it.

    upload_2017-6-28_17-35-7.png

    Please note, my code so far has NOT made any changes to the GUI so at the moment this feature is either fully switched ON or OFF for all schedules.

    However, the way I have implemented the changes makes it simple to add the ability to set this for each schedule in the GUI (and at this point the setting would only act as the default setting that could be overridden.

    Let me know if this feature is wanted and if so what you need me to do (as I'm not new to coding but I'm new to contributing to open source projects).

    My changes:

    GitHub - Tuggax/MediaPortal-1: MediaPortal turns your HTPC into a very advanced media center, or Home Theater PC (HTPC)

    GitHub - Tuggax/TVServerXBMC: Kodi/XBMC pvr backend plugin for MediaPortal's TVServer

    Cheers!
     
    • Like Like x 3
    • Thank You! Thank You! x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. ge2301
    • Team MediaPortal

    ge2301 MP2 Design

    Joined:
    January 11, 2014
    Messages:
    5,423
    Likes Received:
    1,382
    Gender:
    Male
    Occupation:
    Automotive Industry
    Location:
    Stuttgart (But living abroad)
    Ratings:
    +2,091 / 3
    Home Country:
    Germany Germany
    Great job (y) Would be good, if you add a GUI setting to the recording dialog in EPG. What you need:
    • Write rights in GitHub to MP2 project --> @morpheus_xx
    • Create an own branch, which is cloned from WiP2.1.1
    • Commit your changes to your branch and after code review it can merged back into WiP2.1.1
     
  4. ge2301
    • Team MediaPortal

    ge2301 MP2 Design

    Joined:
    January 11, 2014
    Messages:
    5,423
    Likes Received:
    1,382
    Gender:
    Male
    Occupation:
    Automotive Industry
    Location:
    Stuttgart (But living abroad)
    Ratings:
    +2,091 / 3
    Home Country:
    Germany Germany
    @morpheus_xx maybe you missed the tag. Would be good if you can give our contributors a feedback.
     
  5. aspik
    • Team MediaPortal

    aspik Development Group

    Joined:
    April 14, 2008
    Messages:
    1,144
    Likes Received:
    331
    Ratings:
    +547 / 1
    I think, for start a pull request would be also good :)
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!