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
28d39948
Commit
28d39948
authored
Sep 23, 2008
by
Eric Wong
Committed by
Max Kellermann
Sep 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
songvec: remove songvec_prune
Any pruned files will be noticed during update and pruned from the live database, so this inefficient function can go away and never come back.
parent
3f0ae13c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
28 deletions
+0
-28
song_save.c
src/song_save.c
+0
-3
songvec.c
src/songvec.c
+0
-23
songvec.h
src/songvec.h
+0
-2
No files found.
src/song_save.c
View file @
28d39948
...
@@ -149,7 +149,4 @@ void readSongInfoIntoList(FILE *fp, struct songvec *sv,
...
@@ -149,7 +149,4 @@ void readSongInfoIntoList(FILE *fp, struct songvec *sv,
if
(
song
)
if
(
song
)
insertSongIntoList
(
sv
,
song
);
insertSongIntoList
(
sv
,
song
);
if
(
isUpdatingDB
())
/* only needed until we get rid of forked update */
songvec_prune
(
sv
);
}
}
src/songvec.c
View file @
28d39948
...
@@ -64,26 +64,3 @@ void songvec_free(struct songvec *sv)
...
@@ -64,26 +64,3 @@ void songvec_free(struct songvec *sv)
sv
->
base
=
NULL
;
sv
->
base
=
NULL
;
sv
->
nr
=
0
;
sv
->
nr
=
0
;
}
}
/*
* Removes missing songs from a songvec. This function is only temporary
* as updating will be moved into a thread and updating shared memory...
*/
#include "path.h"
#include "ls.h"
void
songvec_prune
(
struct
songvec
*
sv
)
{
int
i
;
char
tmp
[
MPD_PATH_MAX
];
struct
stat
sb
;
for
(
i
=
sv
->
nr
;
--
i
>=
0
;
)
{
Song
*
song
=
sv
->
base
[
i
];
assert
(
song
);
if
(
!
myStat
(
get_song_url
(
tmp
,
song
),
&
sb
))
continue
;
songvec_delete
(
sv
,
song
);
freeSong
(
song
);
i
=
sv
->
nr
;
}
}
src/songvec.h
View file @
28d39948
...
@@ -19,6 +19,4 @@ void songvec_add(struct songvec *sv, Song *add);
...
@@ -19,6 +19,4 @@ void songvec_add(struct songvec *sv, Song *add);
void
songvec_free
(
struct
songvec
*
sv
);
void
songvec_free
(
struct
songvec
*
sv
);
void
songvec_prune
(
struct
songvec
*
sv
);
#endif
/* SONGVEC_H */
#endif
/* SONGVEC_H */
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