Project

General

Profile

How to define an index for remote albums ?

Introduction

You can list all your albums hosted on a site and download them from ComicsReader.

You need to provide an index with all information about albums. This index is in XML or JSON format.

A PHP script available on Mercurial repository allows to automatically create these indices.

Details

Below is an example in XML :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<albums>
    <album>
        <title>Album 1</title>
        <filename>album_1.cbz</filename>
        <size>10000000</size>
        <thumbnail>http://mysite.com/thumbnails/album_1.png</thumbnail>
        <url>http://mysite.com/album_1.cbz</url>
    </album>
    <album>
        <title>Album 2</title>
        <filename>album_2.cbz</filename>
        <size>20000000</size>
        <thumbnail>http://mysite.com/thumbnails/album_2.png</thumbnail>
        <url>http://mysite.com/album_2.cbz</url>
    </album>
    <folder>
        <title>Folder 1</title>
        <url>http://mysite.com/folder_1.xml</url>
    </folder>
</albums>

And now in JSON :

{"albums": {
    "album": [
        {
            "title": "Album 1",
            "filename": "album_1.cbz",
            "size": 10000000,
            "thumbnail": "http://mysite.com/thumbnails/album_1.png",
            "url": "http://mysite.com/album_1.cbz" 
        },
        {
            "title": "Album 2",
            "filename": "album_2.cbz",
            "size": 20000000,
            "thumbnail": "http://mysite.com/thumbnails/album_2.png",
            "url": "http://mysite.com/album_2.cbz" 
        }
    ],
    "folder": [
        {
            "title": "Folder 1",
            "url": "http://mysite.com/folder_1.json" 
        }
    ]
}}

For an album :

  1. title is the title which is displayed in browser activity
  2. filename is the filename which will be used when locally saving the album
  3. size is the size of the file (it will be used to check if the file changed since last time)
  4. thumbnail is the URL of the album cover to display in browser activity
  5. url is the URL to use to download the album (special characters should be encoded with %xx)

For a folder :

  1. title is the title which is displayed in browser activity
  2. url is the URL to the other index