How to Output Indexes with MediaServer
This page provides information for those who want to generate HTML files for MediaServer on their own.
(For technical users / advanced users)
General users should use the MediaServer or PHP script available on the
Download Page.
If WebDAV is supported, an index is not required.
(Enable WebDAV in the server registration settings of ComicGlass)
How to Create index HTML
MediaServer automatically extracts book lists from HTML.
Since it is not fully RFC-compliant, the extraction may fail if there are nested JavaScript or comments.
Please output in as simple a form as possible.
- Filenames must be percent-encoded (RFC3986).
- The HTML character encoding must be UTF-8.
If the file system is not UTF-8, you can handle this by specifying the booktitle attribute described below.
- Books and folders are determined by their extensions.
To force a file to be treated as a book regardless of its extension, see “Specifying as a Book File” below.
Specifying a Title
By default, the filename is used as the book title.
You can also specify a different display name by adding an attribute named booktitle inside the A element tag.
When this attribute is specified, the file will also be saved under this name after download.
(This feature makes it easy to generate index lists even if your file system is not UTF-8.
However, filenames must always be percent-encoded.)
Specifying File Size
Similarly, by adding the booksize attribute, you can display the file size to the user.
It is used only for display purposes and does not affect any other behavior.
Specifying File Modification Date
Similarly, by adding the bookdate attribute, you can specify the modification date of books and folders.
This field is used for sorting. The value must be in POSIX time.
Specifying as a Book File
If you specify bookfile="true", the file will be treated as a book even without an extension.
Specifying "false" is not allowed.
cgexpand Attribute
This is used when streaming expansion is performed on the server side. Do not specify it.