Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Track position

  1. #11
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    5,846
    Quote Originally Posted by philippe_44 View Post
    I don't have an idea at this point how to do that. I don't have easy access to a 'newsong' handler or call that would be "hookable" before the old one is closed.
    I've pushed the code to github if you want to have a look. The benefit of this method is that it makes the possibility to grab the last position very accurate and super simple. As always, it's depressing to see the time spent to find a solution and the ridiculously low number of lines of code
    Last edited by philippe_44; 2020-04-14 at 22:51.
    LMS 7.9 on Pi 3B+ & Odroid-C2 - SqueezeAMP!, 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, Riva 1 & 3

  2. #12
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,430

    Track position

    > I've pushed the code to github if you want to have a look. The benefit
    > of this method is that it makes the possibility to grab the last
    > position very accurate and super simple. As always, it's depressing to
    > see the time spent to find a solution and the ridiculously low number of
    > resulting lines of code


    Did you look into the protocol handler's onStop method? I believe it
    would be called from the stop handler here:

    https://github.com/Logitech/slimserv...roller.pm#L586


    --

    Michael

  3. #13
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    5,846
    Quote Originally Posted by mherger View Post
    > I've pushed the code to github if you want to have a look. The benefit
    > of this method is that it makes the possibility to grab the last
    > position very accurate and super simple. As always, it's depressing to
    > see the time spent to find a solution and the ridiculously low number of
    > resulting lines of code


    Did you look into the protocol handler's onStop method? I believe it
    would be called from the stop handler here:

    https://github.com/Logitech/slimserv...roller.pm#L586


    --

    Michael
    You've just killed all my hopes to be smart
    LMS 7.9 on Pi 3B+ & Odroid-C2 - SqueezeAMP!, 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, Riva 1 & 3

  4. #14
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,430

    Track position

    > You've just killed all my hopes to be smart

    onStop did the trick?

    --

    Michael

  5. #15
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    5,846

    Track position

    Quote Originally Posted by mherger View Post
    > You've just killed all my hopes to be smart

    onStop did the trick?

    --

    Michael
    Yes, fully ... I fell on my sword. But at least I've learned one thing in Perl and to systematically search for "can()" function in LMS
    Last edited by philippe_44; 2020-04-15 at 23:56.
    LMS 7.9 on Pi 3B+ & Odroid-C2 - SqueezeAMP!, 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, Riva 1 & 3

  6. #16
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    5,846
    Quote Originally Posted by mherger View Post
    > You've just killed all my hopes to be smart

    onStop did the trick?

    --

    Michael
    And I forgot to thank you
    LMS 7.9 on Pi 3B+ & Odroid-C2 - SqueezeAMP!, 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, Riva 1 & 3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •