mirror of
https://github.com/evilhero/mylar
synced 2024-12-21 23:32:23 +00:00
IMP: OPDS page size as configuration option (#2393)
This commit is contained in:
parent
251c59808c
commit
420a3e0570
5 changed files with 9 additions and 2 deletions
1
Mylar.py
1
Mylar.py
|
@ -308,6 +308,7 @@ def main():
|
|||
'opds_authentication': mylar.CONFIG.OPDS_AUTHENTICATION,
|
||||
'opds_username': mylar.CONFIG.OPDS_USERNAME,
|
||||
'opds_password': mylar.CONFIG.OPDS_PASSWORD,
|
||||
'opds_pagesize': mylar.CONFIG.OPDS_PAGESIZE,
|
||||
}
|
||||
|
||||
# Try to start the server.
|
||||
|
|
|
@ -244,6 +244,10 @@
|
|||
<div id="opdsoptions">
|
||||
<div class="row_checkbox">
|
||||
<small>Access the OPDS server at http://mylarhost/opds/ - keep in mind your scheme (http or https), your hostname, port, and any http_root you may have set. </small></br>
|
||||
<div class="row">
|
||||
<label>OPDS Page Size</label>
|
||||
<input type="text" name="opds_pagesize" value="${config['opds_pagesize']}" size="10">
|
||||
</div>
|
||||
<input id="opds_authentication" type="checkbox" name="opds_authentication" value="1" ${config['opds_authentication']} /><label>OPDS Requires Credentials</label>
|
||||
<%
|
||||
opds_notes = "Require authentication for OPDS. If checked\nyou will need to provide a username/password.\nThe service user name will work (if set). Additionally,\nyou can provide a user with only OPDS access below.\nNOTE: If this is not checked, OPDS will be available\nwithout a password."
|
||||
|
|
|
@ -368,6 +368,7 @@ _CONFIG_DEFINITIONS = OrderedDict({
|
|||
'OPDS_USERNAME': (str, 'OPDS', None),
|
||||
'OPDS_PASSWORD': (str, 'OPDS', None),
|
||||
'OPDS_METAINFO': (bool, 'OPDS', False),
|
||||
'OPDS_PAGESIZE': (int, 'OPDS', 30),
|
||||
|
||||
})
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class OPDS(object):
|
|||
|
||||
def __init__(self):
|
||||
self.cmd = None
|
||||
self.PAGE_SIZE=30
|
||||
self.PAGE_SIZE=mylar.CONFIG.OPDS_PAGESIZE
|
||||
self.img = None
|
||||
self.issue_id = None
|
||||
self.file = None
|
||||
|
|
|
@ -5149,6 +5149,7 @@ class WebInterface(object):
|
|||
"opds_username": mylar.CONFIG.OPDS_USERNAME,
|
||||
"opds_password": mylar.CONFIG.OPDS_PASSWORD,
|
||||
"opds_metainfo": helpers.checked(mylar.CONFIG.OPDS_METAINFO),
|
||||
"opds_pagesize": mylar.CONFIG.OPDS_PAGESIZE,
|
||||
"dlstats": dlprovstats,
|
||||
"dltotals": freq_tot,
|
||||
"alphaindex": mylar.CONFIG.ALPHAINDEX
|
||||
|
@ -5397,7 +5398,7 @@ class WebInterface(object):
|
|||
'lowercase_filenames', 'autowant_upcoming', 'autowant_all', 'comic_cover_local', 'alternate_latest_series_covers', 'cvinfo', 'snatchedtorrent_notify',
|
||||
'prowl_enabled', 'prowl_onsnatch', 'pushover_enabled', 'pushover_onsnatch', 'boxcar_enabled',
|
||||
'boxcar_onsnatch', 'pushbullet_enabled', 'pushbullet_onsnatch', 'telegram_enabled', 'telegram_onsnatch', 'slack_enabled', 'slack_onsnatch',
|
||||
'email_enabled', 'email_enc', 'email_ongrab', 'email_onpost', 'opds_enable', 'opds_authentication', 'opds_metainfo', 'enable_ddl', 'deluge_pause'] #enable_public
|
||||
'email_enabled', 'email_enc', 'email_ongrab', 'email_onpost', 'opds_enable', 'opds_authentication', 'opds_metainfo', 'opds_pagesize', 'enable_ddl', 'deluge_pause'] #enable_public
|
||||
|
||||
for checked_config in checked_configs:
|
||||
if checked_config not in kwargs:
|
||||
|
|
Loading…
Reference in a new issue