Commit Graph

385 Commits

Author SHA1 Message Date
Eric Wollesen
81a198a76a return id for "addid" with position
Previously the id was being returned only when a position wasn't
specified.
2016-06-13 10:14:20 -06:00
Max Kellermann
e228144159 command/playlist: eliminate spl_print() calls
playlist_file_print() already handles stored playlists.  spl_print()
is never called with a successful result.
2016-04-13 19:47:41 +02:00
Max Kellermann
9b85446808 util/StringPointer: rename typedef pointer to pointer_type 2016-04-12 22:53:06 +02:00
Max Kellermann
2fd5182608 db/Interface: GetSong() throws exception on error 2016-03-19 00:19:50 +01:00
Max Kellermann
b24a5e0662 Partition: add method EmitIdle()
Prepare for moving idle events to class Partition.  Right now, it's
just a wrapper for idle_add().
2016-03-05 19:16:39 +01:00
Max Kellermann
1aee89f5ea *: include cleanup (using iwyu) 2016-03-01 22:08:13 +01:00
Max Kellermann
fb547260d1 player/Control: Play*() returns Error information 2016-02-28 13:31:41 +01:00
Max Kellermann
ac15581c56 command/error: remove unused function print_playlist_result() 2016-02-28 11:53:38 +01:00
Max Kellermann
9e2e882157 PlaylistPrint: throw PlaylistError on error 2016-02-28 11:52:39 +01:00
Max Kellermann
99ded56047 command/error: remove db_domain from ToAck(Error) 2016-02-28 11:48:12 +01:00
Max Kellermann
5b8dce7456 db/simple: throw DatabaseError on error 2016-02-28 11:40:59 +01:00
Max Kellermann
304d78a4c8 command/error: remove playlist_domain from ToAck(Error)
playlist_domain is no longer used for class Error.
2016-02-28 11:17:43 +01:00
Max Kellermann
b6cb9b853a queue/PlaylistEdit: throw PlaylistError on error 2016-02-28 11:02:36 +01:00
Max Kellermann
ea626368a0 queue/QueueCommands: use std::unique_ptr 2016-02-28 10:56:37 +01:00
Max Kellermann
c81747dd15 queue/PlaylistTag: throw PlaylistError on error 2016-02-28 10:40:31 +01:00
Max Kellermann
1d67aa7bf2 update copyright year to 2016 2016-02-26 17:54:05 +01:00
Max Kellermann
7623c1c5cb SongUpdate: move tag_scan_fallback() to tag/Generic.cxx 2016-02-22 18:00:49 +01:00
Max Kellermann
a5f8fd774d tag/handler: use CamelCase 2016-02-22 17:38:06 +01:00
Max Kellermann
4b79f0047d db/DatabaseError: add exception class DatabaseError 2016-02-07 01:09:33 +01:00
Max Kellermann
6a789b660a command/CommandError: move code to ToAck(DatabaseErrorCode) 2016-02-07 01:09:10 +01:00
Max Kellermann
0d8e44a079 db/DatabaseError: rename enum db_error and make strictly-typed 2016-02-07 01:01:10 +01:00
Max Kellermann
f3503e0026 fs/DirectoryReader: use C++ exceptions instead of class Error 2015-12-29 12:56:26 +01:00
Max Kellermann
3843972b05 command/Error: workaround for gcc 4.x rethrow_exception(exception_ptr) 2015-12-29 12:39:28 +01:00
Max Kellermann
37862f0f20 PlaylistFile: convert more APIs from Error to std::exception 2015-12-28 14:20:37 +01:00
Max Kellermann
1f184f4aec PlaylistFile: throw exception on spl_map_to_fs() failure 2015-12-28 14:20:37 +01:00
Max Kellermann
48693250a4 command/Error: no std::exception_ptr forward declaration
This breaks on some standard library implementations.
2015-12-28 14:20:37 +01:00
Max Kellermann
570dcb6309 command/Error: support nested exceptions 2015-12-28 07:00:01 +01:00
Max Kellermann
19e43087a8 command/Error: move code to ToAck(std::exception_ptr) 2015-12-28 06:53:52 +01:00
Max Kellermann
1c90400081 command/Error: pass std::exception_ptr to PrintError()
Necessary to preserve type information.  The try/catch sequence didn't
work previously.
2015-12-27 06:43:55 +01:00
Max Kellermann
e939d667d9 protocol/Ack: add exception class wrapping enum ack 2015-12-18 09:53:02 +01:00
Max Kellermann
8bb5a565cd PlaylistError: add exception class wrapping enum PlaylistResult 2015-12-18 09:21:11 +01:00
Max Kellermann
51168169e7 util/Tokenizer: use std::runtime_error on syntax error 2015-12-16 11:34:26 +01:00
Max Kellermann
8f93c36466 command/AllCommands: catch and report std::exception 2015-12-16 00:07:51 +01:00
Max Kellermann
28f9a0a900 command/other: re-allow "lsinfo /"
This compatibility hack was accidently broken by commit f072cbbb
2015-11-13 21:04:02 +01:00
Max Kellermann
a6bb3cf60a command/queue: use StringIsEqual() instead of memcmp()
memcmp() can overflow the buffer.
2015-11-13 21:02:33 +01:00
Max Kellermann
5e93c05095 queue/Playlist: seek methods return bool/Error instead of PlaylistResult 2015-11-11 19:56:01 +01:00
Max Kellermann
0f4f04eaa4 command/CommandError: send verbose error message to client 2015-11-11 19:51:09 +01:00
Max Kellermann
2e55d561d3 PlaylistError: remove unused code "ERRNO" 2015-11-11 19:50:57 +01:00
Max Kellermann
36239895bd player/Control: add Lock prefix to locking method names 2015-11-11 16:50:57 +01:00
Max Kellermann
8acf996d90 command/queue: add range parameter to plchanges and plchangesposid 2015-10-27 20:35:40 +01:00
Max Kellermann
f072cbbba7 LocateUri: new library to classify URIs in a standard way 2015-10-22 09:39:28 +02:00
Max Kellermann
0366dcf604 PlaylistPrint: fix -Wunused #ifndef ENABLE_DATABASE 2015-10-20 13:50:00 +02:00
Max Kellermann
fc2154ee92 DetachedSong: move code from Update() to LoadFile()
Avoid duplicate AllocatedPath::FromUTF8() invocations in two callers.
2015-10-20 12:10:42 +02:00
Max Kellermann
76f85e6f7b command/DatabaseCommands: pass URI to handle_lsinfo2() 2015-10-20 12:07:18 +02:00
Max Kellermann
81ce684b35 command/FileCommands: fix access to absolute paths in "readcomments" 2015-10-20 11:25:46 +02:00
Max Kellermann
f0b58c6f24 db/UniqueTags, tag/Set, ...: use typedef tag_mask_t 2015-08-24 11:53:30 +02:00
Max Kellermann
36cd73df51 client, command: use StringIsEqual() 2015-08-14 19:48:30 +02:00
Max Kellermann
6f20889f00 command/CommandListBuilder: postpone "size" initialization 2015-08-14 19:42:11 +02:00
Max Kellermann
8e408725e9 protocol/Result: move current_command to class Response 2015-08-14 19:04:00 +02:00
Max Kellermann
d053797340 protocol/Result: move command_list_num to class Response 2015-08-14 19:00:02 +02:00
Max Kellermann
86e036c393 command: pass Response object to command callbacks 2015-08-13 12:48:31 +02:00
Max Kellermann
7652a2986b client/Response: new Client wrapper class for writing responses 2015-08-12 08:41:05 +02:00
Max Kellermann
b1480167be command/Request: add parser methods
Wrapper for protocol/ArgParser.cxx.
2015-08-11 23:02:34 +02:00
Max Kellermann
e118e958f7 protocol/ArgParser: add overload with max_value parameter 2015-08-11 22:58:04 +02:00
Max Kellermann
9231f420c1 protocol/ArgParser: overload as ParseCommandArg(), pass references 2015-08-11 22:43:10 +02:00
Max Kellermann
0f92d021a1 command/Request: new struct wrapping ConstBuffer<const char *> 2015-08-11 22:43:10 +02:00
Max Kellermann
cbdc3194cc protocol/ArgParser: add struct RangeArg 2015-08-11 22:43:10 +02:00
Max Kellermann
993df0fd28 command/{Queue,Other}: eliminate local "bool" variable 2015-08-11 21:54:29 +02:00
Max Kellermann
f9e0f0d257 PlaylistSave: return bool/Error instead of PlaylistResult 2015-03-24 22:03:17 +01:00
Max Kellermann
1c90b0c19d *: change C-style prototypes, drop "(void)" 2015-03-03 20:05:08 +01:00
Max Kellermann
0febb218ed FileCommands: use Path::HasNewline() 2015-03-03 12:42:27 +01:00
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 release v0.19.4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUa674AAoJECNuiljG20USNMUQAIpl0/cJI98dljXWZ4uzaRoc
 JMPTvWkVUP9qBN3VnNISR+2NXsL7iGO6rXh9MACpfv8mcOf+/jg8LCX/3/RzDkP+
 lnhFqQ+xnl3TUjwpABKM2lU87I8QXamtCbxEvONTpcH4Dt/GVfBolrlzBu1G17cF
 7f07uZntpz/Dhtg0SWCVLS+QDGQtDNCgpXcfGlxWsGfEBWKAC+Aifv+2QDA0nXOU
 WfOU2r3vV3UNmQSu0/O6cyB5Du01SVVYSa5BNpLu3o6CHawAhVcTXdLX12JSDahk
 Qjy9VAF9bX+odZJ9M4xAlRBZYZWKfiZ6Dt0FevevqAllkd2GlQJPXWWXWXJ4PWd+
 a3K/js1hLgCIO2qk8aDKaFGTOnVk5F5eFN6d+jh5gwcuFiGa0CcSWxaCEe7vBVy3
 CTukuUBlgN4hA9gBNNvJrpbV+BO8ZY1LkS6w3E95Qz3VrwclTl5qKW2+6TYLMKBA
 VIBQM8TwOHAKyhn50vhBfk6Zz6c28LkrMc0Ycm5xFD1I3fC6E62vqDVfBUMr9HJi
 fG3PmxcrSTH8ZKgSADjF7DtR0M5munUrQhw7w0pwXUpKuDvUg3nIHulu88Dl9rZq
 MDODNRpBkQwGXs9i4SxLTSA9nQtlAh3x3mqtjOf1i2jhkuSJ8R8jQne+8wDaT0Bt
 dXD9h+qc/8+FOnrB0uYd
 =LYOC
 -----END PGP SIGNATURE-----

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
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 release v0.18.9
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTEwdzAAoJECNuiljG20USkFYP/i1PaM7O20e2EPE7ELhffk1I
 PEL6WiuCxfEHP+JbH/RPy/CdyKIqx3TTeaktXzOJmCcU+5fAgbpIwfK689ZjpE7Y
 U+7aPfGudfjYTxM/bigEo+1XAIYWJCJ2IlopN0lRIZSquUm8rfxosqsNzJFrhwsK
 40Ps36XdpYUA3z9dugyJjeKQETkjJa5Y55C1yml5RRUz+yPqyiPelm0dSlx3Ggce
 KpmNZfp8g8/stwb08iw+qk+cNKP75eJwPdFmQrsc91QxP1oW7ERWhiICA0ZtqaNe
 T0Ld5+wZ6uTJSztQiUsWrJYS1yKix5q1Za8tyFr3a9NPI+iIjsALXqU9k7zmZ6Id
 GK0Xr9Noo1o80QeGkd60nJyCQXbEU/V0p9D/QiDVei+IvK6mbxF3y2gPA7wobgrC
 KEDgsJZ+0fjmgdx+eb8ydg0uIwHrk04u0YKukUqA3bkNS/PUEICPqblcg8Spf89I
 RMdjq2HFcpkaIwGvryfHIbTNUbonAziMzmiJ0WQA1FCD3x1WELvBf09GzAsUEoFX
 Be0Co15rODOByo5ryZvSJv5BCr2RuCPwzNF+V26nMaKK7EloQWmbO0rpkRLVRk81
 qo1JmElm6SyeE3kHqVW/NyrPxLtd7VngV+z9hXr95szUjCjMv/MK169r4jumLTex
 RLyPDkhkQLDIijamhjfZ
 =nX0n
 -----END PGP SIGNATURE-----

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
Max Kellermann
b9c248e7e7 PlaylistFile: use class SongLoader 2014-02-03 23:50:19 +01:00
Max Kellermann
d533b59ee3 PlaylistFile: switch spl_append_uri() arguments
Playlist file name first, to be consistent with the other functions in
this library.
2014-02-03 23:33:25 +01:00
Max Kellermann
ca36ac2ba1 SongLoader: new class that merges duplicate code
There was quite a lot of duplicate code for loading DetachedSong
objects, with different semantics for "securely" loading local files.
2014-02-03 23:32:10 +01:00
Max Kellermann
ba675d6a55 FileCommands: use PathTraitsUTF8::IsAbsolute() 2014-02-03 23:31:28 +01:00
Max Kellermann
a8e52ad89f ClientFile: move client_allow_file() into the Client class 2014-02-02 13:59:07 +01:00
Max Kellermann
4465e2c46b db: add compile-time option to disable database 2014-01-30 20:39:40 +01:00
Max Kellermann
34b309b99a OtherCommands: merge duplicate code from handle_update(), handle_rescan() 2014-01-30 20:39:40 +01:00
Max Kellermann
c6725884bc db/update: convert to OO API
Move global variables into the new classes.  That may allow multiple
update threads for multiple databases one day.
2014-01-30 18:47:05 +01:00
Max Kellermann
a137f817f5 db/Directory: move isRootDirectory() to Uri.hxx
Decouple command/OtherCommands.cxx from the "simple" database plugin.
2014-01-29 18:05:33 +01:00
Max Kellermann
ff87145537 sticker: don't use classes Directory and Song
Don't depend on the "simple" database plugin.  This fixes an assertion
failure / crash and allows using stickers with other plugins.
2014-01-29 17:45:07 +01:00
Max Kellermann
f5a923b9d1 OutputAll: convert to class, move instance to class Partition
Another big chunk of code for multi-player support.
2014-01-28 09:20:53 +01:00
Max Kellermann
f548a966f5 Playlist{Info,Vector}: move to db/ 2014-01-27 11:05:21 +01:00
Max Kellermann
642be502c0 NeighborCommands: convert assertion to runtime check 2014-01-26 01:17:49 +01:00
Max Kellermann
5c4a42caa0 neighbor: new subsystem to detect file servers on the local network
This commit adds the NeighborPlugin API which can be used to detect
nearby file servers that can be used by input plugins.  This list of
servers is exported using the new "listneighbors" command.  The idle
even "neighbor" notifies interested clients when a new neighbor is
found or an existing one is lost.

