Add albumart command

Add API documentation
Support 64 bit offsets
Use InputStream for all reads
This commit is contained in:
Ryan Walklin
2017-07-21 19:49:28 +10:00
parent 6f37f5752b
commit 9df8b32f10
4 changed files with 154 additions and 0 deletions

View File

@@ -1573,6 +1573,42 @@ OK
<title>The music database</title>
<variablelist>
<varlistentry id="album_art">
<term>
<cmdsynopsis>
<command>albumart</command>
<arg choice="req"><replaceable>URI</replaceable></arg>
<arg choice="req"><replaceable>OFFSET</replaceable></arg>
</cmdsynopsis>
</term>
<listitem>
<para>
Searches the directory the file <varname>URI</varname>
resides in and attempts to return a chunk of an album
art image file at offset <varname>OFFSET</varname>.
</para>
<para>
Uses the filename "cover" with any of ".png, .jpg,
.tiff, .bmp".
</para>
<para>
Returns the file size and actual number
of bytes read at the requested offset, followed
by the chunk requested as raw bytes, then a
newline and the completion code.
</para>
<para>
Example:
</para>
<programlisting>albumart
size: 1024768
binary: 8192
&lt;8192 bytes&gt;
OK
</programlisting>
</listitem>
</varlistentry>
<varlistentry id="command_count">
<term>