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
f9472746
Commit
f9472746
authored
Feb 07, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InotifyUpdate: use class Storage instead of Mapper.cxx
parent
f6939f71
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
Main.cxx
src/Main.cxx
+4
-1
InotifyUpdate.cxx
src/db/update/InotifyUpdate.cxx
+4
-3
InotifyUpdate.hxx
src/db/update/InotifyUpdate.hxx
+3
-1
No files found.
src/Main.cxx
View file @
f9472746
...
...
@@ -528,8 +528,11 @@ int mpd_main(int argc, char *argv[])
if
(
config_get_bool
(
CONF_AUTO_UPDATE
,
false
))
{
#ifdef ENABLE_INOTIFY
if
(
mapper_has_music_directory
()
&&
instance
->
storage
!=
nullptr
&&
instance
->
update
!=
nullptr
)
mpd_inotify_init
(
*
instance
->
event_loop
,
*
instance
->
update
,
mpd_inotify_init
(
*
instance
->
event_loop
,
*
instance
->
storage
,
*
instance
->
update
,
config_get_unsigned
(
CONF_AUTO_UPDATE_DEPTH
,
G_MAXUINT
));
#else
...
...
src/db/update/InotifyUpdate.cxx
View file @
f9472746
...
...
@@ -22,7 +22,7 @@
#include "InotifySource.hxx"
#include "InotifyQueue.hxx"
#include "InotifyDomain.hxx"
#include "
Mapper
.hxx"
#include "
storage/StorageInterface
.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/FileSystem.hxx"
#include "util/Error.hxx"
...
...
@@ -290,11 +290,12 @@ mpd_inotify_callback(int wd, unsigned mask,
}
void
mpd_inotify_init
(
EventLoop
&
loop
,
UpdateService
&
update
,
unsigned
max_depth
)
mpd_inotify_init
(
EventLoop
&
loop
,
Storage
&
storage
,
UpdateService
&
update
,
unsigned
max_depth
)
{
LogDebug
(
inotify_domain
,
"initializing inotify"
);
const
auto
&
path
=
mapper_get_music_directory_fs
(
);
const
auto
path
=
storage
.
MapFS
(
""
);
if
(
path
.
IsNull
())
{
LogDebug
(
inotify_domain
,
"no music directory configured"
);
return
;
...
...
src/db/update/InotifyUpdate.hxx
View file @
f9472746
...
...
@@ -24,10 +24,12 @@
#include "Compiler.h"
class
EventLoop
;
class
Storage
;
class
UpdateService
;
void
mpd_inotify_init
(
EventLoop
&
loop
,
UpdateService
&
update
,
unsigned
max_depth
);
mpd_inotify_init
(
EventLoop
&
loop
,
Storage
&
storage
,
UpdateService
&
update
,
unsigned
max_depth
);
void
mpd_inotify_finish
(
void
);
...
...
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