There's a lot missing currently: protocol&user documentation, and a
way to "mount" remote servers into the music database.  Obviously,
some code from the UPnP database plugin can be moved to a neighbor
plugin.
2014-01-26 00:10:05 +01:00
Max Kellermann
68eda78704 Mixer*: move to mixer/ 2014-01-24 16:44:32 +01:00
Max Kellermann
9d34fc394c Database*: move to db/ 2014-01-24 16:38:44 +01:00
Max Kellermann
973c9872f9 Sticker*: move to sticker/ 2014-01-24 16:38:15 +01:00
Max Kellermann
e199c33c6e Client*: move to client/ 2014-01-24 00:26:53 +01:00
Max Kellermann
08296cd66d Update*: move to update/ 2014-01-24 00:24:43 +01:00
Max Kellermann
51adaf2c47 decoder/*: move to decoder/plugins/ 2014-01-24 00:02:24 +01:00
Max Kellermann
ea5b901bcc output/*: move to output/plugins/ 2014-01-23 23:49:50 +01:00
Max Kellermann
f1f19841bd playlist/*: move to playlist/plugins/ 2014-01-23 23:30:12 +01:00
Max Kellermann
a42f9e4ee3 LightDirectory: new struct replacing Directory in the DB API 2014-01-22 23:01:32 +01:00
Max Kellermann
f5ae1ce00b LightSong: new class to be used by DatabasePlugin callbacks
Detach the Song class completely from the public API, only to be used
by SimpleDatabase and the update thread.
2014-01-19 17:04:51 +01:00
Max Kellermann
9fb82f9687 DetachedSong: add method Update()
Don't create an intermediate Song instance when all we want is a
DetachedSong.
2014-01-15 12:05:44 +01:00
Max Kellermann
4f83c60296 copyright year 2014 2014-01-13 22:31:55 +01:00
Max Kellermann
8f9ba96c59 SongUpdate: move code to handle_lsinfo()
Don't create a temporary Song object in handle_lsinfo().  Instead,
print all tags while parsing the remote file.
2014-01-08 23:35:37 +01:00
Max Kellermann
6a953394f4 SongSticker: use Song references 2014-01-08 00:41:08 +01:00
Max Kellermann
809b0eb1f5 command: "lsinfo" and "readcomments" allowed for remote files 2013-12-29 18:25:32 +01:00
Max Kellermann
9be82891b0 TagFile: pass reference instead of pointer 2013-12-29 16:24:04 +01:00
Max Kellermann
777844ae0c system/SocketError, ...: use strerror() instead of g_strerror()
Avoid GLib.
2013-12-15 18:32:07 +01:00
Max Kellermann
2b717997e2 command: add commands "addtagid", "cleartagid" 2013-12-02 12:50:27 +01:00
Max Kellermann
f90abe9530 include cleanup using iwyu 2013-11-28 11:50:54 +01:00
Max Kellermann
fd2eafa7c6 ClientRead: "close" flushes the output buffer
Add a new CommandResult code called "FINISH" which, unlike "CLOSE",
will attempt to flush the output buffer.  This is a one-shot attempt;
it will do one write, and not try again.
2013-11-06 22:01:06 +01:00
Max Kellermann
8555b65c50 *: update copyright year to 2013 2013-10-30 23:37:06 +01:00
Max Kellermann
55868eecd0 PlayerCommands: show CrossFade/MixRamp only if enabled 2013-10-30 17:49:47 +01:00
Max Kellermann
b5fc21b9f4 Revert "command: new commands "findin", "searchin" with base URI"
This reverts commit a577944ab5.

Will be replaced by new options for the old commands "search" and
"find".
2013-10-29 21:13:40 +01:00
Max Kellermann
20597b3632 *: use nullptr instead of NULL 2013-10-28 23:58:17 +01:00
Max Kellermann
a577944ab5 command: new commands "findin", "searchin" with base URI 2013-10-26 16:13:35 +02:00
Max Kellermann
17ec3b0c2d FileCommands: "readcomments" understands APE and ID3v2 tags
Implements Mantis ticket 3843.
2013-10-26 16:04:29 +02:00
Max Kellermann
fb75137540 FileCommands: fix wrong control character check in IsValidValue()
Check was the wrong way around, and made all valid values invisible.
2013-10-26 16:04:06 +02:00
Max Kellermann
a40246d312 TagFile: use Path instead of const char * 2013-10-26 15:38:29 +02:00
Max Kellermann
17dc638c18 command: new command "readcomments" lists arbitrary file tags 2013-10-25 19:35:40 +02:00
Max Kellermann
961c7d0f78 OtherCommands: re-add the "volume" command
This command was removed by commit 206392ad (MPD 0.16), even though it
was been proven useful for some very simple clients.  On request, I
add it to the protocol again.
2013-10-25 00:20:36 +02:00
Max Kellermann
0e4d2e7277 Util/ASCII: add function StringEqualsCaseASCII()
Replaces GLib's g_ascii_strcasecmp().
2013-10-20 23:09:51 +02:00
Max Kellermann
5ec843dcc8 *Commands: move to src/command/ 2013-10-20 13:41:04 +02:00