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
86a90daf
Commit
86a90daf
authored
9 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/update/Remove: pass URI to Remove()
parent
42f7df96
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
Editor.cxx
src/db/update/Editor.cxx
+1
-1
Remove.cxx
src/db/update/Remove.cxx
+2
-3
Remove.hxx
src/db/update/Remove.hxx
+1
-1
No files found.
src/db/update/Editor.cxx
View file @
86a90daf
...
...
@@ -39,7 +39,7 @@ DatabaseEditor::DeleteSong(Directory &dir, Song *del)
const
ScopeDatabaseUnlock
unlock
;
/* now take it out of the playlist (in the main_task) */
remove
.
Remove
(
del
);
remove
.
Remove
(
del
->
GetURI
()
);
/* finally, all possible references gone, free it */
del
->
Free
();
...
...
This diff is collapsed.
Click to expand it.
src/db/update/Remove.cxx
View file @
86a90daf
...
...
@@ -20,7 +20,6 @@
#include "config.h"
/* must be first for large file support */
#include "Remove.hxx"
#include "UpdateDomain.hxx"
#include "db/plugins/simple/Song.hxx"
#include "db/DatabaseListener.hxx"
#include "Log.hxx"
...
...
@@ -51,14 +50,14 @@ UpdateRemoveService::RunDeferred()
}
void
UpdateRemoveService
::
Remove
(
const
Song
*
song
)
UpdateRemoveService
::
Remove
(
std
::
string
&&
uri
)
{
bool
was_empty
;
{
const
ScopeLock
protect
(
mutex
);
was_empty
=
uris
.
empty
();
uris
.
emplace_front
(
s
ong
->
GetURI
(
));
uris
.
emplace_front
(
s
td
::
move
(
uri
));
}
/* inject an event into the main thread, but only if the list
...
...
This diff is collapsed.
Click to expand it.
src/db/update/Remove.hxx
View file @
86a90daf
...
...
@@ -52,7 +52,7 @@ public:
* This serialized access is implemented to avoid excessive
* locking.
*/
void
Remove
(
const
Song
*
song
);
void
Remove
(
std
::
string
&&
uri
);
private
:
/* virtual methods from class DeferredMonitor */
...
...
This diff is collapsed.
Click to expand it.
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