diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/song_print.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/song_print.c b/src/song_print.c index 64ab9f6b1..2efae9b89 100644 --- a/src/song_print.c +++ b/src/song_print.c @@ -50,6 +50,23 @@ song_print_info(struct client *client, struct song *song) { song_print_url(client, song); + if (song->mtime > 0) { + time_t t = song->mtime; +#ifndef G_OS_WIN32 + struct tm tm; +#endif + char timestamp[32]; + + strftime(timestamp, sizeof(timestamp), "%FT%TZ", +#ifdef G_OS_WIN32 + gmtime(&t) +#else + gmtime_r(&t, &tm) +#endif + ); + client_printf(client, "Last-Modified: %s\n", timestamp); + } + if (song->tag) tag_print(client, song->tag); |