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
dd57b819
Commit
dd57b819
authored
Jul 17, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PlaylistFile: use struct ConfigData
parent
ffe68199
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
Main.cxx
src/Main.cxx
+1
-1
PlaylistFile.cxx
src/PlaylistFile.cxx
+6
-6
PlaylistFile.hxx
src/PlaylistFile.hxx
+2
-1
No files found.
src/Main.cxx
View file @
dd57b819
...
@@ -545,7 +545,7 @@ try {
...
@@ -545,7 +545,7 @@ try {
glue_mapper_init
();
glue_mapper_init
();
initPermissions
();
initPermissions
();
spl_global_init
();
spl_global_init
(
GetGlobalConfig
()
);
#ifdef ENABLE_ARCHIVE
#ifdef ENABLE_ARCHIVE
archive_plugin_init_all
();
archive_plugin_init_all
();
#endif
#endif
...
...
src/PlaylistFile.cxx
View file @
dd57b819
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#include "fs/io/TextFile.hxx"
#include "fs/io/TextFile.hxx"
#include "fs/io/FileOutputStream.hxx"
#include "fs/io/FileOutputStream.hxx"
#include "fs/io/BufferedOutputStream.hxx"
#include "fs/io/BufferedOutputStream.hxx"
#include "config/
Global
.hxx"
#include "config/
Data
.hxx"
#include "config/Option.hxx"
#include "config/Option.hxx"
#include "config/Defaults.hxx"
#include "config/Defaults.hxx"
#include "Idle.hxx"
#include "Idle.hxx"
...
@@ -55,15 +55,15 @@ static unsigned playlist_max_length;
...
@@ -55,15 +55,15 @@ static unsigned playlist_max_length;
bool
playlist_saveAbsolutePaths
=
DEFAULT_PLAYLIST_SAVE_ABSOLUTE_PATHS
;
bool
playlist_saveAbsolutePaths
=
DEFAULT_PLAYLIST_SAVE_ABSOLUTE_PATHS
;
void
void
spl_global_init
(
void
)
spl_global_init
(
const
ConfigData
&
config
)
{
{
playlist_max_length
=
playlist_max_length
=
config
_get_p
ositive
(
ConfigOption
::
MAX_PLAYLIST_LENGTH
,
config
.
GetP
ositive
(
ConfigOption
::
MAX_PLAYLIST_LENGTH
,
DEFAULT_PLAYLIST_MAX_LENGTH
);
DEFAULT_PLAYLIST_MAX_LENGTH
);
playlist_saveAbsolutePaths
=
playlist_saveAbsolutePaths
=
config
_get_b
ool
(
ConfigOption
::
SAVE_ABSOLUTE_PATHS
,
config
.
GetB
ool
(
ConfigOption
::
SAVE_ABSOLUTE_PATHS
,
DEFAULT_PLAYLIST_SAVE_ABSOLUTE_PATHS
);
DEFAULT_PLAYLIST_SAVE_ABSOLUTE_PATHS
);
}
}
bool
bool
...
...
src/PlaylistFile.hxx
View file @
dd57b819
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include <vector>
#include <vector>
#include <string>
#include <string>
struct
ConfigData
;
class
DetachedSong
;
class
DetachedSong
;
class
SongLoader
;
class
SongLoader
;
class
PlaylistVector
;
class
PlaylistVector
;
...
@@ -36,7 +37,7 @@ extern bool playlist_saveAbsolutePaths;
...
@@ -36,7 +37,7 @@ extern bool playlist_saveAbsolutePaths;
* Perform some global initialization, e.g. load configuration values.
* Perform some global initialization, e.g. load configuration values.
*/
*/
void
void
spl_global_init
();
spl_global_init
(
const
ConfigData
&
config
);
/**
/**
* Determines whether the specified string is a valid name for a
* Determines whether the specified string is a valid name for a
...
...
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