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
7aca4cd1
Commit
7aca4cd1
authored
Oct 22, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stored_playlist: send timestamps
Send last modification timestamps to the client. This allows the client to see when another client modifies a stored playlist.
parent
9c983c44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
COMMANDS
doc/COMMANDS
+6
-0
command.c
src/command.c
+8
-0
No files found.
doc/COMMANDS
View file @
7aca4cd1
...
...
@@ -191,6 +191,12 @@ repeat <int state>
listplaylists
prints a list of the playlist directory
After each playlist name, the server sends its last
modification time as attribute "Last-Modified" in ISO 8601
format. To avoid problems due to clock differences between
clients and the server, clients should not compare this value
with their local clock.
rm <string name>
removes the playlist <name>.m3u from the playlist directory
...
...
src/command.c
View file @
7aca4cd1
...
...
@@ -208,8 +208,16 @@ print_spl_list(struct client *client, GPtrArray *list)
for
(
unsigned
i
=
0
;
i
<
list
->
len
;
++
i
)
{
struct
stored_playlist_info
*
playlist
=
g_ptr_array_index
(
list
,
i
);
time_t
t
;
struct
tm
tm
;
char
timestamp
[
32
];
client_printf
(
client
,
"playlist: %s
\n
"
,
playlist
->
name
);
t
=
playlist
->
mtime
;
strftime
(
timestamp
,
sizeof
(
timestamp
),
"%FT%TZ"
,
gmtime_r
(
&
t
,
&
tm
));
client_printf
(
client
,
"Last-Modified: %s
\n
"
,
timestamp
);
}
}
...
...
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