nucliadb 6.6.1.post4631__py3-none-any.whl → 6.6.1.post4640__py3-none-any.whl
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.
- nucliadb/ingest/orm/resource.py +16 -4
- nucliadb/search/search/query_parser/old_filters.py +1 -1
- {nucliadb-6.6.1.post4631.dist-info → nucliadb-6.6.1.post4640.dist-info}/METADATA +6 -6
- {nucliadb-6.6.1.post4631.dist-info → nucliadb-6.6.1.post4640.dist-info}/RECORD +7 -7
- {nucliadb-6.6.1.post4631.dist-info → nucliadb-6.6.1.post4640.dist-info}/WHEEL +0 -0
- {nucliadb-6.6.1.post4631.dist-info → nucliadb-6.6.1.post4640.dist-info}/entry_points.txt +0 -0
- {nucliadb-6.6.1.post4631.dist-info → nucliadb-6.6.1.post4640.dist-info}/top_level.txt +0 -0
nucliadb/ingest/orm/resource.py
CHANGED
@@ -602,7 +602,7 @@ class Resource:
|
|
602
602
|
FieldType.LINK,
|
603
603
|
load=False,
|
604
604
|
)
|
605
|
-
maybe_update_basic_thumbnail(self.basic, link_extracted_data.link_thumbnail)
|
605
|
+
maybe_update_basic_thumbnail(self.basic, link_extracted_data.link_thumbnail, self.kb.kbid)
|
606
606
|
|
607
607
|
await field_link.set_link_extracted_data(link_extracted_data)
|
608
608
|
|
@@ -661,7 +661,7 @@ class Resource:
|
|
661
661
|
# uri can change after extraction
|
662
662
|
await field_file.set_file_extracted_data(file_extracted_data)
|
663
663
|
maybe_update_basic_icon(self.basic, file_extracted_data.icon)
|
664
|
-
maybe_update_basic_thumbnail(self.basic, file_extracted_data.file_thumbnail)
|
664
|
+
maybe_update_basic_thumbnail(self.basic, file_extracted_data.file_thumbnail, self.kb.kbid)
|
665
665
|
self.modified = True
|
666
666
|
|
667
667
|
async def _should_update_resource_title_from_file_metadata(self) -> bool:
|
@@ -722,7 +722,9 @@ class Resource:
|
|
722
722
|
)
|
723
723
|
await field_obj.set_field_metadata(field_metadata)
|
724
724
|
|
725
|
-
maybe_update_basic_thumbnail(
|
725
|
+
maybe_update_basic_thumbnail(
|
726
|
+
self.basic, field_metadata.metadata.metadata.thumbnail, self.kb.kbid
|
727
|
+
)
|
726
728
|
|
727
729
|
update_basic_computedmetadata_classifications(self.basic, field_metadata)
|
728
730
|
self.modified = True
|
@@ -879,13 +881,23 @@ def maybe_update_basic_icon(basic: PBBasic, mimetype: Optional[str]) -> bool:
|
|
879
881
|
return True
|
880
882
|
|
881
883
|
|
882
|
-
def maybe_update_basic_thumbnail(basic: PBBasic, thumbnail: Optional[CloudFile]) -> bool:
|
884
|
+
def maybe_update_basic_thumbnail(basic: PBBasic, thumbnail: Optional[CloudFile], kbid: str) -> bool:
|
883
885
|
if basic.thumbnail or thumbnail is None:
|
884
886
|
return False
|
885
887
|
basic.thumbnail = CloudLink.format_reader_download_uri(thumbnail.uri)
|
888
|
+
fix_kbid_in_thumbnail(basic, kbid)
|
886
889
|
return True
|
887
890
|
|
888
891
|
|
892
|
+
def fix_kbid_in_thumbnail(basic: PBBasic, kbid: str):
|
893
|
+
if basic.thumbnail.startswith("/kb/") and not basic.thumbnail.startswith(f"/kb/{kbid}/"):
|
894
|
+
# Replace the kbid in the thumbnail if it doesn't match the current kbid. This is necessary for
|
895
|
+
# resources that have been backed up and we are restoring them to a different kbid.
|
896
|
+
parts = basic.thumbnail.split("/", 3)
|
897
|
+
parts[2] = kbid
|
898
|
+
basic.thumbnail = "/".join(parts)
|
899
|
+
|
900
|
+
|
889
901
|
def update_basic_languages(basic: Basic, languages: list[str]) -> bool:
|
890
902
|
if len(languages) == 0:
|
891
903
|
return False
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: nucliadb
|
3
|
-
Version: 6.6.1.
|
3
|
+
Version: 6.6.1.post4640
|
4
4
|
Summary: NucliaDB
|
5
5
|
Author-email: Nuclia <nucliadb@nuclia.com>
|
6
6
|
License-Expression: AGPL-3.0-or-later
|
@@ -19,11 +19,11 @@ Classifier: Programming Language :: Python :: 3.12
|
|
19
19
|
Classifier: Programming Language :: Python :: 3 :: Only
|
20
20
|
Requires-Python: <4,>=3.9
|
21
21
|
Description-Content-Type: text/markdown
|
22
|
-
Requires-Dist: nucliadb-telemetry[all]>=6.6.1.
|
23
|
-
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.6.1.
|
24
|
-
Requires-Dist: nucliadb-protos>=6.6.1.
|
25
|
-
Requires-Dist: nucliadb-models>=6.6.1.
|
26
|
-
Requires-Dist: nidx-protos>=6.6.1.
|
22
|
+
Requires-Dist: nucliadb-telemetry[all]>=6.6.1.post4640
|
23
|
+
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.6.1.post4640
|
24
|
+
Requires-Dist: nucliadb-protos>=6.6.1.post4640
|
25
|
+
Requires-Dist: nucliadb-models>=6.6.1.post4640
|
26
|
+
Requires-Dist: nidx-protos>=6.6.1.post4640
|
27
27
|
Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
|
28
28
|
Requires-Dist: nuclia-models>=0.43.0
|
29
29
|
Requires-Dist: uvicorn[standard]
|
@@ -163,7 +163,7 @@ nucliadb/ingest/orm/exceptions.py,sha256=k4Esv4NtL4TrGTcsQpwrSfDhPQpiYcRbB1SpYmB
|
|
163
163
|
nucliadb/ingest/orm/index_message.py,sha256=DWMTHJoVamUbK8opKl5csDvxfgz7c2j7phG1Ut4yIxk,15724
|
164
164
|
nucliadb/ingest/orm/knowledgebox.py,sha256=_rkeTMIXMhR64gbYtZpFHoUHghV2DTJ2lUBqZsoqC_4,23898
|
165
165
|
nucliadb/ingest/orm/metrics.py,sha256=OiuggTh-n3kZHA2G73NEUdIlh8c3yFrbusI88DK-Mko,1273
|
166
|
-
nucliadb/ingest/orm/resource.py,sha256=
|
166
|
+
nucliadb/ingest/orm/resource.py,sha256=yB0HWC3jc_1b-zXu-3FJCKOdAPPSb1aRBHpbZhsvyQk,37749
|
167
167
|
nucliadb/ingest/orm/utils.py,sha256=fCQRuyecgqhaY7mcBG93oaXMkzkKb9BFjOcy4-ZiSNw,2693
|
168
168
|
nucliadb/ingest/orm/processor/__init__.py,sha256=Aqd9wCNTvggkMkCY3WvoI8spdr94Jnqk-0iq9XpLs18,922
|
169
169
|
nucliadb/ingest/orm/processor/auditing.py,sha256=TeYhXGJRyQ7ROytbb2u8R0fIh_FYi3HgTu3S1ribY3U,4623
|
@@ -273,7 +273,7 @@ nucliadb/search/search/query_parser/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyv
|
|
273
273
|
nucliadb/search/search/query_parser/exceptions.py,sha256=sVl9gRNzhE-s480LBBVkiXzNRbKhYRQN5F3it5tNNp8,939
|
274
274
|
nucliadb/search/search/query_parser/fetcher.py,sha256=nP4EySj2BvH10QgCvgzvp13Nf22wwfHsdLbDoPlH2cQ,16831
|
275
275
|
nucliadb/search/search/query_parser/models.py,sha256=kAslqX_-zaIdUpcpdNU2a5uQPQh7LC605qWLZ4aZ5T4,5064
|
276
|
-
nucliadb/search/search/query_parser/old_filters.py,sha256=
|
276
|
+
nucliadb/search/search/query_parser/old_filters.py,sha256=GsU3T3-WiSPvjucP7evHkshzAWZOli8qsuXChvWRCY0,9092
|
277
277
|
nucliadb/search/search/query_parser/parsers/__init__.py,sha256=ySCNSdbesLXGZyR88919njulA6UE10_3PhqMG_Yj1o4,1034
|
278
278
|
nucliadb/search/search/query_parser/parsers/ask.py,sha256=eTz8wS-EJHuAagR384h6TT64itymFZRpfZJGX8r6aZM,2771
|
279
279
|
nucliadb/search/search/query_parser/parsers/catalog.py,sha256=JuDiBL2wdjAuEFEPo0e2nQ4VqWjF3FXakT0ziZk3Oes,7495
|
@@ -376,8 +376,8 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
|
|
376
376
|
nucliadb/writer/tus/s3.py,sha256=vF0NkFTXiXhXq3bCVXXVV-ED38ECVoUeeYViP8uMqcU,8357
|
377
377
|
nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
|
378
378
|
nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
|
379
|
-
nucliadb-6.6.1.
|
380
|
-
nucliadb-6.6.1.
|
381
|
-
nucliadb-6.6.1.
|
382
|
-
nucliadb-6.6.1.
|
383
|
-
nucliadb-6.6.1.
|
379
|
+
nucliadb-6.6.1.post4640.dist-info/METADATA,sha256=9NDGw_2TtVLrkEwI6F9OKW6aNWcUyCxYOnXB6bp3eVg,4158
|
380
|
+
nucliadb-6.6.1.post4640.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
381
|
+
nucliadb-6.6.1.post4640.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
|
382
|
+
nucliadb-6.6.1.post4640.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
|
383
|
+
nucliadb-6.6.1.post4640.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|