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
d5287682
Commit
d5287682
authored
Aug 29, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ArgParser: allow fractional seconds in ParseCommandArg(SongTime)
parent
7c567e3c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
10 deletions
+13
-10
NEWS
NEWS
+1
-0
protocol.xml
doc/protocol.xml
+8
-6
ArgParser.cxx
src/protocol/ArgParser.cxx
+4
-4
No files found.
NEWS
View file @
d5287682
...
...
@@ -8,6 +8,7 @@ ver 0.19 (not yet released)
- "list" on album artist falls back to the artist tag
- "list" and "count" allow grouping
- new "search"/"find" filter "modified-since"
- "seek*" allows fractional position
- close connection after syntax error
* database
- proxy: forward "idle" events
...
...
doc/protocol.xml
View file @
d5287682
...
...
@@ -877,8 +877,8 @@
<listitem>
<para>
Seeks to the position
<varname>
TIME
</varname>
(in
seconds
) of entry
<varname>
SONGPOS
</varname>
in the
playlist.
seconds
; fractions allowed) of entry
<varname>
SONGPOS
</varname>
in the
playlist.
</para>
</listitem>
</varlistentry>
...
...
@@ -893,7 +893,8 @@
<listitem>
<para>
Seeks to the position
<varname>
TIME
</varname>
(in
seconds) of song
<varname>
SONGID
</varname>
.
seconds; fractions allowed) of song
<varname>
SONGID
</varname>
.
</para>
</listitem>
</varlistentry>
...
...
@@ -907,9 +908,10 @@
</term>
<listitem>
<para>
Seeks to the position
<varname>
TIME
</varname>
within the
current song. If prefixed by '+' or '-', then the time
is relative to the current playing position.
Seeks to the position
<varname>
TIME
</varname>
(in
seconds; fractions allowed) within the current song. If
prefixed by '+' or '-', then the time is relative to the
current playing position.
</para>
</listitem>
</varlistentry>
...
...
src/protocol/ArgParser.cxx
View file @
d5287682
...
...
@@ -191,8 +191,8 @@ check_float(Client &client, float *value_r, const char *s)
bool
ParseCommandArg
(
Client
&
client
,
SongTime
&
value_r
,
const
char
*
s
)
{
unsigned
value
;
bool
success
=
check_
unsigned
(
client
,
&
value
,
s
)
;
float
value
;
bool
success
=
check_
float
(
client
,
&
value
,
s
)
&&
value
>=
0
;
if
(
success
)
value_r
=
SongTime
::
FromS
(
value
);
...
...
@@ -202,8 +202,8 @@ ParseCommandArg(Client &client, SongTime &value_r, const char *s)
bool
ParseCommandArg
(
Client
&
client
,
SignedSongTime
&
value_r
,
const
char
*
s
)
{
in
t
value
;
bool
success
=
check_
in
t
(
client
,
&
value
,
s
);
floa
t
value
;
bool
success
=
check_
floa
t
(
client
,
&
value
,
s
);
if
(
success
)
value_r
=
SignedSongTime
::
FromS
(
value
);
...
...
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