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
f8eece22
Commit
f8eece22
authored
Feb 12, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist/embcue: ignore "FILE", always point to container song file
An embedded CUE sheet must always point to the song file it is contained in.
parent
df563db2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
embcue_playlist_plugin.c
src/playlist/embcue_playlist_plugin.c
+15
-2
No files found.
src/playlist/embcue_playlist_plugin.c
View file @
f8eece22
...
...
@@ -45,6 +45,13 @@ struct embcue_playlist {
struct
playlist_provider
base
;
/**
* This is an override for the CUE's "FILE". An embedded CUE
* sheet must always point to the song file it is contained
* in.
*/
char
*
filename
;
/**
* The value of the file's "CUESHEET" tag.
*/
char
*
cuesheet
;
...
...
@@ -97,6 +104,8 @@ embcue_playlist_open_uri(const char *uri,
return
NULL
;
}
playlist
->
filename
=
g_path_get_basename
(
uri
);
playlist
->
next
=
playlist
->
cuesheet
;
playlist
->
parser
=
cue_parser_new
();
...
...
@@ -110,6 +119,7 @@ embcue_playlist_close(struct playlist_provider *_playlist)
cue_parser_free
(
playlist
->
parser
);
g_free
(
playlist
->
cuesheet
);
g_free
(
playlist
->
filename
);
g_free
(
playlist
);
}
...
...
@@ -137,11 +147,14 @@ embcue_playlist_read(struct playlist_provider *_playlist)
cue_parser_feed
(
playlist
->
parser
,
line
);
song
=
cue_parser_get
(
playlist
->
parser
);
if
(
song
!=
NULL
)
return
song
;
return
song
_replace_uri
(
song
,
playlist
->
filename
)
;
}
cue_parser_finish
(
playlist
->
parser
);
return
cue_parser_get
(
playlist
->
parser
);
song
=
cue_parser_get
(
playlist
->
parser
);
if
(
song
!=
NULL
)
song
=
song_replace_uri
(
song
,
playlist
->
filename
);
return
song
;
}
static
const
char
*
const
embcue_playlist_suffixes
[]
=
{
...
...
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