[Approved] Resuming TV / Video / DVD (1 Viewer)

riksmith

Portal Pro
April 18, 2009
1,856
322
Home Country
Netherlands Netherlands
As requested by elliottmc: Use cancelable dialog instead of yes / no dialog. Same behaviour applies as the current dialog shown when a recording is actively recording.

Patch 1: TV Recorded.

Patched for Video and DVD to follow.

Patch 2: DVD + Video
Did some refactoring so i only have the code once for dvd's.

If there are other places (audio?) to patch please let me know.
 

riksmith

Portal Pro
April 18, 2009
1,856
322
Home Country
Netherlands Netherlands
Video seems a bit complicated, do not have time for that today. DVD seems simpler.

Edit: Well.. the code doesn't look so good here... there are several path's for both DVD and video, some use the resume point, some don't. Some use the dvd player SelectDVDPlayer.OnPlayDVD, others not. This is not easy fixable. I have to dive in to it if it still needs fixing, but i think it will be tricky. I am not willing to code the thing six times for three playback types :).

Sum of things i noted:
Main menu -> Play disc -> No questions asked plays the disc from start.
Videos list: Click on the DVD drive, shows the dialog from the video playing code.
Videos list: Right click on the dvd drive and choose play dvd -> Shows the dialog from SelectDVDPlayer code.
 

chefkoch

Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,129
    1,635
    Dresden / Munich / Maastricht
    Home Country
    Germany Germany
    AW: Resuming TV / Video / DVD

    Okay, I took a look at the source and reworked it a bit.
    I inverted some if statements to reduce nesting.
    In those cases "return" only was called in else statement.

    I attached the modified files, to have all in one place available.

    :D so far for the patch.
    It is currently being discussed within the team, so stay tuned.

    regards
    chefkoch
     

    riksmith

    Portal Pro
    April 18, 2009
    1,856
    322
    Home Country
    Netherlands Netherlands
    Did you deliberately move the "//Continue playing at last stop time" comment to halfway the statement? I don't find i a good practice myself to insert a comment somewhere in a statement. I don't think it improves readability. If you would want to change the location from the original place i would suggest placing it above the statement.
     

    chefkoch

    Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,129
    1,635
    Dresden / Munich / Maastricht
    Home Country
    Germany Germany
    AW: Re: Resuming TV / Video / DVD

    Did you deliberately move the "//Continue playing at last stop time" comment to halfway the statement? I don't find i a good practice myself to insert a comment somewhere in a statement. I don't think it improves readability. If you would want to change the location from the original place i would suggest placing it above the statement.

    It was just that it was moved below and the statement itself was split by ReSharper automatically.
    But you are right, that placing it above would be a better choice. Will be done later.
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Re: AW: Re: Resuming TV / Video / DVD

    Did you deliberately move the "//Continue playing at last stop time" comment to halfway the statement? I don't find i a good practice myself to insert a comment somewhere in a statement. I don't think it improves readability. If you would want to change the location from the original place i would suggest placing it above the statement.

    It was just that it was moved below and the statement itself was split by ReSharper automatically.
    But you are right, that placing it above would be a better choice. Will be done later.

    Bump!

    Where are we with getting this into SVN?

    Best wishes,

    Mark
     

    Users who are viewing this thread

    Top Bottom