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
f37a1026
Commit
f37a1026
authored
Mar 18, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
queue/Playlist: rename DeleteSong() to StaleSong()
parent
91fb7fa3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
Instance.cxx
src/Instance.cxx
+1
-1
Partition.hxx
src/Partition.hxx
+2
-6
Playlist.hxx
src/queue/Playlist.hxx
+7
-1
PlaylistEdit.cxx
src/queue/PlaylistEdit.cxx
+1
-1
No files found.
src/Instance.cxx
View file @
f37a1026
...
@@ -66,7 +66,7 @@ Instance::OnDatabaseSongRemoved(const char *uri)
...
@@ -66,7 +66,7 @@ Instance::OnDatabaseSongRemoved(const char *uri)
sticker_song_delete
(
uri
,
IgnoreError
());
sticker_song_delete
(
uri
,
IgnoreError
());
#endif
#endif
partition
->
Delet
eSong
(
uri
);
partition
->
Stal
eSong
(
uri
);
}
}
#endif
#endif
...
...
src/Partition.hxx
View file @
f37a1026
...
@@ -91,14 +91,10 @@ struct Partition final : QueueListener, PlayerListener, MixerListener {
...
@@ -91,14 +91,10 @@ struct Partition final : QueueListener, PlayerListener, MixerListener {
playlist
.
DeleteRange
(
pc
,
start
,
end
);
playlist
.
DeleteRange
(
pc
,
start
,
end
);
}
}
#ifdef ENABLE_DATABASE
void
StaleSong
(
const
char
*
uri
)
{
playlist
.
StaleSong
(
pc
,
uri
);
void
DeleteSong
(
const
char
*
uri
)
{
playlist
.
DeleteSong
(
pc
,
uri
);
}
}
#endif
void
Shuffle
(
unsigned
start
,
unsigned
end
)
{
void
Shuffle
(
unsigned
start
,
unsigned
end
)
{
playlist
.
Shuffle
(
pc
,
start
,
end
);
playlist
.
Shuffle
(
pc
,
start
,
end
);
}
}
...
...
src/queue/Playlist.hxx
View file @
f37a1026
...
@@ -237,7 +237,13 @@ public:
...
@@ -237,7 +237,13 @@ public:
*/
*/
void
DeleteRange
(
PlayerControl
&
pc
,
unsigned
start
,
unsigned
end
);
void
DeleteRange
(
PlayerControl
&
pc
,
unsigned
start
,
unsigned
end
);
void
DeleteSong
(
PlayerControl
&
pc
,
const
char
*
uri
);
/**
* Mark the given song as "stale", i.e. as not being available
* anymore. This gets called when a song is removed from the
* database. The method attempts to remove all instances of
* this song from the queue.
*/
void
StaleSong
(
PlayerControl
&
pc
,
const
char
*
uri
);
void
Shuffle
(
PlayerControl
&
pc
,
unsigned
start
,
unsigned
end
);
void
Shuffle
(
PlayerControl
&
pc
,
unsigned
start
,
unsigned
end
);
...
...
src/queue/PlaylistEdit.cxx
View file @
f37a1026
...
@@ -310,7 +310,7 @@ playlist::DeleteId(PlayerControl &pc, unsigned id)
...
@@ -310,7 +310,7 @@ playlist::DeleteId(PlayerControl &pc, unsigned id)
}
}
void
void
playlist
::
Delet
eSong
(
PlayerControl
&
pc
,
const
char
*
uri
)
playlist
::
Stal
eSong
(
PlayerControl
&
pc
,
const
char
*
uri
)
{
{
for
(
int
i
=
queue
.
GetLength
()
-
1
;
i
>=
0
;
--
i
)
for
(
int
i
=
queue
.
GetLength
()
-
1
;
i
>=
0
;
--
i
)
if
(
queue
.
Get
(
i
).
IsURI
(
uri
))
if
(
queue
.
Get
(
i
).
IsURI
(
uri
))
...
...
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