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
e9c45a91
Commit
e9c45a91
authored
Feb 05, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist/Registry: add RAII class
parent
a065c6e6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
Main.cxx
src/Main.cxx
+1
-3
PlaylistRegistry.hxx
src/playlist/PlaylistRegistry.hxx
+11
-0
dump_playlist.cxx
test/dump_playlist.cxx
+1
-3
No files found.
src/Main.cxx
View file @
e9c45a91
...
...
@@ -550,7 +550,7 @@ mpd_main_after_fork(const ConfigData &raw_config, const Config &config)
client_manager_init
(
raw_config
);
const
ScopeInputPluginsInit
input_plugins_init
(
raw_config
,
instance
->
io_thread
.
GetEventLoop
());
playlist_list_global
_init
(
raw_config
);
const
ScopePlaylistPluginsInit
playlist_plugins
_init
(
raw_config
);
#ifdef ENABLE_DAEMON
daemonize_commit
();
...
...
@@ -654,8 +654,6 @@ mpd_main_after_fork(const ConfigData &raw_config, const Config &config)
sticker_global_finish
();
#endif
playlist_list_global_finish
();
return
EXIT_SUCCESS
;
}
...
...
src/playlist/PlaylistRegistry.hxx
View file @
e9c45a91
...
...
@@ -47,6 +47,17 @@ playlist_list_global_init(const ConfigData &config);
void
playlist_list_global_finish
()
noexcept
;
class
ScopePlaylistPluginsInit
{
public
:
explicit
ScopePlaylistPluginsInit
(
const
ConfigData
&
config
)
{
playlist_list_global_init
(
config
);
}
~
ScopePlaylistPluginsInit
()
noexcept
{
playlist_list_global_finish
();
}
};
/**
* Opens a playlist by its URI.
*/
...
...
test/dump_playlist.cxx
View file @
e9c45a91
...
...
@@ -65,7 +65,7 @@ try {
io_thread
.
Start
();
const
ScopeInputPluginsInit
input_plugins_init
(
config
,
io_thread
.
GetEventLoop
());
playlist_list_global
_init
(
config
);
const
ScopePlaylistPluginsInit
playlist_plugins
_init
(
config
);
const
ScopeDecoderPluginsInit
decoder_plugins_init
(
config
);
/* open the playlist */
...
...
@@ -116,8 +116,6 @@ try {
playlist
.
reset
();
is
.
reset
();
playlist_list_global_finish
();
return
EXIT_SUCCESS
;
}
catch
(...)
{
PrintException
(
std
::
current_exception
());
...
...
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