Commit Graph

673 Commits

Author SHA1 Message Date
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 41a7203c28 Tag: add class const_iterator and methods begin(), end()
Enables using range-based "for".
2014-07-12 17:22:39 +02:00
Max Kellermann fa1fb47d75 Merge branch 'v0.18.x' 2014-06-23 10:13:50 +02:00
Max Kellermann 848ed14788 db/proxy: fall back to recursive walk on old libmpdclient/MPD
Error message was 'too few arguments for "find"' because the "base"
constraint was not supported, and no other constraints remained.
2014-06-23 09:18:11 +02:00
Max Kellermann 4c8a5dfb05 db/proxy: use mpd_song_get_{start,end}() only with libmpdclient >= 2.3 2014-06-23 09:17:35 +02:00
Max Kellermann b9eeb6e6eb db/proxy: use mpd_song_get_{start,end}() only with libmpdclient >= 2.3 2014-06-23 08:57:51 +02:00
Max Kellermann 936eb43c0e db/proxy: initialize LightSong::real_uri
Fixes potential crash.
2014-06-21 12:37:23 +02:00
Max Kellermann fefb35c782 Directory: eliminate attribute "have_stat"
Check for 0 in "device" and "inode" instead.
2014-06-16 19:46:35 +02:00
Max Kellermann 3ca0a39a35 db/simple: use class boost::intrusive::list
Remove the C list_head library and use type-safe C++ instead.
2014-06-16 18:39:16 +02:00
Max Kellermann bc2a1160b8 db/Count: implement grouping 2014-04-27 22:27:43 +02:00
Max Kellermann 75542e8f5d db/Count: add constructor 2014-04-27 22:27:28 +02:00
Max Kellermann fcb55f841a DatabasePrint: move PrintSongCount() to Count.cxx 2014-04-26 22:59:21 +02:00
Max Kellermann 154e601f4e db/Helpers: split library 2014-04-25 18:39:21 +02:00
Max Kellermann 4cca75b2e1 DatabasePrint: refactor variable/function names 2014-04-25 18:36:07 +02:00
Max Kellermann ecc12c9ba1 db/Helpers: move code to tag/Set.cxx 2014-04-24 18:32:23 +02:00
Max Kellermann 9e50993c13 db/Helpers: move TagSet to dedicated header 2014-04-24 18:18:26 +02:00
Max Kellermann b32ec857b1 db/Helpers: use set::emplace() 2014-04-24 18:17:07 +02:00
Max Kellermann 0de42d56fc DatabasePrint: eliminate printAllIn(), printInfoForAllIn() 2014-04-24 18:09:39 +02:00
Max Kellermann 6378ad69bb DatabasePrint: merge adjacent client_printf() calls 2014-04-24 18:07:12 +02:00
Max Kellermann 9616e9bf3b DatabasePrint: pass const SearchStats reference 2014-04-24 18:06:46 +02:00
Max Kellermann 7c8b73bffb DatabasePrint: use unsigned counts 2014-04-24 18:06:26 +02:00
Max Kellermann ae178c77bd DatabaseCommands: "list" allows grouping 2014-04-24 11:38:49 +02:00
Max Kellermann 27002ad1ea db/Helpers: "list" on album artist falls back to the artist tag 2014-04-24 10:48:52 +02:00
Max Kellermann 986dd2fac1 db/Helpers: move code to CheckUniqueTag() 2014-04-24 10:47:53 +02:00
Max Kellermann 3965b490a9 db/Helpers: use reference instead of pointer 2014-04-24 10:31:19 +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 1d1f8be260 DatabasePrint: convert "type" to unsigned 2014-04-24 08:18:41 +02:00
Max Kellermann f2f1801c25 db/proxy: check connect error before initializing SocketMonitor
Fixes crash bug because mpd_connection_get_async() was called without
a connection.
2014-03-06 13:35:42 +01:00
Max Kellermann 36ca57a54e fs/StandardDirectory: add GetUserCacheDir()
Move code from CreateConfiguredDatabase() and add XDG support.  This
implements an automatic Linux fallback for the setting "db_file" if
none was specified.
2014-03-01 22:51:51 +01:00
Max Kellermann b8f1850bba db/Configured: store database file in cache directory
Add class Context which wraps the Android/Java Context class and add a
JNI wrapper for method Context.getCacheDir().
2014-03-01 22:20:28 +01:00
Max Kellermann 7ccc609da2 db/update/ExcludeList: make no-op if GLib is disabled
Quick hack to allow using the database without GLib (for Android).
2014-03-01 08:16:13 +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 20cdab5546 DatabasePrint: move code to PrintDirectoryURI() 2014-02-28 08:21:34 +01:00
Max Kellermann 6765234b60 DatabasePrint: add API documentation 2014-02-28 08:17:25 +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 f65254680a db/update/Queue: use std::list instead of std::queue
The problem with std::queue is that it doesn't give us enough control.
The method Clear() is a kludge already, but soon, we'll need
filtering.
2014-02-27 20:49:13 +01:00
Max Kellermann d64edb6896 db/simple: GetRoot() returns reference 2014-02-27 19:29:10 +01:00
Max Kellermann 3f9ad8e104 db/update/Service: allocate UpdateWalk dynamically 2014-02-27 18:04:24 +01:00
Max Kellermann 1c772ef699 Playlist: use the Error library to return errors 2014-02-27 17:27:23 +01:00
Max Kellermann 681e012fb5 db/update: cancel the update on shutdown 2014-02-27 16:58:35 +01:00
Max Kellermann 3be36643a1 db/UpdateGlue: rename to Service.cxx 2014-02-27 16:14:10 +01:00
Max Kellermann 21e19ef69f db/simple/Directory: eliminate method LookupSong()
Move to SimpleDatabase::GetSong() to give that method more control.
2014-02-26 20:10:31 +01:00
Max Kellermann 69a42fc901 db/simple/Directory: LookupDirectory() return remaining URI
Code can now be reused in LookupSong().
2014-02-26 19:50:46 +01:00
Max Kellermann 525789cd36 db/simple/Directory: make variables more local 2014-02-26 19:50:36 +01:00
Max Kellermann 367d660c08 db/Directory: add DEVICE_* documentation 2014-02-26 10:00:38 +01:00
Max Kellermann 4d73e4d605 db/simple: create dedicated directory 2014-02-26 09:17:41 +01:00
Max Kellermann d86cc5bf42 db/Song: update API documentation for SimpleDatabasePlugin 2014-02-25 22:16:20 +01:00
Max Kellermann 5f262da09d db/simple: remove unused method LookupDirectory() 2014-02-25 20:13:40 +01:00
Max Kellermann 82985a9488 db/simple: make internal methods "private" 2014-02-25 19:48:01 +01:00
Max Kellermann afcdb65f80 db/simple: add comment 2014-02-25 18:17:54 +01:00