My favorites | Sign in
Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 6: Schedule tracks for a particular time
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ewxrjk
Closed:  May 2008
Type-Enhancement
Priority-Low


Sign in to add a comment
 
Reported by ewxrjk, Mar 05, 2008
Currently tracks play as soon as they reach the head of the queue.  It has
been requested that tracks be scheduled for a particular time.

at and cron seem perfectly adequate tools for this but I'm open to argument.
Comment 1 by ewxrjk, Mar 05, 2008
(No comment was entered for this change.)
Status: New
Comment 2 by ewxrjk, May 24, 2008
I've started work on this.  A rough description of how it works:-

 * @ref trackdb_scheduledb is a mapping from ID strings to encoded
 * key-value pairs called 'actiondata'.
 *
 * Possible actiondata keys are:
 * - @b when: when to perform this action (required)
 * - @b who: originator for action (required)
 * - @b action: action to perform (required)
 * - @b track: for @c action=play, the track to play
 * - @b key: for @c action=set-global, the global pref to set
 * - @b value: for @c action=set-global, the value to set (omit to unset)
 * - @b priority: the importance of this action
 * - @b recurs: how the event recurs; NOT IMPLEMENTED
 * - ...others to be defined
 *
 * Possible actions are:
 * - @b play: play a track
 * - @b set-global: set or unset a global pref
 * - ...others to be defined
 *
 * Possible priorities are:
 * - @b junk: junk actions that are in the past at startup are discarded
 * - @b normal: normal actions that are in the past at startup are run
 *   immediately.  (This the default.)
 * - ...others to be defined
 *
 * On startup the schedule database is read and a timeout set on the event loop
 * for each action.  Similarly when an action is added, a timeout is set on the
 * event loop.  The timeout has the ID attached as user data so that the action
 * can easily be found again.
 *
 * Recurring events are NOT IMPLEMENTED yet but this is the proposed
 * interface:
 *
 * Recurring events are updated with a new 'when' field when they are processed
 * (event on error).  Non-recurring events are just deleted after processing.
 *
 * The recurs field is a whitespace-delimited list of criteria:
 * - nn:nn or nn:nn:nn define a time of day, in local time.  There must be
 *   at least one of these but can be more than one.
 * - a day name (monday, tuesday, ...) defines the days of the week on
 *   which the event will recur.  There can be more than one.
 * - a day number and month name (1 january, 5 february, ...) defines
 *   the days of the year on which the event will recur.  There can be
 *   more than one of these.
 *
 * Day and month names are case insensitive.  Multiple languages are
 * likely to be supported, especially if people send me pointers to
 * their month and day names.  Abbreviations are NOT supported, as
 * there is more of a risk of a clash between different languages that
 * way.
 *
 * If there are no week or year days then the event recurs every day.
 *
 * If there are both week and year days then the union of them is
 * taken, rather than the intersection.

Recurring events probably won't be in the first released version, but we'll see.
Status: Started
Comment 3 by ewxrjk, May 25, 2008
revno: 667
committer: Richard Kettlewell <rjk@greenend.org.uk>
branch nick: disorder.dev
timestamp: Sun 2008-05-25 12:57:20 +0100
message:
  Merge event scheduling implementation.  This fixes defect #6,
  "Schedule tracks for a particular time".

Status: Fixed
Sign in to add a comment

Hosted by Google Code