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
3bdee552
Commit
3bdee552
authored
Mar 05, 2005
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added composer, performer, and comment metadata items
git-svn-id:
https://svn.musicpd.org/mpd/trunk@3022
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
4b016caf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
9 deletions
+41
-9
mpdconf.example
doc/mpdconf.example
+6
-7
flac_plugin.c
src/inputPlugins/flac_plugin.c
+10
-0
ogg_plugin.c
src/inputPlugins/ogg_plugin.c
+8
-0
tag.c
src/tag.c
+13
-1
tag.h
src/tag.h
+4
-1
No files found.
doc/mpdconf.example
View file @
3bdee552
...
...
@@ -25,16 +25,14 @@ audio_output {
name "default ao output"
#
# use this if you want to use OSS audio output
# type "
ao
"
# type "
oss
"
# name "my OSS sound card"
# driver "oss"
# options "dsp=/dev/dsp"
# device "/dev/dsp" # optional
#
# use this if you want to use ALSA audio output
# type "a
o
"
# type "a
lsa
"
# name "my ALSA device"
# driver "alsa09"
# options "dev=hw:0,0"
# device "hw:0,0" # optional
} # end of audio_output "ao"
#
# Set this if you have problems
...
...
@@ -200,8 +198,9 @@ audio_output {
################ MISCELLANEOUS OPTIONS ###################
#
# This sets the metadata mpd will use, to disable all metadata, set to "none"
# NOTE: comment's are disabled by default
#
#metadata_to_use
"artist,album,title,genre,date,track
"
#metadata_to_use
"artist,album,title,genre,date,track,composer,performer,comment
"
#
# This setting exists as precaution against attacks.
#
...
...
src/inputPlugins/flac_plugin.c
View file @
3bdee552
...
...
@@ -499,6 +499,16 @@ static MpdTag * copyVorbisCommentBlockToMpdTag(FLAC__StreamMetadata * block,
block
->
data
.
vorbis_comment
.
comments
+
i
,
TAG_ITEM_DATE
,
&
tag
));
else
if
(
commentMatchesAddToTag
(
"composer="
,
block
->
data
.
vorbis_comment
.
comments
+
i
,
TAG_ITEM_COMPOSER
,
&
tag
));
else
if
(
commentMatchesAddToTag
(
"performer="
,
block
->
data
.
vorbis_comment
.
comments
+
i
,
TAG_ITEM_PERFORMER
,
&
tag
));
}
return
tag
;
...
...
src/inputPlugins/ogg_plugin.c
View file @
3bdee552
...
...
@@ -164,6 +164,14 @@ MpdTag * oggCommentsParse(char ** comments) {
if
(
!
ret
)
ret
=
newMpdTag
();
addItemToMpdTag
(
ret
,
TAG_ITEM_DATE
,
temp
);
}
else
if
((
temp
=
ogg_parseComment
(
*
comments
,
"composer"
)))
{
if
(
!
ret
)
ret
=
newMpdTag
();
addItemToMpdTag
(
ret
,
TAG_ITEM_COMPOSER
,
temp
);
}
else
if
((
temp
=
ogg_parseComment
(
*
comments
,
"performer"
)))
{
if
(
!
ret
)
ret
=
newMpdTag
();
addItemToMpdTag
(
ret
,
TAG_ITEM_PERFORMER
,
temp
);
}
comments
++
;
}
...
...
src/tag.c
View file @
3bdee552
...
...
@@ -42,6 +42,12 @@
#include <FLAC/metadata.h>
#endif
#ifdef HAVE_ID3TAG
#ifndef ID3_FRAME_COMPOSER
#define ID3_FRAME_COMPOSER "TCOM"
#endif
#endif
char
*
mpdTagItemKeys
[
TAG_NUM_OF_ITEM_TYPES
]
=
{
"Artist"
,
...
...
@@ -50,7 +56,10 @@ char * mpdTagItemKeys[TAG_NUM_OF_ITEM_TYPES] =
"Track"
,
"Name"
,
"Genre"
,
"Date"
"Date"
,
"Composer"
,
"Performer"
,
"Comment"
};
static
mpd_sint8
ignoreTagItems
[
TAG_NUM_OF_ITEM_TYPES
];
...
...
@@ -70,6 +79,7 @@ void initTagConfig() {
/* parse the "metadata_to_use" config parameter below */
memset
(
ignoreTagItems
,
0
,
TAG_NUM_OF_ITEM_TYPES
);
ignoreTagItems
[
TAG_ITEM_COMMENT
]
=
1
;
/* ignore comments by default */
param
=
getConfigParam
(
CONF_METADATA_TO_USE
);
...
...
@@ -174,6 +184,8 @@ MpdTag * parseId3Tag(struct id3_tag * tag) {
ret
=
getID3Info
(
tag
,
ID3_FRAME_TRACK
,
TAG_ITEM_TRACK
,
ret
);
ret
=
getID3Info
(
tag
,
ID3_FRAME_YEAR
,
TAG_ITEM_DATE
,
ret
);
ret
=
getID3Info
(
tag
,
ID3_FRAME_GENRE
,
TAG_ITEM_GENRE
,
ret
);
ret
=
getID3Info
(
tag
,
ID3_FRAME_COMPOSER
,
TAG_ITEM_COMPOSER
,
ret
);
ret
=
getID3Info
(
tag
,
ID3_FRAME_COMMENT
,
TAG_ITEM_COMMENT
,
ret
);
return
ret
;
}
...
...
src/tag.h
View file @
3bdee552
...
...
@@ -41,8 +41,11 @@
#define TAG_ITEM_NAME 4
#define TAG_ITEM_GENRE 5
#define TAG_ITEM_DATE 6
#define TAG_ITEM_COMPOSER 7
#define TAG_ITEM_PERFORMER 8
#define TAG_ITEM_COMMENT 9
#define TAG_NUM_OF_ITEM_TYPES
7
#define TAG_NUM_OF_ITEM_TYPES
10
extern
char
*
mpdTagItemKeys
[];
...
...
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