Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 7 of 7
  1. #1
    Senior Member cparker's Avatar
    Join Date
    Oct 2005
    Location
    Hampshire, United Kingdom
    Posts
    591

    Alarm ProtocolHandler can it fire without destroying the playlist?

    Hi

    I have a query on the LMS core Alarm code. I subscribe to the alarm event and receive notification via the ProtocolHander/overridePlayback and from there fire my code.

    However, if the player is playing music at the time that the alarm first, the current playlist is destroyed. Is this a LMS core thing, or is there another way that I can get an alarm notification that still preserves the current playlist?

    Just for reference, this is my overridePlayback code;

    sub overridePlayback {
    my ( $class, $client, $url ) = @_;

    if ($url !~ m|^sugarcube.*)$|) {
    return undef;
    }
    Slim::Utils::Timers::setTimer($client, Time::HiRes::time() + 1, \&Plugins::SugarCube::Plugin::AlarmFired($client), );
    return 1;
    }

    Thanks in advance
    www.spicefly.com - ** Spicefly SugarCube ** - A hassle free acoustic journey through your music library using MusicIP. Plus the finest MusicIP installation guides, enhanced MIP Interface and SpyGlass MIP the Windows Automated MusicIP Headless Installer.

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,872

    Alarm ProtocolHandler can it fire withoutdestroying the playlist?

    > However, if the player is playing music at the time that the alarm
    > first, the current playlist is destroyed. Is this a LMS core thing, or
    > is there another way that I can get an alarm notification that still
    > preserves the current playlist?


    The alarm code is using destructive commands. It does indeed replace the
    currently playing playlist.

    --

    Michael

  3. #3
    Senior Member Mnyb's Avatar
    Join Date
    Feb 2006
    Location
    Västerås Sweden
    Posts
    16,260
    Is not everything a playlist for LMS for anything to play it must be on the now playing playlist ? I always wished that alarm could have to option to squirell away the current playlist and then put it back once out of alarm mode .
    --------------------------------------------------------------------
    Main hifi: Touch + CIA PS +MeridianG68J MeridianHD621 MeridianG98DH 2 x MeridianDSP5200 MeridianDSP5200HC 2 xMeridianDSP3100 +Rel Stadium 3 sub.
    Bedroom/Office: Boom
    Kitchen: Touch + powered Fostex PM0.4
    Misc use: Radio (with battery)
    iPad1 with iPengHD & SqueezePad
    (spares Touch, SB3, reciever ,controller )
    server HP proliant micro server N36L with ClearOS Linux

    http://people.xiph.org/~xiphmont/demo/neil-young.html

  4. #4
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,872

    Alarm ProtocolHandler can it fire withoutdestroying the playlist?

    > Is not everything a playlist for LMS for anything to play it must be on
    > the now playing playlist ? I always wished that alarm could have to
    > option to squirell away the current playlist and then put it back once
    > out of alarm mode .


    There's the "playlist preview" command, which could do some of this. Or
    it could be coded in the alarm. But that alarm code already is more
    complex than you'd ever think an alarm could be...

    --

    Michael

  5. #5
    Senior Member Mnyb's Avatar
    Join Date
    Feb 2006
    Location
    Västerås Sweden
    Posts
    16,260
    Quote Originally Posted by mherger View Post
    > Is not everything a playlist for LMS for anything to play it must be on
    > the now playing playlist ? I always wished that alarm could have to
    > option to squirell away the current playlist and then put it back once
    > out of alarm mode .


    There's the "playlist preview" command, which could do some of this. Or
    it could be coded in the alarm. But that alarm code already is more
    complex than you'd ever think an alarm could be...

    --

    Michael
    I remeber the mess when radio came about and the alarm
    Code was modified on daily basis for a while...

    I’m not developing so I leave this tread now.
    --------------------------------------------------------------------
    Main hifi: Touch + CIA PS +MeridianG68J MeridianHD621 MeridianG98DH 2 x MeridianDSP5200 MeridianDSP5200HC 2 xMeridianDSP3100 +Rel Stadium 3 sub.
    Bedroom/Office: Boom
    Kitchen: Touch + powered Fostex PM0.4
    Misc use: Radio (with battery)
    iPad1 with iPengHD & SqueezePad
    (spares Touch, SB3, reciever ,controller )
    server HP proliant micro server N36L with ClearOS Linux

    http://people.xiph.org/~xiphmont/demo/neil-young.html

  6. #6
    Senior Member cparker's Avatar
    Join Date
    Oct 2005
    Location
    Hampshire, United Kingdom
    Posts
    591
    Quote Originally Posted by mherger View Post
    > However, if the player is playing music at the time that the alarm
    > first, the current playlist is destroyed. Is this a LMS core thing, or
    > is there another way that I can get an alarm notification that still
    > preserves the current playlist?


    The alarm code is using destructive commands. It does indeed replace the
    currently playing playlist.

    --

    Michael
    Hi

    I had a look at the alarm code (AlarmSnoozeApplet) but it looks like from some quick tests that its already destroyed by the time this is initialised? Any steer on where its being called from is that inside the core code somewhere?

    Cheers
    www.spicefly.com - ** Spicefly SugarCube ** - A hassle free acoustic journey through your music library using MusicIP. Plus the finest MusicIP installation guides, enhanced MIP Interface and SpyGlass MIP the Windows Automated MusicIP Headless Installer.

  7. #7
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,872

    Alarm ProtocolHandler can it fire withoutdestroying the playlist?

    > I had a look at the alarm code (AlarmSnoozeApplet) but it looks like
    > from some quick tests that its already destroyed by the time this is
    > initialised?


    Don't look at the client side. It's in LMS (Slim::Utils::Alarm).

    --

    Michael

Tags for this Thread

Posting Permissions

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