summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/transforms/elasticsearch.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_tools/transforms/elasticsearch.py')
-rw-r--r--python/fatcat_tools/transforms/elasticsearch.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/fatcat_tools/transforms/elasticsearch.py b/python/fatcat_tools/transforms/elasticsearch.py
index 91086a0c..645142de 100644
--- a/python/fatcat_tools/transforms/elasticsearch.py
+++ b/python/fatcat_tools/transforms/elasticsearch.py
@@ -137,8 +137,10 @@ def release_to_elasticsearch(entity, force_bool=True):
if f.extra and f.extra.get('shadows'):
# TODO: shadow check goes here
in_shadows = True
- is_pdf = 'pdf' in (f.mimetype or '') or 'pdf' in url.lower()
+ is_pdf = 'pdf' in (f.mimetype or '')
for url in (f.urls or []):
+ if not f.mimetype and 'pdf' in url.lower():
+ is_pdf = True
if url.url.lower().startswith('http'):
in_web = True
if url.rel in ('dweb', 'p2p', 'ipfs', 'dat', 'torrent'):