From 3ac494222f0d67520d3847e6399352083a0e7bed Mon Sep 17 00:00:00 2001 From: Rupa Schomaker Date: Thu, 23 Nov 2017 16:00:18 -0600 Subject: [PATCH] skip file rather than try to serve it up. Prevents error, but now the dir count and the real count differ. Probably want to only list items at the directory level when the item physically exists on disk. --- mylar/opds.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mylar/opds.py b/mylar/opds.py index a750a119..1b989d89 100644 --- a/mylar/opds.py +++ b/mylar/opds.py @@ -367,6 +367,9 @@ class OPDS(object): title = escape('Annual %s - %s' % (issue['Issue_Number'], issue['IssueName'])) fileloc = os.path.join(comic['ComicLocation'],issue['Location']) + if not os.path.isfile(fileloc): + logger.debug("Missing File: %s" % (fileloc)) + continue metainfo = None if mylar.CONFIG.OPDS_METAINFO: metainfo = mylar.helpers.IssueDetails(fileloc)