Max Kellermann
29b18d9ab7
SongUpdate: use the Storage interface, support remote files
...
This commit finally allows the database update to scan remote files,
e.g. using the smbclient storage plugin. However, it is not yet
possible to configure that, therefore the feature is not accessible
yet.
2014-02-06 19:06:08 +01:00
Max Kellermann
f6682aae77
db/update: include StorageInterface.hxx instead of LocalStorage.hxx
2014-02-05 19:26:18 +01:00
Max Kellermann
0ba1b73395
storage: add abstract interface
...
Prepare for the plugin interface.
2014-02-05 18:53:51 +01:00
Max Kellermann
4c995eb498
db/UpdateWalk: move LocalStorage to Instance
...
Keep only a reference.
2014-02-05 17:58:13 +01:00
Max Kellermann
144cfe70bf
db/update/Remove: initialize attribute "removed_song"
...
Fixes bogus assertion failure.
2014-02-05 17:58:13 +01:00
Max Kellermann
9ae7f186bc
LocalStorage: new API abstracting filesystem walk
...
Prepare to make this a new plugin API, for example to use a SMB share
for the music_directory.
2014-02-05 10:04:03 +01:00
Max Kellermann
f8d114be42
db/UpdateIO: add "pure" attributes
2014-02-05 10:04:03 +01:00
Max Kellermann
2c70251df1
db/UpdateGlue: relax assertion
...
Fixes assertion failure when update gets launched during MPD startup.
2014-02-05 10:04:03 +01:00
Max Kellermann
ff665b37cb
db/DatabaseListener: add method OnDatabaseSongRemoved()
...
Decouples db/update/Remove.cpp from global variables.
2014-02-04 19:53:37 +01:00
Max Kellermann
ce73843014
db/proxy: include cleanup
2014-02-04 19:53:12 +01:00
Max Kellermann
eec6d09959
db/update/Service: use DatabaseListener instead of Instance
...
Don't use the global variable "instance".
2014-02-04 18:54:54 +01:00
Max Kellermann
c5fa8ed321
db/update/Service: use EventLoop::IsInside()
...
Don't use the global variable "main_thread".
2014-02-04 18:54:45 +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
c953904343
db/update/Service: initialize "progress" and "update_task_id"
...
Database update was randomly broken due to these uninitialized
variables.
2014-02-04 11:22:13 +01:00
Max Kellermann
d76b6f878e
db/update/Service: add SimpleDatabase reference
...
Don't use the global variables from the DatabaseSimple library.
2014-02-04 09:05:32 +01:00
Max Kellermann
f25ef8d682
db/update/Walk: add Directory reference parameter
...
Remove dependency on the DatabaseSimple library.
2014-02-04 09:05:32 +01:00
Max Kellermann
33a2c01ea2
db/Simple: remove unused function db_get_directory()
2014-02-04 09:03:17 +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
db69ceade6
db/LightSong: make "real_uri" a pointer
...
Reduce overhead. LightSong can always point to the "real" allocated
string.
2014-02-04 00:38:52 +01:00
Max Kellermann
78689645dc
db/update/Archive: delete archive from database on error
2014-01-31 22:24:28 +01:00
Max Kellermann
26970579b8
db/update/Editor: add locking method variants
2014-01-31 22:17:49 +01:00
Max Kellermann
04b4f53488
db/update: convert runtime check to assertion
2014-01-31 21:59:35 +01:00
Max Kellermann
a631200cca
update/Walk: declare std::string at assignment
...
Reduce overhead.
2014-01-30 22:19:56 +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
d5b017407d
ExcludeList: move to db/update/
2014-01-30 10:11:12 +01:00
Max Kellermann
4b044bd8e1
InotifyUpdate: pass EventLoop to mpd_inotify_init()
2014-01-29 18:36:32 +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
f548a966f5
Playlist{Info,Vector}: move to db/
2014-01-27 11:05:21 +01:00
Max Kellermann
3dad837ca6
db/upnp: remove sleep(2) call
...
This call was unnecessary. It is a bad idea anyway to block the MPD
process for some arbitrary amount of time.
2014-01-26 15:50:30 +01:00
Max Kellermann
d7e78059b0
upnp: initialize the client handle only once
...
Eliminate class LibUPnP and move the code to ClientInit.cxx. Its
initialization function can be called multiple times, but
UpnpRegisterClient() is called at most once.
2014-01-26 15:43:23 +01:00
Max Kellermann
e57e89b9d5
upnp/discovery: use a plain UpnpClient_Handle instead of class LibUPnP
2014-01-26 15:22:33 +01:00
Max Kellermann
f86f5ad224
db/upnp: move generic code to lib/upnp/
2014-01-26 13:41:40 +01:00
Max Kellermann
4a3dc2cea2
db/upnp: rename variables
2014-01-26 13:08:52 +01:00
Max Kellermann
97391fd4b9
DespotifyUtils, Expat: move to lib/
2014-01-24 16:44:36 +01:00
Max Kellermann
9d34fc394c
Database*: move to db/
2014-01-24 16:38:44 +01:00
Max Kellermann
197b503f3e
Config*: move to config/
2014-01-24 00:20:01 +01:00
Max Kellermann
b8e382b011
db/upnp/Discovery: use std::list instead of std::map
...
There will only be very few items, and that does not justify the bloat
of std::map.
2014-01-23 22:35:22 +01:00
Max Kellermann
c9af358e4b
db/upnp/Discovery: move code to LockAdd(), LockRemove()
2014-01-23 22:35:22 +01:00
Max Kellermann
3afcfe3330
db/upnp/Discovery: un-inline the destructor
2014-01-23 22:35:22 +01:00
Max Kellermann
f3f5e2e162
db/upnp: un-inline a few destructors
...
Reduce bloat.
2014-01-23 21:17:40 +01:00
Max Kellermann
b52d8fbebe
db/upnp: strict vpath checks for the "root" directory
2014-01-23 00:40:39 +01:00
Max Kellermann
b61a2c722c
db/upnp: move code to VisitObject()
2014-01-23 00:28:27 +01:00
Max Kellermann
c455d2c1de
db/upnp: merge two PathTraitsUTF8::Build() calls
2014-01-23 00:25:08 +01:00
Max Kellermann
77070f5ab9
db/upnp: move code to VisitItem()
2014-01-23 00:17:38 +01:00
Max Kellermann
8d5f7160ac
db/upnp: fix subdirectory paths in "listallinfo"
...
Add missing server name prefix.
2014-01-23 00:07:35 +01:00
Max Kellermann
b167ce2913
base_uri
2014-01-23 00:06:17 +01:00
Max Kellermann
3ac15ca8d1
db/upnp: pass char* to visitSong()
...
Don't use std::string, reduce bloat.
2014-01-23 00:06:03 +01:00
Max Kellermann
f703d4fc3e
db/upnp: call VisitDirectory on servers, even in recursive mode
2014-01-22 23:52:08 +01:00
Max Kellermann
77c461fed7
db/upnp: make several methods "const"
2014-01-22 23:50:33 +01:00
Max Kellermann
a89c21b06a
db/upnp: inline Configure()
2014-01-22 23:30:53 +01:00