Commit Graph

446 Commits

Author SHA1 Message Date
Max Kellermann 75a89c5983 PlayerThread: use SongTime for elapsed_time 2014-08-29 13:20:58 +02:00
Max Kellermann 2289968634 PlayerControl: use SignedSongTime for the song duration 2014-08-29 13:20:58 +02:00
Max Kellermann 127fe6ecf0 PlaylistEdit: pass std::chrono::duration to SetSongIdRange() 2014-08-28 13:03:18 +02:00
Max Kellermann 3952920492 Playlist: use std::chrono::duration for Seek*() 2014-08-28 06:42:19 +02:00
Max Kellermann cf797657ed AllCommands: close connection after syntax error
Stop HTTP clients from exploiting MPD via forged POST requests.
2014-08-12 15:33:45 +02:00
Max Kellermann aa0f06d6b7 db/Interface: add virtual method Update()
For database plugins that don't use the UpdateService.
2014-07-29 23:31:27 +02:00
Max Kellermann 0c47685e02 OtherCommands: split handle_update() 2014-07-29 23:29:57 +02:00
Max Kellermann 751995ab95 QueueCommands: new command "rangeid"
Manipulates the playback range of a queued song.
2014-07-12 18:55:41 +02:00
Max Kellermann 828cd6fd0b Merge branch 'v0.18.x' 2014-07-11 21:33:50 +02:00
Max Kellermann 11a5ee821b PlaylistEdit: postpone UpdateQueuedSong() when adding multiple songs
Implement a "bulk" edit mode that postpones both UpdateQueuedSong()
and OnModified().  This way, the playlist version gets incremented
only once.  More importantly: when adding multiple songs to a queue
that consists of only one song, the first song that got added will
always be played next.  By postponing this choice, all newly added
songs get a chance to become the next song.  Fixes the second (and
last) part of Mantis ticket 0004005.
2014-07-11 20:22:35 +02:00
Max Kellermann a8a85143f6 QueueCommands: make "result" more local 2014-07-11 20:22:35 +02:00
Max Kellermann 2da0322329 command: make argc unsigned 2014-06-16 19:50:34 +02:00
Max Kellermann 3364c1b893 ClientList: use class boost::intrusive::list
Eliminate extra allocations for the std::list node instances.
2014-06-11 09:27:17 +02:00
Max Kellermann 0adcda387a PlaylistCommands: remove redundant playlist_load_spl() call
This case is handled already by playlist_open_in_playlist_dir() (via
playlist_mapper_open()).  And the call didn't work anyway.
2014-05-10 19:02:33 +02:00
Max Kellermann bc2a1160b8 db/Count: implement grouping 2014-04-27 22:27:43 +02:00
Max Kellermann fcb55f841a DatabasePrint: move PrintSongCount() to Count.cxx 2014-04-26 22:59:21 +02:00
Max Kellermann 4cca75b2e1 DatabasePrint: refactor variable/function names 2014-04-25 18:36:07 +02:00
Max Kellermann 95b1a640b6 DatabaseCommands: disallow "grouping" by the selected tag
Fixes assertion failure.
2014-04-25 11:28:17 +02:00
Max Kellermann 0de42d56fc DatabasePrint: eliminate printAllIn(), printInfoForAllIn() 2014-04-24 18:09:39 +02:00
Max Kellermann ae178c77bd DatabaseCommands: "list" allows grouping 2014-04-24 11:38:49 +02:00
Max Kellermann 7fdd801479 DatabaseCommands: simplify the handle_list() argument parser 2014-04-24 11:38:48 +02:00
Max Kellermann b999e16406 SongFilter: convert argv to ConstBuffer 2014-04-24 09:59:59 +02:00
Max Kellermann c9aec3e866 DatabaseCommands: fix crash on "list base"
The string "base" is understood by locate_parse_type(), but not by
listAllUniqueTags().  The special tag type LOCATE_TAG_BASE_TYPE causes
a crash in PrintUniqueTag().
2014-04-24 08:19:08 +02:00
Max Kellermann 38e6c0ad3f DatabaseCommands: clarify compatibility comment 2014-04-24 08:11:06 +02:00
Max Kellermann 88eae9dabb command/{storage,file}: suppress bogus format warnings on WIN32 2014-03-14 08:58:43 +01:00
Max Kellermann 503ed9c331 Merge tag 'release-0.18.9' 2014-03-02 11:46:07 +01:00
Max Kellermann 96afa8bd2b command: add command "listfiles"
Lists files and directories.  Supports storage plugins.
2014-03-01 06:25:57 +01:00
Max Kellermann 4c27898ce7 {Other,Database}Commands: contract declaration and assignment 2014-02-28 07:12:04 +01:00
Max Kellermann d34ae0850c AllCommands: "findadd" requires the "add" permission 2014-02-27 23:08:22 +01:00
Max Kellermann e9a85aa4e4 db/simple: mount points
A SimpleDatabase instance can now "mount" other Database instances at
certain locations.  This is used to use a new SimpleDatabase instance
for each storage mount (issued with the "mount" protocol command).
Each such instance has its own database file, stored in the directory
that is specified with the "cache_directory" option.
2014-02-27 20:49:13 +01:00
Max Kellermann 1c772ef699 Playlist: use the Error library to return errors 2014-02-27 17:27:23 +01:00
Max Kellermann 809b89b5af Playlist*: move to queue/ 2014-02-27 17:12:42 +01:00
Max Kellermann ae594ad92c DatabasePlugin: split header 2014-02-19 22:54:52 +01:00
Max Kellermann e624171ba1 StickerCommands: include cleanup 2014-02-19 09:53:22 +01:00
Max Kellermann df9667a497 StorageCommands: add command "unmount" 2014-02-12 23:48:08 +01:00
Max Kellermann ace4ba3171 StorageCommands: emit IDLE_MOUNT on successful "mount"
Add the new idle event to Idle.hxx/Idle.cxx.
2014-02-12 23:06:47 +01:00
Max Kellermann 0935ae330a StorageCommands: add command "listmounts" 2014-02-12 21:47:59 +01:00
Max Kellermann 73aec9ce63 StorageCommands: expose the "mount" command 2014-02-09 11:07:08 +01:00
Max Kellermann 570b12ec13 Idle: error out when unrecognized idle event was specified
Implements the error checks missing in commit 0bad8406
2014-02-09 08:07:48 +01:00
Max Kellermann ac286ef734 OtherCommands: remove unnecessary nullptr check 2014-02-09 08:07:43 +01:00
Max Kellermann b531c4c2fe OtherCommands: use Storage::MapUTF8() instead of Mapper.cxx 2014-02-07 22:58:21 +01:00
Max Kellermann bb3b836dbb FileCommands: support remove database files 2014-02-07 18:41:42 +01:00
Max Kellermann 1873c67540 FileCommands: use Storage::MapFS() instead of map_uri_fs() 2014-02-07 18:38:10 +01:00
Max Kellermann 8fd8f23a6b FileCommands: move code to read_file_comments() 2014-02-07 18:33:43 +01:00
Max Kellermann c13810ebaa Mapper: move map_song_detach() to db/DatabaseSong.cxx
Use Storage::MapUTF8() internally, don't use global variables.
2014-02-07 00:42:14 +01:00
Max Kellermann abc16b919d {Message,Neighbor}Commands: use Client::partition instead of Main.hxx 2014-02-04 11:35:23 +01:00
Max Kellermann cf6281a5a7 Instance: add Database attribute
Move from db/DatabaseGlue.cxx, eliminating global variable.
2014-02-04 11:22:33 +01:00
Max Kellermann 33a2c01ea2 db/Simple: remove unused function db_get_directory() 2014-02-04 09:03:17 +01:00
Max Kellermann 9c637df77e SongSticker: add Database reference parameter 2014-02-04 01:15:08 +01:00
Max Kellermann 29072797ca db/DatabasePlaylist: pass Database reference around
Reduce global variable usage, move to frontend code.
2014-02-04 00:57:43 +01:00