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
89015145
Commit
89015145
authored
Jan 18, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Playlist, Song: clarify parameter encoding
parent
21fe376d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
15 deletions
+15
-15
OtherCommands.cxx
src/OtherCommands.cxx
+3
-3
Partition.hxx
src/Partition.hxx
+2
-2
Playlist.hxx
src/Playlist.hxx
+1
-1
PlaylistEdit.cxx
src/PlaylistEdit.cxx
+2
-2
SongUpdate.cxx
src/SongUpdate.cxx
+5
-5
song.h
src/song.h
+2
-2
No files found.
src/OtherCommands.cxx
View file @
89015145
...
...
@@ -116,13 +116,13 @@ handle_lsinfo(Client *client, int argc, char *argv[])
if
(
strncmp
(
uri
,
"file:///"
,
8
)
==
0
)
{
/* print information about an arbitrary local file */
const
char
*
path
=
uri
+
7
;
const
char
*
path
_utf8
=
uri
+
7
;
GError
*
error
=
NULL
;
if
(
!
client_allow_file
(
client
,
path
,
&
error
))
if
(
!
client_allow_file
(
client
,
path
_utf8
,
&
error
))
return
print_error
(
client
,
error
);
struct
song
*
song
=
song_file_load
(
path
,
NULL
);
struct
song
*
song
=
song_file_load
(
path
_utf8
,
NULL
);
if
(
song
==
NULL
)
{
command_error
(
client
,
ACK_ERROR_NO_EXIST
,
"No such file"
);
...
...
src/Partition.hxx
View file @
89015145
...
...
@@ -43,9 +43,9 @@ struct Partition {
playlist
.
Clear
(
pc
);
}
enum
playlist_result
AppendFile
(
const
char
*
path_
fs
,
enum
playlist_result
AppendFile
(
const
char
*
path_
utf8
,
unsigned
*
added_id
=
nullptr
)
{
return
playlist
.
AppendFile
(
pc
,
path_
fs
,
added_id
);
return
playlist
.
AppendFile
(
pc
,
path_
utf8
,
added_id
);
}
enum
playlist_result
AppendURI
(
const
char
*
uri_utf8
,
...
...
src/Playlist.hxx
View file @
89015145
...
...
@@ -144,7 +144,7 @@ public:
* Note: the caller is responsible for checking permissions.
*/
enum
playlist_result
AppendFile
(
player_control
&
pc
,
const
char
*
path_
fs
,
const
char
*
path_
utf8
,
unsigned
*
added_id
=
nullptr
);
enum
playlist_result
AppendURI
(
player_control
&
pc
,
...
...
src/PlaylistEdit.cxx
View file @
89015145
...
...
@@ -59,9 +59,9 @@ playlist::Clear(player_control &pc)
enum
playlist_result
playlist
::
AppendFile
(
struct
player_control
&
pc
,
const
char
*
path_
fs
,
unsigned
*
added_id
)
const
char
*
path_
utf8
,
unsigned
*
added_id
)
{
struct
song
*
song
=
song_file_load
(
path_
fs
,
NULL
);
struct
song
*
song
=
song_file_load
(
path_
utf8
,
NULL
);
if
(
song
==
NULL
)
return
PLAYLIST_RESULT_NO_SUCH_SONG
;
...
...
src/SongUpdate.cxx
View file @
89015145
...
...
@@ -45,16 +45,16 @@ extern "C" {
#include <stdio.h>
struct
song
*
song_file_load
(
const
char
*
path
,
Directory
*
parent
)
song_file_load
(
const
char
*
path
_utf8
,
Directory
*
parent
)
{
struct
song
*
song
;
bool
ret
;
assert
((
parent
==
NULL
)
==
g_path_is_absolute
(
path
));
assert
(
!
uri_has_scheme
(
path
));
assert
(
strchr
(
path
,
'\n'
)
==
NULL
);
assert
((
parent
==
NULL
)
==
g_path_is_absolute
(
path
_utf8
));
assert
(
!
uri_has_scheme
(
path
_utf8
));
assert
(
strchr
(
path
_utf8
,
'\n'
)
==
NULL
);
song
=
song_file_new
(
path
,
parent
);
song
=
song_file_new
(
path
_utf8
,
parent
);
//in archive ?
if
(
parent
!=
NULL
&&
parent
->
device
==
DEVICE_INARCHIVE
)
{
...
...
src/song.h
View file @
89015145
...
...
@@ -76,7 +76,7 @@ song_remote_new(const char *uri);
/** allocate a new song with a local file name */
struct
song
*
song_file_new
(
const
char
*
path
,
struct
Directory
*
parent
);
song_file_new
(
const
char
*
path
_utf8
,
struct
Directory
*
parent
);
/**
* allocate a new song structure with a local file name and attempt to
...
...
@@ -84,7 +84,7 @@ song_file_new(const char *path, struct Directory *parent);
* data, NULL is returned.
*/
struct
song
*
song_file_load
(
const
char
*
path
,
struct
Directory
*
parent
);
song_file_load
(
const
char
*
path
_utf8
,
struct
Directory
*
parent
);
/**
* Replaces the URI of a song object. The given song object is
...
...
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