2018-04-24 16:09 GMT-05:00 Romain Beauxis <romain.beau...@gmail.com>:
>
> 2018-04-24 14:33 GMT-05:00 Jeff Hyche <jwhy...@warwind.org>:
> > I maybe missing something here. I've not had time to sit down and think
> > much about this, but how will this tell me what playlist just got
> > finished playing?
>
> Something like this:
>
> def on_playlist1_track(~last,pos) =
>    print("Playlist1 has a new track at position: #{pos}. Last track: #{last}")
> end

Sorry, you need to return a boolean so something like this:
def on_playlist1_track(~last,pos) =
   print("Playlist1 has a new track at position: #{pos}. Last track: #{last}")
   false
end

> playlist = playlist(on_track=on_playlist1_track,...)
>
> > On Tue, Apr 24, 2018 at 08:49:59AM -0500, Romain Beauxis wrote:
> >> Ok, I've just pushed a new on_track callback for playlists. It takes two
> >> argument: ~last:bool, true when the next track is the last in the playlist
> >> and the actual track's position. If you return true in this function then a
> >> playlist reload will be immediately queued.
> >>
> >> 2018-04-16 11:22 GMT-05:00 Romain Beauxis <romain.beau...@gmail.com>:
> >>
> >> > Actually, no. It's not a bad idea, I'll look at adding a playlist 
> >> > argument
> >> > for it.
> >> >
> >> > 2018-04-10 15:45 GMT-05:00 Jeff Hyche <jwhy...@warwind.org>:
> >> >
> >> >> I have a number of playlists.once that are reloaded using a cronjob.  Is
> >> >> there a way to tell what play list just got finished playing?  I want to
> >> >> create a intellegent function using on_done=, but I need a way to tell
> >> >> what playlist just finished.
> >> >>
> >> >> I've been playing with the source.id() but it doesn't seem to be useful
> >> >> for that.   In fact I really can't figure out what use it has at all
> >> >>
> >
> > ------------------------------------------------------------------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > _______________________________________________
> > Savonet-users mailing list
> > Savonet-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/savonet-users
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to