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
8e0d39ae
Commit
8e0d39ae
authored
Aug 05, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/update/Playlist: prepend "../" only for relative URIs
Prepending "../" to absolute URIs would break them.
parent
1761fb14
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
NEWS
NEWS
+1
-0
Playlist.cxx
src/db/update/Playlist.cxx
+9
-1
No files found.
NEWS
View file @
8e0d39ae
...
...
@@ -3,6 +3,7 @@ ver 0.22.10 (not yet released)
- support "albumart" for virtual tracks in CUE sheets
* database
- simple: fix crash bug
- simple: fix absolute paths in CUE "as_directory" entries
* input
- curl: fix crash bug after stream with Icy metadata was closed by peer
- tidal: remove defunct unmaintained plugin
...
...
src/db/update/Playlist.cxx
View file @
8e0d39ae
...
...
@@ -30,6 +30,7 @@
#include "playlist/SongEnumerator.hxx"
#include "storage/FileInfo.hxx"
#include "storage/StorageInterface.hxx"
#include "fs/Traits.hxx"
#include "util/StringFormat.hxx"
#include "Log.hxx"
...
...
@@ -70,7 +71,14 @@ UpdateWalk::UpdatePlaylistFile(Directory &parent, std::string_view name,
auto
db_song
=
std
::
make_unique
<
Song
>
(
std
::
move
(
*
song
),
*
directory
);
db_song
->
target
=
"../"
+
db_song
->
filename
;
db_song
->
target
=
PathTraitsUTF8
::
IsAbsoluteOrHasScheme
(
db_song
->
filename
.
c_str
())
?
db_song
->
filename
/* prepend "../" to relative paths to
go from the virtual directory
(DEVICE_PLAYLIST) to the containing
directory */
:
"../"
+
db_song
->
filename
;
db_song
->
filename
=
StringFormat
<
64
>
(
"track%04u"
,
++
track
);
...
...
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