1
0
Fork 0
mirror of https://github.com/Yetangitu/owncloud-apps.git synced 2025-10-02 14:49:17 +02:00

Changed feed structure so it validates in the online validator (http://opds-validator.appspot.com/)

This commit is contained in:
frankdelange 2014-12-11 01:27:26 +01:00
parent 154f32ad5f
commit 8208645134
2 changed files with 7 additions and 21 deletions

View file

@ -4,7 +4,7 @@
<name>OPDS catalog</name> <name>OPDS catalog</name>
<description>Personal OPDS catalog</description> <description>Personal OPDS catalog</description>
<licence>AGPL</licence> <licence>AGPL</licence>
<version>0.1.1</version> <version>0.1.2</version>
<author>Frank de Lange</author> <author>Frank de Lange</author>
<requiremin>7.0</requiremin> <requiremin>7.0</requiremin>
<shipped>true</shipped> <shipped>true</shipped>

View file

@ -33,6 +33,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
<?php if ($_['id'] == 'root'): ?> <?php if ($_['id'] == 'root'): ?>
<entry> <entry>
<title><?php p($l->t("Browse catalog")); ?></title> <title><?php p($l->t("Browse catalog")); ?></title>
<updated><?php p(date("Y-m-d\TH:i:sP", $_['feed_updated'])); ?></updated>
<content type="text"><?php p($l->t("Browse the catalog in alphabetical order")); ?></content> <content type="text"><?php p($l->t("Browse the catalog in alphabetical order")); ?></content>
<link type="application/atom+xml;profile=opds-catalog;kind=navigation" <link type="application/atom+xml;profile=opds-catalog;kind=navigation"
href="?id=directory"/> href="?id=directory"/>
@ -40,16 +41,13 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
</entry> </entry>
<entry> <entry>
<title><?php p($l->t("%s's bookshelf", array($_['user']))); ?></title> <title><?php p($l->t("%s's bookshelf", array($_['user']))); ?></title>
<updated><?php p(date("Y-m-d\TH:i:sP", $_['feed_updated'])); ?></updated>
<content type="text"><?php p($l->t("This bookshelf contains %s books", array($_['bookshelf-count']))); ?></content> <content type="text"><?php p($l->t("This bookshelf contains %s books", array($_['bookshelf-count']))); ?></content>
<link type="application/atom+xml;profile=opds-catalog;kind=navigation" <link type="application/atom+xml;profile=opds-catalog;kind=navigation"
href="?id=bookshelf"/> href="?id=bookshelf"/>
<id>id:by_bookshelf</id> <id>id:by_bookshelf</id>
</entry> </entry>
<?php elseif ($_['id'] == 'bookshelf'): ?> <?php elseif ($_['id'] == 'bookshelf'): ?>
<link rel="http://opds-spec.org/facet"
href="?id=bookshelf"
title="Bookshelf"
opds:activeFacet="true" />
<?php foreach ($_['bookshelf'] as $file): ?> <?php foreach ($_['bookshelf'] as $file): ?>
<entry> <entry>
@ -66,13 +64,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
rel="http://opds-spec.org/image" rel="http://opds-spec.org/image"
type="image/jpeg" /> type="image/jpeg" />
<link href="<?php p($file['icon']); ?>" <link href="<?php p($file['icon']); ?>"
rel="x-stanza-cover-image" rel="http://opds-spec.org/image/thumbnail"
type="image/jpeg" />
<link href="<?php p($file['icon']); ?>"
rel="http://opds-spec.org/thumbnail"
type="image/jpeg" />
<link href="<?php p($file['icon']); ?>"
rel="x-stanza-cover-image-thumbnail"
type="image/jpeg" /> type="image/jpeg" />
<content type="text"></content> <content type="text"></content>
</entry> </entry>
@ -84,7 +76,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
<title><?php p($file['name']); ?></title> <title><?php p($file['name']); ?></title>
<updated><?php p(date("Y-m-d\TH:i:sP", $file['mtime'])); ?></updated> <updated><?php p(date("Y-m-d\TH:i:sP", $file['mtime'])); ?></updated>
<id>id:<?php p($file['id']); ?></id> <id>id:<?php p($file['id']); ?></id>
<link type="application/atom+xml" <link type="application/atom+xml;profile=opds-catalog;kind=navigation"
rel="alternate" rel="alternate"
href="?id=<?php p($file['id']); ?>"/> href="?id=<?php p($file['id']); ?>"/>
<link type="application/atom+xml;profile=opds-catalog;kind=navigation" <link type="application/atom+xml;profile=opds-catalog;kind=navigation"
@ -107,15 +99,9 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
rel="http://opds-spec.org/image" rel="http://opds-spec.org/image"
type="image/jpeg" /> type="image/jpeg" />
<link href="<?php p($file['icon']); ?>" <link href="<?php p($file['icon']); ?>"
rel="x-stanza-cover-image" rel="http://opds-spec.org/image/thumbnail"
type="image/jpeg" /> type="image/jpeg" />
<link href="<?php p($file['icon']); ?>" <content type="text"></content>
rel="http://opds-spec.org/thumbnail"
type="image/jpeg" />
<link href="<?php p($file['icon']); ?>"
rel="x-stanza-cover-image-thumbnail"
type="image/jpeg" />
<content type="text/html"></content>
</entry> </entry>
<?php endif; ?> <?php endif; ?>
<?php endforeach; ?> <?php endforeach; ?>