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
686d8bbe
Commit
686d8bbe
authored
Feb 12, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tag_handler: add new handler that updates has_playlist
parent
4b36af4a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
tag_handler.c
src/tag_handler.c
+17
-0
tag_handler.h
src/tag_handler.h
+7
-0
No files found.
src/tag_handler.c
View file @
686d8bbe
...
...
@@ -20,6 +20,8 @@
#include "config.h"
#include "tag_handler.h"
#include <glib.h>
static
void
add_tag_duration
(
unsigned
seconds
,
void
*
ctx
)
{
...
...
@@ -41,3 +43,18 @@ const struct tag_handler add_tag_handler = {
.
tag
=
add_tag_tag
,
};
static
void
full_tag_pair
(
const
char
*
name
,
G_GNUC_UNUSED
const
char
*
value
,
void
*
ctx
)
{
struct
tag
*
tag
=
ctx
;
if
(
g_ascii_strcasecmp
(
name
,
"cuesheet"
)
==
0
)
tag
->
has_playlist
=
true
;
}
const
struct
tag_handler
full_tag_handler
=
{
.
duration
=
add_tag_duration
,
.
tag
=
add_tag_tag
,
.
pair
=
full_tag_pair
,
};
src/tag_handler.h
View file @
686d8bbe
...
...
@@ -91,4 +91,11 @@ tag_handler_invoke_pair(const struct tag_handler *handler, void *ctx,
*/
extern
const
struct
tag_handler
add_tag_handler
;
/**
* This #tag_handler implementation adds tag values to a #tag object
* (casted from the context pointer), and supports the has_playlist
* attribute.
*/
extern
const
struct
tag_handler
full_tag_handler
;
#endif
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