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
4ab6b59a
Commit
4ab6b59a
authored
Oct 08, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
song: use song_file_update() in song_file_load()
Eliminate duplicated code.
parent
02e8c000
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
song.c
src/song.c
+3
-10
No files found.
src/song.c
View file @
4ab6b59a
...
...
@@ -62,9 +62,7 @@ struct song *
song_file_load
(
const
char
*
path
,
struct
directory
*
parent
)
{
struct
song
*
song
;
struct
decoder_plugin
*
plugin
;
unsigned
int
next
=
0
;
char
path_max_tmp
[
MPD_PATH_MAX
],
*
abs_path
;
bool
ret
;
assert
(
parent
!=
NULL
);
...
...
@@ -75,13 +73,8 @@ song_file_load(const char *path, struct directory *parent)
song
=
song_file_new
(
path
,
parent
);
abs_path
=
rmp2amp_r
(
path_max_tmp
,
song_get_url
(
song
,
path_max_tmp
));
while
(
song
->
tag
==
NULL
&&
(
plugin
=
isMusic
(
abs_path
,
&
(
song
->
mtime
),
next
++
)))
{
song
->
tag
=
plugin
->
tag_dup
(
abs_path
);
}
if
(
song
->
tag
==
NULL
||
song
->
tag
->
time
<
0
)
{
ret
=
song_file_update
(
song
);
if
(
!
ret
)
{
song_free
(
song
);
return
NULL
;
}
...
...
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