diff --git a/files_opds/appinfo/remote.php b/files_opds/appinfo/remote.php
new file mode 100644
index 0000000..a4abe2d
--- /dev/null
+++ b/files_opds/appinfo/remote.php
@@ -0,0 +1,2 @@
+create('opds_catalog', '/')
+ ->actionInclude('files_opds/index.php');
+$this->create('opds_catalog_admin_settings', 'ajax/admin.php')
+ ->actionInclude('files_opds/ajax/admin.php');
+$this->create('opds_catalog_personal_settings', 'ajax/personal.php')
+ ->actionInclude('files_opds/ajax/personal.php');
+$this->create('opds_catalog_clear_bookshelf', 'ajax/clear_bookshelf.php')
+ ->actionInclude('files_opds/ajax/clear_bookshelf.php');
+$this->create('opds_catalog_schedule_rescan', 'ajax/schedule_rescan.php')
+ ->actionInclude('files_opds/ajax/schedule_rescan.php');
diff --git a/files_opds/index.php b/files_opds/index.php
index 963d2f9..0d065c0 100644
--- a/files_opds/index.php
+++ b/files_opds/index.php
@@ -58,7 +58,7 @@ $dirInfo = \OC\Files\Filesystem::getFileInfo($dir);
/* If requested resource is a file, serve it, otherwise produce opds feed */
switch ($dirInfo->getType()) {
case 'file':
- if ($type) {
+ if (isset($type)) {
Feed::servePreview($dir,$type);
} else {
Feed::serveFile($dir,$id);
diff --git a/files_opds/lib/feed.php b/files_opds/lib/feed.php
index 4b4ab13..ccc4147 100644
--- a/files_opds/lib/feed.php
+++ b/files_opds/lib/feed.php
@@ -35,7 +35,7 @@ class Feed
*/
public static function serveFile($path, $id) {
\OCP\User::checkLoggedIn();
- \OC::$session->close();
+ \OC::$server->getSession()->close();
Bookshelf::add($id);
$dirName = dirname($path);
$fileName = basename($path);
@@ -81,7 +81,7 @@ class Feed
*/
public static function servePreview($path, $type) {
\OCP\User::checkLoggedIn();
- \OC::$session->close();
+ \OC::$server->getSession()->close();
$i = \OC\Files\Filesystem::getFileInfo($path,false);
/* check for predefined cover, if found replace $path with that of cover file */
diff --git a/files_opds/lib/files.php b/files_opds/lib/files.php
index 0567f09..a689b00 100644
--- a/files_opds/lib/files.php
+++ b/files_opds/lib/files.php
@@ -23,7 +23,7 @@ class Files extends \OCA\Files\Helper
* @param \OCP\Files\FileInfo $i
* @return array formatted file info
*/
- public static function formatFileInfo($i) {
+ public static function formatFileInfo(\OCP\Files\FileInfo $i) {
$entry = array();
$entry['id'] = $i['fileid'];
diff --git a/files_opds/templates/admin.php b/files_opds/templates/admin.php
index 13f60ce..1ac0a2e 100644
--- a/files_opds/templates/admin.php
+++ b/files_opds/templates/admin.php
@@ -22,7 +22,11 @@ function checkBox($format) {
?>
-
t('OPDS')); ?>
+
|
diff --git a/files_opds/templates/personal.php b/files_opds/templates/personal.php
index 7475034..3916c54 100644
--- a/files_opds/templates/personal.php
+++ b/files_opds/templates/personal.php
@@ -13,7 +13,11 @@
?>
-
t('OPDS')); ?>
+
type="checkbox">
diff --git a/files_reader/appinfo/routes.php b/files_reader/appinfo/routes.php
new file mode 100644
index 0000000..5a3b930
--- /dev/null
+++ b/files_reader/appinfo/routes.php
@@ -0,0 +1,15 @@
+create('files_reader', '/')
+ ->actionInclude('files_reader/viewer.php');
+