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
3341b282
Commit
3341b282
authored
Feb 07, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PlaylistSave: use DetachedSong::GetRealURI() in playlist_print_song()
The DetachedSong instance already knows its own absolute path, and there is no need to ask the mapper again.
parent
bb3b836d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
PlaylistSave.cxx
src/PlaylistSave.cxx
+7
-12
No files found.
src/PlaylistSave.cxx
View file @
3341b282
...
...
@@ -39,18 +39,13 @@
void
playlist_print_song
(
FILE
*
file
,
const
DetachedSong
&
song
)
{
if
(
playlist_saveAbsolutePaths
&&
song
.
IsInDatabase
()
&&
song
.
IsFile
())
{
const
auto
path
=
map_song_fs
(
song
);
if
(
!
path
.
IsNull
())
fprintf
(
file
,
"%s
\n
"
,
path
.
c_str
());
}
else
{
const
auto
uri_utf8
=
song
.
GetURI
();
const
auto
uri_fs
=
AllocatedPath
::
FromUTF8
(
uri_utf8
);
if
(
!
uri_fs
.
IsNull
())
fprintf
(
file
,
"%s
\n
"
,
uri_fs
.
c_str
());
}
const
char
*
uri_utf8
=
playlist_saveAbsolutePaths
?
song
.
GetRealURI
()
:
song
.
GetURI
();
const
auto
uri_fs
=
AllocatedPath
::
FromUTF8
(
uri_utf8
);
if
(
!
uri_fs
.
IsNull
())
fprintf
(
file
,
"%s
\n
"
,
uri_fs
.
c_str
());
}
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