Commit Graph

324 Commits

Author SHA1 Message Date
Max Kellermann 6ff394bcc9 StorageCommands: use PathTraitsUTF8 for protocol argument 2015-03-02 21:25:55 +01:00
Max Kellermann 7a8f96b1dd FileCommands: use PathTraitsFS typedefs 2015-02-28 23:00:26 +01:00
Max Kellermann 90a61b6bab fs/FileInfo: new library providing GetFileInfo()
Replaces StatFile(), with a portable data object.
2015-02-28 23:00:26 +01:00
Max Kellermann 00583bc4a8 FileCommands: skip special files completely
Previously, MPD printed the time stamp without printing the file
name.  That made no sense.
2015-02-28 23:00:26 +01:00
Max Kellermann 2d06a8e880 storage/FileInfo: rename to StorageFileInfo 2015-02-28 23:00:26 +01:00
Max Kellermann 676dfabc91 command/{Queue,File}Commands: drop "file:///" prefix for absolute paths
Requiring this prefix makes the client's intention very clear, but it
was too hard to understand why this prefix was needed.  Initially, my
intention was to differentiate from broken clients which prefix relate
URIs with a slash; once MPD allowed that.  In the past few years
however, MPD has disallowed that, and there was no significant
breakage (except for the "add /" special case which some clients
apparently still do).  So I figure it's about time to define that an
URI that begins with a slash points to an arbitrary file on the file
system.
2015-02-09 07:55:06 +01:00
Max Kellermann 593bb5a8a7 StickerDatabase: convert the struct name to upper case 2015-01-28 19:33:56 +01:00
Max Kellermann 712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00
Max Kellermann 49968541fd sticker/Match: add inequality operators 2014-12-12 22:26:04 +01:00
Max Kellermann cc143105b8 sticker/Match: add operator "EQUALS"
Mapped to "=" in the MPD protocol.  This is the first operator,
initially supporting value matches in the MPD protocol.
2014-12-12 22:16:00 +01:00
Max Kellermann fed44e95b3 sticker/Song: add enum StickerOperator to sticker_song_find() 2014-12-12 22:10:24 +01:00
Max Kellermann 204a1de3fd sticker/Database: use the Error library 2014-12-12 21:43:54 +01:00
Max Kellermann 900c4977cc AllCommands: use ARRAY_SIZE() 2014-12-09 21:58:01 +01:00
Max Kellermann 6edfc56c9d command: use ConstBuffer<const char *> for argument list 2014-12-08 13:30:35 +01:00
Max Kellermann 5837a63942 AllCommands: simplify the tokenizer loop 2014-12-08 13:25:41 +01:00
Max Kellermann 3a28f456b1 AllCommands: assign current_command early 2014-12-08 13:25:00 +01:00
Max Kellermann 4f6fc2675c AllCommands: remove redundant initializer 2014-12-08 13:09:12 +01:00
Max Kellermann 1a8c3271da AllCommands: make variables more local 2014-12-06 00:10:34 +01:00
Max Kellermann bd49e8e76f AllCommands: make the commands array "constexpr" 2014-12-06 00:07:07 +01:00
Max Kellermann 70b5a81a29 {Tag,Song}Print, PlayerCommands: report song duration with milliseconds precision 2014-11-25 17:46:43 +01:00
Max Kellermann 26382713c2 Merge tag 'v0.19.4' 2014-11-18 21:47:20 +01:00
Max Kellermann 460cfba6ff QueueCommands: workaround for buggy clients that send "add /" 2014-11-18 21:31:54 +01:00
Max Kellermann f37481f843 DatabaseCommands: add "window" parameter to "search"/"find" 2014-11-18 14:31:27 +01:00
Max Kellermann 575fbad254 AllCommands: "commands" returns playlist commands only if playlist_directory configured 2014-10-25 23:50:47 +02:00
Max Kellermann 3d2558bde6 StoragePlugin: pass EventLoop to constructor 2014-10-09 07:45:25 +02:00
Max Kellermann 89f9561d10 storage/Interface: include cleanup 2014-10-01 23:38:17 +02:00
Max Kellermann 9270485723 Merge branch 'v0.18.x' 2014-09-24 21:49:20 +02:00
Andrzej Rybczak a0ef27a0cd command/list: reset used size after the list has been processed 2014-09-18 09:15:39 +02:00
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