Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
3fdc678a
Commit
3fdc678a
authored
Feb 08, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Main: support arbitrary storage plugins
parent
a0088ccc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
NEWS
NEWS
+3
-0
Main.cxx
src/Main.cxx
+12
-0
No files found.
NEWS
View file @
3fdc678a
...
...
@@ -8,6 +8,9 @@ ver 0.19 (not yet released)
- proxy: forward "idle" events
- proxy: copy "Last-Modified" from remote directories
- upnp: new plugin
* storage
- music_directory can point to a remote file server
- smbclient: new plugin
* playlist
- soundcloud: use https instead of http
- soundcloud: add default API key
...
...
src/Main.cxx
View file @
3fdc678a
...
...
@@ -55,6 +55,7 @@
#include "unix/SignalHandlers.hxx"
#include "unix/Daemon.hxx"
#include "system/FatalError.hxx"
#include "util/UriUtil.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "thread/Id.hxx"
...
...
@@ -63,6 +64,7 @@
#include "config/ConfigData.hxx"
#include "config/ConfigDefaults.hxx"
#include "config/ConfigOption.hxx"
#include "config/ConfigError.hxx"
#include "Stats.hxx"
#ifdef ENABLE_DATABASE
...
...
@@ -71,6 +73,7 @@
#include "db/DatabaseSimple.hxx"
#include "db/plugins/SimpleDatabasePlugin.hxx"
#include "storage/plugins/LocalStorage.hxx"
#include "storage/Registry.hxx"
#endif
#ifdef ENABLE_NEIGHBOR_PLUGINS
...
...
@@ -148,6 +151,15 @@ glue_mapper_init(Error &error)
static
bool
InitStorage
(
Error
&
error
)
{
auto
uri
=
config_get_string
(
CONF_MUSIC_DIR
,
nullptr
);
if
(
uri
!=
nullptr
&&
uri_has_scheme
(
uri
))
{
instance
->
storage
=
CreateStorageURI
(
uri
,
error
);
if
(
instance
->
storage
==
nullptr
&&
!
error
.
IsDefined
())
error
.
Format
(
config_domain
,
"Unrecognized storage URI: %s"
,
uri
);
return
instance
->
storage
!=
nullptr
;
}
auto
path_fs
=
config_get_path
(
CONF_MUSIC_DIR
,
error
);
if
(
path_fs
.
IsNull
()
&&
error
.
IsDefined
())
return
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment