mirror of
https://github.com/Yetangitu/owncloud-apps.git
synced 2025-10-02 14:49:17 +02:00
files_opds: add skip list to personal settings, bump version to 0.6.0, new dist file
This commit is contained in:
parent
256d2eb879
commit
30ccabed34
7 changed files with 13 additions and 5 deletions
|
@ -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();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<name>OPDS catalog</name>
|
||||
<description>Personal OPDS catalog</description>
|
||||
<licence>AGPL</licence>
|
||||
<version>0.5.9</version>
|
||||
<version>0.6.0</version>
|
||||
<author>Frank de Lange</author>
|
||||
<requiremin>7.0</requiremin>
|
||||
<shipped>true</shipped>
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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/');
|
||||
|
|
|
@ -32,6 +32,10 @@
|
|||
<td><label for="opds-file-types"><?php p($l->t('Supported extensions:')) ?></label></td>
|
||||
<td><input type="text" id="opds-file-types" title="<?php p($l->t("Enter list of comma-separated extensions (eg. pdf,epub,doc,txt). Leave blank to publish all file types.")); ?>" value="<?php p($_['fileTypes']) ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="opds-skip-list"><?php p($l->t('Skip these filenames:')) ?></label></td>
|
||||
<td><input type="text" id="opds-skip-list" title="<?php p($l->t("Enter list of comma-separated file names which should be skipped. Leave blank to use the default skip list.")); ?>" value="<?php p($_['skipList']) ?>" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue