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
d5cfa6d4
Commit
d5cfa6d4
authored
Jun 26, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TagId3: remove the "id3v1_encoding" setting
Drop support for misencoded tags. People should not be using ID3v1 anyway.
parent
f415167e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
58 deletions
+13
-58
NEWS
NEWS
+2
-0
mpd.conf.5
doc/mpd.conf.5
+0
-6
mpdconf.example
doc/mpdconf.example
+0
-4
ConfigTemplates.cxx
src/config/ConfigTemplates.cxx
+1
-1
TagId3.cxx
src/tag/TagId3.cxx
+10
-47
No files found.
NEWS
View file @
d5cfa6d4
...
...
@@ -9,6 +9,8 @@ ver 0.20 (not yet released)
- ape, ogg: drop support for non-standard tag "album artist"
affected filetypes: vorbis, flac, opus & all files with ape2 tags
(most importantly some mp3s)
- id3: remove the "id3v1_encoding" setting; by definition, all ID3v1 tags
are ISO-Latin-1
* decoder
- ffmpeg: support ReplayGain and MixRamp
- ffmpeg: support stream tags
...
...
doc/mpd.conf.5
View file @
d5cfa6d4
...
...
@@ -156,12 +156,6 @@ This specifies the character set used for the filesystem. A list of supported
character sets can be obtained by running "iconv \-l". The default is
determined from the locale when the db was originally created.
.TP
.B id3v1_encoding <charset>
This specifies the character set which ID3v1 tags are encoded in. A list of
supported character sets can be obtained by running "iconv \-l". The default is
to let libid3tag convert them (from ISO-8859-1, as the standard specifies) and
do no additional conversion.
.TP
.B gapless_mp3_playback <yes or no>
This specifies whether to support gapless playback of MP3s which have the
necessary headers. Useful if your MP3s have headers with incorrect
...
...
doc/mpdconf.example
View file @
d5cfa6d4
...
...
@@ -373,8 +373,4 @@ input {
#
#filesystem_charset "UTF-8"
#
# This setting controls the encoding that ID3v1 tags should be converted from.
#
#id3v1_encoding "ISO-8859-1"
#
###############################################################################
src/config/ConfigTemplates.cxx
View file @
d5cfa6d4
...
...
@@ -64,7 +64,7 @@ const ConfigTemplate config_param_templates[] = {
{
"max_command_list_size"
},
{
"max_output_buffer_size"
},
{
"filesystem_charset"
},
{
"id3v1_encoding"
},
{
"id3v1_encoding"
,
false
,
true
},
{
"metadata_to_use"
},
{
"save_absolute_paths_in_playlists"
},
{
"gapless_mp3_playback"
},
...
...
src/tag/TagId3.cxx
View file @
d5cfa6d4
...
...
@@ -33,10 +33,6 @@
#include "fs/Path.hxx"
#include "fs/FileSystem.hxx"
#ifdef HAVE_GLIB
#include <glib.h>
#endif
#include <id3tag.h>
#include <string>
...
...
@@ -91,43 +87,11 @@ tag_id3_getstring(const struct id3_frame *frame, unsigned i)
/* This will try to convert a string to utf-8,
*/
static
id3_utf8_t
*
import_id3_string
(
bool
is_id3v1
,
const
id3_ucs4_t
*
ucs4
)
import_id3_string
(
const
id3_ucs4_t
*
ucs4
)
{
id3_utf8_t
*
utf8
;
#ifdef HAVE_GLIB
/* use encoding field here? */
const
char
*
encoding
;
if
(
is_id3v1
&&
(
encoding
=
config_get_string
(
ConfigOption
::
ID3V1_ENCODING
,
nullptr
))
!=
nullptr
)
{
id3_latin1_t
*
isostr
=
id3_ucs4_latin1duplicate
(
ucs4
);
if
(
gcc_unlikely
(
isostr
==
nullptr
))
return
nullptr
;
utf8
=
(
id3_utf8_t
*
)
g_convert_with_fallback
((
const
char
*
)
isostr
,
-
1
,
"utf-8"
,
encoding
,
nullptr
,
nullptr
,
nullptr
,
nullptr
);
if
(
utf8
==
nullptr
)
{
FormatWarning
(
id3_domain
,
"Unable to convert %s string to UTF-8: '%s'"
,
encoding
,
isostr
);
free
(
isostr
);
return
nullptr
;
}
free
(
isostr
);
}
else
{
#else
(
void
)
is_id3v1
;
#endif
utf8
=
id3_ucs4_utf8duplicate
(
ucs4
);
if
(
gcc_unlikely
(
utf8
==
nullptr
))
return
nullptr
;
#ifdef HAVE_GLIB
}
#endif
id3_utf8_t
*
utf8
=
id3_ucs4_utf8duplicate
(
ucs4
);
if
(
gcc_unlikely
(
utf8
==
nullptr
))
return
nullptr
;
id3_utf8_t
*
utf8_stripped
=
(
id3_utf8_t
*
)
xstrdup
(
Strip
((
char
*
)
utf8
));
...
...
@@ -144,7 +108,7 @@ import_id3_string(bool is_id3v1, const id3_ucs4_t *ucs4)
* - string list
*/
static
void
tag_id3_import_text_frame
(
struct
id3_tag
*
tag
,
const
struct
id3_frame
*
frame
,
tag_id3_import_text_frame
(
const
struct
id3_frame
*
frame
,
TagType
type
,
const
struct
tag_handler
*
handler
,
void
*
handler_ctx
)
{
...
...
@@ -173,7 +137,7 @@ tag_id3_import_text_frame(struct id3_tag *tag, const struct id3_frame *frame,
if
(
type
==
TAG_GENRE
)
ucs4
=
id3_genre_name
(
ucs4
);
id3_utf8_t
*
utf8
=
import_id3_string
(
tag_is_id3v1
(
tag
),
ucs4
);
id3_utf8_t
*
utf8
=
import_id3_string
(
ucs4
);
if
(
utf8
==
nullptr
)
continue
;
...
...
@@ -194,7 +158,7 @@ tag_id3_import_text(struct id3_tag *tag, const char *id, TagType type,
const
struct
id3_frame
*
frame
;
for
(
unsigned
i
=
0
;
(
frame
=
id3_tag_findframe
(
tag
,
id
,
i
))
!=
nullptr
;
++
i
)
tag_id3_import_text_frame
(
tag
,
frame
,
type
,
tag_id3_import_text_frame
(
frame
,
type
,
handler
,
handler_ctx
);
}
...
...
@@ -208,8 +172,7 @@ tag_id3_import_text(struct id3_tag *tag, const char *id, TagType type,
* - full string (we use this one)
*/
static
void
tag_id3_import_comment_frame
(
struct
id3_tag
*
tag
,
const
struct
id3_frame
*
frame
,
TagType
type
,
tag_id3_import_comment_frame
(
const
struct
id3_frame
*
frame
,
TagType
type
,
const
struct
tag_handler
*
handler
,
void
*
handler_ctx
)
{
...
...
@@ -225,7 +188,7 @@ tag_id3_import_comment_frame(struct id3_tag *tag,
if
(
ucs4
==
nullptr
)
return
;
id3_utf8_t
*
utf8
=
import_id3_string
(
tag_is_id3v1
(
tag
),
ucs4
);
id3_utf8_t
*
utf8
=
import_id3_string
(
ucs4
);
if
(
utf8
==
nullptr
)
return
;
...
...
@@ -244,7 +207,7 @@ tag_id3_import_comment(struct id3_tag *tag, const char *id, TagType type,
const
struct
id3_frame
*
frame
;
for
(
unsigned
i
=
0
;
(
frame
=
id3_tag_findframe
(
tag
,
id
,
i
))
!=
nullptr
;
++
i
)
tag_id3_import_comment_frame
(
tag
,
frame
,
type
,
tag_id3_import_comment_frame
(
frame
,
type
,
handler
,
handler_ctx
);
}
...
...
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