esentity 0.2.294__tar.gz → 0.2.295__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {esentity-0.2.294 → esentity-0.2.295}/PKG-INFO +1 -1
- esentity-0.2.295/esentity/__init__.py +1 -0
- {esentity-0.2.294 → esentity-0.2.295}/esentity/api.py +18 -2
- {esentity-0.2.294 → esentity-0.2.295}/pyproject.toml +1 -1
- {esentity-0.2.294 → esentity-0.2.295}/setup.py +1 -1
- esentity-0.2.294/esentity/__init__.py +0 -1
- {esentity-0.2.294 → esentity-0.2.295}/esentity/encoder.py +0 -0
- {esentity-0.2.294 → esentity-0.2.295}/esentity/ext.py +0 -0
- {esentity-0.2.294 → esentity-0.2.295}/esentity/filters.py +0 -0
- {esentity-0.2.294 → esentity-0.2.295}/esentity/models.py +0 -0
- {esentity-0.2.294 → esentity-0.2.295}/esentity/routes.py +0 -0
- {esentity-0.2.294 → esentity-0.2.295}/esentity/tasks.py +0 -0
- {esentity-0.2.294 → esentity-0.2.295}/esentity/telegram.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.2.295'
|
|
@@ -1788,17 +1788,33 @@ class ApiContentSlots(Resource):
|
|
|
1788
1788
|
_sort=_sort,
|
|
1789
1789
|
)
|
|
1790
1790
|
|
|
1791
|
-
def process_page(item, process_content=False):
|
|
1791
|
+
def process_page(item, process_content=False, process_media=False):
|
|
1792
1792
|
_doc = item['_source']
|
|
1793
1793
|
_doc['id'] = item['_id']
|
|
1794
1794
|
_doc['full_path'] = get_page_url(_doc, True)
|
|
1795
|
+
|
|
1796
|
+
if process_media:
|
|
1797
|
+
if _doc['cover']:
|
|
1798
|
+
path = current_app.images.path(_doc['cover'])
|
|
1799
|
+
if os.path.isfile(path):
|
|
1800
|
+
image = Image.open(path)
|
|
1801
|
+
w, h = image.size
|
|
1802
|
+
_doc['cover_info'] = f'{w}x{h}'
|
|
1803
|
+
|
|
1804
|
+
if _doc['screen']:
|
|
1805
|
+
path = current_app.images.path(_doc['screen'])
|
|
1806
|
+
if os.path.isfile(path):
|
|
1807
|
+
image = Image.open(path)
|
|
1808
|
+
w, h = image.size
|
|
1809
|
+
_doc['screen_info'] = f'{w}x{h}'
|
|
1810
|
+
|
|
1795
1811
|
if process_content:
|
|
1796
1812
|
_doc.update(process_content_stats(_doc.get('content')))
|
|
1797
1813
|
return _doc
|
|
1798
1814
|
|
|
1799
1815
|
return {
|
|
1800
1816
|
'ok': True,
|
|
1801
|
-
'items': [process_page(item, process_content='columns' in data and 'content' in data['columns']) for item in pages],
|
|
1817
|
+
'items': [process_page(item, process_content='columns' in data and 'content' in data['columns'], process_media='columns' in data and 'media' in data['columns']) for item in pages],
|
|
1802
1818
|
'total': total,
|
|
1803
1819
|
}
|
|
1804
1820
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '0.2.294'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|