Wols-笨狼
IImmich
•Created by Wols-笨狼 on 2/20/2025 in #help-desk-support
How to force upload image from CLI?
Nah, let's me study of EXIF data, since the photo is come from
cv2.imwrite()
, I'm not sure we have that data or not.
Any way thanks, I'll try it tomorrow.22 replies
IImmich
•Created by Wols-笨狼 on 2/20/2025 in #help-desk-support
How to force upload image from CLI?
Is any way I can change that hash?
22 replies
IImmich
•Created by Wols-笨狼 on 2/20/2025 in #help-desk-support
How to force upload image from CLI?
@bo0tzz Sorry but do you have any idea how I can make this two file have two different id?
22 replies
IImmich
•Created by Wols-笨狼 on 2/20/2025 in #help-desk-support
How to force upload image from CLI?
(node:internal/async_hooks:130:17) {
immich_server | severity_local: 'ERROR',
immich_server | severity: 'ERROR',
immich_server | code: '23505',
immich_server | detail: 'Key ("ownerId", checksum)=(da38ebe3-942c-420c-94c7-94c896a20407, \\xf9115ac9d27a73b6bb2e232e6f6d1bee519b765a) already exists.',
immich_server | schema_name: 'public',
immich_server | table_name: 'assets',
immich_server | constraint_name: 'UQ_assets_owner_checksum',
immich_server | file: 'nbtinsert.c',
immich_server | line: '663',
immich_server | routine: '_bt_check_unique'
immich_server | },
immich_server | sql: 'insert into "assets" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "isArchived", "duration", "isVisible", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15) returning *',
immich_server | params: [
immich_server | 'da38ebe3-942c-420c-94c7-94c896a20407',
immich_server | null,
immich_server | <Buffer f9 11 5a c9 d2 7a 73 b6 bb 2e 23 2e 6f 6d 1b ee 51 9b 76 5a>,
immich_server | 'upload/upload/da38ebe3-942c-420c-94c7-94c896a20407/ad/12/ad12ce15-e282-4566-85c4-bead93260429.png',
immich_server | '/home/wols/GFurProject/2024_12_24_16_49_50.png-1735030190.5480473',
immich_server | 'python',
immich_server | 2024-12-24T16:49:50.548Z,
immich_server | 2024-12-24T16:49:50.548Z,
immich_server | 2024-12-24T16:49:50.548Z,
immich_server | 'IMAGE',
immich_server | false,
immich_server | false,
immich_server | null,
true,'2024_12_24_16_49_50.png'
(node:internal/async_hooks:130:17) {
immich_server | severity_local: 'ERROR',
immich_server | severity: 'ERROR',
immich_server | code: '23505',
immich_server | detail: 'Key ("ownerId", checksum)=(da38ebe3-942c-420c-94c7-94c896a20407, \\xf9115ac9d27a73b6bb2e232e6f6d1bee519b765a) already exists.',
immich_server | schema_name: 'public',
immich_server | table_name: 'assets',
immich_server | constraint_name: 'UQ_assets_owner_checksum',
immich_server | file: 'nbtinsert.c',
immich_server | line: '663',
immich_server | routine: '_bt_check_unique'
immich_server | },
immich_server | sql: 'insert into "assets" ("ownerId", "libraryId", "checksum", "originalPath", "deviceAssetId", "deviceId", "fileCreatedAt", "fileModifiedAt", "localDateTime", "type", "isFavorite", "isArchived", "duration", "isVisible", "originalFileName") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15) returning *',
immich_server | params: [
immich_server | 'da38ebe3-942c-420c-94c7-94c896a20407',
immich_server | null,
immich_server | <Buffer f9 11 5a c9 d2 7a 73 b6 bb 2e 23 2e 6f 6d 1b ee 51 9b 76 5a>,
immich_server | 'upload/upload/da38ebe3-942c-420c-94c7-94c896a20407/ad/12/ad12ce15-e282-4566-85c4-bead93260429.png',
immich_server | '/home/wols/GFurProject/2024_12_24_16_49_50.png-1735030190.5480473',
immich_server | 'python',
immich_server | 2024-12-24T16:49:50.548Z,
immich_server | 2024-12-24T16:49:50.548Z,
immich_server | 2024-12-24T16:49:50.548Z,
immich_server | 'IMAGE',
immich_server | false,
immich_server | false,
immich_server | null,
true,'2024_12_24_16_49_50.png'
22 replies
IImmich
•Created by Wols-笨狼 on 2/20/2025 in #help-desk-support
How to force upload image from CLI?
$ sudo docker compose logs
...
immich_server | Query failed : {
immich_server | durationMs: 26.172741000074893,
immich_server | error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
immich_server | at ErrorResponse (/usr/src/app/node_modules/postgres/cjs/src/connection.js:788:26)
immich_server | at handle (/usr/src/app/node_modules/postgres/cjs/src/connection.js:474:6)
immich_server | at Socket.data (/usr/src/app/node_modules/postgres/cjs/src/connection.js:315:9)
immich_server | at Socket.emit (node:events:524:28)
immich_server | at addChunk (node:internal/streams/readable:561:12)
immich_server | at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
immich_server | at Readable.push (node:internal/streams/readable:392:5)
immich_server | at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
immich_server | at TCP.callbackTrampoline
$ sudo docker compose logs
...
immich_server | Query failed : {
immich_server | durationMs: 26.172741000074893,
immich_server | error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
immich_server | at ErrorResponse (/usr/src/app/node_modules/postgres/cjs/src/connection.js:788:26)
immich_server | at handle (/usr/src/app/node_modules/postgres/cjs/src/connection.js:474:6)
immich_server | at Socket.data (/usr/src/app/node_modules/postgres/cjs/src/connection.js:315:9)
immich_server | at Socket.emit (node:events:524:28)
immich_server | at addChunk (node:internal/streams/readable:561:12)
immich_server | at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
immich_server | at Readable.push (node:internal/streams/readable:392:5)
immich_server | at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
immich_server | at TCP.callbackTrampoline
22 replies
IImmich
•Created by Wols-笨狼 on 2/20/2025 in #help-desk-support
How to force upload image from CLI?
Any idea where is this ID create in source code? Maybe I camn have look
22 replies
IImmich
•Created by Wols-笨狼 on 2/20/2025 in #help-desk-support
How to force upload image from CLI?
Here is another try by api.
First I get all photo file name and id by
And then try upload
/api/albums/:id
Name:2025_02_14_14_07_22.pngcv.png, id:abc859a6-2fcf-4ebe-a1fe-aaf9e8d10016
Name:2025_02_14_14_07_22.png, id:f1b881ac-a60b-4a68-b924-1edebbb7ce65
Name:2025_02_14_14_06_00.png, id:b1764808-9936-41e8-b296-722ba8513379
Name:2025_02_14_14_04_36.png, id:7ed0fc80-09f6-4856-ad2a-4eb42d860625
Name:2025_02_14_14_03_25.png, id:a084b65e-9baf-4173-a7a1-abf88f1c1ef1
Name:2025_02_14_13_54_40.png, id:d1aaf2a8-7bf9-4cc1-955f-c6e3dd2c820d
Name:2025_02_14_13_51_53.png, id:ca5f3c55-7100-4f4a-8ae3-14fedd4d80c2
Name:2025_02_10_13_55_13.png, id:1ec9f19d-85c4-44f7-a696-3feedf80ab64
Name:2025_02_08_15_04_17.png, id:270bc847-02b0-4bf8-81ea-b7995ec3cc23
Name:2024_12_24_17_25_22.png, id:30a94ad2-b831-4e14-89a9-4ebd9fc01653
Name:2024_12_24_16_41_02.png, id:9a43a371-9d64-4121-b889-8af2086d1f32
Name:2024_12_24_16_37_48.png, id:c57e3c26-f676-4a37-bb02-9936baecea63
Name:2024_12_11_12_08_27.png, id:bc446d3a-bc0a-4822-98c9-a0968ab1c8ef
Name:2024_12_11_11_46_08.png, id:b9caecfd-b449-4fe4-97b4-6995afd4e25a
Name:2024_12_11_11_27_46.png, id:ac2a6c39-d089-4c71-a34f-6d8ea4b96fe6
Name:2025_02_14_14_07_22.pngcv.png, id:abc859a6-2fcf-4ebe-a1fe-aaf9e8d10016
Name:2025_02_14_14_07_22.png, id:f1b881ac-a60b-4a68-b924-1edebbb7ce65
Name:2025_02_14_14_06_00.png, id:b1764808-9936-41e8-b296-722ba8513379
Name:2025_02_14_14_04_36.png, id:7ed0fc80-09f6-4856-ad2a-4eb42d860625
Name:2025_02_14_14_03_25.png, id:a084b65e-9baf-4173-a7a1-abf88f1c1ef1
Name:2025_02_14_13_54_40.png, id:d1aaf2a8-7bf9-4cc1-955f-c6e3dd2c820d
Name:2025_02_14_13_51_53.png, id:ca5f3c55-7100-4f4a-8ae3-14fedd4d80c2
Name:2025_02_10_13_55_13.png, id:1ec9f19d-85c4-44f7-a696-3feedf80ab64
Name:2025_02_08_15_04_17.png, id:270bc847-02b0-4bf8-81ea-b7995ec3cc23
Name:2024_12_24_17_25_22.png, id:30a94ad2-b831-4e14-89a9-4ebd9fc01653
Name:2024_12_24_16_41_02.png, id:9a43a371-9d64-4121-b889-8af2086d1f32
Name:2024_12_24_16_37_48.png, id:c57e3c26-f676-4a37-bb02-9936baecea63
Name:2024_12_11_12_08_27.png, id:bc446d3a-bc0a-4822-98c9-a0968ab1c8ef
Name:2024_12_11_11_46_08.png, id:b9caecfd-b449-4fe4-97b4-6995afd4e25a
Name:2024_12_11_11_27_46.png, id:ac2a6c39-d089-4c71-a34f-6d8ea4b96fe6
2024_12_24_16_49_50.png
, also got error
{'status': 'duplicate', 'id': '9a43a371-9d64-4121-b889-8af2086d1f32'}
{'status': 'duplicate', 'id': '9a43a371-9d64-4121-b889-8af2086d1f32'}
22 replies
IImmich
•Created by Wols-笨狼 on 2/20/2025 in #help-desk-support
How to force upload image from CLI?
{'id': 'e3b9fb11-4e6f-4e7b-ae27-b1d99da97379', 'deviceAssetId': '2024_12_24_16_49_50.png-3418636', 'ownerId': 'da38ebe3-942c-420c-94c7-94c896a20407', 'deviceId': 'CLI', 'libraryId': None, 'type': 'IMAGE', 'originalPath': 'upload/library/admin/2024/2024-12-24/2024_12_24_16_49_50.png', 'originalFileName': '2024_12_24_16_49_50.png', 'originalMimeType': 'image/png', 'thumbhash': 'EviFC4ItCNlfdqcuIKsHhQYWeHh4iIc=', 'fileCreatedAt': '2024-12-24T08:49:50.548+00:00', 'fileModifiedAt': '2024-12-24T08:49:50.548+00:00', 'localDateTime': '2024-12-24T08:49:50.548+00:00', 'updatedAt': '2025-02-21T06:02:42.470018+00:00', 'isFavorite': False, 'isArchived': False, 'isTrashed': False, 'duration': '0:00:00.00000', 'exifInfo': {'make': None, 'model': None, 'exifImageWidth': 1920, 'exifImageHeight': 1080, 'fileSizeInByte': 3418636, 'orientation': None, 'dateTimeOriginal': '2024-12-24T08:49:50.548+00:00', 'modifyDate': '2024-12-24T08:49:50.548+00:00', 'timeZone': None, 'lensModel': None, 'fNumber': None, 'focalLength': None, 'iso': None, 'exposureTime': None, 'latitude': None, 'longitude': None, 'city': None, 'state': None, 'country': None, 'description': '', 'projectionType': None, 'rating': None}, 'livePhotoVideoId': None, 'people': [], 'checksum': '+RFaydJ6c7a7LiMub20b7lGbdlo=', 'isOffline': False, 'hasMetadata': True, 'duplicateId': None, 'resized': True}
{'id': 'e3b9fb11-4e6f-4e7b-ae27-b1d99da97379', 'deviceAssetId': '2024_12_24_16_49_50.png-3418636', 'ownerId': 'da38ebe3-942c-420c-94c7-94c896a20407', 'deviceId': 'CLI', 'libraryId': None, 'type': 'IMAGE', 'originalPath': 'upload/library/admin/2024/2024-12-24/2024_12_24_16_49_50.png', 'originalFileName': '2024_12_24_16_49_50.png', 'originalMimeType': 'image/png', 'thumbhash': 'EviFC4ItCNlfdqcuIKsHhQYWeHh4iIc=', 'fileCreatedAt': '2024-12-24T08:49:50.548+00:00', 'fileModifiedAt': '2024-12-24T08:49:50.548+00:00', 'localDateTime': '2024-12-24T08:49:50.548+00:00', 'updatedAt': '2025-02-21T06:02:42.470018+00:00', 'isFavorite': False, 'isArchived': False, 'isTrashed': False, 'duration': '0:00:00.00000', 'exifInfo': {'make': None, 'model': None, 'exifImageWidth': 1920, 'exifImageHeight': 1080, 'fileSizeInByte': 3418636, 'orientation': None, 'dateTimeOriginal': '2024-12-24T08:49:50.548+00:00', 'modifyDate': '2024-12-24T08:49:50.548+00:00', 'timeZone': None, 'lensModel': None, 'fNumber': None, 'focalLength': None, 'iso': None, 'exposureTime': None, 'latitude': None, 'longitude': None, 'city': None, 'state': None, 'country': None, 'description': '', 'projectionType': None, 'rating': None}, 'livePhotoVideoId': None, 'people': [], 'checksum': '+RFaydJ6c7a7LiMub20b7lGbdlo=', 'isOffline': False, 'hasMetadata': True, 'duplicateId': None, 'resized': True}
22 replies
IImmich
•Created by Wols-笨狼 on 2/20/2025 in #help-desk-support
How to force upload image from CLI?
This time I try upload
2024_12_24_16_49_50.png
first, then upload the other.
I found that I have two file have same thumb hash.
Is this is the reason? Why and how can I fix it?
This two file are made by openCV and Kivy, so I am pretty sure they are different, not copy paste
{'id': '690e8def-20e3-46cd-a3ec-cacb65f62658', 'deviceAssetId': '2024_12_24_16_41_02.png-3418636', 'ownerId': '6fb21a2b-7b7c-4ae6-9143-cd7207263aa3', 'deviceId': 'CLI', 'libraryId': None, 'type': 'IMAGE', 'originalPath': 'upload/upload/6fb21a2b-7b7c-4ae6-9143-cd7207263aa3/83/5b/835be438-b4d7-4d79-9aa1-154950df51f6.png', 'originalFileName': '2024_12_24_16_41_02.png', 'originalMimeType': 'image/png', 'thumbhash': 'EviFC4ItCNlfdqcuIKsHhQYWeHh4iIc=', 'fileCreatedAt': '2024-12-24T08:41:02.439+00:00', 'fileModifiedAt': '2024-12-24T08:41:02.439+00:00', 'localDateTime': '2024-12-24T08:41:02.439+00:00', 'updatedAt': '2025-02-13T08:19:09.831003+00:00', 'isFavorite': False, 'isArchived': False, 'isTrashed': False, 'duration': '0:00:00.00000', 'exifInfo': {'make': None, 'model': None, 'exifImageWidth': 1920, 'exifImageHeight': 1080, 'fileSizeInByte': 3418636, 'orientation': None, 'dateTimeOriginal': '2024-12-24T08:41:02.439+00:00', 'modifyDate': '2024-12-24T08:41:02.439+00:00', 'timeZone': None, 'lensModel': None, 'fNumber': None, 'focalLength': None, 'iso': None, 'exposureTime': None, 'latitude': None, 'longitude': None, 'city': None, 'state': None, 'country': None, 'description': '', 'projectionType': None, 'rating': None}, 'livePhotoVideoId': None, 'people': [], 'checksum': '+RFaydJ6c7a7LiMub20b7lGbdlo=', 'isOffline': False, 'hasMetadata': True, 'duplicateId': None, 'resized': True}
{'id': '690e8def-20e3-46cd-a3ec-cacb65f62658', 'deviceAssetId': '2024_12_24_16_41_02.png-3418636', 'ownerId': '6fb21a2b-7b7c-4ae6-9143-cd7207263aa3', 'deviceId': 'CLI', 'libraryId': None, 'type': 'IMAGE', 'originalPath': 'upload/upload/6fb21a2b-7b7c-4ae6-9143-cd7207263aa3/83/5b/835be438-b4d7-4d79-9aa1-154950df51f6.png', 'originalFileName': '2024_12_24_16_41_02.png', 'originalMimeType': 'image/png', 'thumbhash': 'EviFC4ItCNlfdqcuIKsHhQYWeHh4iIc=', 'fileCreatedAt': '2024-12-24T08:41:02.439+00:00', 'fileModifiedAt': '2024-12-24T08:41:02.439+00:00', 'localDateTime': '2024-12-24T08:41:02.439+00:00', 'updatedAt': '2025-02-13T08:19:09.831003+00:00', 'isFavorite': False, 'isArchived': False, 'isTrashed': False, 'duration': '0:00:00.00000', 'exifInfo': {'make': None, 'model': None, 'exifImageWidth': 1920, 'exifImageHeight': 1080, 'fileSizeInByte': 3418636, 'orientation': None, 'dateTimeOriginal': '2024-12-24T08:41:02.439+00:00', 'modifyDate': '2024-12-24T08:41:02.439+00:00', 'timeZone': None, 'lensModel': None, 'fNumber': None, 'focalLength': None, 'iso': None, 'exposureTime': None, 'latitude': None, 'longitude': None, 'city': None, 'state': None, 'country': None, 'description': '', 'projectionType': None, 'rating': None}, 'livePhotoVideoId': None, 'people': [], 'checksum': '+RFaydJ6c7a7LiMub20b7lGbdlo=', 'isOffline': False, 'hasMetadata': True, 'duplicateId': None, 'resized': True}
22 replies
IImmich
•Created by Wols-笨狼 on 2/20/2025 in #help-desk-support
How to force upload image from CLI?
I remove
Then
Still will got duplicate assets
DB_DATA_LOCATION
UPLOAD_LOCATION
DB_DATA_LOCATION
UPLOAD_LOCATION
$ sudo docker compose up -d
$ immich upload --skip-hash --album --recursive ../myProject/
Crawling for assets...
Skipping hash check, assuming all files are new
Uploading assets | ██████████████████████████░░░░░░░░░░░░░░ | 63% | ETA: 4s | 47.5 MB/47.5 MB
Successfully uploaded 17 new assets (30.4 MB)
Skipped 5 duplicate assets (17.1 MB)
Creating albums | ████████████████████████████████████████ | 100% | ETA: 0s | 2/2 albums
Successfully created 2 new albums
Successfully updated 22 assets
Adding assets to albums | ████████████████████████████████████████ | 100% | ETA: 0s | 22/22 assets
$ sudo docker compose up -d
$ immich upload --skip-hash --album --recursive ../myProject/
Crawling for assets...
Skipping hash check, assuming all files are new
Uploading assets | ██████████████████████████░░░░░░░░░░░░░░ | 63% | ETA: 4s | 47.5 MB/47.5 MB
Successfully uploaded 17 new assets (30.4 MB)
Skipped 5 duplicate assets (17.1 MB)
Creating albums | ████████████████████████████████████████ | 100% | ETA: 0s | 2/2 albums
Successfully created 2 new albums
Successfully updated 22 assets
Adding assets to albums | ████████████████████████████████████████ | 100% | ETA: 0s | 22/22 assets
$ ls ../myProject/
2024_12_11_11_27_46.png 2024_12_24_16_42_49.png 2025_02_08_15_04_17.png 2025_02_14_14_04_36.png
2024_12_11_11_46_08.png 2024_12_24_16_49_50.png 2025_02_10_13_55_13.png 2025_02_14_14_06_00.png
2024_12_11_12_08_27.png 2024_12_24_17_02_39.png 2025_02_14_13_51_53.png 2025_02_14_14_07_22.png
2024_12_24_16_37_48.png 2024_12_24_17_03_44.png 2025_02_14_13_54_40.png 2025_02_14_14_07_22.pngcv.png
2024_12_24_16_41_02.png 2024_12_24_17_25_22.png 2025_02_14_14_03_25.png Fail
$ ls ../myProject/
2024_12_11_11_27_46.png 2024_12_24_16_42_49.png 2025_02_08_15_04_17.png 2025_02_14_14_04_36.png
2024_12_11_11_46_08.png 2024_12_24_16_49_50.png 2025_02_10_13_55_13.png 2025_02_14_14_06_00.png
2024_12_11_12_08_27.png 2024_12_24_17_02_39.png 2025_02_14_13_51_53.png 2025_02_14_14_07_22.png
2024_12_24_16_37_48.png 2024_12_24_17_03_44.png 2025_02_14_13_54_40.png 2025_02_14_14_07_22.pngcv.png
2024_12_24_16_41_02.png 2024_12_24_17_25_22.png 2025_02_14_14_03_25.png Fail
22 replies
IImmich
•Created by Wols-笨狼 on 2/20/2025 in #help-desk-support
How to force upload image from CLI?
Yes, and I try delete all picture and upload again still got duplicate assets
22 replies
IImmich
•Created by Wols-笨狼 on 2/20/2025 in #help-desk-support
How to force upload image from CLI?
By the way all this image is make an save by kivy or openCV
22 replies
IImmich
•Created by Wols-笨狼 on 2/20/2025 in #help-desk-support
How to force upload image from CLI?
But I didn't see it on server, I also check by request info get album info, there i no same name picture.
22 replies