Periodic recordings never are started if programmed between two days

Discussion in 'fixed TV-Server / Client Bugs' started by rublopez, August 15, 2007.

  1. rublopez

    rublopez Portal Member

    Joined:
    August 22, 2006
    Messages:
    9
    Likes Received:
    0
    Location:
    Madrid (Spain)
    Ratings:
    +0 / 0
    I have found a bug in periodic recordings. If a recording is programmed between two days, the recording never is started. For example, if the recording starts at 22:00 and ends at 01:00 of the next day, the recording is never started.

    I have seen the source code and I have found the cause. For all the periodic recordings, the start time and the end time are set of the following form:



    DateTime start = new DateTime(currentTime.Year, currentTime.Month, currentTime.Day, schedule.StartTime.Hour, schedule.StartTime.Minute, schedule.StartTime.Second);
    DateTime end = new DateTime(currentTime.Year, currentTime.Month, currentTime.Day, schedule.EndTime.Hour, schedule.EndTime.Minute, schedule.EndTime.Second);

    Both the start time and the end time include the year, month and day of the current time, therefore if the end time finalizes at the next day, the end time will be always minor than start time and the current time never will be between the start time and the end time.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Frodo
    • Premium Supporter

    Frodo Retired Team Member

    Joined:
    April 22, 2004
    Messages:
    1,518
    Likes Received:
    121
    Occupation:
    Professional .NET developer
    Location:
    The Netherlands
    Ratings:
    +121 / 0
    Home Country:
    Netherlands Netherlands
    According to the sourcecode and SVN
    This bug was solved on 19 june
    The current code looks like:
    Code (Text):
    1.  
    2.  
    3.           DateTime start = new DateTime(currentTime.Year, currentTime.Month, currentTime.Day, schedule.StartTime.Hour, schedule.StartTime.Minute, schedule.StartTime.Second);
    4.           DateTime end = new DateTime(currentTime.Year, currentTime.Month, currentTime.Day, schedule.EndTime.Hour, schedule.EndTime.Minute, schedule.EndTime.Second);
    5.           if (start > end) end = end.AddDays(1);
    6.  
    Are you sure you are running the latest svn of the tvserver????

    Frodo
     
  4. rublopez

    rublopez Portal Member

    Joined:
    August 22, 2006
    Messages:
    9
    Likes Received:
    0
    Location:
    Madrid (Spain)
    Ratings:
    +0 / 0
    Thank you, frodo.

    I was using a old SVN version.

    Kind regards
     
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!