Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Player restart - fix unexpected playback start on reconnects #797

Merged

Commits on Jul 31, 2022

  1. Fix client playback start on reconnect

    This is a fix to the changes introduced by Player restart proposal LMS-Community#699,
    LMS-Community#699.
    
    A client that disappears/disconnects for a few seconds/minutes before
    reconnecting may start playing immediately it reconnects, for no good reason.
    
    This change ensures that a client's playing state is recorded as soon as the
    client disappears/disconnects. The playing state is used to determine if the
    client should restart playback when it connects to LMS, so it is essential
    that it is recorded as soon as the client is disconnected.
    
    At present, the playing state (recorded in preference 'playingAtPowerOff') is
    not recorded until LMS starts to 'forget' the disconnected client. This will
    take place 5 minutes after 'slimproto_close', via a timer that calls
    'forget_disconnected_client'.
    
    But if the client reconnects in the interim, '_hello_handler' will kill the
    relevant timer, and the true playing state is not recorded. It may, in fact,
    reflect a condition that existed some days/weeks in the past.
    mw9 committed Jul 31, 2022
    Configuration menu
    Copy the full SHA
    687054b View commit details
    Browse the repository at this point in the history
  2. Client playback start on power on/reconnect - add robustness

    On power on, or reconnection, clients will automatically start playback
    if the persistent preference setting 'playingAtPowerOff' is enabled.
    
    Once acted upon, this setting is no longer valid. LMS will set it again if
    required, i.e. on Power off, or a player disconnection.
    
    This "belt & braces" change explicitly resets 'playingAtPowerOff' once it has
    been acted upon. It is intended to protect against unexpected resumption of
    playback that may occur in otherwise unforeseen circumstances.
    mw9 committed Jul 31, 2022
    Configuration menu
    Copy the full SHA
    4c0e185 View commit details
    Browse the repository at this point in the history
  3. White space changes - Player.pm

    mw9 committed Jul 31, 2022
    Configuration menu
    Copy the full SHA
    ac6c8b6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8b81f02 View commit details
    Browse the repository at this point in the history