diff --git a/README.md b/README.md index fdc75a4..0d1d22b 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ The OPDS root feed links to a hierarchical navigation feed mirroring the directo The feed is in compliance with the OPDS 1.1 specification according to the online OPDS validator (http://opds-validator.appspot.com/). -In the personal settings page there are options to enable/disable the feed (it is disabled by default), set the feed title, set the feed root directory (the default is /Library), enter a list of extensions to which the feed should be limited (by default this field is empty so it publishes all files descending from the feed root) and clear the personal bookshelf. +In the personal settings page there are options to enable/disable the feed (it is disabled by default), set the feed title, set the feed root directory (the default is /Library), enter a comma-delimited list of extensions to which the feed should be limited (by default this field is empty so it publishes all files descending from the feed root), enter a comma-delimited list of filenames to skip (default is 'metadata.opf,cover.jpg') and clear the personal bookshelf. The admin settings page contains options to set the feed subtitle, change file preview preferences (which should probably be in core or in a separate app as this changes a system-wide setting ('enabledPreviewProviders')) and change the cover image and thumbnail dimensions. diff --git a/dist/files_opds-0.6.0.tar.gz b/dist/files_opds-0.6.0.tar.gz new file mode 100644 index 0000000..9403abf Binary files /dev/null and b/dist/files_opds-0.6.0.tar.gz differ diff --git a/files_opds/ajax/personal.php b/files_opds/ajax/personal.php index 64fc9b5..821643c 100644 --- a/files_opds/ajax/personal.php +++ b/files_opds/ajax/personal.php @@ -18,8 +18,9 @@ namespace OCA\Files_Opds; $l = new \OC_L10N('files_opds'); $opdsEnable = isset($_POST['opdsEnable']) ? $_POST['opdsEnable'] : 'false'; -$rootPath = isset($_POST['rootPath']) ? $_POST['rootPath'] : null; +$rootPath = isset($_POST['rootPath']) ? $_POST['rootPath'] : '/Library'; $fileTypes = isset($_POST['fileTypes']) ? $_POST['fileTypes'] : ''; +$skipList = isset($_POST['skipList']) ? $_POST['skipList'] : 'metadata.opf,cover.jpg'; $feedTitle = isset($_POST['feedTitle']) ? $_POST['feedTitle'] : $l->t("%s's Library", \OCP\User::getDisplayName()); if (!is_null($rootPath)){ @@ -39,6 +40,7 @@ if (!is_null($rootPath)){ } Config::set('enable', $opdsEnable); Config::set('file_types', $fileTypes); + Config::set('skip_list', $skipList); Config::set('feed_title', $feedTitle); Config::set('id', Util::genUuid()); exit(); diff --git a/files_opds/appinfo/info.xml b/files_opds/appinfo/info.xml index a6c3a67..c1dbc41 100644 --- a/files_opds/appinfo/info.xml +++ b/files_opds/appinfo/info.xml @@ -4,7 +4,7 @@ OPDS catalog Personal OPDS catalog AGPL - 0.5.9 + 0.6.0 Frank de Lange 7.0 true diff --git a/files_opds/js/personal.js b/files_opds/js/personal.js index 297b452..a897f4c 100644 --- a/files_opds/js/personal.js +++ b/files_opds/js/personal.js @@ -25,6 +25,7 @@ $(document).ready(function(){ opdsEnable : opdsEnable, rootPath : $('#opds-root-path').val(), fileTypes : $('#opds-file-types').val(), + skipList : $('#opds-skip-list').val(), feedTitle : $('#opds-feed-title').val() }; OC.msg.startSaving('#opds-personal .msg'); @@ -34,8 +35,8 @@ $(document).ready(function(){ OC.msg.finishedSaving('#opds-personal .msg', data); } }; - $('#opds-root-path,#opds-file-types,#opds-feed-title').blur(opdsSettings.save); - $('#opds-root-path,#opds-file-types,#opds-feed-title').keypress(function( event ) { + $('#opds-root-path,#opds-file-types,#opds-feed-title,#opds-skip-list').blur(opdsSettings.save); + $('#opds-root-path,#opds-file-types,#opds-feed-title,#opds-skip-list').keypress(function( event ) { if (event.which == 13) { event.preventDefault(); opdsSettings.save(); diff --git a/files_opds/personal.php b/files_opds/personal.php index 87adecc..3647c52 100644 --- a/files_opds/personal.php +++ b/files_opds/personal.php @@ -20,6 +20,7 @@ $tmpl->assign('opdsEnable-checked', ($opdsEnable === 'true') ? 'checked="checked $tmpl->assign('opdsEnable-value', ($opdsEnable === 'true') ? '1' : '0'); $tmpl->assign('rootPath', Config::get('root_path', '/Library')); $tmpl->assign('fileTypes', Config::get('file_types', '')); +$tmpl->assign('skipList', Config::get('skip_list', 'metadata.opf,cover.jpg')); $tmpl->assign('feedTitle', Config::get('feed_title', $l->t("%s's Library", \OCP\User::getDisplayName()))); $tmpl->assign('bookshelf-count', Bookshelf::count()); $tmpl->assign('feedUrl', \OC_Helper::linkToAbsolute('','index.php') . '/apps/files_opds/'); diff --git a/files_opds/templates/personal.php b/files_opds/templates/personal.php index 2d0252d..75ea30c 100644 --- a/files_opds/templates/personal.php +++ b/files_opds/templates/personal.php @@ -32,6 +32,10 @@ " value="" /> + + + " value="" /> +