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
4363c494
Commit
4363c494
authored
Aug 04, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tag_id3: moved id3_genre_name() call to tag_id3_import_text()
The ID3_FRAME_GENRE field is queried only in tag_id3_import_text(). Don't pass the tag type to import_id3_string().
parent
09571fcc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
tag_id3.c
src/tag_id3.c
+6
-6
No files found.
src/tag_id3.c
View file @
4363c494
...
@@ -79,14 +79,12 @@ tag_id3_getstring(const struct id3_frame *frame, unsigned i)
...
@@ -79,14 +79,12 @@ tag_id3_getstring(const struct id3_frame *frame, unsigned i)
/* This will try to convert a string to utf-8,
/* This will try to convert a string to utf-8,
*/
*/
static
id3_utf8_t
*
static
id3_utf8_t
*
import_id3_string
(
bool
is_id3v1
,
const
id3_ucs4_t
*
ucs4
,
enum
tag_type
type
)
import_id3_string
(
bool
is_id3v1
,
const
id3_ucs4_t
*
ucs4
)
{
{
id3_utf8_t
*
utf8
,
*
utf8_stripped
;
id3_utf8_t
*
utf8
,
*
utf8_stripped
;
id3_latin1_t
*
isostr
;
id3_latin1_t
*
isostr
;
const
char
*
encoding
;
const
char
*
encoding
;
if
(
type
==
TAG_ITEM_GENRE
)
ucs4
=
id3_genre_name
(
ucs4
);
/* use encoding field here? */
/* use encoding field here? */
if
(
is_id3v1
&&
if
(
is_id3v1
&&
(
encoding
=
config_get_string
(
CONF_ID3V1_ENCODING
,
NULL
))
!=
NULL
)
{
(
encoding
=
config_get_string
(
CONF_ID3V1_ENCODING
,
NULL
))
!=
NULL
)
{
...
@@ -159,8 +157,10 @@ tag_id3_import_text(struct tag *dest, struct id3_tag *tag, const char *id,
...
@@ -159,8 +157,10 @@ tag_id3_import_text(struct tag *dest, struct id3_tag *tag, const char *id,
if
(
ucs4
==
NULL
)
if
(
ucs4
==
NULL
)
continue
;
continue
;
utf8
=
import_id3_string
(
tag_is_id3v1
(
tag
),
if
(
type
==
TAG_ITEM_GENRE
)
ucs4
,
type
);
ucs4
=
id3_genre_name
(
ucs4
);
utf8
=
import_id3_string
(
tag_is_id3v1
(
tag
),
ucs4
);
if
(
utf8
==
NULL
)
if
(
utf8
==
NULL
)
continue
;
continue
;
...
@@ -200,7 +200,7 @@ tag_id3_import_comment(struct tag *dest, struct id3_tag *tag, const char *id,
...
@@ -200,7 +200,7 @@ tag_id3_import_comment(struct tag *dest, struct id3_tag *tag, const char *id,
if
(
ucs4
==
NULL
)
if
(
ucs4
==
NULL
)
return
;
return
;
utf8
=
import_id3_string
(
tag_is_id3v1
(
tag
),
ucs4
,
type
);
utf8
=
import_id3_string
(
tag_is_id3v1
(
tag
),
ucs4
);
if
(
utf8
==
NULL
)
if
(
utf8
==
NULL
)
return
;
return
;
...
...
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