bongo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bongo-devel] Re: Bongo marking and selecting random tracks


From: Daniel Brockman
Subject: Re: [bongo-devel] Re: Bongo marking and selecting random tracks
Date: Sat, 31 Mar 2007 19:24:31 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

address@hidden (Daniel Jensen) writes:

> Anthony Chaumas-Pellet <address@hidden> writes:
>
>> The one problem at present is that the track currently playing can be
>> picked when choosing a new track (at least when I explicitly ask for a
>> new random track). A quick fix is to also check against
>> (not (bongo-currently-playing-track-line-p)).
>>
>> This 'random choice picks same track' behaviour seems specific to
>> 'random-marked', as it doesn't appear when no tracks are marked.
>
> Well, I can reproduce the behaviour with unmarked tracks also. It is
> because the currently playing track is not marked as "played" before
> the new track is selected. Your fix is good.

Yes.  Thank you, Anthony.

There is one problem with the proposed fix: it will make
random playback fail when there is only one track, even
though the reasonable thing to do in this case is to play
that one track over and over.

> As an alternative, we could make `bongo-play-random' stop
> before picking a random track.

This solves the aforementioned problem, but introduces
another problem: `bongo-play-random' would stop playback and
then give an error when there is only one track and Bongo is
marking played tracks.  The reasonable thing to do in this
case is to just give an error (not stopping playback).

> The third option is to set the played property for the currently
> playing track, but that is a potentially bigger change.

Yes, I don't want to do this.  It may be a good idea to mark
the current track as played once it is played halfway through,
but I don't want it to be marked immediately.

Unfortunately, implementing that in a reasonably reliable
way would be non-trivial.

So I propose a fourth option:

 (defun bongo-unplayed-randomly-playable-track-line-p (&optional point)
   "Return non-nil for unplayed and randomly playable track lines.
 Inspect the line at POINT; or the one at point, if POINT is nil.
 See `bongo-randomly-playable-track-line-p' and `bongo-played-track-line-p'."
   (and (bongo-randomly-playable-track-line-p point)
+       (not (and bongo-mark-played-tracks
+                 (bongo-currently-playing-track-line-p)))
        (not (bongo-played-track-line-p))))

It is not as clean as the other options, but I believe it
will give good results in all cases.

All in favor?

-- 
Daniel Brockman <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]