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
7519768c
Commit
7519768c
authored
Nov 25, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Queue: add "reorder" parameter to SetPriority()
parent
9af470c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
Queue.cxx
src/queue/Queue.cxx
+3
-2
Queue.hxx
src/queue/Queue.hxx
+4
-1
No files found.
src/queue/Queue.cxx
View file @
7519768c
...
...
@@ -402,7 +402,8 @@ Queue::CountSamePriority(unsigned start_order, uint8_t priority) const
}
bool
Queue
::
SetPriority
(
unsigned
position
,
uint8_t
priority
,
int
after_order
)
Queue
::
SetPriority
(
unsigned
position
,
uint8_t
priority
,
int
after_order
,
bool
reorder
)
{
assert
(
position
<
length
);
...
...
@@ -414,7 +415,7 @@ Queue::SetPriority(unsigned position, uint8_t priority, int after_order)
item
->
version
=
version
;
item
->
priority
=
priority
;
if
(
!
random
)
if
(
!
random
||
!
reorder
)
/* don't reorder if not in random mode */
return
true
;
...
...
src/queue/Queue.hxx
View file @
7519768c
...
...
@@ -340,10 +340,13 @@ struct Queue {
/**
* Shuffles a (position) range in the queue. The songs are physically
* shuffled, not by using the "order" mapping.
*
* @param reorder false to suppress updating the order list
*/
void
ShuffleRange
(
unsigned
start
,
unsigned
end
);
bool
SetPriority
(
unsigned
position
,
uint8_t
priority
,
int
after_order
);
bool
SetPriority
(
unsigned
position
,
uint8_t
priority
,
int
after_order
,
bool
reorder
=
true
);
bool
SetPriorityRange
(
unsigned
start_position
,
unsigned
end_position
,
uint8_t
priority
,
int
after_order
);
...
...
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