mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Handling if reader.metadata is None. Not sending ready event.
This commit is contained in:
parent
b019d7030b
commit
1161476c61
2 changed files with 1 additions and 8 deletions
7
main.py
7
main.py
|
|
@ -11,8 +11,6 @@ from wrolpi import root_api, BEFORE_STARTUP_FUNCTIONS, admin
|
|||
from wrolpi.common import logger, get_config, import_modules, check_media_directory, limit_concurrent, \
|
||||
wrol_mode_enabled, cancel_refresh_tasks
|
||||
from wrolpi.downloader import download_manager, import_downloads_config
|
||||
from wrolpi.events import Events
|
||||
from wrolpi import flags
|
||||
from wrolpi.root_api import api_app
|
||||
from wrolpi.vars import PROJECT_DIR, DOCKERIZED, PYTEST
|
||||
from wrolpi.version import get_version_string
|
||||
|
|
@ -173,11 +171,6 @@ async def startup(app: Sanic):
|
|||
await import_downloads_config()
|
||||
|
||||
|
||||
@api_app.after_server_start
|
||||
async def ready(app: Sanic):
|
||||
Events.send_ready()
|
||||
|
||||
|
||||
@api_app.after_server_start
|
||||
async def periodic_downloads(app: Sanic):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ class PDFIndexer(Indexer, ABC):
|
|||
|
||||
data = PDFMetadata()
|
||||
|
||||
if reader is None:
|
||||
if reader is None or reader.metadata is None:
|
||||
logger.error(f'Cannot get title of {path} PyPDF2 is not installed.')
|
||||
data.title = super().get_title(file)
|
||||
return data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue