From: Richard Kettlewell Date: Sun, 31 Jul 2011 16:16:46 +0000 (+0100) Subject: Merge remote-tracking branch 'origin/branch-5.0' X-Git-Tag: branchpoint-5.1~33 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/commitdiff_plain/feda7bfaefd9e5fb705d6893f26428a3109e7226?ds=inline;hp=-c Merge remote-tracking branch 'origin/branch-5.0' Conflicts: CHANGES.html --- feda7bfaefd9e5fb705d6893f26428a3109e7226 diff --combined CHANGES.html index 65f10ae,008cc87..75a9ef4 --- a/CHANGES.html +++ b/CHANGES.html @@@ -1,8 -1,65 +1,8 @@@ - + DisOrder Change History - + @@@ -11,69 -68,15 +11,78 @@@

This file documents recent user-visible changes to DisOrder.

+

IMPORTANT: you should read README.upgrades before upgrading.

+ +

Changes up to version 5.1

+ +
+ +

Removable Device Support

+ +
+ +

The server will now automatically initiate a rescan when a filesystem is + mounted or unmounted. (Use the mount_rescan option if you want to + suppress this behavior.)

+ +

The server takes care not to hold audio files open unnecessarily, so + that devices can be unmounted even if tracks from them are currently being + buffered.

+ +
+ +

Disobedience

+ +
+ +

You can now edit the required-tags and prohibited-tags + global preferences in Disobedience + (issue + #29).

+ +
+ +

Backups

+ +
+ +

The Debian package now includes a cronjob that backs up the database + daily. See /etc/cron.d/disorder. You can put settings + in /etc/default/disorder to turn this off or to control how long + the backups are kept for.

+ +

The disorder-dump -r option was broken.

+ +

disorder-dump now gets permissions right automatically (issue + #56).

+ +
+ +

General

+ +
+ +

Unicode support has been upgraded to Unicode + 6.0.0.

+ +

Various minor bug fixes.

+ +
+ +
+ +

Changes up to version 5.0.3

+ +
+ +

Security: Local connections can no longer create and delete users + unless they are properly authorized.

+ +
+

Changes up to version 5.0.2

@@@ -155,7 -158,7 +164,7 @@@

Confirmation URLs should be cleaner (and in particular not end with punctuation). (Please see README.upgrades for more about this.)

+ href="README.upgrades.html">README.upgrades for more about this.)

@@@ -211,67 -214,67 +220,67 @@@ - #30 + #30 mini disobedience interface - #32 + #32 Excessively verbose log chatter on shutdown - #33 + #33 (Some) plugins need -lm. - #39 + #39 Double bind() non-multicast AF_INET - #40 + #40 Missing stub function - #41 + #41 Missing includes for timeval - #42 + #42 syntax error in empeg_host section - #43 + #43 decoder segfault with FLAC 1.2.1 - #44 + #44 gcc 4.3.2-1ubuntu12 SUYB patch - #45 + #45 disobedience doesn't configure its back end - #46 + #46 Sort search results in web interface - #48 + #48 build-time dependency on oggdec removed - #49 + #49 Disobedience's 'When' column gets out of date @@@ -679,7 -682,7 +688,7 @@@

Important! See README.upgrades when upgrading.

+ href="README.upgrades.html">README.upgrades when upgrading.

Platforms And Installation

diff --combined server/server.c index c09b044,0ebfb4f..53a351b --- a/server/server.c +++ b/server/server.c @@@ -201,9 -201,9 +201,9 @@@ static int reader_error(ev_source attri static int c_disable(struct conn *c, char **vec, int nvec) { if(nvec == 0) - disable_playing(c->who); + disable_playing(c->who, c->ev); else if(nvec == 1 && !strcmp(vec[0], "now")) - disable_playing(c->who); + disable_playing(c->who, c->ev); else { sink_writes(ev_writer_sink(c->w), "550 invalid argument\n"); return 1; /* completed */ @@@ -866,7 -866,7 +866,7 @@@ static int c_random_enable(struct conn static int c_random_disable(struct conn *c, char attribute((unused)) **vec, int attribute((unused)) nvec) { - disable_random(c->who); + disable_random(c->who, c->ev); sink_writes(ev_writer_sink(c->w), "250 OK\n"); return 1; /* completed */ } @@@ -1150,19 -1150,8 +1150,19 @@@ static int c_set_global(struct conn *c sink_writes(ev_writer_sink(c->w), "550 cannot set internal global preferences\n"); return 1; } - trackdb_set_global(vec[0], vec[1], c->who); - sink_printf(ev_writer_sink(c->w), "250 OK\n"); + /* We special-case the 'magic' preferences here. */ + if(!strcmp(vec[0], "playing")) { + (flag_enabled(vec[1]) ? enable_playing : disable_playing)(c->who, c->ev); + sink_printf(ev_writer_sink(c->w), "250 OK\n"); + } else if(!strcmp(vec[0], "random-play")) { + (flag_enabled(vec[1]) ? enable_random : disable_random)(c->who, c->ev); + sink_printf(ev_writer_sink(c->w), "250 OK\n"); + } else { + if(trackdb_set_global(vec[0], vec[1], c->who)) + sink_printf(ev_writer_sink(c->w), "250 OK\n"); + else + sink_writes(ev_writer_sink(c->w), "550 not found\n"); + } return 1; } @@@ -1188,7 -1177,7 +1188,7 @@@ static int c_nop(struct conn *c static int c_new(struct conn *c, char **vec, int nvec) { - int max, n; + int max; char **tracks; if(nvec > 0) @@@ -1199,6 -1188,7 +1199,6 @@@ max = config->new_max; tracks = trackdb_new(0, max); sink_printf(ev_writer_sink(c->w), "253 New track list follows\n"); - n = 0; while(*tracks) { sink_printf(ev_writer_sink(c->w), "%s%s\n", **tracks == '.' ? "." : "", *tracks); @@@ -1865,12 -1855,12 +1865,12 @@@ static const struct command */ rights_type rights; } commands[] = { - { "adduser", 2, 3, c_adduser, RIGHT_ADMIN|RIGHT__LOCAL }, + { "adduser", 2, 3, c_adduser, RIGHT_ADMIN }, { "adopt", 1, 1, c_adopt, RIGHT_PLAY }, { "allfiles", 0, 2, c_allfiles, RIGHT_READ }, { "confirm", 1, 1, c_confirm, 0 }, { "cookie", 1, 1, c_cookie, 0 }, - { "deluser", 1, 1, c_deluser, RIGHT_ADMIN|RIGHT__LOCAL }, + { "deluser", 1, 1, c_deluser, RIGHT_ADMIN }, { "dirs", 0, 2, c_dirs, RIGHT_READ }, { "disable", 0, 1, c_disable, RIGHT_GLOBAL_PREFS }, { "edituser", 3, 3, c_edituser, RIGHT_ADMIN|RIGHT_USERINFO }, @@@ -1907,7 -1897,7 +1907,7 @@@ { "random-enabled", 0, 0, c_random_enabled, RIGHT_READ }, { "recent", 0, 0, c_recent, RIGHT_READ }, { "reconfigure", 0, 0, c_reconfigure, RIGHT_ADMIN }, - { "register", 3, 3, c_register, RIGHT_REGISTER|RIGHT__LOCAL }, + { "register", 3, 3, c_register, RIGHT_REGISTER }, { "reminder", 1, 1, c_reminder, RIGHT__LOCAL }, { "remove", 1, 1, c_remove, RIGHT_REMOVE__MASK }, { "rescan", 0, INT_MAX, c_rescan, RIGHT_RESCAN },