summaryrefslogtreecommitdiff
path: root/doc/protocol.rst
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-08-12 14:01:14 +0200
committerMax Kellermann <max@musicpd.org>2019-08-13 11:55:51 +0200
commite2da13b0d3f5029741cb1a02013dadc63f84861b (patch)
tree179ce8cbfbdeb6a52f62e70cfe1b4662f27f28d0 /doc/protocol.rst
parent54daa85ac2d7cae14ad44d2849dd8a74ffc01438 (diff)
command/file: add command "readpicture"
Closes https://github.com/MusicPlayerDaemon/MPD/issues/42
Diffstat (limited to 'doc/protocol.rst')
-rw-r--r--doc/protocol.rst24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/protocol.rst b/doc/protocol.rst
index 9c580259c..72520d67e 100644
--- a/doc/protocol.rst
+++ b/doc/protocol.rst
@@ -1005,6 +1005,30 @@ The music database
decoder plugins support it. For example, on Ogg files,
this lists the Vorbis comments.
+:command:`readpicture {URI} {OFFSET}`
+ Locate a picture for the given song and return a chunk of the
+ image file at offset ``OFFSET``. This is usually implemented by
+ reading embedded pictures from binary tags (e.g. ID3v2's ``APIC``
+ tag).
+
+ Returns the following values:
+
+ - ``size``: the total file size
+ - ``type``: the file's MIME type (optional)
+ - ``binary``: see :ref:`binary`
+
+ If the song file was recognized, but there is no picture, the
+ response is successful, but is otherwise empty.
+
+ Example::
+
+ readpicture foo/bar.ogg 0
+ size: 1024768
+ type: image/jpeg
+ binary: 8192
+ <8192 bytes>
+ OK
+
.. _command_search:
:command:`search {FILTER} [sort {TYPE}] [window {START:END}]`