Compare commits
94 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8af7a9c1b9 | |||
| 0b02fda4e0 | |||
| 96516ae4b9 | |||
| caa9b1a041 | |||
| 65dcf9b655 | |||
| 0ceb773865 | |||
| 6995cc2b38 | |||
| 6740c67ed8 | |||
| 4f25cec6df | |||
| ab5dd4d66a | |||
| 7ce8f845b2 | |||
| efe45fd0aa | |||
| 1e6ef5c9e4 | |||
| f53e4721cf | |||
| 7a755a089b | |||
| c468da589a | |||
| b0aafce16b | |||
| de0fd06f43 | |||
| 186b4e1333 | |||
| b74b20824a | |||
| 4a1ff6abce | |||
| edb085691a | |||
| 3e12b10866 | |||
| 4735db8e79 | |||
| b06ea687b4 | |||
| e6bc831c97 | |||
| e73dc3dc72 | |||
| f22338f36f | |||
| 7893dca733 | |||
| c717fd2131 | |||
| a373d50c31 | |||
| cdbc673a59 | |||
| 98cbf94388 | |||
| 15f9ff1fcb | |||
| 92811190a8 | |||
| 6cbdb4c90d | |||
| ba57646f9f | |||
| 7b737786b3 | |||
| d03e97f650 | |||
| 230eff4e1a | |||
| c3ff1b54af | |||
| a68e6be7e1 | |||
| 22dc9bcebb | |||
| fa095c3ca0 | |||
| 4e08ff6c33 | |||
| 95987c9777 | |||
| d489813a88 | |||
| 1593eaf6fc | |||
| b2c5a90af7 | |||
| ad58d7e23e | |||
| 01c7adc24d | |||
| 233372303b | |||
| 9b528519e4 | |||
| 98fa532135 | |||
| 397513b074 | |||
| d634ef2d2b | |||
| 27050af57b | |||
| 12bfb19852 | |||
| 9a9d64acd7 | |||
| 02047a0104 | |||
| f2f6713a53 | |||
| 3127636c42 | |||
| 2c639d7fe4 | |||
| 710cbd694b | |||
| 6674d67abe | |||
| 009a1402e6 | |||
| 0dd38c6ec1 | |||
| 5c3283400f | |||
| 8cf33690b8 | |||
| d39917a4db | |||
| 8c3c3357fe | |||
| 9323b69c61 | |||
| b3ef5fe6e7 | |||
| 7b2f98a433 | |||
| 0a552d2bfa | |||
| 17773f0a77 | |||
| a287a766d9 | |||
| 0a649f28d9 | |||
| a66ccb3452 | |||
| 184a662fda | |||
| c6cff180b2 | |||
| d1ce9e4d3c | |||
| 56bf3cc3d1 | |||
| 2bf6a46927 | |||
| 7b1de6209d | |||
| a9caa407ec | |||
| 00a5da0ebc | |||
| 1e3052bd0b | |||
| 2554cc96b0 | |||
| 0dabb890cf | |||
| 5fc3cb5567 | |||
| 8f73313b23 | |||
| 7bcef37ba7 | |||
| 8e677ed844 |
@@ -1,11 +1,14 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: false
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: I have a question or need support
|
- name: ✋ I have a question or need support
|
||||||
url: https://discord.immich.app
|
url: https://discord.immich.app
|
||||||
about: We use GitHub for tracking bugs, please check out our Discord channel for freaky fast support.
|
about: We use GitHub for tracking bugs, please check out our Discord channel for freaky fast support.
|
||||||
- name: Feature Request
|
- name: 📷 My photo or video has a date, time, or timezone problem
|
||||||
|
url: https://github.com/immich-app/immich/discussions/12650
|
||||||
|
about: Upload a sample file to this discussion and we will take a look
|
||||||
|
- name: 🌟 Feature request
|
||||||
url: https://github.com/immich-app/immich/discussions/new?category=feature-request
|
url: https://github.com/immich-app/immich/discussions/new?category=feature-request
|
||||||
about: Please use our GitHub Discussion for making feature requests.
|
about: Please use our GitHub Discussion for making feature requests.
|
||||||
- name: I'm unsure where to go
|
- name: 🫣 I'm unsure where to go
|
||||||
url: https://discord.immich.app
|
url: https://discord.immich.app
|
||||||
about: If you are unsure where to go, then joining our Discord is recommended; Just ask!
|
about: If you are unsure where to go, then joining our Discord is recommended; Just ask!
|
||||||
|
|||||||
@@ -33,3 +33,6 @@ documentation:
|
|||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- machine-learning/app/**
|
- machine-learning/app/**
|
||||||
|
|
||||||
|
changelog:translation:
|
||||||
|
- head-branch: ['^chore/translations$']
|
||||||
|
|||||||
@@ -40,6 +40,53 @@ jobs:
|
|||||||
id: should_force
|
id: should_force
|
||||||
run: echo "should_force=${{ github.event_name == 'workflow_dispatch' || github.event_name == 'release' }}" >> "$GITHUB_OUTPUT"
|
run: echo "should_force=${{ github.event_name == 'workflow_dispatch' || github.event_name == 'release' }}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
retag_ml:
|
||||||
|
name: Re-Tag ML
|
||||||
|
needs: pre-job
|
||||||
|
if: ${{ needs.pre-job.outputs.should_run_ml == 'false' && !github.event.pull_request.head.repo.fork }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
suffix: ["", "-cuda", "-openvino", "-armnn"]
|
||||||
|
steps:
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Re-tag image
|
||||||
|
run: |
|
||||||
|
REGISTRY_NAME="ghcr.io"
|
||||||
|
REPOSITORY=${{ github.repository_owner }}/immich-machine-learning
|
||||||
|
TAG_OLD=main${{ matrix.suffix }}
|
||||||
|
TAG_NEW=${{ github.event.number == 0 && github.ref_name || format('pr-{0}', github.event.number) }}${{ matrix.suffix }}
|
||||||
|
docker buildx imagetools create -t $REGISTRY_NAME/$REPOSITORY:$TAG_NEW $REGISTRY_NAME/$REPOSITORY:$TAG_OLD
|
||||||
|
|
||||||
|
retag_server:
|
||||||
|
name: Re-Tag Server
|
||||||
|
needs: pre-job
|
||||||
|
if: ${{ needs.pre-job.outputs.should_run_server == 'false' && !github.event.pull_request.head.repo.fork }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
suffix: [""]
|
||||||
|
steps:
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Re-tag image
|
||||||
|
run: |
|
||||||
|
REGISTRY_NAME="ghcr.io"
|
||||||
|
REPOSITORY=${{ github.repository_owner }}/immich-server
|
||||||
|
TAG_OLD=main${{ matrix.suffix }}
|
||||||
|
TAG_NEW=${{ github.event.number == 0 && github.ref_name || format('pr-{0}', github.event.number) }}${{ matrix.suffix }}
|
||||||
|
docker buildx imagetools create -t $REGISTRY_NAME/$REPOSITORY:$TAG_NEW $REGISTRY_NAME/$REPOSITORY:$TAG_OLD
|
||||||
|
|
||||||
|
|
||||||
build_and_push_ml:
|
build_and_push_ml:
|
||||||
name: Build and Push ML
|
name: Build and Push ML
|
||||||
needs: pre-job
|
needs: pre-job
|
||||||
@@ -235,9 +282,22 @@ jobs:
|
|||||||
BUILD_SOURCE_REF=${{ github.ref_name }}
|
BUILD_SOURCE_REF=${{ github.ref_name }}
|
||||||
BUILD_SOURCE_COMMIT=${{ github.sha }}
|
BUILD_SOURCE_COMMIT=${{ github.sha }}
|
||||||
|
|
||||||
success-check:
|
success-check-server:
|
||||||
name: Docker Build & Push Success
|
name: Docker Build & Push Server Success
|
||||||
needs: [build_and_push_ml, build_and_push_server]
|
needs: [build_and_push_server, retag_server]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: always()
|
||||||
|
steps:
|
||||||
|
- name: Any jobs failed?
|
||||||
|
if: ${{ contains(needs.*.result, 'failure') }}
|
||||||
|
run: exit 1
|
||||||
|
- name: All jobs passed or skipped
|
||||||
|
if: ${{ !(contains(needs.*.result, 'failure')) }}
|
||||||
|
run: echo "All jobs passed or skipped" && echo "${{ toJSON(needs.*.result) }}"
|
||||||
|
|
||||||
|
success-check-ml:
|
||||||
|
name: Docker Build & Push ML Success
|
||||||
|
needs: [build_and_push_ml, retag_ml]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: always()
|
if: always()
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -56,6 +56,10 @@ jobs:
|
|||||||
run: dart format lib/ --set-exit-if-changed
|
run: dart format lib/ --set-exit-if-changed
|
||||||
working-directory: ./mobile
|
working-directory: ./mobile
|
||||||
|
|
||||||
|
- name: Run dart custom_lint
|
||||||
|
run: dart run custom_lint
|
||||||
|
working-directory: ./mobile
|
||||||
|
|
||||||
# Enable after riverpod generator migration is completed
|
# Enable after riverpod generator migration is completed
|
||||||
# - name: Run dart custom lint
|
# - name: Run dart custom lint
|
||||||
# run: dart run custom_lint
|
# run: dart run custom_lint
|
||||||
|
|||||||
Vendored
+4
-4
@@ -5,8 +5,8 @@
|
|||||||
"type": "node",
|
"type": "node",
|
||||||
"request": "attach",
|
"request": "attach",
|
||||||
"restart": true,
|
"restart": true,
|
||||||
"port": 9230,
|
"port": 9231,
|
||||||
"name": "Immich Server",
|
"name": "Immich API Server",
|
||||||
"remoteRoot": "/usr/src/app",
|
"remoteRoot": "/usr/src/app",
|
||||||
"localRoot": "${workspaceFolder}/server"
|
"localRoot": "${workspaceFolder}/server"
|
||||||
},
|
},
|
||||||
@@ -14,8 +14,8 @@
|
|||||||
"type": "node",
|
"type": "node",
|
||||||
"request": "attach",
|
"request": "attach",
|
||||||
"restart": true,
|
"restart": true,
|
||||||
"port": 9231,
|
"port": 9230,
|
||||||
"name": "Immich Microservices",
|
"name": "Immich Workers",
|
||||||
"remoteRoot": "/usr/src/app",
|
"remoteRoot": "/usr/src/app",
|
||||||
"localRoot": "${workspaceFolder}/server"
|
"localRoot": "${workspaceFolder}/server"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ For the mobile app, you can use `https://demo.immich.app/api` for the `Server En
|
|||||||
| LivePhoto/MotionPhoto backup and playback | Yes | Yes |
|
| LivePhoto/MotionPhoto backup and playback | Yes | Yes |
|
||||||
| Support 360 degree image display | No | Yes |
|
| Support 360 degree image display | No | Yes |
|
||||||
| User-defined storage structure | Yes | Yes |
|
| User-defined storage structure | Yes | Yes |
|
||||||
| Public Sharing | No | Yes |
|
| Public Sharing | Yes | Yes |
|
||||||
| Archive and Favorites | Yes | Yes |
|
| Archive and Favorites | Yes | Yes |
|
||||||
| Global Map | Yes | Yes |
|
| Global Map | Yes | Yes |
|
||||||
| Partner Sharing | Yes | Yes |
|
| Partner Sharing | Yes | Yes |
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
FROM node:20.17.0-alpine3.20@sha256:1a526b97cace6b4006256570efa1a29cd1fe4b96a5301f8d48e87c5139438a45 AS core
|
FROM node:20.17.0-alpine3.20@sha256:2d07db07a2df6830718ae2a47db6fedce6745f5bcd174c398f2acdda90a11c03 AS core
|
||||||
|
|
||||||
WORKDIR /usr/src/open-api/typescript-sdk
|
WORKDIR /usr/src/open-api/typescript-sdk
|
||||||
COPY open-api/typescript-sdk/package*.json open-api/typescript-sdk/tsconfig*.json ./
|
COPY open-api/typescript-sdk/package*.json open-api/typescript-sdk/tsconfig*.json ./
|
||||||
|
|||||||
Generated
+242
-270
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@immich/cli",
|
"name": "@immich/cli",
|
||||||
"version": "2.2.18",
|
"version": "2.2.19",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@immich/cli",
|
"name": "@immich/cli",
|
||||||
"version": "2.2.18",
|
"version": "2.2.19",
|
||||||
"license": "GNU Affero General Public License version 3",
|
"license": "GNU Affero General Public License version 3",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fast-glob": "^3.3.2",
|
"fast-glob": "^3.3.2",
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
"@types/cli-progress": "^3.11.0",
|
"@types/cli-progress": "^3.11.0",
|
||||||
"@types/lodash-es": "^4.17.12",
|
"@types/lodash-es": "^4.17.12",
|
||||||
"@types/mock-fs": "^4.13.1",
|
"@types/mock-fs": "^4.13.1",
|
||||||
"@types/node": "^20.16.2",
|
"@types/node": "^20.16.5",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
||||||
"@typescript-eslint/parser": "^8.0.0",
|
"@typescript-eslint/parser": "^8.0.0",
|
||||||
"@vitest/coverage-v8": "^2.0.5",
|
"@vitest/coverage-v8": "^2.0.5",
|
||||||
@@ -52,14 +52,14 @@
|
|||||||
},
|
},
|
||||||
"../open-api/typescript-sdk": {
|
"../open-api/typescript-sdk": {
|
||||||
"name": "@immich/sdk",
|
"name": "@immich/sdk",
|
||||||
"version": "1.114.0",
|
"version": "1.115.0",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "GNU Affero General Public License version 3",
|
"license": "GNU Affero General Public License version 3",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@oazapfts/runtime": "^1.0.2"
|
"@oazapfts/runtime": "^1.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^20.16.2",
|
"@types/node": "^20.16.5",
|
||||||
"typescript": "^5.3.3"
|
"typescript": "^5.3.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -825,9 +825,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@eslint/js": {
|
"node_modules/@eslint/js": {
|
||||||
"version": "9.9.1",
|
"version": "9.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.9.1.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.10.0.tgz",
|
||||||
"integrity": "sha512-xIDQRsfg5hNBqHz04H1R3scSVwmI+KUbqjsQKHKQ1DAUSaUjYPReZZmS/5PNiKu1fUvzDd6H7DEDKACSEhu+TQ==",
|
"integrity": "sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -844,6 +844,19 @@
|
|||||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@eslint/plugin-kit": {
|
||||||
|
"version": "0.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.1.0.tgz",
|
||||||
|
"integrity": "sha512-autAXT203ixhqei9xt+qkYOvY8l6LAFIdT2UXc/RPNeUVfqRF1BV94GTJyVPFKT8nFM6MyVJhjLj9E8JWvf5zQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"levn": "^0.4.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@humanwhocodes/module-importer": {
|
"node_modules/@humanwhocodes/module-importer": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
|
||||||
@@ -1324,9 +1337,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "20.16.3",
|
"version": "20.16.5",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.5.tgz",
|
||||||
"integrity": "sha512-/wdGiWRkMOm53gAsSyFMXFZHbVg7C6CbkrzHNpaHoYfsUWPg7m6ZRKtvQjgvQ9i8WT540a3ydRlRQbxjY30XxQ==",
|
"integrity": "sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -1340,17 +1353,17 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||||
"version": "8.3.0",
|
"version": "8.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.5.0.tgz",
|
||||||
"integrity": "sha512-FLAIn63G5KH+adZosDYiutqkOkYEx0nvcwNNfJAf+c7Ae/H35qWwTYvPZUKFj5AS+WfHG/WJJfWnDnyNUlp8UA==",
|
"integrity": "sha512-lHS5hvz33iUFQKuPFGheAB84LwcJ60G8vKnEhnfcK1l8kGVLro2SFYW6K0/tj8FUhRJ0VHyg1oAfg50QGbPPHw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/regexpp": "^4.10.0",
|
"@eslint-community/regexpp": "^4.10.0",
|
||||||
"@typescript-eslint/scope-manager": "8.3.0",
|
"@typescript-eslint/scope-manager": "8.5.0",
|
||||||
"@typescript-eslint/type-utils": "8.3.0",
|
"@typescript-eslint/type-utils": "8.5.0",
|
||||||
"@typescript-eslint/utils": "8.3.0",
|
"@typescript-eslint/utils": "8.5.0",
|
||||||
"@typescript-eslint/visitor-keys": "8.3.0",
|
"@typescript-eslint/visitor-keys": "8.5.0",
|
||||||
"graphemer": "^1.4.0",
|
"graphemer": "^1.4.0",
|
||||||
"ignore": "^5.3.1",
|
"ignore": "^5.3.1",
|
||||||
"natural-compare": "^1.4.0",
|
"natural-compare": "^1.4.0",
|
||||||
@@ -1374,16 +1387,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser": {
|
"node_modules/@typescript-eslint/parser": {
|
||||||
"version": "8.3.0",
|
"version": "8.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.5.0.tgz",
|
||||||
"integrity": "sha512-h53RhVyLu6AtpUzVCYLPhZGL5jzTD9fZL+SYf/+hYOx2bDkyQXztXSc4tbvKYHzfMXExMLiL9CWqJmVz6+78IQ==",
|
"integrity": "sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": "8.3.0",
|
"@typescript-eslint/scope-manager": "8.5.0",
|
||||||
"@typescript-eslint/types": "8.3.0",
|
"@typescript-eslint/types": "8.5.0",
|
||||||
"@typescript-eslint/typescript-estree": "8.3.0",
|
"@typescript-eslint/typescript-estree": "8.5.0",
|
||||||
"@typescript-eslint/visitor-keys": "8.3.0",
|
"@typescript-eslint/visitor-keys": "8.5.0",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -1403,14 +1416,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/scope-manager": {
|
"node_modules/@typescript-eslint/scope-manager": {
|
||||||
"version": "8.3.0",
|
"version": "8.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.5.0.tgz",
|
||||||
"integrity": "sha512-mz2X8WcN2nVu5Hodku+IR8GgCOl4C0G/Z1ruaWN4dgec64kDBabuXyPAr+/RgJtumv8EEkqIzf3X2U5DUKB2eg==",
|
"integrity": "sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "8.3.0",
|
"@typescript-eslint/types": "8.5.0",
|
||||||
"@typescript-eslint/visitor-keys": "8.3.0"
|
"@typescript-eslint/visitor-keys": "8.5.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||||
@@ -1421,14 +1434,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/type-utils": {
|
"node_modules/@typescript-eslint/type-utils": {
|
||||||
"version": "8.3.0",
|
"version": "8.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.5.0.tgz",
|
||||||
"integrity": "sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg==",
|
"integrity": "sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/typescript-estree": "8.3.0",
|
"@typescript-eslint/typescript-estree": "8.5.0",
|
||||||
"@typescript-eslint/utils": "8.3.0",
|
"@typescript-eslint/utils": "8.5.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"ts-api-utils": "^1.3.0"
|
"ts-api-utils": "^1.3.0"
|
||||||
},
|
},
|
||||||
@@ -1446,9 +1459,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/types": {
|
"node_modules/@typescript-eslint/types": {
|
||||||
"version": "8.3.0",
|
"version": "8.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.5.0.tgz",
|
||||||
"integrity": "sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw==",
|
"integrity": "sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -1460,14 +1473,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/typescript-estree": {
|
"node_modules/@typescript-eslint/typescript-estree": {
|
||||||
"version": "8.3.0",
|
"version": "8.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.5.0.tgz",
|
||||||
"integrity": "sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA==",
|
"integrity": "sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "8.3.0",
|
"@typescript-eslint/types": "8.5.0",
|
||||||
"@typescript-eslint/visitor-keys": "8.3.0",
|
"@typescript-eslint/visitor-keys": "8.5.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"fast-glob": "^3.3.2",
|
"fast-glob": "^3.3.2",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
@@ -1489,16 +1502,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/utils": {
|
"node_modules/@typescript-eslint/utils": {
|
||||||
"version": "8.3.0",
|
"version": "8.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.5.0.tgz",
|
||||||
"integrity": "sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA==",
|
"integrity": "sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.4.0",
|
"@eslint-community/eslint-utils": "^4.4.0",
|
||||||
"@typescript-eslint/scope-manager": "8.3.0",
|
"@typescript-eslint/scope-manager": "8.5.0",
|
||||||
"@typescript-eslint/types": "8.3.0",
|
"@typescript-eslint/types": "8.5.0",
|
||||||
"@typescript-eslint/typescript-estree": "8.3.0"
|
"@typescript-eslint/typescript-estree": "8.5.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||||
@@ -1512,13 +1525,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/visitor-keys": {
|
"node_modules/@typescript-eslint/visitor-keys": {
|
||||||
"version": "8.3.0",
|
"version": "8.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.5.0.tgz",
|
||||||
"integrity": "sha512-RmZwrTbQ9QveF15m/Cl28n0LXD6ea2CjkhH5rQ55ewz3H24w+AMCJHPVYaZ8/0HoG8Z3cLLFFycRXxeO2tz9FA==",
|
"integrity": "sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "8.3.0",
|
"@typescript-eslint/types": "8.5.0",
|
||||||
"eslint-visitor-keys": "^3.4.3"
|
"eslint-visitor-keys": "^3.4.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -1530,19 +1543,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vitest/coverage-v8": {
|
"node_modules/@vitest/coverage-v8": {
|
||||||
"version": "2.0.5",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.0.tgz",
|
||||||
"integrity": "sha512-qeFcySCg5FLO2bHHSa0tAZAOnAUbp4L6/A5JDuj9+bt53JREl8hpLjLHEWF0e/gWc8INVpJaqA7+Ene2rclpZg==",
|
"integrity": "sha512-yqCkr2nrV4o58VcVMxTVkS6Ggxzy7pmSD8JbTbhbH5PsQfUIES1QT716VUzo33wf2lX9EcWYdT3Vl2MMmjR59g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ampproject/remapping": "^2.3.0",
|
"@ampproject/remapping": "^2.3.0",
|
||||||
"@bcoe/v8-coverage": "^0.2.3",
|
"@bcoe/v8-coverage": "^0.2.3",
|
||||||
"debug": "^4.3.5",
|
"debug": "^4.3.6",
|
||||||
"istanbul-lib-coverage": "^3.2.2",
|
"istanbul-lib-coverage": "^3.2.2",
|
||||||
"istanbul-lib-report": "^3.0.1",
|
"istanbul-lib-report": "^3.0.1",
|
||||||
"istanbul-lib-source-maps": "^5.0.6",
|
"istanbul-lib-source-maps": "^5.0.6",
|
||||||
"istanbul-reports": "^3.1.7",
|
"istanbul-reports": "^3.1.7",
|
||||||
"magic-string": "^0.30.10",
|
"magic-string": "^0.30.11",
|
||||||
"magicast": "^0.3.4",
|
"magicast": "^0.3.4",
|
||||||
"std-env": "^3.7.0",
|
"std-env": "^3.7.0",
|
||||||
"test-exclude": "^7.0.1",
|
"test-exclude": "^7.0.1",
|
||||||
@@ -1552,17 +1566,24 @@
|
|||||||
"url": "https://opencollective.com/vitest"
|
"url": "https://opencollective.com/vitest"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"vitest": "2.0.5"
|
"@vitest/browser": "2.1.0",
|
||||||
|
"vitest": "2.1.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@vitest/browser": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vitest/expect": {
|
"node_modules/@vitest/expect": {
|
||||||
"version": "2.0.5",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.0.tgz",
|
||||||
"integrity": "sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==",
|
"integrity": "sha512-N3/xR4fSu0+6sVZETEtPT1orUs2+Y477JOXTcU3xKuu3uBlsgbD7/7Mz2LZ1Jr1XjwilEWlrIgSCj4N1+5ZmsQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vitest/spy": "2.0.5",
|
"@vitest/spy": "2.1.0",
|
||||||
"@vitest/utils": "2.0.5",
|
"@vitest/utils": "2.1.0",
|
||||||
"chai": "^5.1.1",
|
"chai": "^5.1.1",
|
||||||
"tinyrainbow": "^1.2.0"
|
"tinyrainbow": "^1.2.0"
|
||||||
},
|
},
|
||||||
@@ -1570,11 +1591,40 @@
|
|||||||
"url": "https://opencollective.com/vitest"
|
"url": "https://opencollective.com/vitest"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vitest/pretty-format": {
|
"node_modules/@vitest/mocker": {
|
||||||
"version": "2.0.5",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.0.tgz",
|
||||||
"integrity": "sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==",
|
"integrity": "sha512-ZxENovUqhzl+QiOFpagiHUNUuZ1qPd5yYTCYHomGIZOFArzn4mgX2oxZmiAItJWAaXHG6bbpb/DpSPhlk5DgtA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@vitest/spy": "^2.1.0-beta.1",
|
||||||
|
"estree-walker": "^3.0.3",
|
||||||
|
"magic-string": "^0.30.11"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/vitest"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@vitest/spy": "2.1.0",
|
||||||
|
"msw": "^2.3.5",
|
||||||
|
"vite": "^5.0.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"msw": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"vite": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@vitest/pretty-format": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tinyrainbow": "^1.2.0"
|
"tinyrainbow": "^1.2.0"
|
||||||
},
|
},
|
||||||
@@ -1583,12 +1633,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vitest/runner": {
|
"node_modules/@vitest/runner": {
|
||||||
"version": "2.0.5",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.0.tgz",
|
||||||
"integrity": "sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==",
|
"integrity": "sha512-D9+ZiB8MbMt7qWDRJc4CRNNUlne/8E1X7dcKhZVAbcOKG58MGGYVDqAq19xlhNfMFZsW0bpVKgztBwks38Ko0w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vitest/utils": "2.0.5",
|
"@vitest/utils": "2.1.0",
|
||||||
"pathe": "^1.1.2"
|
"pathe": "^1.1.2"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
@@ -1596,24 +1647,39 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vitest/snapshot": {
|
"node_modules/@vitest/snapshot": {
|
||||||
"version": "2.0.5",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.0.tgz",
|
||||||
"integrity": "sha512-SgCPUeDFLaM0mIUHfaArq8fD2WbaXG/zVXjRupthYfYGzc8ztbFbu6dUNOblBG7XLMR1kEhS/DNnfCZ2IhdDew==",
|
"integrity": "sha512-x69CygGMzt9VCO283K2/FYQ+nBrOj66OTKpsPykjCR4Ac3lLV+m85hj9reaIGmjBSsKzVvbxWmjWE3kF5ha3uQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vitest/pretty-format": "2.0.5",
|
"@vitest/pretty-format": "2.1.0",
|
||||||
"magic-string": "^0.30.10",
|
"magic-string": "^0.30.11",
|
||||||
"pathe": "^1.1.2"
|
"pathe": "^1.1.2"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://opencollective.com/vitest"
|
"url": "https://opencollective.com/vitest"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vitest/spy": {
|
"node_modules/@vitest/snapshot/node_modules/@vitest/pretty-format": {
|
||||||
"version": "2.0.5",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.0.tgz",
|
||||||
"integrity": "sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==",
|
"integrity": "sha512-7sxf2F3DNYatgmzXXcTh6cq+/fxwB47RIQqZJFoSH883wnVAoccSRT6g+dTKemUBo8Q5N4OYYj1EBXLuRKvp3Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"tinyrainbow": "^1.2.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/vitest"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@vitest/spy": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-IXX5NkbdgTYTog3F14i2LgnBc+20YmkXMx0IWai84mcxySUDRgm0ihbOfR4L0EVRBDFG85GjmQQEZNNKVVpkZw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tinyspy": "^3.0.0"
|
"tinyspy": "^3.0.0"
|
||||||
},
|
},
|
||||||
@@ -1622,13 +1688,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vitest/utils": {
|
"node_modules/@vitest/utils": {
|
||||||
"version": "2.0.5",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.0.tgz",
|
||||||
"integrity": "sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==",
|
"integrity": "sha512-rreyfVe0PuNqJfKYUwfPDfi6rrp0VSu0Wgvp5WBqJonP+4NvXHk48X6oBam1Lj47Hy6jbJtnMj3OcRdrkTP0tA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vitest/pretty-format": "2.0.5",
|
"@vitest/pretty-format": "2.1.0",
|
||||||
"estree-walker": "^3.0.3",
|
|
||||||
"loupe": "^3.1.1",
|
"loupe": "^3.1.1",
|
||||||
"tinyrainbow": "^1.2.0"
|
"tinyrainbow": "^1.2.0"
|
||||||
},
|
},
|
||||||
@@ -1636,6 +1702,19 @@
|
|||||||
"url": "https://opencollective.com/vitest"
|
"url": "https://opencollective.com/vitest"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@vitest/utils/node_modules/@vitest/pretty-format": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-7sxf2F3DNYatgmzXXcTh6cq+/fxwB47RIQqZJFoSH883wnVAoccSRT6g+dTKemUBo8Q5N4OYYj1EBXLuRKvp3Q==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"tinyrainbow": "^1.2.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/vitest"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/acorn": {
|
"node_modules/acorn": {
|
||||||
"version": "8.12.1",
|
"version": "8.12.1",
|
||||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",
|
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",
|
||||||
@@ -1710,6 +1789,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz",
|
||||||
"integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==",
|
"integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@@ -1800,6 +1880,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",
|
"resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",
|
||||||
"integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",
|
"integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
@@ -1838,6 +1919,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz",
|
||||||
"integrity": "sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==",
|
"integrity": "sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"assertion-error": "^2.0.1",
|
"assertion-error": "^2.0.1",
|
||||||
"check-error": "^2.1.1",
|
"check-error": "^2.1.1",
|
||||||
@@ -1870,6 +1952,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz",
|
||||||
"integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==",
|
"integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 16"
|
"node": ">= 16"
|
||||||
}
|
}
|
||||||
@@ -2014,6 +2097,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz",
|
||||||
"integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==",
|
"integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
@@ -2112,9 +2196,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint": {
|
"node_modules/eslint": {
|
||||||
"version": "9.9.1",
|
"version": "9.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.9.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.10.0.tgz",
|
||||||
"integrity": "sha512-dHvhrbfr4xFQ9/dq+jcVneZMyRYLjggWjk6RVsIiHsP8Rz6yZ8LvZ//iU4TrZF+SXWG+JkNF2OyiZRvzgRDqMg==",
|
"integrity": "sha512-Y4D0IgtBZfOcOUAIQTSXBKoNGfY0REGqHJG6+Q81vNippW5YlKjHFj4soMxamKK1NXHUWuBZTLdU3Km+L/pcHw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -2122,7 +2206,8 @@
|
|||||||
"@eslint-community/regexpp": "^4.11.0",
|
"@eslint-community/regexpp": "^4.11.0",
|
||||||
"@eslint/config-array": "^0.18.0",
|
"@eslint/config-array": "^0.18.0",
|
||||||
"@eslint/eslintrc": "^3.1.0",
|
"@eslint/eslintrc": "^3.1.0",
|
||||||
"@eslint/js": "9.9.1",
|
"@eslint/js": "9.10.0",
|
||||||
|
"@eslint/plugin-kit": "^0.1.0",
|
||||||
"@humanwhocodes/module-importer": "^1.0.1",
|
"@humanwhocodes/module-importer": "^1.0.1",
|
||||||
"@humanwhocodes/retry": "^0.3.0",
|
"@humanwhocodes/retry": "^0.3.0",
|
||||||
"@nodelib/fs.walk": "^1.2.8",
|
"@nodelib/fs.walk": "^1.2.8",
|
||||||
@@ -2145,7 +2230,6 @@
|
|||||||
"is-glob": "^4.0.0",
|
"is-glob": "^4.0.0",
|
||||||
"is-path-inside": "^3.0.3",
|
"is-path-inside": "^3.0.3",
|
||||||
"json-stable-stringify-without-jsonify": "^1.0.1",
|
"json-stable-stringify-without-jsonify": "^1.0.1",
|
||||||
"levn": "^0.4.1",
|
|
||||||
"lodash.merge": "^4.6.2",
|
"lodash.merge": "^4.6.2",
|
||||||
"minimatch": "^3.1.2",
|
"minimatch": "^3.1.2",
|
||||||
"natural-compare": "^1.4.0",
|
"natural-compare": "^1.4.0",
|
||||||
@@ -2383,6 +2467,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
|
||||||
"integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
|
"integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/estree": "^1.0.0"
|
"@types/estree": "^1.0.0"
|
||||||
}
|
}
|
||||||
@@ -2396,29 +2481,6 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/execa": {
|
|
||||||
"version": "8.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz",
|
|
||||||
"integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"cross-spawn": "^7.0.3",
|
|
||||||
"get-stream": "^8.0.1",
|
|
||||||
"human-signals": "^5.0.0",
|
|
||||||
"is-stream": "^3.0.0",
|
|
||||||
"merge-stream": "^2.0.0",
|
|
||||||
"npm-run-path": "^5.1.0",
|
|
||||||
"onetime": "^6.0.0",
|
|
||||||
"signal-exit": "^4.1.0",
|
|
||||||
"strip-final-newline": "^3.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16.17"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sindresorhus/execa?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/fast-deep-equal": {
|
"node_modules/fast-deep-equal": {
|
||||||
"version": "3.1.3",
|
"version": "3.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||||
@@ -2582,22 +2644,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz",
|
||||||
"integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==",
|
"integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "*"
|
"node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/get-stream": {
|
|
||||||
"version": "8.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz",
|
|
||||||
"integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/glob": {
|
"node_modules/glob": {
|
||||||
"version": "10.4.5",
|
"version": "10.4.5",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
|
||||||
@@ -2688,15 +2739,6 @@
|
|||||||
"integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
|
"integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/human-signals": {
|
|
||||||
"version": "5.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz",
|
|
||||||
"integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16.17.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/ignore": {
|
"node_modules/ignore": {
|
||||||
"version": "5.3.1",
|
"version": "5.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
|
||||||
@@ -2818,18 +2860,6 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/is-stream": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
|
|
||||||
"integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/isexe": {
|
"node_modules/isexe": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||||
@@ -3016,6 +3046,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz",
|
||||||
"integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==",
|
"integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"get-func-name": "^2.0.1"
|
"get-func-name": "^2.0.1"
|
||||||
}
|
}
|
||||||
@@ -3061,12 +3092,6 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/merge-stream": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
|
|
||||||
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/merge2": {
|
"node_modules/merge2": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
|
||||||
@@ -3087,18 +3112,6 @@
|
|||||||
"node": ">=8.6"
|
"node": ">=8.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/mimic-fn": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/min-indent": {
|
"node_modules/min-indent": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
|
||||||
@@ -3219,48 +3232,6 @@
|
|||||||
"semver": "bin/semver"
|
"semver": "bin/semver"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/npm-run-path": {
|
|
||||||
"version": "5.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz",
|
|
||||||
"integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"path-key": "^4.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/npm-run-path/node_modules/path-key": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/onetime": {
|
|
||||||
"version": "6.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
|
|
||||||
"integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"mimic-fn": "^4.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/optionator": {
|
"node_modules/optionator": {
|
||||||
"version": "0.9.3",
|
"version": "0.9.3",
|
||||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
|
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
|
||||||
@@ -3397,21 +3368,23 @@
|
|||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz",
|
||||||
"integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==",
|
"integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==",
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/pathval": {
|
"node_modules/pathval": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz",
|
||||||
"integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==",
|
"integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 14.16"
|
"node": ">= 14.16"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/picocolors": {
|
"node_modules/picocolors": {
|
||||||
"version": "1.0.1",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz",
|
||||||
"integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==",
|
"integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
@@ -3436,9 +3409,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/postcss": {
|
"node_modules/postcss": {
|
||||||
"version": "8.4.41",
|
"version": "8.4.47",
|
||||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz",
|
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz",
|
||||||
"integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==",
|
"integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -3457,8 +3430,8 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nanoid": "^3.3.7",
|
"nanoid": "^3.3.7",
|
||||||
"picocolors": "^1.0.1",
|
"picocolors": "^1.1.0",
|
||||||
"source-map-js": "^1.2.0"
|
"source-map-js": "^1.2.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^10 || ^12 || >=14"
|
"node": "^10 || ^12 || >=14"
|
||||||
@@ -3827,10 +3800,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/source-map-js": {
|
"node_modules/source-map-js": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||||
"integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
|
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
@@ -3933,18 +3907,6 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/strip-final-newline": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
|
|
||||||
"integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/strip-indent": {
|
"node_modules/strip-indent": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",
|
||||||
@@ -4031,10 +3993,18 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/tinybench": {
|
"node_modules/tinybench": {
|
||||||
"version": "2.8.0",
|
"version": "2.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz",
|
||||||
"integrity": "sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==",
|
"integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==",
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/tinyexec": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/tinypool": {
|
"node_modules/tinypool": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
@@ -4055,10 +4025,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tinyspy": {
|
"node_modules/tinyspy": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz",
|
||||||
"integrity": "sha512-q5nmENpTHgiPVd1cJDDc9cVoYN5x4vCvwT3FMilvKPKneCBZAxn2YWQjDF0UMcE9k0Cay1gBiDfTMU0g+mPMQA==",
|
"integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.0.0"
|
"node": ">=14.0.0"
|
||||||
}
|
}
|
||||||
@@ -4140,9 +4111,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.5.4",
|
"version": "5.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz",
|
||||||
"integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==",
|
"integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -4210,14 +4181,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vite": {
|
"node_modules/vite": {
|
||||||
"version": "5.4.2",
|
"version": "5.4.6",
|
||||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.6.tgz",
|
||||||
"integrity": "sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==",
|
"integrity": "sha512-IeL5f8OO5nylsgzd9tq4qD2QqI0k2CQLGrWD0rCN0EQJZpBK5vJAx0I+GDkMOXxQX/OfFHMuLIx6ddAxGX/k+Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esbuild": "^0.21.3",
|
"esbuild": "^0.21.3",
|
||||||
"postcss": "^8.4.41",
|
"postcss": "^8.4.43",
|
||||||
"rollup": "^4.20.0"
|
"rollup": "^4.20.0"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -4270,15 +4241,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vite-node": {
|
"node_modules/vite-node": {
|
||||||
"version": "2.0.5",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.0.tgz",
|
||||||
"integrity": "sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==",
|
"integrity": "sha512-+ybYqBVUjYyIscoLzMWodus2enQDZOpGhcU6HdOVD6n8WZdk12w1GFL3mbnxLs7hPtRtqs1Wo5YF6/Tsr6fmhg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cac": "^6.7.14",
|
"cac": "^6.7.14",
|
||||||
"debug": "^4.3.5",
|
"debug": "^4.3.6",
|
||||||
"pathe": "^1.1.2",
|
"pathe": "^1.1.2",
|
||||||
"tinyrainbow": "^1.2.0",
|
|
||||||
"vite": "^5.0.0"
|
"vite": "^5.0.0"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -4312,29 +4283,30 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vitest": {
|
"node_modules/vitest": {
|
||||||
"version": "2.0.5",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/vitest/-/vitest-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.0.tgz",
|
||||||
"integrity": "sha512-8GUxONfauuIdeSl5f9GTgVEpg5BTOlplET4WEDaeY2QBiN8wSm68vxN/tb5z405OwppfoCavnwXafiaYBC/xOA==",
|
"integrity": "sha512-XuuEeyNkqbfr0FtAvd9vFbInSSNY1ykCQTYQ0sj9wPy4hx+1gR7gqVNdW0AX2wrrM1wWlN5fnJDjF9xG6mYRSQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ampproject/remapping": "^2.3.0",
|
"@vitest/expect": "2.1.0",
|
||||||
"@vitest/expect": "2.0.5",
|
"@vitest/mocker": "2.1.0",
|
||||||
"@vitest/pretty-format": "^2.0.5",
|
"@vitest/pretty-format": "^2.1.0",
|
||||||
"@vitest/runner": "2.0.5",
|
"@vitest/runner": "2.1.0",
|
||||||
"@vitest/snapshot": "2.0.5",
|
"@vitest/snapshot": "2.1.0",
|
||||||
"@vitest/spy": "2.0.5",
|
"@vitest/spy": "2.1.0",
|
||||||
"@vitest/utils": "2.0.5",
|
"@vitest/utils": "2.1.0",
|
||||||
"chai": "^5.1.1",
|
"chai": "^5.1.1",
|
||||||
"debug": "^4.3.5",
|
"debug": "^4.3.6",
|
||||||
"execa": "^8.0.1",
|
"magic-string": "^0.30.11",
|
||||||
"magic-string": "^0.30.10",
|
|
||||||
"pathe": "^1.1.2",
|
"pathe": "^1.1.2",
|
||||||
"std-env": "^3.7.0",
|
"std-env": "^3.7.0",
|
||||||
"tinybench": "^2.8.0",
|
"tinybench": "^2.9.0",
|
||||||
|
"tinyexec": "^0.3.0",
|
||||||
"tinypool": "^1.0.0",
|
"tinypool": "^1.0.0",
|
||||||
"tinyrainbow": "^1.2.0",
|
"tinyrainbow": "^1.2.0",
|
||||||
"vite": "^5.0.0",
|
"vite": "^5.0.0",
|
||||||
"vite-node": "2.0.5",
|
"vite-node": "2.1.0",
|
||||||
"why-is-node-running": "^2.3.0"
|
"why-is-node-running": "^2.3.0"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -4349,8 +4321,8 @@
|
|||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@edge-runtime/vm": "*",
|
"@edge-runtime/vm": "*",
|
||||||
"@types/node": "^18.0.0 || >=20.0.0",
|
"@types/node": "^18.0.0 || >=20.0.0",
|
||||||
"@vitest/browser": "2.0.5",
|
"@vitest/browser": "2.1.0",
|
||||||
"@vitest/ui": "2.0.5",
|
"@vitest/ui": "2.1.0",
|
||||||
"happy-dom": "*",
|
"happy-dom": "*",
|
||||||
"jsdom": "*"
|
"jsdom": "*"
|
||||||
},
|
},
|
||||||
@@ -4535,9 +4507,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/yaml": {
|
"node_modules/yaml": {
|
||||||
"version": "2.5.0",
|
"version": "2.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz",
|
||||||
"integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==",
|
"integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@immich/cli",
|
"name": "@immich/cli",
|
||||||
"version": "2.2.18",
|
"version": "2.2.19",
|
||||||
"description": "Command Line Interface (CLI) for Immich",
|
"description": "Command Line Interface (CLI) for Immich",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": "./dist/index.js",
|
"exports": "./dist/index.js",
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"@types/cli-progress": "^3.11.0",
|
"@types/cli-progress": "^3.11.0",
|
||||||
"@types/lodash-es": "^4.17.12",
|
"@types/lodash-es": "^4.17.12",
|
||||||
"@types/mock-fs": "^4.13.1",
|
"@types/mock-fs": "^4.13.1",
|
||||||
"@types/node": "^20.16.2",
|
"@types/node": "^20.16.5",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
||||||
"@typescript-eslint/parser": "^8.0.0",
|
"@typescript-eslint/parser": "^8.0.0",
|
||||||
"@vitest/coverage-v8": "^2.0.5",
|
"@vitest/coverage-v8": "^2.0.5",
|
||||||
|
|||||||
+30
-30
@@ -2,37 +2,37 @@
|
|||||||
# Manual edits may be lost in future updates.
|
# Manual edits may be lost in future updates.
|
||||||
|
|
||||||
provider "registry.opentofu.org/cloudflare/cloudflare" {
|
provider "registry.opentofu.org/cloudflare/cloudflare" {
|
||||||
version = "4.40.0"
|
version = "4.41.0"
|
||||||
constraints = "4.40.0"
|
constraints = "4.41.0"
|
||||||
hashes = [
|
hashes = [
|
||||||
"h1:GP2N1tXrmpxu+qEDvFAmkfv9aeZNhag3bchyJpGpYbU=",
|
"h1:0mc+YrjQrcctGrGYDmzlcqcgSv9MYB74rvMaZylIKC8=",
|
||||||
"h1:HDJKZBQkVU0kQl4gViQ5L7EcFLn9hB0iuvO+ORJiDS4=",
|
"h1:0zUx4vk4jOORQqn6xHBF7dO6N6bielFHdJ0mgF4Obn8=",
|
||||||
"h1:KrbeEsZoCJOnnX68yNI5h3QhMjc5bBCQW4yvYaEFq3s=",
|
"h1:AsIZW3uLFNOZO7kL/K7/Y/S0IYxUV9Hz85NNk/3TTsA=",
|
||||||
"h1:LelwnzU0OVn6g2+T9Ub9XdpC+vbheraIL/qgXhWBs/k=",
|
"h1:FSgYM4+LHMbX/a4Y1kx7FPPWmXqS3/MQYzvjMJHHHWM=",
|
||||||
"h1:TIq9CynfWrKgCxKL97Akj89cYlvJKn/AL4UXogd8/FM=",
|
"h1:Tx6Nh3BWP1x9L3KK/Eyi+ET0T26g3+jf1jyiuqpNIis=",
|
||||||
"h1:Uoy5oPdm1ipDG7yIMCUN1IXMpsTGXahPw3I0rVA/6wA=",
|
"h1:VRI9wu8P43xxfpeTndRwsisLnqncfnmEYMOEH5zH4pQ=",
|
||||||
"h1:Wunfpm+IZhENdoimrh4iXiakVnCsfKOHo80yJUjMQXM=",
|
"h1:YxQqmiES/Yanq/VfGqBEqg+VIO7FGhO88aKoWFHyGIg=",
|
||||||
"h1:cRdCuahMOFrNyldnCInqGQRBT1DTkRPSfPnaf5r05iw=",
|
"h1:ZWHiaesjgDLKWlfdNj0oKyj/DWdxcfsO6NINu39zfpY=",
|
||||||
"h1:k+zpXg8BO7gdbTIfSGyQisHhs5aVWQVbPLa5uUdr2UA=",
|
"h1:a2aCgDDBz3ccrr8YstIMl7VFnKo1xZAp+rOv59PPJ7U=",
|
||||||
"h1:kWNrzZ8Rh0OpHikexkmwJIIucD6SMZPi4oGyDsKJitw=",
|
"h1:aRyv8tB6wBAF9lKsLEdiHyCqnK5LfZq0FqMXCcUB4UU=",
|
||||||
"h1:lomfTTjK78BdSEVTFcJUBQRy7IQHuGQImMaPWaYpfgQ=",
|
"h1:lXpuO7zv2uD2GzPE1ARxznreRAh+QHTc2lAJ7iOoFgY=",
|
||||||
"h1:oWcWlZe52ZRyLQciNe94RaWzhHifSTu03nlK0uL7rlM=",
|
"h1:sA1xq0QNQ4fH8SHXouYNq50xirVD18SamKQwPsBQrrY=",
|
||||||
"h1:p3JJrhGEPlPQP7Uwy9FNMdvqCyD8tuT4lnXuJ+pSF/M=",
|
"h1:v7sHvKq7oqMYPn47ULHFyIQsKD9o+6Xg/uHbxQUixEw=",
|
||||||
"h1:wtB0sKxG2K/H41hWJI4uJdImWquuaP34Sip5LmfE410=",
|
"h1:wo/x4atWyXuWGlfR6h5nH0YwBAmBwTRY27HtWP8ycLo=",
|
||||||
"zh:01742e5946f936548f8e42120287ffc757abf97e7cbbe34e25c266a438fb54fd",
|
"zh:339d26e06dc6fb299ea8aad9476a60fd65bb1d40631ae8eeb81cddf2dd2bebc8",
|
||||||
"zh:08d81f5a5aab4cc269f983b8c6b5be0e278105136aca9681740802619577371f",
|
"zh:3dec2ad96ac2c283fd34ce65781b55c4edbb4d5c5cb53da8e31537176c0ed562",
|
||||||
"zh:0d75131ba70902cfc94a7a5900369bdde56528b2aad6e10b164449cc97d57396",
|
"zh:5f63a5f8080319a2fff09d4d49944829fa708723436520787cfb60725ced80cf",
|
||||||
"zh:3890a715a012e197541daacdacb8cceec6d364814daa4640ddfe98a8ba9036cb",
|
"zh:67162c28ccea71cb8141ed15c0637e35621354ebe14878e0b75a8f160fc5505d",
|
||||||
"zh:58254ce5ebe1faed4664df86210c39d660bcdc60280f17b25fe4d4dbea21ea8c",
|
"zh:6ac1e07f5347b6395aca690ed22101bb25e957d25f986f760ff673a7adfd5ef6",
|
||||||
"zh:6b0abc1adbc2edee79368ce9f7338ebcb5d0bf941e8d7d9ac505b750f20f80a2",
|
"zh:70282a723c7b52fcabde2baad41c864ed3a8d69f0c4d27a6b6933cac434cffc6",
|
||||||
"zh:81cc415d1477174a1ca288d25fdb57e5ee488c2d7f61f265ef995b255a53b0ce",
|
|
||||||
"zh:8680140c7fe5beaefe61c5cfa471bf88422dc0c0f05dad6d3cb482d4ffd22be4",
|
|
||||||
"zh:890df766e9b839623b1f0437355032a3c006226a6c200cd911e15ee1a9014e9f",
|
"zh:890df766e9b839623b1f0437355032a3c006226a6c200cd911e15ee1a9014e9f",
|
||||||
"zh:a491d26236122ccb83dac8cb490d2c0aa1f4d3a0b4abe99300fd49b1a624f42f",
|
"zh:924cd23abc326c6b3914e2cd9c94c7832c2552e1e9ae258fb9fd9aedaa5f7ce7",
|
||||||
"zh:a70d9c469dc8d55715ba77c9d1a4ede1fdebf79e60ee18438a0844868db54e0d",
|
"zh:a4b75e4c239879296259e7d54f1befbc7fdc16da2d62d1294e9f73add4cae61e",
|
||||||
"zh:a7fcb7d5c4222e14ec6d9a15adf8b9a083d84b102c3d0e4a0d102df5a1360b62",
|
"zh:a6ceb08feb63b00c7141783b31e45a154c76fd8cdebbdf371074805f0053572d",
|
||||||
"zh:b4f9677174fabd199c8ebd2e9e5eb3528cf887e700569a4fb61eef4e070cec5e",
|
"zh:afae1843f9ba85f2f6d94108c65cf43a457e83531a632d44d863e935160cb2ba",
|
||||||
"zh:c27f0f7519221d75dae4a3787a59e05acd5cc9a0d30a390eff349a77d20d52e6",
|
"zh:bd6628ce60c778960a5755f7010b7e2cc5c6ff0341a21c175341b28058ec843d",
|
||||||
"zh:db00d8605dbf43ca42fe1481a6c67fdcaa73debb7d2a0f613cb95ae5c5e7150e",
|
"zh:cd30866a1ff99d72b5fa1699db582fa4f25562e6ab21dcc6870324f3056108e0",
|
||||||
|
"zh:df5924cca691a8220aaaebb5cb55c3d6c32ff0a881f198695eff28155eb12b54",
|
||||||
|
"zh:e78d0696c941aba58df1cb36b8a0d25cd5f3963f01d9338fdbda74db58afdd49",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
cloudflare = {
|
cloudflare = {
|
||||||
source = "cloudflare/cloudflare"
|
source = "cloudflare/cloudflare"
|
||||||
version = "4.40.0"
|
version = "4.41.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+30
-30
@@ -2,37 +2,37 @@
|
|||||||
# Manual edits may be lost in future updates.
|
# Manual edits may be lost in future updates.
|
||||||
|
|
||||||
provider "registry.opentofu.org/cloudflare/cloudflare" {
|
provider "registry.opentofu.org/cloudflare/cloudflare" {
|
||||||
version = "4.40.0"
|
version = "4.41.0"
|
||||||
constraints = "4.40.0"
|
constraints = "4.41.0"
|
||||||
hashes = [
|
hashes = [
|
||||||
"h1:GP2N1tXrmpxu+qEDvFAmkfv9aeZNhag3bchyJpGpYbU=",
|
"h1:0mc+YrjQrcctGrGYDmzlcqcgSv9MYB74rvMaZylIKC8=",
|
||||||
"h1:HDJKZBQkVU0kQl4gViQ5L7EcFLn9hB0iuvO+ORJiDS4=",
|
"h1:0zUx4vk4jOORQqn6xHBF7dO6N6bielFHdJ0mgF4Obn8=",
|
||||||
"h1:KrbeEsZoCJOnnX68yNI5h3QhMjc5bBCQW4yvYaEFq3s=",
|
"h1:AsIZW3uLFNOZO7kL/K7/Y/S0IYxUV9Hz85NNk/3TTsA=",
|
||||||
"h1:LelwnzU0OVn6g2+T9Ub9XdpC+vbheraIL/qgXhWBs/k=",
|
"h1:FSgYM4+LHMbX/a4Y1kx7FPPWmXqS3/MQYzvjMJHHHWM=",
|
||||||
"h1:TIq9CynfWrKgCxKL97Akj89cYlvJKn/AL4UXogd8/FM=",
|
"h1:Tx6Nh3BWP1x9L3KK/Eyi+ET0T26g3+jf1jyiuqpNIis=",
|
||||||
"h1:Uoy5oPdm1ipDG7yIMCUN1IXMpsTGXahPw3I0rVA/6wA=",
|
"h1:VRI9wu8P43xxfpeTndRwsisLnqncfnmEYMOEH5zH4pQ=",
|
||||||
"h1:Wunfpm+IZhENdoimrh4iXiakVnCsfKOHo80yJUjMQXM=",
|
"h1:YxQqmiES/Yanq/VfGqBEqg+VIO7FGhO88aKoWFHyGIg=",
|
||||||
"h1:cRdCuahMOFrNyldnCInqGQRBT1DTkRPSfPnaf5r05iw=",
|
"h1:ZWHiaesjgDLKWlfdNj0oKyj/DWdxcfsO6NINu39zfpY=",
|
||||||
"h1:k+zpXg8BO7gdbTIfSGyQisHhs5aVWQVbPLa5uUdr2UA=",
|
"h1:a2aCgDDBz3ccrr8YstIMl7VFnKo1xZAp+rOv59PPJ7U=",
|
||||||
"h1:kWNrzZ8Rh0OpHikexkmwJIIucD6SMZPi4oGyDsKJitw=",
|
"h1:aRyv8tB6wBAF9lKsLEdiHyCqnK5LfZq0FqMXCcUB4UU=",
|
||||||
"h1:lomfTTjK78BdSEVTFcJUBQRy7IQHuGQImMaPWaYpfgQ=",
|
"h1:lXpuO7zv2uD2GzPE1ARxznreRAh+QHTc2lAJ7iOoFgY=",
|
||||||
"h1:oWcWlZe52ZRyLQciNe94RaWzhHifSTu03nlK0uL7rlM=",
|
"h1:sA1xq0QNQ4fH8SHXouYNq50xirVD18SamKQwPsBQrrY=",
|
||||||
"h1:p3JJrhGEPlPQP7Uwy9FNMdvqCyD8tuT4lnXuJ+pSF/M=",
|
"h1:v7sHvKq7oqMYPn47ULHFyIQsKD9o+6Xg/uHbxQUixEw=",
|
||||||
"h1:wtB0sKxG2K/H41hWJI4uJdImWquuaP34Sip5LmfE410=",
|
"h1:wo/x4atWyXuWGlfR6h5nH0YwBAmBwTRY27HtWP8ycLo=",
|
||||||
"zh:01742e5946f936548f8e42120287ffc757abf97e7cbbe34e25c266a438fb54fd",
|
"zh:339d26e06dc6fb299ea8aad9476a60fd65bb1d40631ae8eeb81cddf2dd2bebc8",
|
||||||
"zh:08d81f5a5aab4cc269f983b8c6b5be0e278105136aca9681740802619577371f",
|
"zh:3dec2ad96ac2c283fd34ce65781b55c4edbb4d5c5cb53da8e31537176c0ed562",
|
||||||
"zh:0d75131ba70902cfc94a7a5900369bdde56528b2aad6e10b164449cc97d57396",
|
"zh:5f63a5f8080319a2fff09d4d49944829fa708723436520787cfb60725ced80cf",
|
||||||
"zh:3890a715a012e197541daacdacb8cceec6d364814daa4640ddfe98a8ba9036cb",
|
"zh:67162c28ccea71cb8141ed15c0637e35621354ebe14878e0b75a8f160fc5505d",
|
||||||
"zh:58254ce5ebe1faed4664df86210c39d660bcdc60280f17b25fe4d4dbea21ea8c",
|
"zh:6ac1e07f5347b6395aca690ed22101bb25e957d25f986f760ff673a7adfd5ef6",
|
||||||
"zh:6b0abc1adbc2edee79368ce9f7338ebcb5d0bf941e8d7d9ac505b750f20f80a2",
|
"zh:70282a723c7b52fcabde2baad41c864ed3a8d69f0c4d27a6b6933cac434cffc6",
|
||||||
"zh:81cc415d1477174a1ca288d25fdb57e5ee488c2d7f61f265ef995b255a53b0ce",
|
|
||||||
"zh:8680140c7fe5beaefe61c5cfa471bf88422dc0c0f05dad6d3cb482d4ffd22be4",
|
|
||||||
"zh:890df766e9b839623b1f0437355032a3c006226a6c200cd911e15ee1a9014e9f",
|
"zh:890df766e9b839623b1f0437355032a3c006226a6c200cd911e15ee1a9014e9f",
|
||||||
"zh:a491d26236122ccb83dac8cb490d2c0aa1f4d3a0b4abe99300fd49b1a624f42f",
|
"zh:924cd23abc326c6b3914e2cd9c94c7832c2552e1e9ae258fb9fd9aedaa5f7ce7",
|
||||||
"zh:a70d9c469dc8d55715ba77c9d1a4ede1fdebf79e60ee18438a0844868db54e0d",
|
"zh:a4b75e4c239879296259e7d54f1befbc7fdc16da2d62d1294e9f73add4cae61e",
|
||||||
"zh:a7fcb7d5c4222e14ec6d9a15adf8b9a083d84b102c3d0e4a0d102df5a1360b62",
|
"zh:a6ceb08feb63b00c7141783b31e45a154c76fd8cdebbdf371074805f0053572d",
|
||||||
"zh:b4f9677174fabd199c8ebd2e9e5eb3528cf887e700569a4fb61eef4e070cec5e",
|
"zh:afae1843f9ba85f2f6d94108c65cf43a457e83531a632d44d863e935160cb2ba",
|
||||||
"zh:c27f0f7519221d75dae4a3787a59e05acd5cc9a0d30a390eff349a77d20d52e6",
|
"zh:bd6628ce60c778960a5755f7010b7e2cc5c6ff0341a21c175341b28058ec843d",
|
||||||
"zh:db00d8605dbf43ca42fe1481a6c67fdcaa73debb7d2a0f613cb95ae5c5e7150e",
|
"zh:cd30866a1ff99d72b5fa1699db582fa4f25562e6ab21dcc6870324f3056108e0",
|
||||||
|
"zh:df5924cca691a8220aaaebb5cb55c3d6c32ff0a881f198695eff28155eb12b54",
|
||||||
|
"zh:e78d0696c941aba58df1cb36b8a0d25cd5f3963f01d9338fdbda74db58afdd49",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
cloudflare = {
|
cloudflare = {
|
||||||
source = "cloudflare/cloudflare"
|
source = "cloudflare/cloudflare"
|
||||||
version = "4.40.0"
|
version = "4.41.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ output "immich_app_branch_subdomain" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
output "immich_app_branch_pages_hostname" {
|
output "immich_app_branch_pages_hostname" {
|
||||||
value = cloudflare_record.immich_app_branch_subdomain.value
|
value = cloudflare_record.immich_app_branch_subdomain.content
|
||||||
}
|
}
|
||||||
|
|
||||||
output "pages_project_name" {
|
output "pages_project_name" {
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 3001:3001
|
- 3001:3001
|
||||||
- 9230:9230
|
- 9230:9230
|
||||||
|
- 9231:9231
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
- database
|
- database
|
||||||
@@ -98,7 +99,7 @@ services:
|
|||||||
|
|
||||||
redis:
|
redis:
|
||||||
container_name: immich_redis
|
container_name: immich_redis
|
||||||
image: redis:6.2-alpine@sha256:e3b17ba9479deec4b7d1eeec1548a253acc5374d68d3b27937fcfe4df8d18c7e
|
image: redis:6.2-alpine@sha256:2d1463258f2764328496376f5d965f20c6a67f66ea2b06dc42af351f75248792
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: redis-cli ping || exit 1
|
test: redis-cli ping || exit 1
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ services:
|
|||||||
|
|
||||||
redis:
|
redis:
|
||||||
container_name: immich_redis
|
container_name: immich_redis
|
||||||
image: redis:6.2-alpine@sha256:e3b17ba9479deec4b7d1eeec1548a253acc5374d68d3b27937fcfe4df8d18c7e
|
image: redis:6.2-alpine@sha256:2d1463258f2764328496376f5d965f20c6a67f66ea2b06dc42af351f75248792
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: redis-cli ping || exit 1
|
test: redis-cli ping || exit 1
|
||||||
restart: always
|
restart: always
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ services:
|
|||||||
|
|
||||||
redis:
|
redis:
|
||||||
container_name: immich_redis
|
container_name: immich_redis
|
||||||
image: docker.io/redis:6.2-alpine@sha256:e3b17ba9479deec4b7d1eeec1548a253acc5374d68d3b27937fcfe4df8d18c7e
|
image: docker.io/redis:6.2-alpine@sha256:2d1463258f2764328496376f5d965f20c6a67f66ea2b06dc42af351f75248792
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: redis-cli ping || exit 1
|
test: redis-cli ping || exit 1
|
||||||
restart: always
|
restart: always
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ The recommended way to backup and restore the Immich database is to use the `pg_
|
|||||||
It is not recommended to directly backup the `DB_DATA_LOCATION` folder. Doing so while the database is running can lead to a corrupted backup that cannot be restored.
|
It is not recommended to directly backup the `DB_DATA_LOCATION` folder. Doing so while the database is running can lead to a corrupted backup that cannot be restored.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
### Manual Backup and Restore
|
||||||
|
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<TabItem value="Linux system" label="Linux system" default>
|
<TabItem value="Linux system" label="Linux system" default>
|
||||||
|
|
||||||
@@ -29,10 +31,11 @@ docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=postgre
|
|||||||
```
|
```
|
||||||
|
|
||||||
```bash title='Restore'
|
```bash title='Restore'
|
||||||
docker compose down -v # CAUTION! Deletes all Immich data to start from scratch.
|
docker compose down -v # CAUTION! Deletes all Immich data to start from scratch
|
||||||
# rm -rf DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch.
|
## Uncomment the next line and replace DB_DATA_LOCATION with your Postgres path to permanently reset the Postgres database
|
||||||
|
# rm -rf DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch
|
||||||
docker compose pull # Update to latest version of Immich (if desired)
|
docker compose pull # Update to latest version of Immich (if desired)
|
||||||
docker compose create # Create Docker containers for Immich apps without running them.
|
docker compose create # Create Docker containers for Immich apps without running them
|
||||||
docker start immich_postgres # Start Postgres server
|
docker start immich_postgres # Start Postgres server
|
||||||
sleep 10 # Wait for Postgres server to start up
|
sleep 10 # Wait for Postgres server to start up
|
||||||
gunzip < "/path/to/backup/dump.sql.gz" \
|
gunzip < "/path/to/backup/dump.sql.gz" \
|
||||||
@@ -49,10 +52,11 @@ docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=postgre
|
|||||||
```
|
```
|
||||||
|
|
||||||
```powershell title='Restore'
|
```powershell title='Restore'
|
||||||
docker compose down -v # CAUTION! Deletes all Immich data to start from scratch.
|
docker compose down -v # CAUTION! Deletes all Immich data to start from scratch
|
||||||
# Remove-Item -Recurse -Force DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch.
|
## Uncomment the next line and replace DB_DATA_LOCATION with your Postgres path to permanently reset the Postgres database
|
||||||
|
# Remove-Item -Recurse -Force DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch
|
||||||
docker compose pull # Update to latest version of Immich (if desired)
|
docker compose pull # Update to latest version of Immich (if desired)
|
||||||
docker compose create # Create Docker containers for Immich apps without running them.
|
docker compose create # Create Docker containers for Immich apps without running them
|
||||||
docker start immich_postgres # Start Postgres server
|
docker start immich_postgres # Start Postgres server
|
||||||
sleep 10 # Wait for Postgres server to start up
|
sleep 10 # Wait for Postgres server to start up
|
||||||
gc "C:\path\to\backup\dump.sql" | docker exec -i immich_postgres psql --username=postgres # Restore Backup
|
gc "C:\path\to\backup\dump.sql" | docker exec -i immich_postgres psql --username=postgres # Restore Backup
|
||||||
@@ -68,6 +72,8 @@ Note that for the database restore to proceed properly, it requires a completely
|
|||||||
Some deployment methods make it difficult to start the database without also starting the server or microservices. In these cases, you may set the environmental variable `DB_SKIP_MIGRATIONS=true` before starting the services. This will prevent the server from running migrations that interfere with the restore process. Note that both the server and microservices must have this variable set to prevent the migrations from running. Be sure to remove this variable and restart the services after the database is restored.
|
Some deployment methods make it difficult to start the database without also starting the server or microservices. In these cases, you may set the environmental variable `DB_SKIP_MIGRATIONS=true` before starting the services. This will prevent the server from running migrations that interfere with the restore process. Note that both the server and microservices must have this variable set to prevent the migrations from running. Be sure to remove this variable and restart the services after the database is restored.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
### Automatic Database Backups
|
||||||
|
|
||||||
The database dumps can also be automated (using [this image](https://github.com/prodrigestivill/docker-postgres-backup-local)) by editing the docker compose file to match the following:
|
The database dumps can also be automated (using [this image](https://github.com/prodrigestivill/docker-postgres-backup-local)) by editing the docker compose file to match the following:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -157,7 +163,7 @@ for more info read the [release notes](https://github.com/immich-app/immich/rele
|
|||||||
|
|
||||||
- The Immich database containing all the information to allow the system to function properly.
|
- The Immich database containing all the information to allow the system to function properly.
|
||||||
**Note:** This folder will only appear to users who have made the changes mentioned in [v1.102.0](https://github.com/immich-app/immich/discussions/8930) (an optional, non-mandatory change) or who started with this version.
|
**Note:** This folder will only appear to users who have made the changes mentioned in [v1.102.0](https://github.com/immich-app/immich/discussions/8930) (an optional, non-mandatory change) or who started with this version.
|
||||||
- Stored in `UPLOAD_LOCATION/postgres`.
|
- Stored in `DB_DATA_LOCATION`.
|
||||||
|
|
||||||
:::danger
|
:::danger
|
||||||
A backup of this folder does not constitute a backup of your database!
|
A backup of this folder does not constitute a backup of your database!
|
||||||
@@ -203,7 +209,7 @@ When you turn off the storage template engine, it will leave the assets in `UPLO
|
|||||||
|
|
||||||
- The Immich database containing all the information to allow the system to function properly.
|
- The Immich database containing all the information to allow the system to function properly.
|
||||||
**Note:** This folder will only appear to users who have made the changes mentioned in [v1.102.0](https://github.com/immich-app/immich/discussions/8930) (an optional, non-mandatory change) or who started with this version.
|
**Note:** This folder will only appear to users who have made the changes mentioned in [v1.102.0](https://github.com/immich-app/immich/discussions/8930) (an optional, non-mandatory change) or who started with this version.
|
||||||
- Stored in `UPLOAD_LOCATION/postgres`.
|
- Stored in `DB_DATA_LOCATION`.
|
||||||
|
|
||||||
:::danger
|
:::danger
|
||||||
A backup of this folder does not constitute a backup of your database!
|
A backup of this folder does not constitute a backup of your database!
|
||||||
|
|||||||
@@ -8,13 +8,11 @@ Immich supports the option to send notifications via Email for the following eve
|
|||||||
|
|
||||||
## SMTP settings
|
## SMTP settings
|
||||||
|
|
||||||
You can access the settings panel from the web at `Administration -> Settings -> Notification settings`
|
You can access the settings panel from the web at `Administration -> Settings -> Notification settings`.
|
||||||
|
|
||||||
Under Email, enter the following details to connect with SMTP servers.
|
Under Email, enter the required details to connect with an SMTP server.
|
||||||
|
|
||||||
You can use the following [guide](/docs/guides/smtp-gmail) to use Gmail's SMTP server.
|
You can use [this guide](/docs/guides/smtp-gmail) to use Gmail's SMTP server.
|
||||||
|
|
||||||
<img src={require('./img/email-settings.png').default} width="80%" title="SMTP settings" />
|
|
||||||
|
|
||||||
## User's notifications settings
|
## User's notifications settings
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 218 KiB |
@@ -106,7 +106,7 @@ in User `settings.json` (`cmd + shift + p` and search for `Open User Settings JS
|
|||||||
"editor.suggest.snippetsPreventQuickSuggestions": false,
|
"editor.suggest.snippetsPreventQuickSuggestions": false,
|
||||||
"editor.suggestSelection": "first",
|
"editor.suggestSelection": "first",
|
||||||
"editor.tabCompletion": "onlySnippets",
|
"editor.tabCompletion": "onlySnippets",
|
||||||
"editor.wordBasedSuggestions": false,
|
"editor.wordBasedSuggestions": "off",
|
||||||
"editor.defaultFormatter": "Dart-Code.dart-code"
|
"editor.defaultFormatter": "Dart-Code.dart-code"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ You do not need to redo any machine learning jobs after enabling hardware accele
|
|||||||
|
|
||||||
- The GPU must have compute capability 5.2 or greater.
|
- The GPU must have compute capability 5.2 or greater.
|
||||||
- The server must have the official NVIDIA driver installed.
|
- The server must have the official NVIDIA driver installed.
|
||||||
- The installed driver must be >= 545 (it must support CUDA 12.3.2).
|
- The installed driver must be >= 535 (it must support CUDA 12.2).
|
||||||
- On Linux (except for WSL2), you also need to have [NVIDIA Container Toolkit][nvct] installed.
|
- On Linux (except for WSL2), you also need to have [NVIDIA Container Toolkit][nvct] installed.
|
||||||
|
|
||||||
#### OpenVINO
|
#### OpenVINO
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# Scaling Immich
|
||||||
|
|
||||||
|
Immich is built with modern deployment practices in mind, and the backend is designed to be able to run multiple instances in parallel. When doing this, the only requirement you need to be aware of is that every instance needs to be connected to the shared infrastructure. That means they should all have access to the same Postgres and Redis instances, and have the same files mounted into the containers.
|
||||||
|
|
||||||
|
Scaling can be useful for many reasons. Maybe you have a gaming PC that you want to use for transcoding and thumbnail generation, or perhaps you run a Kubernetes cluster across a handful of powerful servers that you want to make use of.
|
||||||
|
|
||||||
|
:::info
|
||||||
|
If you only have a single machine to run Immich on, scaling to multiple containers is unlikely to provide any benefit. An Immich container will run multiple background tasks at once, and you can increase their number from the admin panel.
|
||||||
|
:::
|
||||||
|
|
||||||
|
The details of how to scale across multiple machines will vary widely between different environments and require some knowledge to set up, and as such this guide gives no specific instructions. In some cases scaling up can be as easy as incrementing the amount of replicas on a Kubernetes deployment, in others it might need you to configure network tunnels or NFS mounts. The details are left as an exercise for the reader ;)
|
||||||
|
|
||||||
|
## Workers
|
||||||
|
|
||||||
|
By default, each running `immich-server` container comes with multiple internal workers. If you're scaling up only to handle more background tasks, you can choose to disable the worker responsible for the API. See [workers](../administration/jobs-workers.md) for more detail.
|
||||||
|
|
||||||
|
## Scaling down
|
||||||
|
|
||||||
|
In the same way you can scale up to multiple containers, you can also choose to scale down. All state is stored in Postgres, Redis, and the filesystem so there is no risk in stopping a running immich-server container, for example if you want to use your GPU to play some games. As long as there is an API worker running you will still be able to browse Immich, and jobs will wait to be processed until there is a worker available for them.
|
||||||
@@ -80,6 +80,10 @@ The Compose file './docker-compose.yml' is invalid because:
|
|||||||
See the previous paragraph about installing from the official docker repository.
|
See the previous paragraph about installing from the official docker repository.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
:::info Health check start interval
|
||||||
|
If you get an error `can't set healthcheck.start_interval as feature require Docker Engine v25 or later`, it helps to comment out the line for `start_interval` in the `database` section of the `docker-compose.yml` file.
|
||||||
|
:::
|
||||||
|
|
||||||
:::tip
|
:::tip
|
||||||
For more information on how to use the application, please refer to the [Post Installation](/docs/install/post-install.mdx) guide.
|
For more information on how to use the application, please refer to the [Post Installation](/docs/install/post-install.mdx) guide.
|
||||||
:::
|
:::
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import StorageTemplate from '/docs/partials/_storage-template.md';
|
|||||||
import MobileAppDownload from '/docs/partials/_mobile-app-download.md';
|
import MobileAppDownload from '/docs/partials/_mobile-app-download.md';
|
||||||
import MobileAppLogin from '/docs/partials/_mobile-app-login.md';
|
import MobileAppLogin from '/docs/partials/_mobile-app-login.md';
|
||||||
import MobileAppBackup from '/docs/partials/_mobile-app-backup.md';
|
import MobileAppBackup from '/docs/partials/_mobile-app-backup.md';
|
||||||
|
import ServerBackup from '/docs/partials/_server-backup.md';
|
||||||
|
|
||||||
# Post Install Steps
|
# Post Install Steps
|
||||||
|
|
||||||
@@ -33,6 +34,10 @@ A list of common steps to take after installing Immich include:
|
|||||||
|
|
||||||
<MobileAppLogin />
|
<MobileAppLogin />
|
||||||
|
|
||||||
## Step 6 - Backup Your Library
|
## Step 6 - Upload Your Library
|
||||||
|
|
||||||
<MobileAppBackup />
|
<MobileAppBackup />
|
||||||
|
|
||||||
|
## Step 7 - Setup Server Backups
|
||||||
|
|
||||||
|
<ServerBackup />
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
Now that you have imported some pictures, you should setup server backups to preserve your memories.
|
||||||
|
You can do so by following our [backup guide](/docs/administration/backup-and-restore.md).
|
||||||
Generated
+22
-12
@@ -6068,9 +6068,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/docusaurus-lunr-search": {
|
"node_modules/docusaurus-lunr-search": {
|
||||||
"version": "3.4.0",
|
"version": "3.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/docusaurus-lunr-search/-/docusaurus-lunr-search-3.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/docusaurus-lunr-search/-/docusaurus-lunr-search-3.5.0.tgz",
|
||||||
"integrity": "sha512-GfllnNXCLgTSPH9TAKWmbn8VMfwpdOAZ1xl3T2GgX8Pm26qSDLfrrdVwjguaLfMJfzciFL97RKrAJlgrFM48yw==",
|
"integrity": "sha512-k3zN4jYMi/prWInJILGKOxE+BVcgYinwj9+gcECsYm52tS+4ZKzXQzbPnVJAEXmvKOfFMcDFvS3MSmm6cEaxIQ==",
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"autocomplete.js": "^0.37.0",
|
"autocomplete.js": "^0.37.0",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
@@ -6097,14 +6098,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/docusaurus-lunr-search/node_modules/@types/unist": {
|
"node_modules/docusaurus-lunr-search/node_modules/@types/unist": {
|
||||||
"version": "2.0.10",
|
"version": "2.0.11",
|
||||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz",
|
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz",
|
||||||
"integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA=="
|
"integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==",
|
||||||
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/docusaurus-lunr-search/node_modules/bail": {
|
"node_modules/docusaurus-lunr-search/node_modules/bail": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz",
|
||||||
"integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==",
|
"integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==",
|
||||||
|
"license": "MIT",
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "github",
|
"type": "github",
|
||||||
"url": "https://github.com/sponsors/wooorm"
|
"url": "https://github.com/sponsors/wooorm"
|
||||||
@@ -6114,6 +6117,7 @@
|
|||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz",
|
||||||
"integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==",
|
"integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==",
|
||||||
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
@@ -6122,6 +6126,7 @@
|
|||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
|
||||||
"integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==",
|
"integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==",
|
||||||
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
@@ -6130,6 +6135,7 @@
|
|||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz",
|
||||||
"integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==",
|
"integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==",
|
||||||
|
"license": "MIT",
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "github",
|
"type": "github",
|
||||||
"url": "https://github.com/sponsors/wooorm"
|
"url": "https://github.com/sponsors/wooorm"
|
||||||
@@ -6139,6 +6145,7 @@
|
|||||||
"version": "9.2.2",
|
"version": "9.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz",
|
||||||
"integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==",
|
"integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==",
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bail": "^1.0.0",
|
"bail": "^1.0.0",
|
||||||
"extend": "^3.0.0",
|
"extend": "^3.0.0",
|
||||||
@@ -6156,6 +6163,7 @@
|
|||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz",
|
||||||
"integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==",
|
"integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==",
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/unist": "^2.0.2"
|
"@types/unist": "^2.0.2"
|
||||||
},
|
},
|
||||||
@@ -6168,6 +6176,7 @@
|
|||||||
"version": "4.2.1",
|
"version": "4.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz",
|
||||||
"integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==",
|
"integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==",
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/unist": "^2.0.0",
|
"@types/unist": "^2.0.0",
|
||||||
"is-buffer": "^2.0.0",
|
"is-buffer": "^2.0.0",
|
||||||
@@ -6183,6 +6192,7 @@
|
|||||||
"version": "2.0.4",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz",
|
||||||
"integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==",
|
"integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==",
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/unist": "^2.0.0",
|
"@types/unist": "^2.0.0",
|
||||||
"unist-util-stringify-position": "^2.0.0"
|
"unist-util-stringify-position": "^2.0.0"
|
||||||
@@ -16081,9 +16091,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tailwindcss": {
|
"node_modules/tailwindcss": {
|
||||||
"version": "3.4.10",
|
"version": "3.4.11",
|
||||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.10.tgz",
|
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.11.tgz",
|
||||||
"integrity": "sha512-KWZkVPm7yJRhdu4SRSl9d4AK2wM3a50UsvgHZO7xY77NQr2V+fIrEuoDGQcbvswWvFGbS2f6e+jC/6WJm1Dl0w==",
|
"integrity": "sha512-qhEuBcLemjSJk5ajccN9xJFtM/h0AVCPaA6C92jNP+M2J8kX+eMJHI7R2HFKUvvAsMpcfLILMCFYSeDwpMmlUg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alloc/quick-lru": "^5.2.0",
|
"@alloc/quick-lru": "^5.2.0",
|
||||||
@@ -16443,9 +16453,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.5.4",
|
"version": "5.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz",
|
||||||
"integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==",
|
"integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
|
|||||||
@@ -1,16 +1,20 @@
|
|||||||
import {
|
import {
|
||||||
|
mdiBug,
|
||||||
mdiCalendarToday,
|
mdiCalendarToday,
|
||||||
mdiCrosshairsOff,
|
mdiCrosshairsOff,
|
||||||
|
mdiDatabase,
|
||||||
mdiLeadPencil,
|
mdiLeadPencil,
|
||||||
mdiLockOff,
|
mdiLockOff,
|
||||||
mdiLockOutline,
|
mdiLockOutline,
|
||||||
|
mdiSecurity,
|
||||||
mdiSpeedometerSlow,
|
mdiSpeedometerSlow,
|
||||||
|
mdiTrashCan,
|
||||||
mdiWeb,
|
mdiWeb,
|
||||||
mdiWrap,
|
mdiWrap,
|
||||||
} from '@mdi/js';
|
} from '@mdi/js';
|
||||||
import Layout from '@theme/Layout';
|
import Layout from '@theme/Layout';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Item as TimelineItem, Timeline } from '../components/timeline';
|
import { Timeline, Item as TimelineItem } from '../components/timeline';
|
||||||
|
|
||||||
const withLanguage = (date: Date) => (language: string) => date.toLocaleDateString(language);
|
const withLanguage = (date: Date) => (language: string) => date.toLocaleDateString(language);
|
||||||
|
|
||||||
@@ -96,6 +100,51 @@ const items: Item[] = [
|
|||||||
link: { url: 'https://github.com/immich-app/immich/pull/6787', text: '#6787' },
|
link: { url: 'https://github.com/immich-app/immich/pull/6787', text: '#6787' },
|
||||||
date: new Date(2024, 0, 31),
|
date: new Date(2024, 0, 31),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
icon: mdiBug,
|
||||||
|
iconColor: 'green',
|
||||||
|
title: 'ESM imports are cursed',
|
||||||
|
description:
|
||||||
|
'Prior to Node.js v20.8 using --experimental-vm-modules in a CommonJS project that imported an ES module that imported a CommonJS modules would create a segfault and crash Node.js',
|
||||||
|
link: {
|
||||||
|
url: 'https://github.com/immich-app/immich/pull/6719',
|
||||||
|
text: '#6179',
|
||||||
|
},
|
||||||
|
date: new Date(2024, 0, 9),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: mdiDatabase,
|
||||||
|
iconColor: 'gray',
|
||||||
|
title: 'PostgreSQL parameters are cursed',
|
||||||
|
description: `PostgresSQL has a limit of ${Number(65535).toLocaleString()} parameters, so bulk inserts can fail with large datasets.`,
|
||||||
|
link: {
|
||||||
|
url: 'https://github.com/immich-app/immich/pull/6034',
|
||||||
|
text: '#6034',
|
||||||
|
},
|
||||||
|
date: new Date(2023, 11, 28),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: mdiSecurity,
|
||||||
|
iconColor: 'gold',
|
||||||
|
title: 'Secure contexts are cursed',
|
||||||
|
description: `Some web features like the clipboard API only work in "secure contexts" (ie. https or localhost)`,
|
||||||
|
link: {
|
||||||
|
url: 'https://github.com/immich-app/immich/issues/2981',
|
||||||
|
text: '#2981',
|
||||||
|
},
|
||||||
|
date: new Date(2023, 5, 26),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: mdiTrashCan,
|
||||||
|
iconColor: 'gray',
|
||||||
|
title: 'TypeORM deletes are cursed',
|
||||||
|
description: `The remove implementation in TypeORM mutates the input, deleting the id property from the original object.`,
|
||||||
|
link: {
|
||||||
|
url: 'https://github.com/typeorm/typeorm/issues/7024#issuecomment-948519328',
|
||||||
|
text: 'typeorm#6034',
|
||||||
|
},
|
||||||
|
date: new Date(2023, 1, 23),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function CursedKnowledgePage(): JSX.Element {
|
export default function CursedKnowledgePage(): JSX.Element {
|
||||||
|
|||||||
Vendored
+4
@@ -1,4 +1,8 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"label": "v1.115.0",
|
||||||
|
"url": "https://v1.115.0.archive.immich.app"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "v1.114.0",
|
"label": "v1.114.0",
|
||||||
"url": "https://v1.114.0.archive.immich.app"
|
"url": "https://v1.114.0.archive.immich.app"
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ services:
|
|||||||
- 2285:3001
|
- 2285:3001
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:6.2-alpine@sha256:e3b17ba9479deec4b7d1eeec1548a253acc5374d68d3b27937fcfe4df8d18c7e
|
image: redis:6.2-alpine@sha256:2d1463258f2764328496376f5d965f20c6a67f66ea2b06dc42af351f75248792
|
||||||
|
|
||||||
database:
|
database:
|
||||||
image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
|
image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
|
||||||
|
|||||||
Generated
+386
-361
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "immich-e2e",
|
"name": "immich-e2e",
|
||||||
"version": "1.114.0",
|
"version": "1.115.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
"@immich/sdk": "file:../open-api/typescript-sdk",
|
"@immich/sdk": "file:../open-api/typescript-sdk",
|
||||||
"@playwright/test": "^1.44.1",
|
"@playwright/test": "^1.44.1",
|
||||||
"@types/luxon": "^3.4.2",
|
"@types/luxon": "^3.4.2",
|
||||||
"@types/node": "^20.16.2",
|
"@types/node": "^20.16.5",
|
||||||
"@types/oidc-provider": "^8.5.1",
|
"@types/oidc-provider": "^8.5.1",
|
||||||
"@types/pg": "^8.11.0",
|
"@types/pg": "^8.11.0",
|
||||||
"@types/pngjs": "^6.0.4",
|
"@types/pngjs": "^6.0.4",
|
||||||
|
|||||||
@@ -545,6 +545,48 @@ describe('/asset', () => {
|
|||||||
expect(status).toEqual(200);
|
expect(status).toEqual(200);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should not allow linking two photos', async () => {
|
||||||
|
const { status, body } = await request(app)
|
||||||
|
.put(`/assets/${user1Assets[0].id}`)
|
||||||
|
.set('Authorization', `Bearer ${user1.accessToken}`)
|
||||||
|
.send({ livePhotoVideoId: user1Assets[1].id });
|
||||||
|
|
||||||
|
expect(body).toEqual(errorDto.badRequest('Live photo video must be a video'));
|
||||||
|
expect(status).toEqual(400);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should not allow linking a video owned by another user', async () => {
|
||||||
|
const asset = await utils.createAsset(user2.accessToken, { assetData: { filename: 'example.mp4' } });
|
||||||
|
const { status, body } = await request(app)
|
||||||
|
.put(`/assets/${user1Assets[0].id}`)
|
||||||
|
.set('Authorization', `Bearer ${user1.accessToken}`)
|
||||||
|
.send({ livePhotoVideoId: asset.id });
|
||||||
|
|
||||||
|
expect(body).toEqual(errorDto.badRequest('Live photo video does not belong to the user'));
|
||||||
|
expect(status).toEqual(400);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should link a motion photo', async () => {
|
||||||
|
const asset = await utils.createAsset(user1.accessToken, { assetData: { filename: 'example.mp4' } });
|
||||||
|
const { status, body } = await request(app)
|
||||||
|
.put(`/assets/${user1Assets[0].id}`)
|
||||||
|
.set('Authorization', `Bearer ${user1.accessToken}`)
|
||||||
|
.send({ livePhotoVideoId: asset.id });
|
||||||
|
|
||||||
|
expect(status).toEqual(200);
|
||||||
|
expect(body).toMatchObject({ id: user1Assets[0].id, livePhotoVideoId: asset.id });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should unlink a motion photo', async () => {
|
||||||
|
const { status, body } = await request(app)
|
||||||
|
.put(`/assets/${user1Assets[0].id}`)
|
||||||
|
.set('Authorization', `Bearer ${user1.accessToken}`)
|
||||||
|
.send({ livePhotoVideoId: null });
|
||||||
|
|
||||||
|
expect(status).toEqual(200);
|
||||||
|
expect(body).toMatchObject({ id: user1Assets[0].id, livePhotoVideoId: null });
|
||||||
|
});
|
||||||
|
|
||||||
it('should update date time original when sidecar file contains DateTimeOriginal', async () => {
|
it('should update date time original when sidecar file contains DateTimeOriginal', async () => {
|
||||||
const sidecarData = `<?xpacket begin='?' id='W5M0MpCehiHzreSzNTczkc9d'?>
|
const sidecarData = `<?xpacket begin='?' id='W5M0MpCehiHzreSzNTczkc9d'?>
|
||||||
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 12.40'>
|
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 12.40'>
|
||||||
@@ -1010,7 +1052,7 @@ describe('/asset', () => {
|
|||||||
dateTimeOriginal: '2010-07-20T17:27:12.000Z',
|
dateTimeOriginal: '2010-07-20T17:27:12.000Z',
|
||||||
latitude: null,
|
latitude: null,
|
||||||
longitude: null,
|
longitude: null,
|
||||||
orientation: '1',
|
orientation: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ describe('/libraries', () => {
|
|||||||
refreshedAt: null,
|
refreshedAt: null,
|
||||||
assetCount: 0,
|
assetCount: 0,
|
||||||
importPaths: [],
|
importPaths: [],
|
||||||
exclusionPatterns: [],
|
exclusionPatterns: expect.any(Array),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -270,7 +270,7 @@ describe('/libraries', () => {
|
|||||||
refreshedAt: null,
|
refreshedAt: null,
|
||||||
assetCount: 0,
|
assetCount: 0,
|
||||||
importPaths: [],
|
importPaths: [],
|
||||||
exclusionPatterns: [],
|
exclusionPatterns: expect.any(Array),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -34,8 +34,11 @@ describe('/trash', () => {
|
|||||||
const before = await getAssetInfo({ id: assetId }, { headers: asBearerAuth(admin.accessToken) });
|
const before = await getAssetInfo({ id: assetId }, { headers: asBearerAuth(admin.accessToken) });
|
||||||
expect(before).toStrictEqual(expect.objectContaining({ id: assetId, isTrashed: true }));
|
expect(before).toStrictEqual(expect.objectContaining({ id: assetId, isTrashed: true }));
|
||||||
|
|
||||||
const { status } = await request(app).post('/trash/empty').set('Authorization', `Bearer ${admin.accessToken}`);
|
const { status, body } = await request(app)
|
||||||
expect(status).toBe(204);
|
.post('/trash/empty')
|
||||||
|
.set('Authorization', `Bearer ${admin.accessToken}`);
|
||||||
|
expect(status).toBe(200);
|
||||||
|
expect(body).toEqual({ count: 1 });
|
||||||
|
|
||||||
await utils.waitForWebsocketEvent({ event: 'assetDelete', id: assetId });
|
await utils.waitForWebsocketEvent({ event: 'assetDelete', id: assetId });
|
||||||
|
|
||||||
@@ -51,8 +54,11 @@ describe('/trash', () => {
|
|||||||
const before = await getAssetInfo({ id: assetId }, { headers: asBearerAuth(admin.accessToken) });
|
const before = await getAssetInfo({ id: assetId }, { headers: asBearerAuth(admin.accessToken) });
|
||||||
expect(before).toStrictEqual(expect.objectContaining({ id: assetId, isTrashed: true, isArchived: true }));
|
expect(before).toStrictEqual(expect.objectContaining({ id: assetId, isTrashed: true, isArchived: true }));
|
||||||
|
|
||||||
const { status } = await request(app).post('/trash/empty').set('Authorization', `Bearer ${admin.accessToken}`);
|
const { status, body } = await request(app)
|
||||||
expect(status).toBe(204);
|
.post('/trash/empty')
|
||||||
|
.set('Authorization', `Bearer ${admin.accessToken}`);
|
||||||
|
expect(status).toBe(200);
|
||||||
|
expect(body).toEqual({ count: 1 });
|
||||||
|
|
||||||
await utils.waitForWebsocketEvent({ event: 'assetDelete', id: assetId });
|
await utils.waitForWebsocketEvent({ event: 'assetDelete', id: assetId });
|
||||||
|
|
||||||
@@ -76,8 +82,11 @@ describe('/trash', () => {
|
|||||||
const before = await getAssetInfo({ id: assetId }, { headers: asBearerAuth(admin.accessToken) });
|
const before = await getAssetInfo({ id: assetId }, { headers: asBearerAuth(admin.accessToken) });
|
||||||
expect(before).toStrictEqual(expect.objectContaining({ id: assetId, isTrashed: true }));
|
expect(before).toStrictEqual(expect.objectContaining({ id: assetId, isTrashed: true }));
|
||||||
|
|
||||||
const { status } = await request(app).post('/trash/restore').set('Authorization', `Bearer ${admin.accessToken}`);
|
const { status, body } = await request(app)
|
||||||
expect(status).toBe(204);
|
.post('/trash/restore')
|
||||||
|
.set('Authorization', `Bearer ${admin.accessToken}`);
|
||||||
|
expect(status).toBe(200);
|
||||||
|
expect(body).toEqual({ count: 1 });
|
||||||
|
|
||||||
const after = await getAssetInfo({ id: assetId }, { headers: asBearerAuth(admin.accessToken) });
|
const after = await getAssetInfo({ id: assetId }, { headers: asBearerAuth(admin.accessToken) });
|
||||||
expect(after).toStrictEqual(expect.objectContaining({ id: assetId, isTrashed: false }));
|
expect(after).toStrictEqual(expect.objectContaining({ id: assetId, isTrashed: false }));
|
||||||
@@ -99,11 +108,12 @@ describe('/trash', () => {
|
|||||||
const before = await utils.getAssetInfo(admin.accessToken, assetId);
|
const before = await utils.getAssetInfo(admin.accessToken, assetId);
|
||||||
expect(before.isTrashed).toBe(true);
|
expect(before.isTrashed).toBe(true);
|
||||||
|
|
||||||
const { status } = await request(app)
|
const { status, body } = await request(app)
|
||||||
.post('/trash/restore/assets')
|
.post('/trash/restore/assets')
|
||||||
.set('Authorization', `Bearer ${admin.accessToken}`)
|
.set('Authorization', `Bearer ${admin.accessToken}`)
|
||||||
.send({ ids: [assetId] });
|
.send({ ids: [assetId] });
|
||||||
expect(status).toBe(204);
|
expect(status).toBe(200);
|
||||||
|
expect(body).toEqual({ count: 1 });
|
||||||
|
|
||||||
const after = await utils.getAssetInfo(admin.accessToken, assetId);
|
const after = await utils.getAssetInfo(admin.accessToken, assetId);
|
||||||
expect(after.isTrashed).toBe(false);
|
expect(after.isTrashed).toBe(false);
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ export const signupResponseDto = {
|
|||||||
quotaSizeInBytes: null,
|
quotaSizeInBytes: null,
|
||||||
status: 'active',
|
status: 'active',
|
||||||
license: null,
|
license: null,
|
||||||
|
profileChangedAt: expect.any(String),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ download:
|
|||||||
locale_code: nb-NO
|
locale_code: nb-NO
|
||||||
- file: mobile/assets/i18n/sv-SE.json
|
- file: mobile/assets/i18n/sv-SE.json
|
||||||
locale_code: sv-SE
|
locale_code: sv-SE
|
||||||
- file: mobile/assets/i18n/mn.json
|
- file: mobile/assets/i18n/mn-MN.json
|
||||||
locale_code: mn
|
locale_code: mn
|
||||||
- file: mobile/assets/i18n/ko-KR.json
|
- file: mobile/assets/i18n/ko-KR.json
|
||||||
locale_code: ko-KR
|
locale_code: ko-KR
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
ARG DEVICE=cpu
|
ARG DEVICE=cpu
|
||||||
|
|
||||||
FROM python:3.11-bookworm@sha256:20c1819af5af3acba0b2b66074a2615e398ceee6842adf03cd7ad5f8d0ee3daf AS builder-cpu
|
FROM python:3.11-bookworm@sha256:157a371e60389919fe4a72dff71ce86eaa5234f59114c23b0b346d0d02c74d39 AS builder-cpu
|
||||||
|
|
||||||
FROM builder-cpu AS builder-openvino
|
FROM builder-cpu AS builder-openvino
|
||||||
|
|
||||||
@@ -34,23 +34,27 @@ RUN python3 -m venv /opt/venv
|
|||||||
COPY poetry.lock pyproject.toml ./
|
COPY poetry.lock pyproject.toml ./
|
||||||
RUN poetry install --sync --no-interaction --no-ansi --no-root --with ${DEVICE} --without dev
|
RUN poetry install --sync --no-interaction --no-ansi --no-root --with ${DEVICE} --without dev
|
||||||
|
|
||||||
FROM python:3.11-slim-bookworm@sha256:ed4e985674f478c90ce879e9aa224fbb772c84e39b4aed5155b9e2280f131039 AS prod-cpu
|
FROM python:3.11-slim-bookworm@sha256:669bbd08353610485a94d5d0c976b4b6498c55280fe42c00f7581f85ee9f3121 AS prod-cpu
|
||||||
|
|
||||||
FROM prod-cpu AS prod-openvino
|
FROM prod-cpu AS prod-openvino
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install --no-install-recommends -yqq ocl-icd-libopencl1 wget && \
|
apt-get install --no-install-recommends -yqq ocl-icd-libopencl1 wget && \
|
||||||
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17193.4/intel-igc-core_1.0.17193.4_amd64.deb && \
|
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17384.11/intel-igc-core_1.0.17384.11_amd64.deb && \
|
||||||
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17193.4/intel-igc-opencl_1.0.17193.4_amd64.deb && \
|
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17384.11/intel-igc-opencl_1.0.17384.11_amd64.deb && \
|
||||||
wget https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/intel-opencl-icd-dbgsym_24.26.30049.6_amd64.ddeb && \
|
wget https://github.com/intel/compute-runtime/releases/download/24.31.30508.7/intel-opencl-icd_24.31.30508.7_amd64.deb && \
|
||||||
wget https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/intel-opencl-icd_24.26.30049.6_amd64.deb && \
|
wget https://github.com/intel/compute-runtime/releases/download/24.31.30508.7/libigdgmm12_22.4.1_amd64.deb && \
|
||||||
wget https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/libigdgmm12_22.3.20_amd64.deb && \
|
|
||||||
dpkg -i *.deb && \
|
dpkg -i *.deb && \
|
||||||
rm *.deb && \
|
rm *.deb && \
|
||||||
apt-get remove wget -yqq && \
|
apt-get remove wget -yqq && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
FROM nvidia/cuda:12.3.2-cudnn9-runtime-ubuntu22.04@sha256:fa44193567d1908f7ca1f3abf8623ce9c63bc8cba7bcfdb32702eb04d326f7a8 AS prod-cuda
|
FROM nvidia/cuda:12.2.2-runtime-ubuntu22.04@sha256:94c1577b2cd9dd6c0312dc04dff9cb2fdce2b268018abc3d7c2dbcacf1155000 AS prod-cuda
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install --no-install-recommends -yqq libcudnn9-cuda-12 && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY --from=builder-cuda /usr/local/bin/python3 /usr/local/bin/python3
|
COPY --from=builder-cuda /usr/local/bin/python3 /usr/local/bin/python3
|
||||||
COPY --from=builder-cuda /usr/local/lib/python3.11 /usr/local/lib/python3.11
|
COPY --from=builder-cuda /usr/local/lib/python3.11 /usr/local/lib/python3.11
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ class InferenceModel(ABC):
|
|||||||
f"immich-app/{clean_name(self.model_name)}",
|
f"immich-app/{clean_name(self.model_name)}",
|
||||||
cache_dir=self.cache_dir,
|
cache_dir=self.cache_dir,
|
||||||
local_dir=self.cache_dir,
|
local_dir=self.cache_dir,
|
||||||
local_dir_use_symlinks=False,
|
|
||||||
ignore_patterns=ignore_patterns,
|
ignore_patterns=ignore_patterns,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ from app.config import log
|
|||||||
from app.models.base import InferenceModel
|
from app.models.base import InferenceModel
|
||||||
from app.models.transforms import decode_cv2
|
from app.models.transforms import decode_cv2
|
||||||
from app.schemas import FaceDetectionOutput, FacialRecognitionOutput, ModelFormat, ModelSession, ModelTask, ModelType
|
from app.schemas import FaceDetectionOutput, FacialRecognitionOutput, ModelFormat, ModelSession, ModelTask, ModelType
|
||||||
from app.sessions import has_batch_axis
|
|
||||||
|
|
||||||
|
|
||||||
class FaceRecognizer(InferenceModel):
|
class FaceRecognizer(InferenceModel):
|
||||||
@@ -27,7 +26,7 @@ class FaceRecognizer(InferenceModel):
|
|||||||
|
|
||||||
def _load(self) -> ModelSession:
|
def _load(self) -> ModelSession:
|
||||||
session = self._make_session(self.model_path)
|
session = self._make_session(self.model_path)
|
||||||
if self.batch and not has_batch_axis(session):
|
if self.batch and str(session.get_inputs()[0].shape[0]) != "batch":
|
||||||
self._add_batch_axis(self.model_path)
|
self._add_batch_axis(self.model_path)
|
||||||
session = self._make_session(self.model_path)
|
session = self._make_session(self.model_path)
|
||||||
self.model = ArcFaceONNX(
|
self.model = ArcFaceONNX(
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
from app.schemas import ModelSession
|
|
||||||
|
|
||||||
|
|
||||||
def has_batch_axis(session: ModelSession) -> bool:
|
|
||||||
return not isinstance(session.get_inputs()[0].shape[0], int) or session.get_inputs()[0].shape[0] < 0
|
|
||||||
|
|||||||
@@ -124,7 +124,6 @@ class TestBase:
|
|||||||
"immich-app/ViT-B-32__openai",
|
"immich-app/ViT-B-32__openai",
|
||||||
cache_dir=encoder.cache_dir,
|
cache_dir=encoder.cache_dir,
|
||||||
local_dir=encoder.cache_dir,
|
local_dir=encoder.cache_dir,
|
||||||
local_dir_use_symlinks=False,
|
|
||||||
ignore_patterns=["*.armnn"],
|
ignore_patterns=["*.armnn"],
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -136,7 +135,6 @@ class TestBase:
|
|||||||
"immich-app/ViT-B-32__openai",
|
"immich-app/ViT-B-32__openai",
|
||||||
cache_dir=encoder.cache_dir,
|
cache_dir=encoder.cache_dir,
|
||||||
local_dir=encoder.cache_dir,
|
local_dir=encoder.cache_dir,
|
||||||
local_dir_use_symlinks=False,
|
|
||||||
ignore_patterns=[],
|
ignore_patterns=[],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM mambaorg/micromamba:bookworm-slim@sha256:29174348bd09352e5f1b1f6756cf1d00021487b8340fae040e91e4f98e954ce5 AS builder
|
FROM mambaorg/micromamba:bookworm-slim@sha256:5f32c5742e2248f2ca07ccae6861371321aba37372bf8e1a80d6f728f1ab4418 AS builder
|
||||||
|
|
||||||
ENV TRANSFORMERS_CACHE=/cache \
|
ENV TRANSFORMERS_CACHE=/cache \
|
||||||
PYTHONDONTWRITEBYTECODE=1 \
|
PYTHONDONTWRITEBYTECODE=1 \
|
||||||
|
|||||||
Generated
+54
-54
@@ -680,13 +680,13 @@ test = ["pytest (>=6)"]
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fastapi-slim"
|
name = "fastapi-slim"
|
||||||
version = "0.112.2"
|
version = "0.114.2"
|
||||||
description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
|
description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.8"
|
python-versions = ">=3.8"
|
||||||
files = [
|
files = [
|
||||||
{file = "fastapi_slim-0.112.2-py3-none-any.whl", hash = "sha256:c023f74768f187af142c2fe5ff9e4ca3c4c1940bbde7df008cb283532422a23f"},
|
{file = "fastapi_slim-0.114.2-py3-none-any.whl", hash = "sha256:52ae76c53a30ad0fa96beb84c1bf4bef9c72e88c2f7c0473e836f01d7ac3ca6b"},
|
||||||
{file = "fastapi_slim-0.112.2.tar.gz", hash = "sha256:75b8eb0c6ee05a20270da7a527ac7ad53b83414602f42b68f7027484dab3aedb"},
|
{file = "fastapi_slim-0.114.2.tar.gz", hash = "sha256:76d0a450826fb0fa740268be55ef04c44807da87a94fbbf5f16338b5a4a2d321"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
@@ -1963,36 +1963,36 @@ reference = ["Pillow", "google-re2"]
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "onnxruntime"
|
name = "onnxruntime"
|
||||||
version = "1.19.0"
|
version = "1.19.2"
|
||||||
description = "ONNX Runtime is a runtime accelerator for Machine Learning models"
|
description = "ONNX Runtime is a runtime accelerator for Machine Learning models"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "*"
|
python-versions = "*"
|
||||||
files = [
|
files = [
|
||||||
{file = "onnxruntime-1.19.0-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:6ce22a98dfec7b646ae305f52d0ce14a189a758b02ea501860ca719f4b0ae04b"},
|
{file = "onnxruntime-1.19.2-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:84fa57369c06cadd3c2a538ae2a26d76d583e7c34bdecd5769d71ca5c0fc750e"},
|
||||||
{file = "onnxruntime-1.19.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:19019c72873f26927aa322c54cf2bf7312b23451b27451f39b88f57016c94f8b"},
|
{file = "onnxruntime-1.19.2-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bdc471a66df0c1cdef774accef69e9f2ca168c851ab5e4f2f3341512c7ef4666"},
|
||||||
{file = "onnxruntime-1.19.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8eaa16df99171dc636e30108d15597aed8c4c2dd9dbfdd07cc464d57d73fb275"},
|
{file = "onnxruntime-1.19.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e3a4ce906105d99ebbe817f536d50a91ed8a4d1592553f49b3c23c4be2560ae6"},
|
||||||
{file = "onnxruntime-1.19.0-cp310-cp310-win32.whl", hash = "sha256:0eb0f8dbe596fd0f4737fe511fdbb17603853a7d204c5b2ca38d3c7808fc556b"},
|
{file = "onnxruntime-1.19.2-cp310-cp310-win32.whl", hash = "sha256:4b3d723cc154c8ddeb9f6d0a8c0d6243774c6b5930847cc83170bfe4678fafb3"},
|
||||||
{file = "onnxruntime-1.19.0-cp310-cp310-win_amd64.whl", hash = "sha256:616092d54ba8023b7bc0a5f6d900a07a37cc1cfcc631873c15f8c1d6e9e184d4"},
|
{file = "onnxruntime-1.19.2-cp310-cp310-win_amd64.whl", hash = "sha256:17ed7382d2c58d4b7354fb2b301ff30b9bf308a1c7eac9546449cd122d21cae5"},
|
||||||
{file = "onnxruntime-1.19.0-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:a2b53b3c287cd933e5eb597273926e899082d8c84ab96e1b34035764a1627e17"},
|
{file = "onnxruntime-1.19.2-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:d863e8acdc7232d705d49e41087e10b274c42f09e259016a46f32c34e06dc4fd"},
|
||||||
{file = "onnxruntime-1.19.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e94984663963e74fbb468bde9ec6f19dcf890b594b35e249c4dc8789d08993c5"},
|
{file = "onnxruntime-1.19.2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c1dfe4f660a71b31caa81fc298a25f9612815215a47b286236e61d540350d7b6"},
|
||||||
{file = "onnxruntime-1.19.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6f379d1f050cfb55ce015d53727b78ee362febc065c38eed81512b22b757da73"},
|
{file = "onnxruntime-1.19.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a36511dc07c5c964b916697e42e366fa43c48cdb3d3503578d78cef30417cb84"},
|
||||||
{file = "onnxruntime-1.19.0-cp311-cp311-win32.whl", hash = "sha256:4ccb48faea02503275ae7e79e351434fc43c294c4cb5c4d8bcb7479061396614"},
|
{file = "onnxruntime-1.19.2-cp311-cp311-win32.whl", hash = "sha256:50cbb8dc69d6befad4746a69760e5b00cc3ff0a59c6c3fb27f8afa20e2cab7e7"},
|
||||||
{file = "onnxruntime-1.19.0-cp311-cp311-win_amd64.whl", hash = "sha256:9cdc8d311289a84e77722de68bd22b8adfb94eea26f4be6f9e017350faac8b18"},
|
{file = "onnxruntime-1.19.2-cp311-cp311-win_amd64.whl", hash = "sha256:1c3e5d415b78337fa0b1b75291e9ea9fb2a4c1f148eb5811e7212fed02cfffa8"},
|
||||||
{file = "onnxruntime-1.19.0-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:1b59eaec1be9a8613c5fdeaafe67f73a062edce3ac03bbbdc9e2d98b58a30617"},
|
{file = "onnxruntime-1.19.2-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:68e7051bef9cfefcbb858d2d2646536829894d72a4130c24019219442b1dd2ed"},
|
||||||
{file = "onnxruntime-1.19.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:be4144d014a4b25184e63ce7a463a2e7796e2f3df931fccc6a6aefa6f1365dc5"},
|
{file = "onnxruntime-1.19.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d2d366fbcc205ce68a8a3bde2185fd15c604d9645888703785b61ef174265168"},
|
||||||
{file = "onnxruntime-1.19.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:10d7e7d4ca7021ce7f29a66dbc6071addf2de5839135339bd855c6d9c2bba371"},
|
{file = "onnxruntime-1.19.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:477b93df4db467e9cbf34051662a4b27c18e131fa1836e05974eae0d6e4cf29b"},
|
||||||
{file = "onnxruntime-1.19.0-cp312-cp312-win32.whl", hash = "sha256:87f2c58b577a1fb31dc5d92b647ecc588fd5f1ea0c3ad4526f5f80a113357c8d"},
|
{file = "onnxruntime-1.19.2-cp312-cp312-win32.whl", hash = "sha256:9a174073dc5608fad05f7cf7f320b52e8035e73d80b0a23c80f840e5a97c0147"},
|
||||||
{file = "onnxruntime-1.19.0-cp312-cp312-win_amd64.whl", hash = "sha256:8a1f50d49676d7b69566536ff039d9e4e95fc482a55673719f46528218ecbb94"},
|
{file = "onnxruntime-1.19.2-cp312-cp312-win_amd64.whl", hash = "sha256:190103273ea4507638ffc31d66a980594b237874b65379e273125150eb044857"},
|
||||||
{file = "onnxruntime-1.19.0-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:71423c8c4b2d7a58956271534302ec72721c62a41efd0c4896343249b8399ab0"},
|
{file = "onnxruntime-1.19.2-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:636bc1d4cc051d40bc52e1f9da87fbb9c57d9d47164695dfb1c41646ea51ea66"},
|
||||||
{file = "onnxruntime-1.19.0-cp38-cp38-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9d63630d45e9498f96e75bbeb7fd4a56acb10155de0de4d0e18d1b6cbb0b358a"},
|
{file = "onnxruntime-1.19.2-cp38-cp38-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5bd8b875757ea941cbcfe01582970cc299893d1b65bd56731e326a8333f638a3"},
|
||||||
{file = "onnxruntime-1.19.0-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f3bfd15db1e8794d379a86c1a9116889f47f2cca40cc82208fc4f7e8c38e8522"},
|
{file = "onnxruntime-1.19.2-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b2046fc9560f97947bbc1acbe4c6d48585ef0f12742744307d3364b131ac5778"},
|
||||||
{file = "onnxruntime-1.19.0-cp38-cp38-win32.whl", hash = "sha256:3b098003b6b4cb37cc84942e5f1fe27f945dd857cbd2829c824c26b0ba4a247e"},
|
{file = "onnxruntime-1.19.2-cp38-cp38-win32.whl", hash = "sha256:31c12840b1cde4ac1f7d27d540c44e13e34f2345cf3642762d2a3333621abb6a"},
|
||||||
{file = "onnxruntime-1.19.0-cp38-cp38-win_amd64.whl", hash = "sha256:cea067a6541d6787d903ee6843401c5b1332a266585160d9700f9f0939443886"},
|
{file = "onnxruntime-1.19.2-cp38-cp38-win_amd64.whl", hash = "sha256:016229660adea180e9a32ce218b95f8f84860a200f0f13b50070d7d90e92956c"},
|
||||||
{file = "onnxruntime-1.19.0-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:c4fcff12dc5ca963c5f76b9822bb404578fa4a98c281e8c666b429192799a099"},
|
{file = "onnxruntime-1.19.2-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:006c8d326835c017a9e9f74c9c77ebb570a71174a1e89fe078b29a557d9c3848"},
|
||||||
{file = "onnxruntime-1.19.0-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f6dcad8a4db908fbe70b98c79cea1c8b6ac3316adf4ce93453136e33a524ac59"},
|
{file = "onnxruntime-1.19.2-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:df2a94179a42d530b936f154615b54748239c2908ee44f0d722cb4df10670f68"},
|
||||||
{file = "onnxruntime-1.19.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4bc449907c6e8d99eee5ae5cc9c8fdef273d801dcd195393d3f9ab8ad3f49522"},
|
{file = "onnxruntime-1.19.2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fae4b4de45894b9ce7ae418c5484cbf0341db6813effec01bb2216091c52f7fb"},
|
||||||
{file = "onnxruntime-1.19.0-cp39-cp39-win32.whl", hash = "sha256:947febd48405afcf526e45ccff97ff23b15e530434705f734870d22ae7fcf236"},
|
{file = "onnxruntime-1.19.2-cp39-cp39-win32.whl", hash = "sha256:dc5430f473e8706fff837ae01323be9dcfddd3ea471c900a91fa7c9b807ec5d3"},
|
||||||
{file = "onnxruntime-1.19.0-cp39-cp39-win_amd64.whl", hash = "sha256:f60be47eff5ee77fd28a466b0fd41d7debc42a32179d1ddb21e05d6067d7b48b"},
|
{file = "onnxruntime-1.19.2-cp39-cp39-win_amd64.whl", hash = "sha256:38475e29a95c5f6c62c2c603d69fc7d4c6ccbf4df602bd567b86ae1138881c49"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
@@ -2473,13 +2473,13 @@ files = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pytest"
|
name = "pytest"
|
||||||
version = "8.3.2"
|
version = "8.3.3"
|
||||||
description = "pytest: simple powerful testing with Python"
|
description = "pytest: simple powerful testing with Python"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.8"
|
python-versions = ">=3.8"
|
||||||
files = [
|
files = [
|
||||||
{file = "pytest-8.3.2-py3-none-any.whl", hash = "sha256:4ba08f9ae7dcf84ded419494d229b48d0903ea6407b030eaec46df5e6a73bba5"},
|
{file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"},
|
||||||
{file = "pytest-8.3.2.tar.gz", hash = "sha256:c132345d12ce551242c87269de812483f5bcc87cdbb4722e48487ba194f9fdce"},
|
{file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
@@ -2816,13 +2816,13 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"]
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rich"
|
name = "rich"
|
||||||
version = "13.8.0"
|
version = "13.8.1"
|
||||||
description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal"
|
description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7.0"
|
python-versions = ">=3.7.0"
|
||||||
files = [
|
files = [
|
||||||
{file = "rich-13.8.0-py3-none-any.whl", hash = "sha256:2e85306a063b9492dffc86278197a60cbece75bcb766022f3436f567cae11bdc"},
|
{file = "rich-13.8.1-py3-none-any.whl", hash = "sha256:1760a3c0848469b97b558fc61c85233e3dafb69c7a071b4d60c38099d3cd4c06"},
|
||||||
{file = "rich-13.8.0.tar.gz", hash = "sha256:a5ac1f1cd448ade0d59cc3356f7db7a7ccda2c8cbae9c7a90c28ff463d3e91f4"},
|
{file = "rich-13.8.1.tar.gz", hash = "sha256:8260cda28e3db6bf04d2d1ef4dbc03ba80a824c88b0e7668a0f23126a424844a"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
@@ -2834,29 +2834,29 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"]
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruff"
|
name = "ruff"
|
||||||
version = "0.6.3"
|
version = "0.6.4"
|
||||||
description = "An extremely fast Python linter and code formatter, written in Rust."
|
description = "An extremely fast Python linter and code formatter, written in Rust."
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
python-versions = ">=3.7"
|
||||||
files = [
|
files = [
|
||||||
{file = "ruff-0.6.3-py3-none-linux_armv6l.whl", hash = "sha256:97f58fda4e309382ad30ede7f30e2791d70dd29ea17f41970119f55bdb7a45c3"},
|
{file = "ruff-0.6.4-py3-none-linux_armv6l.whl", hash = "sha256:c4b153fc152af51855458e79e835fb6b933032921756cec9af7d0ba2aa01a258"},
|
||||||
{file = "ruff-0.6.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:3b061e49b5cf3a297b4d1c27ac5587954ccb4ff601160d3d6b2f70b1622194dc"},
|
{file = "ruff-0.6.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:bedff9e4f004dad5f7f76a9d39c4ca98af526c9b1695068198b3bda8c085ef60"},
|
||||||
{file = "ruff-0.6.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:34e2824a13bb8c668c71c1760a6ac7d795ccbd8d38ff4a0d8471fdb15de910b1"},
|
{file = "ruff-0.6.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:d02a4127a86de23002e694d7ff19f905c51e338c72d8e09b56bfb60e1681724f"},
|
||||||
{file = "ruff-0.6.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bddfbb8d63c460f4b4128b6a506e7052bad4d6f3ff607ebbb41b0aa19c2770d1"},
|
{file = "ruff-0.6.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7862f42fc1a4aca1ea3ffe8a11f67819d183a5693b228f0bb3a531f5e40336fc"},
|
||||||
{file = "ruff-0.6.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ced3eeb44df75353e08ab3b6a9e113b5f3f996bea48d4f7c027bc528ba87b672"},
|
{file = "ruff-0.6.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eebe4ff1967c838a1a9618a5a59a3b0a00406f8d7eefee97c70411fefc353617"},
|
||||||
{file = "ruff-0.6.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:47021dff5445d549be954eb275156dfd7c37222acc1e8014311badcb9b4ec8c1"},
|
{file = "ruff-0.6.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:932063a03bac394866683e15710c25b8690ccdca1cf192b9a98260332ca93408"},
|
||||||
{file = "ruff-0.6.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:7d7bd20dc07cebd68cc8bc7b3f5ada6d637f42d947c85264f94b0d1cd9d87384"},
|
{file = "ruff-0.6.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:50e30b437cebef547bd5c3edf9ce81343e5dd7c737cb36ccb4fe83573f3d392e"},
|
||||||
{file = "ruff-0.6.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:500f166d03fc6d0e61c8e40a3ff853fa8a43d938f5d14c183c612df1b0d6c58a"},
|
{file = "ruff-0.6.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c44536df7b93a587de690e124b89bd47306fddd59398a0fb12afd6133c7b3818"},
|
||||||
{file = "ruff-0.6.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:42844ff678f9b976366b262fa2d1d1a3fe76f6e145bd92c84e27d172e3c34500"},
|
{file = "ruff-0.6.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ea086601b22dc5e7693a78f3fcfc460cceabfdf3bdc36dc898792aba48fbad6"},
|
||||||
{file = "ruff-0.6.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70452a10eb2d66549de8e75f89ae82462159855e983ddff91bc0bce6511d0470"},
|
{file = "ruff-0.6.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b52387d3289ccd227b62102c24714ed75fbba0b16ecc69a923a37e3b5e0aaaa"},
|
||||||
{file = "ruff-0.6.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:65a533235ed55f767d1fc62193a21cbf9e3329cf26d427b800fdeacfb77d296f"},
|
{file = "ruff-0.6.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:0308610470fcc82969082fc83c76c0d362f562e2f0cdab0586516f03a4e06ec6"},
|
||||||
{file = "ruff-0.6.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d2e2c23cef30dc3cbe9cc5d04f2899e7f5e478c40d2e0a633513ad081f7361b5"},
|
{file = "ruff-0.6.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:803b96dea21795a6c9d5bfa9e96127cc9c31a1987802ca68f35e5c95aed3fc0d"},
|
||||||
{file = "ruff-0.6.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d8a136aa7d228975a6aee3dd8bea9b28e2b43e9444aa678fb62aeb1956ff2351"},
|
{file = "ruff-0.6.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:66dbfea86b663baab8fcae56c59f190caba9398df1488164e2df53e216248baa"},
|
||||||
{file = "ruff-0.6.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:f92fe93bc72e262b7b3f2bba9879897e2d58a989b4714ba6a5a7273e842ad2f8"},
|
{file = "ruff-0.6.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:34d5efad480193c046c86608dbba2bccdc1c5fd11950fb271f8086e0c763a5d1"},
|
||||||
{file = "ruff-0.6.3-py3-none-win32.whl", hash = "sha256:7a62d3b5b0d7f9143d94893f8ba43aa5a5c51a0ffc4a401aa97a81ed76930521"},
|
{file = "ruff-0.6.4-py3-none-win32.whl", hash = "sha256:f0f8968feea5ce3777c0d8365653d5e91c40c31a81d95824ba61d871a11b8523"},
|
||||||
{file = "ruff-0.6.3-py3-none-win_amd64.whl", hash = "sha256:746af39356fee2b89aada06c7376e1aa274a23493d7016059c3a72e3b296befb"},
|
{file = "ruff-0.6.4-py3-none-win_amd64.whl", hash = "sha256:549daccee5227282289390b0222d0fbee0275d1db6d514550d65420053021a58"},
|
||||||
{file = "ruff-0.6.3-py3-none-win_arm64.whl", hash = "sha256:14a9528a8b70ccc7a847637c29e56fd1f9183a9db743bbc5b8e0c4ad60592a82"},
|
{file = "ruff-0.6.4-py3-none-win_arm64.whl", hash = "sha256:ac4b75e898ed189b3708c9ab3fc70b79a433219e1e87193b4f2b77251d058d14"},
|
||||||
{file = "ruff-0.6.3.tar.gz", hash = "sha256:183b99e9edd1ef63be34a3b51fee0a9f4ab95add123dbf89a71f7b1f0c991983"},
|
{file = "ruff-0.6.4.tar.gz", hash = "sha256:ac3b5bfbee99973f80aa1b7cbd1c9cbce200883bdd067300c22a6cc1c7fba212"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "machine-learning"
|
name = "machine-learning"
|
||||||
version = "1.114.0"
|
version = "1.115.0"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["Hau Tran <alex.tran1502@gmail.com>"]
|
authors = ["Hau Tran <alex.tran1502@gmail.com>"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
@@ -0,0 +1,859 @@
|
|||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
version = 3
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "aho-corasick"
|
||||||
|
version = "1.1.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
|
||||||
|
dependencies = [
|
||||||
|
"memchr",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "autocfg"
|
||||||
|
version = "1.3.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bindgen"
|
||||||
|
version = "0.63.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "36d860121800b2a9a94f9b5604b332d5cffb234ce17609ea479d723dbc9d3885"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 1.3.2",
|
||||||
|
"cexpr",
|
||||||
|
"clang-sys",
|
||||||
|
"lazy_static",
|
||||||
|
"lazycell",
|
||||||
|
"peeking_take_while",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"regex",
|
||||||
|
"rustc-hash",
|
||||||
|
"shlex",
|
||||||
|
"syn 1.0.109",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bitflags"
|
||||||
|
version = "1.3.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bitflags"
|
||||||
|
version = "2.6.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "block"
|
||||||
|
version = "0.1.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "byteorder"
|
||||||
|
version = "1.5.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bytes"
|
||||||
|
version = "1.7.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cc"
|
||||||
|
version = "1.1.19"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2d74707dde2ba56f86ae90effb3b43ddd369504387e718014de010cec7959800"
|
||||||
|
dependencies = [
|
||||||
|
"shlex",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cesu8"
|
||||||
|
version = "1.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cexpr"
|
||||||
|
version = "0.6.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
|
||||||
|
dependencies = [
|
||||||
|
"nom",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cfg-if"
|
||||||
|
version = "1.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "clang-sys"
|
||||||
|
version = "1.8.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
|
||||||
|
dependencies = [
|
||||||
|
"glob",
|
||||||
|
"libc",
|
||||||
|
"libloading",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cmake"
|
||||||
|
version = "0.1.51"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "fb1e43aa7fd152b1f968787f7dbcdeb306d1867ff373c69955211876c053f91a"
|
||||||
|
dependencies = [
|
||||||
|
"cc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "combine"
|
||||||
|
version = "4.6.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd"
|
||||||
|
dependencies = [
|
||||||
|
"bytes",
|
||||||
|
"memchr",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "crossbeam-channel"
|
||||||
|
version = "0.5.13"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2"
|
||||||
|
dependencies = [
|
||||||
|
"crossbeam-utils",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "crossbeam-utils"
|
||||||
|
version = "0.8.20"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "dirs"
|
||||||
|
version = "4.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
|
||||||
|
dependencies = [
|
||||||
|
"dirs-sys",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "dirs-sys"
|
||||||
|
version = "0.3.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
"redox_users",
|
||||||
|
"winapi",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "doc-comment"
|
||||||
|
version = "0.3.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "either"
|
||||||
|
version = "1.13.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "enum_dispatch"
|
||||||
|
version = "0.3.13"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd"
|
||||||
|
dependencies = [
|
||||||
|
"once_cell",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn 2.0.77",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "float_next_after"
|
||||||
|
version = "0.1.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4fc612c5837986b7104a87a0df74a5460931f1c5274be12f8d0f40aa2f30d632"
|
||||||
|
dependencies = [
|
||||||
|
"num-traits",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "getrandom"
|
||||||
|
version = "0.2.15"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"libc",
|
||||||
|
"wasi",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "glob"
|
||||||
|
version = "0.3.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "heck"
|
||||||
|
version = "0.4.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hermit-abi"
|
||||||
|
version = "0.3.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "intmap"
|
||||||
|
version = "2.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ee87fd093563344074bacf24faa0bb0227fb6969fb223e922db798516de924d6"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "isar"
|
||||||
|
version = "0.0.0"
|
||||||
|
dependencies = [
|
||||||
|
"dirs",
|
||||||
|
"intmap",
|
||||||
|
"isar-core",
|
||||||
|
"itertools",
|
||||||
|
"jni",
|
||||||
|
"ndk-context",
|
||||||
|
"objc",
|
||||||
|
"objc-foundation",
|
||||||
|
"once_cell",
|
||||||
|
"paste",
|
||||||
|
"serde_json",
|
||||||
|
"threadpool",
|
||||||
|
"unicode-segmentation",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "isar-core"
|
||||||
|
version = "0.0.0"
|
||||||
|
dependencies = [
|
||||||
|
"byteorder",
|
||||||
|
"cfg-if",
|
||||||
|
"crossbeam-channel",
|
||||||
|
"enum_dispatch",
|
||||||
|
"float_next_after",
|
||||||
|
"intmap",
|
||||||
|
"itertools",
|
||||||
|
"libc",
|
||||||
|
"mdbx-sys",
|
||||||
|
"once_cell",
|
||||||
|
"paste",
|
||||||
|
"rand",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"snafu",
|
||||||
|
"widestring",
|
||||||
|
"xxhash-rust",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "itertools"
|
||||||
|
version = "0.10.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
|
||||||
|
dependencies = [
|
||||||
|
"either",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "itoa"
|
||||||
|
version = "1.0.11"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "jni"
|
||||||
|
version = "0.20.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c"
|
||||||
|
dependencies = [
|
||||||
|
"cesu8",
|
||||||
|
"combine",
|
||||||
|
"jni-sys",
|
||||||
|
"log",
|
||||||
|
"thiserror",
|
||||||
|
"walkdir",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "jni-sys"
|
||||||
|
version = "0.3.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "lazy_static"
|
||||||
|
version = "1.5.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "lazycell"
|
||||||
|
version = "1.3.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "libc"
|
||||||
|
version = "0.2.158"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "libloading"
|
||||||
|
version = "0.8.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"windows-targets",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "libredox"
|
||||||
|
version = "0.1.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 2.6.0",
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "log"
|
||||||
|
version = "0.4.22"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "malloc_buf"
|
||||||
|
version = "0.0.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "mdbx-sys"
|
||||||
|
version = "0.0.0"
|
||||||
|
dependencies = [
|
||||||
|
"bindgen",
|
||||||
|
"cc",
|
||||||
|
"cmake",
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "memchr"
|
||||||
|
version = "2.7.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "minimal-lexical"
|
||||||
|
version = "0.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ndk-context"
|
||||||
|
version = "0.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "nom"
|
||||||
|
version = "7.1.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
|
||||||
|
dependencies = [
|
||||||
|
"memchr",
|
||||||
|
"minimal-lexical",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num-traits"
|
||||||
|
version = "0.2.19"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
||||||
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num_cpus"
|
||||||
|
version = "1.16.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
|
||||||
|
dependencies = [
|
||||||
|
"hermit-abi",
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "objc"
|
||||||
|
version = "0.2.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
|
||||||
|
dependencies = [
|
||||||
|
"malloc_buf",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "objc-foundation"
|
||||||
|
version = "0.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9"
|
||||||
|
dependencies = [
|
||||||
|
"block",
|
||||||
|
"objc",
|
||||||
|
"objc_id",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "objc_id"
|
||||||
|
version = "0.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b"
|
||||||
|
dependencies = [
|
||||||
|
"objc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "once_cell"
|
||||||
|
version = "1.20.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "33ea5043e58958ee56f3e15a90aee535795cd7dfd319846288d93c5b57d85cbe"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "paste"
|
||||||
|
version = "1.0.15"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "peeking_take_while"
|
||||||
|
version = "0.1.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ppv-lite86"
|
||||||
|
version = "0.2.20"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
|
||||||
|
dependencies = [
|
||||||
|
"zerocopy",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "proc-macro2"
|
||||||
|
version = "1.0.86"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
|
||||||
|
dependencies = [
|
||||||
|
"unicode-ident",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "quote"
|
||||||
|
version = "1.0.37"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rand"
|
||||||
|
version = "0.8.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
"rand_chacha",
|
||||||
|
"rand_core",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rand_chacha"
|
||||||
|
version = "0.3.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
||||||
|
dependencies = [
|
||||||
|
"ppv-lite86",
|
||||||
|
"rand_core",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rand_core"
|
||||||
|
version = "0.6.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
||||||
|
dependencies = [
|
||||||
|
"getrandom",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "redox_users"
|
||||||
|
version = "0.4.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
|
||||||
|
dependencies = [
|
||||||
|
"getrandom",
|
||||||
|
"libredox",
|
||||||
|
"thiserror",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex"
|
||||||
|
version = "1.10.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619"
|
||||||
|
dependencies = [
|
||||||
|
"aho-corasick",
|
||||||
|
"memchr",
|
||||||
|
"regex-automata",
|
||||||
|
"regex-syntax",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex-automata"
|
||||||
|
version = "0.4.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
|
||||||
|
dependencies = [
|
||||||
|
"aho-corasick",
|
||||||
|
"memchr",
|
||||||
|
"regex-syntax",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex-syntax"
|
||||||
|
version = "0.8.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustc-hash"
|
||||||
|
version = "1.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ryu"
|
||||||
|
version = "1.0.18"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "same-file"
|
||||||
|
version = "1.0.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
||||||
|
dependencies = [
|
||||||
|
"winapi-util",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde"
|
||||||
|
version = "1.0.210"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a"
|
||||||
|
dependencies = [
|
||||||
|
"serde_derive",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_derive"
|
||||||
|
version = "1.0.210"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn 2.0.77",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_json"
|
||||||
|
version = "1.0.128"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8"
|
||||||
|
dependencies = [
|
||||||
|
"itoa",
|
||||||
|
"memchr",
|
||||||
|
"ryu",
|
||||||
|
"serde",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "shlex"
|
||||||
|
version = "1.3.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "snafu"
|
||||||
|
version = "0.7.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e4de37ad025c587a29e8f3f5605c00f70b98715ef90b9061a815b9e59e9042d6"
|
||||||
|
dependencies = [
|
||||||
|
"doc-comment",
|
||||||
|
"snafu-derive",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "snafu-derive"
|
||||||
|
version = "0.7.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf"
|
||||||
|
dependencies = [
|
||||||
|
"heck",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn 1.0.109",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "syn"
|
||||||
|
version = "1.0.109"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"unicode-ident",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "syn"
|
||||||
|
version = "2.0.77"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"unicode-ident",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "thiserror"
|
||||||
|
version = "1.0.63"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
|
||||||
|
dependencies = [
|
||||||
|
"thiserror-impl",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "thiserror-impl"
|
||||||
|
version = "1.0.63"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn 2.0.77",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "threadpool"
|
||||||
|
version = "1.8.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa"
|
||||||
|
dependencies = [
|
||||||
|
"num_cpus",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-ident"
|
||||||
|
version = "1.0.13"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-segmentation"
|
||||||
|
version = "1.12.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "walkdir"
|
||||||
|
version = "2.5.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
|
||||||
|
dependencies = [
|
||||||
|
"same-file",
|
||||||
|
"winapi-util",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wasi"
|
||||||
|
version = "0.11.0+wasi-snapshot-preview1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "widestring"
|
||||||
|
version = "1.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winapi"
|
||||||
|
version = "0.3.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
||||||
|
dependencies = [
|
||||||
|
"winapi-i686-pc-windows-gnu",
|
||||||
|
"winapi-x86_64-pc-windows-gnu",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winapi-i686-pc-windows-gnu"
|
||||||
|
version = "0.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winapi-util"
|
||||||
|
version = "0.1.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
||||||
|
dependencies = [
|
||||||
|
"windows-sys",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winapi-x86_64-pc-windows-gnu"
|
||||||
|
version = "0.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-sys"
|
||||||
|
version = "0.59.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
||||||
|
dependencies = [
|
||||||
|
"windows-targets",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-targets"
|
||||||
|
version = "0.52.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
||||||
|
dependencies = [
|
||||||
|
"windows_aarch64_gnullvm",
|
||||||
|
"windows_aarch64_msvc",
|
||||||
|
"windows_i686_gnu",
|
||||||
|
"windows_i686_gnullvm",
|
||||||
|
"windows_i686_msvc",
|
||||||
|
"windows_x86_64_gnu",
|
||||||
|
"windows_x86_64_gnullvm",
|
||||||
|
"windows_x86_64_msvc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows_aarch64_gnullvm"
|
||||||
|
version = "0.52.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows_aarch64_msvc"
|
||||||
|
version = "0.52.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows_i686_gnu"
|
||||||
|
version = "0.52.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows_i686_gnullvm"
|
||||||
|
version = "0.52.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows_i686_msvc"
|
||||||
|
version = "0.52.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows_x86_64_gnu"
|
||||||
|
version = "0.52.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows_x86_64_gnullvm"
|
||||||
|
version = "0.52.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows_x86_64_msvc"
|
||||||
|
version = "0.52.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "xxhash-rust"
|
||||||
|
version = "0.8.12"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "zerocopy"
|
||||||
|
version = "0.7.35"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
|
||||||
|
dependencies = [
|
||||||
|
"byteorder",
|
||||||
|
"zerocopy-derive",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "zerocopy-derive"
|
||||||
|
version = "0.7.35"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn 2.0.77",
|
||||||
|
]
|
||||||
@@ -36,8 +36,31 @@ analyzer:
|
|||||||
- openapi/**
|
- openapi/**
|
||||||
- lib/generated_plugin_registrant.dart
|
- lib/generated_plugin_registrant.dart
|
||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
- custom_lint
|
- custom_lint
|
||||||
|
|
||||||
|
custom_lint:
|
||||||
|
debug: true
|
||||||
|
rules:
|
||||||
|
- avoid_build_context_in_providers: false
|
||||||
|
- avoid_public_notifier_properties: false
|
||||||
|
- avoid_manual_providers_as_generated_provider_dependency: false
|
||||||
|
- unsupported_provider_value: false
|
||||||
|
- photo_manager:
|
||||||
|
exclude:
|
||||||
|
# required / wanted
|
||||||
|
- album_media.repository.dart
|
||||||
|
- asset_media.repository.dart
|
||||||
|
- file_media.repository.dart
|
||||||
|
# acceptable exceptions for the time being
|
||||||
|
- asset.entity.dart # to provide local AssetEntity for now
|
||||||
|
- immich_local_image_provider.dart # accesses thumbnails via PhotoManager
|
||||||
|
- immich_local_thumbnail_provider.dart # accesses thumbnails via PhotoManager
|
||||||
|
# refactor to make the providers and services testable
|
||||||
|
- backup.provider.dart # uses only PMProgressHandler
|
||||||
|
- manual_upload.provider.dart # uses only PMProgressHandler
|
||||||
|
- background.service.dart # uses only PMProgressHandler
|
||||||
|
- backup.service.dart # uses only PMProgressHandler
|
||||||
|
|
||||||
dart_code_metrics:
|
dart_code_metrics:
|
||||||
metrics:
|
metrics:
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ platform :android do
|
|||||||
task: 'bundle',
|
task: 'bundle',
|
||||||
build_type: 'Release',
|
build_type: 'Release',
|
||||||
properties: {
|
properties: {
|
||||||
"android.injected.version.code" => 158,
|
"android.injected.version.code" => 159,
|
||||||
"android.injected.version.name" => "1.114.0",
|
"android.injected.version.name" => "1.115.0",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
upload_to_play_store(skip_upload_apk: true, skip_upload_images: true, skip_upload_screenshots: true, aab: '../build/app/outputs/bundle/release/app-release.aab')
|
upload_to_play_store(skip_upload_apk: true, skip_upload_images: true, skip_upload_screenshots: true, aab: '../build/app/outputs/bundle/release/app-release.aab')
|
||||||
|
|||||||
@@ -414,7 +414,7 @@
|
|||||||
"search_filter_people_title": "Select people",
|
"search_filter_people_title": "Select people",
|
||||||
"search_page_categories": "Categorías",
|
"search_page_categories": "Categorías",
|
||||||
"search_page_favorites": "Favoritos",
|
"search_page_favorites": "Favoritos",
|
||||||
"search_page_motion_photos": "Fotos en .ovimiento",
|
"search_page_motion_photos": "Fotos en movimiento",
|
||||||
"search_page_no_objects": "No hay información de objetos disponible",
|
"search_page_no_objects": "No hay información de objetos disponible",
|
||||||
"search_page_no_places": "No hay información de lugares disponible",
|
"search_page_no_places": "No hay información de lugares disponible",
|
||||||
"search_page_people": "Personas",
|
"search_page_people": "Personas",
|
||||||
@@ -589,4 +589,4 @@
|
|||||||
"viewer_remove_from_stack": "Eliminar de la pila",
|
"viewer_remove_from_stack": "Eliminar de la pila",
|
||||||
"viewer_stack_use_as_main_asset": "Utilizar como recurso principal",
|
"viewer_stack_use_as_main_asset": "Utilizar como recurso principal",
|
||||||
"viewer_unstack": "Desapilar"
|
"viewer_unstack": "Desapilar"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -589,4 +589,4 @@
|
|||||||
"viewer_remove_from_stack": "Remove from Stack",
|
"viewer_remove_from_stack": "Remove from Stack",
|
||||||
"viewer_stack_use_as_main_asset": "Use as Main Asset",
|
"viewer_stack_use_as_main_asset": "Use as Main Asset",
|
||||||
"viewer_unstack": "Un-Stack"
|
"viewer_unstack": "Un-Stack"
|
||||||
}
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
include: package:lints/recommended.yaml
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
import 'dart:collection';
|
||||||
|
|
||||||
|
import 'package:analyzer/error/listener.dart';
|
||||||
|
import 'package:analyzer/error/error.dart' show ErrorSeverity;
|
||||||
|
import 'package:custom_lint_builder/custom_lint_builder.dart';
|
||||||
|
|
||||||
|
PluginBase createPlugin() => ImmichLinter();
|
||||||
|
|
||||||
|
class ImmichLinter extends PluginBase {
|
||||||
|
@override
|
||||||
|
List<LintRule> getLintRules(CustomLintConfigs configs) => [
|
||||||
|
PhotoManagerRule(configs.rules[PhotoManagerRule._code.name]),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
class PhotoManagerRule extends DartLintRule {
|
||||||
|
PhotoManagerRule(LintOptions? options) : super(code: _code) {
|
||||||
|
final excludeOption = options?.json["exclude"];
|
||||||
|
if (excludeOption is String) {
|
||||||
|
_excludePaths.add(excludeOption);
|
||||||
|
} else if (excludeOption is List) {
|
||||||
|
_excludePaths.addAll(excludeOption.map((option) => option));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final Set<String> _excludePaths = HashSet();
|
||||||
|
|
||||||
|
static const _code = LintCode(
|
||||||
|
name: 'photo_manager',
|
||||||
|
problemMessage:
|
||||||
|
'photo_manager library must only be used in MediaRepository',
|
||||||
|
errorSeverity: ErrorSeverity.WARNING,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
void run(
|
||||||
|
CustomLintResolver resolver,
|
||||||
|
ErrorReporter reporter,
|
||||||
|
CustomLintContext context,
|
||||||
|
) {
|
||||||
|
if (_excludePaths.contains(resolver.source.shortName)) return;
|
||||||
|
|
||||||
|
context.registry.addImportDirective((node) {
|
||||||
|
if (node.uri.stringValue?.startsWith("package:photo_manager") == true) {
|
||||||
|
reporter.atNode(node, code);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,370 @@
|
|||||||
|
# Generated by pub
|
||||||
|
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||||
|
packages:
|
||||||
|
_fe_analyzer_shared:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: _fe_analyzer_shared
|
||||||
|
sha256: "45cfa8471b89fb6643fe9bf51bd7931a76b8f5ec2d65de4fb176dba8d4f22c77"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "73.0.0"
|
||||||
|
_macros:
|
||||||
|
dependency: transitive
|
||||||
|
description: dart
|
||||||
|
source: sdk
|
||||||
|
version: "0.3.2"
|
||||||
|
analyzer:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: analyzer
|
||||||
|
sha256: "4959fec185fe70cce007c57e9ab6983101dbe593d2bf8bbfb4453aaec0cf470a"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.8.0"
|
||||||
|
analyzer_plugin:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: analyzer_plugin
|
||||||
|
sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.11.3"
|
||||||
|
args:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: args
|
||||||
|
sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.5.0"
|
||||||
|
async:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: async
|
||||||
|
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.11.0"
|
||||||
|
boolean_selector:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: boolean_selector
|
||||||
|
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.1"
|
||||||
|
checked_yaml:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: checked_yaml
|
||||||
|
sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.3"
|
||||||
|
ci:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: ci
|
||||||
|
sha256: "145d095ce05cddac4d797a158bc4cf3b6016d1fe63d8c3d2fbd7212590adca13"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.1.0"
|
||||||
|
cli_util:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: cli_util
|
||||||
|
sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.4.1"
|
||||||
|
collection:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: collection
|
||||||
|
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.19.0"
|
||||||
|
convert:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: convert
|
||||||
|
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.1"
|
||||||
|
crypto:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: crypto
|
||||||
|
sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.5"
|
||||||
|
custom_lint:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: custom_lint
|
||||||
|
sha256: "6e1ec47427ca968f22bce734d00028ae7084361999b41673291138945c5baca0"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.6.7"
|
||||||
|
custom_lint_builder:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: custom_lint_builder
|
||||||
|
sha256: ba2f90fff4eff71d202d097eb14b14f87087eaaef742e956208c0eb9d3a40a21
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.6.7"
|
||||||
|
custom_lint_core:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: custom_lint_core
|
||||||
|
sha256: "4ddbbdaa774265de44c97054dcec058a83d9081d071785ece601e348c18c267d"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.6.5"
|
||||||
|
dart_style:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: dart_style
|
||||||
|
sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.3.7"
|
||||||
|
file:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file
|
||||||
|
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "7.0.0"
|
||||||
|
fixnum:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: fixnum
|
||||||
|
sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.0"
|
||||||
|
freezed_annotation:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: freezed_annotation
|
||||||
|
sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.4"
|
||||||
|
glob:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: glob
|
||||||
|
sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.2"
|
||||||
|
hotreloader:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: hotreloader
|
||||||
|
sha256: ed56fdc1f3a8ac924e717257621d09e9ec20e308ab6352a73a50a1d7a4d9158e
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.2.0"
|
||||||
|
json_annotation:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: json_annotation
|
||||||
|
sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.9.0"
|
||||||
|
lints:
|
||||||
|
dependency: "direct dev"
|
||||||
|
description:
|
||||||
|
name: lints
|
||||||
|
sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.0.0"
|
||||||
|
logging:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: logging
|
||||||
|
sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.0"
|
||||||
|
macros:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: macros
|
||||||
|
sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.1.2-main.4"
|
||||||
|
matcher:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: matcher
|
||||||
|
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.12.16+1"
|
||||||
|
meta:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: meta
|
||||||
|
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.15.0"
|
||||||
|
package_config:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: package_config
|
||||||
|
sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.0"
|
||||||
|
path:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path
|
||||||
|
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.9.0"
|
||||||
|
pub_semver:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: pub_semver
|
||||||
|
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.4"
|
||||||
|
pubspec_parse:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: pubspec_parse
|
||||||
|
sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.0"
|
||||||
|
rxdart:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: rxdart
|
||||||
|
sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.28.0"
|
||||||
|
source_span:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: source_span
|
||||||
|
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.10.0"
|
||||||
|
sprintf:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: sprintf
|
||||||
|
sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "7.0.0"
|
||||||
|
stack_trace:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: stack_trace
|
||||||
|
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.11.1"
|
||||||
|
stream_channel:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: stream_channel
|
||||||
|
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.2"
|
||||||
|
stream_transform:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: stream_transform
|
||||||
|
sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.0"
|
||||||
|
string_scanner:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: string_scanner
|
||||||
|
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.0"
|
||||||
|
term_glyph:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: term_glyph
|
||||||
|
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.1"
|
||||||
|
test_api:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: test_api
|
||||||
|
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.7.3"
|
||||||
|
typed_data:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: typed_data
|
||||||
|
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.2"
|
||||||
|
uuid:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: uuid
|
||||||
|
sha256: f33d6bb662f0e4f79dcd7ada2e6170f3b3a2530c28fc41f49a411ddedd576a77
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.5.0"
|
||||||
|
vm_service:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: vm_service
|
||||||
|
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "14.2.5"
|
||||||
|
watcher:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: watcher
|
||||||
|
sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.0"
|
||||||
|
yaml:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: yaml
|
||||||
|
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.2"
|
||||||
|
sdks:
|
||||||
|
dart: ">=3.4.0 <4.0.0"
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
name: immich_mobile_immich_lint
|
||||||
|
publish_to: none
|
||||||
|
|
||||||
|
environment:
|
||||||
|
sdk: '>=3.0.0 <4.0.0'
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
analyzer: ^6.8.0
|
||||||
|
analyzer_plugin: ^0.11.3
|
||||||
|
custom_lint_builder: ^0.6.4
|
||||||
|
|
||||||
|
dev_dependencies:
|
||||||
|
lints: ^4.0.0
|
||||||
@@ -401,7 +401,7 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 172;
|
CURRENT_PROJECT_VERSION = 175;
|
||||||
DEVELOPMENT_TEAM = 2F67MQ8R79;
|
DEVELOPMENT_TEAM = 2F67MQ8R79;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
@@ -543,7 +543,7 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 172;
|
CURRENT_PROJECT_VERSION = 175;
|
||||||
DEVELOPMENT_TEAM = 2F67MQ8R79;
|
DEVELOPMENT_TEAM = 2F67MQ8R79;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
@@ -571,7 +571,7 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 172;
|
CURRENT_PROJECT_VERSION = 175;
|
||||||
DEVELOPMENT_TEAM = 2F67MQ8R79;
|
DEVELOPMENT_TEAM = 2F67MQ8R79;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
|||||||
@@ -58,11 +58,11 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.113.1</string>
|
<string>1.115.0</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>172</string>
|
<string>175</string>
|
||||||
<key>FLTEnableImpeller</key>
|
<key>FLTEnableImpeller</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>ITSAppUsesNonExemptEncryption</key>
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ platform :ios do
|
|||||||
desc "iOS Release"
|
desc "iOS Release"
|
||||||
lane :release do
|
lane :release do
|
||||||
increment_version_number(
|
increment_version_number(
|
||||||
version_number: "1.114.0"
|
version_number: "1.115.0"
|
||||||
)
|
)
|
||||||
increment_build_number(
|
increment_build_number(
|
||||||
build_number: latest_testflight_build_number + 1,
|
build_number: latest_testflight_build_number + 1,
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
import 'package:immich_mobile/entities/store.entity.dart';
|
|
||||||
import 'package:immich_mobile/entities/user.entity.dart';
|
import 'package:immich_mobile/entities/user.entity.dart';
|
||||||
import 'package:immich_mobile/utils/datetime_comparison.dart';
|
import 'package:immich_mobile/utils/datetime_comparison.dart';
|
||||||
import 'package:isar/isar.dart';
|
import 'package:isar/isar.dart';
|
||||||
import 'package:openapi/api.dart';
|
import 'package:openapi/api.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
|
||||||
|
|
||||||
part 'album.entity.g.dart';
|
part 'album.entity.g.dart';
|
||||||
|
|
||||||
@@ -43,6 +41,9 @@ class Album {
|
|||||||
final IsarLinks<User> sharedUsers = IsarLinks<User>();
|
final IsarLinks<User> sharedUsers = IsarLinks<User>();
|
||||||
final IsarLinks<Asset> assets = IsarLinks<Asset>();
|
final IsarLinks<Asset> assets = IsarLinks<Asset>();
|
||||||
|
|
||||||
|
@ignore
|
||||||
|
bool isAll = false;
|
||||||
|
|
||||||
@ignore
|
@ignore
|
||||||
bool get isRemote => remoteId != null;
|
bool get isRemote => remoteId != null;
|
||||||
|
|
||||||
@@ -70,6 +71,9 @@ class Album {
|
|||||||
return name.join(' ');
|
return name.join(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ignore
|
||||||
|
String get eTagKeyAssetCount => "device-album-$localId-asset-count";
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(other) {
|
bool operator ==(other) {
|
||||||
if (other is! Album) return false;
|
if (other is! Album) return false;
|
||||||
@@ -112,19 +116,6 @@ class Album {
|
|||||||
sharedUsers.length.hashCode ^
|
sharedUsers.length.hashCode ^
|
||||||
assets.length.hashCode;
|
assets.length.hashCode;
|
||||||
|
|
||||||
static Album local(AssetPathEntity ape) {
|
|
||||||
final Album a = Album(
|
|
||||||
name: ape.name,
|
|
||||||
createdAt: ape.lastModified?.toUtc() ?? DateTime.now().toUtc(),
|
|
||||||
modifiedAt: ape.lastModified?.toUtc() ?? DateTime.now().toUtc(),
|
|
||||||
shared: false,
|
|
||||||
activityEnabled: false,
|
|
||||||
);
|
|
||||||
a.owner.value = Store.get(StoreKey.currentUser);
|
|
||||||
a.localId = ape.id;
|
|
||||||
return a;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Future<Album> remote(AlbumResponseDto dto) async {
|
static Future<Album> remote(AlbumResponseDto dto) async {
|
||||||
final Isar db = Isar.getInstance()!;
|
final Isar db = Isar.getInstance()!;
|
||||||
final Album a = Album(
|
final Album a = Album(
|
||||||
@@ -164,19 +155,16 @@ class Album {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension AssetsHelper on IsarCollection<Album> {
|
extension AssetsHelper on IsarCollection<Album> {
|
||||||
Future<void> store(Album a) async {
|
Future<Album> store(Album a) async {
|
||||||
await put(a);
|
await put(a);
|
||||||
await a.owner.save();
|
await a.owner.save();
|
||||||
await a.thumbnail.save();
|
await a.thumbnail.save();
|
||||||
await a.sharedUsers.save();
|
await a.sharedUsers.save();
|
||||||
await a.assets.save();
|
await a.assets.save();
|
||||||
|
return a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension AlbumResponseDtoHelper on AlbumResponseDto {
|
extension AlbumResponseDtoHelper on AlbumResponseDto {
|
||||||
List<Asset> getAssets() => assets.map(Asset.remote).toList();
|
List<Asset> getAssets() => assets.map(Asset.remote).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
extension AssetPathEntityHelper on AssetPathEntity {
|
|
||||||
String get eTagKeyAssetCount => "device-album-$id-asset-count";
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:immich_mobile/entities/exif_info.entity.dart';
|
import 'package:immich_mobile/entities/exif_info.entity.dart';
|
||||||
import 'package:immich_mobile/entities/store.entity.dart';
|
|
||||||
import 'package:immich_mobile/utils/hash.dart';
|
import 'package:immich_mobile/utils/hash.dart';
|
||||||
import 'package:isar/isar.dart';
|
import 'package:isar/isar.dart';
|
||||||
import 'package:openapi/api.dart';
|
import 'package:openapi/api.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
import 'package:photo_manager/photo_manager.dart' show AssetEntity;
|
||||||
import 'package:immich_mobile/extensions/string_extensions.dart';
|
import 'package:immich_mobile/extensions/string_extensions.dart';
|
||||||
import 'package:path/path.dart' as p;
|
import 'package:path/path.dart' as p;
|
||||||
|
|
||||||
@@ -42,33 +41,6 @@ class Asset {
|
|||||||
stackId = remote.stack?.id,
|
stackId = remote.stack?.id,
|
||||||
thumbhash = remote.thumbhash;
|
thumbhash = remote.thumbhash;
|
||||||
|
|
||||||
Asset.local(AssetEntity local, List<int> hash)
|
|
||||||
: localId = local.id,
|
|
||||||
checksum = base64.encode(hash),
|
|
||||||
durationInSeconds = local.duration,
|
|
||||||
type = AssetType.values[local.typeInt],
|
|
||||||
height = local.height,
|
|
||||||
width = local.width,
|
|
||||||
fileName = local.title!,
|
|
||||||
ownerId = Store.get(StoreKey.currentUser).isarId,
|
|
||||||
fileModifiedAt = local.modifiedDateTime,
|
|
||||||
updatedAt = local.modifiedDateTime,
|
|
||||||
isFavorite = local.isFavorite,
|
|
||||||
isArchived = false,
|
|
||||||
isTrashed = false,
|
|
||||||
isOffline = false,
|
|
||||||
stackCount = 0,
|
|
||||||
fileCreatedAt = local.createDateTime {
|
|
||||||
if (fileCreatedAt.year == 1970) {
|
|
||||||
fileCreatedAt = fileModifiedAt;
|
|
||||||
}
|
|
||||||
if (local.latitude != null) {
|
|
||||||
exifInfo = ExifInfo(lat: local.latitude, long: local.longitude);
|
|
||||||
}
|
|
||||||
_local = local;
|
|
||||||
assert(hash.length == 20, "invalid SHA1 hash");
|
|
||||||
}
|
|
||||||
|
|
||||||
Asset({
|
Asset({
|
||||||
this.id = Isar.autoIncrement,
|
this.id = Isar.autoIncrement,
|
||||||
required this.checksum,
|
required this.checksum,
|
||||||
@@ -115,6 +87,8 @@ class Asset {
|
|||||||
return _local;
|
return _local;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set local(AssetEntity? assetEntity) => _local = assetEntity;
|
||||||
|
|
||||||
Id id = Isar.autoIncrement;
|
Id id = Isar.autoIncrement;
|
||||||
|
|
||||||
/// stores the raw SHA1 bytes as a base64 String
|
/// stores the raw SHA1 bytes as a base64 String
|
||||||
@@ -210,6 +184,10 @@ class Asset {
|
|||||||
@ignore
|
@ignore
|
||||||
Duration get duration => Duration(seconds: durationInSeconds);
|
Duration get duration => Duration(seconds: durationInSeconds);
|
||||||
|
|
||||||
|
// ignore: invalid_annotation_target
|
||||||
|
@ignore
|
||||||
|
set byteHash(List<int> hash) => checksum = base64.encode(hash);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(other) {
|
bool operator ==(other) {
|
||||||
if (other is! Asset) return false;
|
if (other is! Asset) return false;
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import 'package:immich_mobile/entities/album.entity.dart';
|
||||||
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
|
import 'package:immich_mobile/entities/user.entity.dart';
|
||||||
|
|
||||||
|
abstract interface class IAlbumRepository {
|
||||||
|
Future<int> count({bool? local});
|
||||||
|
Future<Album> create(Album album);
|
||||||
|
Future<Album?> getById(int id);
|
||||||
|
Future<Album?> getByName(
|
||||||
|
String name, {
|
||||||
|
bool? shared,
|
||||||
|
bool? remote,
|
||||||
|
});
|
||||||
|
Future<Album> update(Album album);
|
||||||
|
Future<void> delete(int albumId);
|
||||||
|
Future<List<Album>> getAll({bool? shared});
|
||||||
|
Future<void> removeUsers(Album album, List<User> users);
|
||||||
|
Future<void> addAssets(Album album, List<Asset> assets);
|
||||||
|
Future<void> removeAssets(Album album, List<Asset> assets);
|
||||||
|
Future<Album> recalculateMetadata(Album album);
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import 'package:immich_mobile/entities/album.entity.dart';
|
||||||
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
|
|
||||||
|
abstract interface class IAlbumMediaRepository {
|
||||||
|
Future<List<Album>> getAll();
|
||||||
|
|
||||||
|
Future<List<String>> getAssetIds(String albumId);
|
||||||
|
|
||||||
|
Future<int> getAssetCount(String albumId);
|
||||||
|
|
||||||
|
Future<List<Asset>> getAssets(
|
||||||
|
String albumId, {
|
||||||
|
int start = 0,
|
||||||
|
int end = 0x7fffffffffffffff,
|
||||||
|
DateTime? modifiedFrom,
|
||||||
|
DateTime? modifiedUntil,
|
||||||
|
bool orderByModificationDate = false,
|
||||||
|
});
|
||||||
|
|
||||||
|
Future<Album> get(String id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import 'package:immich_mobile/entities/album.entity.dart';
|
||||||
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
|
import 'package:immich_mobile/entities/user.entity.dart';
|
||||||
|
|
||||||
|
abstract interface class IAssetRepository {
|
||||||
|
Future<List<Asset>> getByAlbum(Album album, {User? notOwnedBy});
|
||||||
|
Future<void> deleteById(List<int> ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
|
|
||||||
|
abstract interface class IAssetMediaRepository {
|
||||||
|
Future<List<String>> deleteAll(List<String> ids);
|
||||||
|
|
||||||
|
Future<Asset?> get(String id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import 'package:immich_mobile/entities/backup_album.entity.dart';
|
||||||
|
|
||||||
|
abstract interface class IBackupRepository {
|
||||||
|
Future<List<String>> getIdsBySelection(BackupSelection backup);
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
import 'dart:typed_data';
|
||||||
|
|
||||||
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
|
|
||||||
|
abstract interface class IFileMediaRepository {
|
||||||
|
Future<Asset?> saveImage(
|
||||||
|
Uint8List data, {
|
||||||
|
required String title,
|
||||||
|
String? relativePath,
|
||||||
|
});
|
||||||
|
|
||||||
|
Future<Asset?> saveVideo(
|
||||||
|
File file, {
|
||||||
|
required String title,
|
||||||
|
String? relativePath,
|
||||||
|
});
|
||||||
|
|
||||||
|
Future<Asset?> saveLivePhoto({
|
||||||
|
required File image,
|
||||||
|
required File video,
|
||||||
|
required String title,
|
||||||
|
});
|
||||||
|
|
||||||
|
Future<void> clearFileCache();
|
||||||
|
|
||||||
|
Future<void> enableBackgroundAccess();
|
||||||
|
|
||||||
|
Future<void> requestExtendedPermissions();
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import 'package:immich_mobile/entities/user.entity.dart';
|
||||||
|
|
||||||
|
abstract interface class IUserRepository {
|
||||||
|
Future<List<User>> getByIds(List<String> ids);
|
||||||
|
}
|
||||||
@@ -1,45 +1,47 @@
|
|||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
import 'package:immich_mobile/entities/album.entity.dart';
|
||||||
|
|
||||||
class AvailableAlbum {
|
class AvailableAlbum {
|
||||||
final AssetPathEntity albumEntity;
|
final Album album;
|
||||||
|
final int assetCount;
|
||||||
final DateTime? lastBackup;
|
final DateTime? lastBackup;
|
||||||
AvailableAlbum({
|
AvailableAlbum({
|
||||||
required this.albumEntity,
|
required this.album,
|
||||||
|
required this.assetCount,
|
||||||
this.lastBackup,
|
this.lastBackup,
|
||||||
});
|
});
|
||||||
|
|
||||||
AvailableAlbum copyWith({
|
AvailableAlbum copyWith({
|
||||||
AssetPathEntity? albumEntity,
|
Album? album,
|
||||||
|
int? assetCount,
|
||||||
DateTime? lastBackup,
|
DateTime? lastBackup,
|
||||||
Uint8List? thumbnailData,
|
Uint8List? thumbnailData,
|
||||||
}) {
|
}) {
|
||||||
return AvailableAlbum(
|
return AvailableAlbum(
|
||||||
albumEntity: albumEntity ?? this.albumEntity,
|
album: album ?? this.album,
|
||||||
|
assetCount: assetCount ?? this.assetCount,
|
||||||
lastBackup: lastBackup ?? this.lastBackup,
|
lastBackup: lastBackup ?? this.lastBackup,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String get name => albumEntity.name;
|
String get name => album.name;
|
||||||
|
|
||||||
Future<int> get assetCount => albumEntity.assetCountAsync;
|
String get id => album.localId!;
|
||||||
|
|
||||||
String get id => albumEntity.id;
|
bool get isAll => album.isAll;
|
||||||
|
|
||||||
bool get isAll => albumEntity.isAll;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() =>
|
String toString() =>
|
||||||
'AvailableAlbum(albumEntity: $albumEntity, lastBackup: $lastBackup)';
|
'AvailableAlbum(albumEntity: $album, lastBackup: $lastBackup)';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
if (identical(this, other)) return true;
|
if (identical(this, other)) return true;
|
||||||
|
|
||||||
return other is AvailableAlbum && other.albumEntity == albumEntity;
|
return other is AvailableAlbum && other.album == album;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => albumEntity.hashCode;
|
int get hashCode => album.hashCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import 'package:photo_manager/photo_manager.dart';
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
|
|
||||||
class BackupCandidate {
|
class BackupCandidate {
|
||||||
BackupCandidate({required this.asset, required this.albumNames});
|
BackupCandidate({required this.asset, required this.albumNames});
|
||||||
|
|
||||||
AssetEntity asset;
|
Asset asset;
|
||||||
List<String> albumNames;
|
List<String> albumNames;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import 'package:photo_manager/photo_manager.dart';
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
|
|
||||||
class ErrorUploadAsset {
|
class ErrorUploadAsset {
|
||||||
final String id;
|
final String id;
|
||||||
final DateTime fileCreatedAt;
|
final DateTime fileCreatedAt;
|
||||||
final String fileName;
|
final String fileName;
|
||||||
final String fileType;
|
final String fileType;
|
||||||
final AssetEntity asset;
|
final Asset asset;
|
||||||
final String errorMessage;
|
final String errorMessage;
|
||||||
|
|
||||||
const ErrorUploadAsset({
|
const ErrorUploadAsset({
|
||||||
@@ -22,7 +22,7 @@ class ErrorUploadAsset {
|
|||||||
DateTime? fileCreatedAt,
|
DateTime? fileCreatedAt,
|
||||||
String? fileName,
|
String? fileName,
|
||||||
String? fileType,
|
String? fileType,
|
||||||
AssetEntity? asset,
|
Asset? asset,
|
||||||
String? errorMessage,
|
String? errorMessage,
|
||||||
}) {
|
}) {
|
||||||
return ErrorUploadAsset(
|
return ErrorUploadAsset(
|
||||||
|
|||||||
@@ -1,28 +1,27 @@
|
|||||||
import 'dart:typed_data';
|
|
||||||
|
|
||||||
import 'package:auto_route/auto_route.dart';
|
import 'package:auto_route/auto_route.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:immich_mobile/entities/album.entity.dart';
|
||||||
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||||
import 'package:immich_mobile/extensions/theme_extensions.dart';
|
import 'package:immich_mobile/extensions/theme_extensions.dart';
|
||||||
import 'package:immich_mobile/widgets/common/immich_loading_indicator.dart';
|
import 'package:immich_mobile/repositories/album_media.repository.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
import 'package:immich_mobile/widgets/common/immich_thumbnail.dart';
|
||||||
|
|
||||||
@RoutePage()
|
@RoutePage()
|
||||||
class AlbumPreviewPage extends HookConsumerWidget {
|
class AlbumPreviewPage extends HookConsumerWidget {
|
||||||
final AssetPathEntity album;
|
final Album album;
|
||||||
const AlbumPreviewPage({super.key, required this.album});
|
const AlbumPreviewPage({super.key, required this.album});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final assets = useState<List<AssetEntity>>([]);
|
final assets = useState<List<Asset>>([]);
|
||||||
|
|
||||||
getAssetsInAlbum() async {
|
getAssetsInAlbum() async {
|
||||||
assets.value = await album.getAssetListRange(
|
assets.value = await ref
|
||||||
start: 0,
|
.read(albumMediaRepositoryProvider)
|
||||||
end: await album.assetCountAsync,
|
.getAssets(album.localId!);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(
|
useEffect(
|
||||||
@@ -68,30 +67,10 @@ class AlbumPreviewPage extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
itemCount: assets.value.length,
|
itemCount: assets.value.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
Future<Uint8List?> thumbData =
|
return ImmichThumbnail(
|
||||||
assets.value[index].thumbnailDataWithSize(
|
asset: assets.value[index],
|
||||||
const ThumbnailSize(200, 200),
|
width: 100,
|
||||||
quality: 50,
|
height: 100,
|
||||||
);
|
|
||||||
|
|
||||||
return FutureBuilder<Uint8List?>(
|
|
||||||
future: thumbData,
|
|
||||||
builder: ((context, snapshot) {
|
|
||||||
if (snapshot.hasData && snapshot.data != null) {
|
|
||||||
return Image.memory(
|
|
||||||
snapshot.data!,
|
|
||||||
width: 100,
|
|
||||||
height: 100,
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return const SizedBox(
|
|
||||||
width: 100,
|
|
||||||
height: 100,
|
|
||||||
child: ImmichLoadingIndicator(),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||||
import 'package:immich_mobile/providers/backup/error_backup_list.provider.dart';
|
import 'package:immich_mobile/providers/backup/error_backup_list.provider.dart';
|
||||||
|
import 'package:immich_mobile/providers/image/immich_local_thumbnail_provider.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
|
||||||
import 'package:photo_manager_image_provider/photo_manager_image_provider.dart';
|
|
||||||
|
|
||||||
@RoutePage()
|
@RoutePage()
|
||||||
class FailedBackupStatusPage extends HookConsumerWidget {
|
class FailedBackupStatusPage extends HookConsumerWidget {
|
||||||
@@ -70,11 +69,10 @@ class FailedBackupStatusPage extends HookConsumerWidget {
|
|||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
child: Image(
|
child: Image(
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
image: AssetEntityImageProvider(
|
image: ImmichLocalThumbnailProvider(
|
||||||
errorAsset.asset,
|
asset: errorAsset.asset,
|
||||||
isOriginal: false,
|
height: 512,
|
||||||
thumbnailSize: const ThumbnailSize.square(512),
|
width: 512,
|
||||||
thumbnailFormat: ThumbnailFormat.jpeg,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|||||||
import 'package:fluttertoast/fluttertoast.dart';
|
import 'package:fluttertoast/fluttertoast.dart';
|
||||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||||
|
import 'package:immich_mobile/repositories/file_media.repository.dart';
|
||||||
import 'package:immich_mobile/widgets/common/immich_image.dart';
|
import 'package:immich_mobile/widgets/common/immich_image.dart';
|
||||||
import 'package:immich_mobile/widgets/common/immich_toast.dart';
|
import 'package:immich_mobile/widgets/common/immich_toast.dart';
|
||||||
import 'package:auto_route/auto_route.dart';
|
import 'package:auto_route/auto_route.dart';
|
||||||
import 'package:immich_mobile/routing/router.dart';
|
import 'package:immich_mobile/routing/router.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
|
||||||
import 'package:immich_mobile/providers/album/album.provider.dart';
|
import 'package:immich_mobile/providers/album/album.provider.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:path/path.dart' as p;
|
import 'package:path/path.dart' as p;
|
||||||
@@ -67,10 +67,10 @@ class EditImagePage extends ConsumerWidget {
|
|||||||
) async {
|
) async {
|
||||||
try {
|
try {
|
||||||
final Uint8List imageData = await _imageToUint8List(image);
|
final Uint8List imageData = await _imageToUint8List(image);
|
||||||
await PhotoManager.editor.saveImage(
|
await ref.read(fileMediaRepositoryProvider).saveImage(
|
||||||
imageData,
|
imageData,
|
||||||
title: "${p.withoutExtension(asset.fileName)}_edited.jpg",
|
title: "${p.withoutExtension(asset.fileName)}_edited.jpg",
|
||||||
);
|
);
|
||||||
await ref.read(albumProvider.notifier).getDeviceAlbums();
|
await ref.read(albumProvider.notifier).getDeviceAlbums();
|
||||||
Navigator.of(context).popUntil((route) => route.isFirst);
|
Navigator.of(context).popUntil((route) => route.isFirst);
|
||||||
ImmichToast.show(
|
ImmichToast.show(
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:immich_mobile/providers/memory.provider.dart';
|
import 'package:immich_mobile/providers/memory.provider.dart';
|
||||||
|
import 'package:immich_mobile/repositories/asset_media.repository.dart';
|
||||||
import 'package:immich_mobile/services/album.service.dart';
|
import 'package:immich_mobile/services/album.service.dart';
|
||||||
import 'package:immich_mobile/entities/exif_info.entity.dart';
|
import 'package:immich_mobile/entities/exif_info.entity.dart';
|
||||||
import 'package:immich_mobile/entities/store.entity.dart';
|
import 'package:immich_mobile/entities/store.entity.dart';
|
||||||
@@ -15,7 +16,6 @@ import 'package:immich_mobile/utils/db.dart';
|
|||||||
import 'package:immich_mobile/utils/renderlist_generator.dart';
|
import 'package:immich_mobile/utils/renderlist_generator.dart';
|
||||||
import 'package:isar/isar.dart';
|
import 'package:isar/isar.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
|
||||||
|
|
||||||
class AssetNotifier extends StateNotifier<bool> {
|
class AssetNotifier extends StateNotifier<bool> {
|
||||||
final AssetService _assetService;
|
final AssetService _assetService;
|
||||||
@@ -257,7 +257,7 @@ class AssetNotifier extends StateNotifier<bool> {
|
|||||||
// Delete asset from device
|
// Delete asset from device
|
||||||
if (local.isNotEmpty) {
|
if (local.isNotEmpty) {
|
||||||
try {
|
try {
|
||||||
return await PhotoManager.editor.deleteWithIds(local);
|
return await _ref.read(assetMediaRepositoryProvider).deleteAll(local);
|
||||||
} catch (e, stack) {
|
} catch (e, stack) {
|
||||||
log.severe("Failed to delete asset from device", e, stack);
|
log.severe("Failed to delete asset from device", e, stack);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ import 'package:collection/collection.dart';
|
|||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:immich_mobile/entities/album.entity.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/album_media.interface.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/file_media.interface.dart';
|
||||||
import 'package:immich_mobile/models/backup/available_album.model.dart';
|
import 'package:immich_mobile/models/backup/available_album.model.dart';
|
||||||
import 'package:immich_mobile/entities/backup_album.entity.dart';
|
import 'package:immich_mobile/entities/backup_album.entity.dart';
|
||||||
import 'package:immich_mobile/models/backup/backup_candidate.model.dart';
|
import 'package:immich_mobile/models/backup/backup_candidate.model.dart';
|
||||||
@@ -13,6 +16,8 @@ import 'package:immich_mobile/models/backup/current_upload_asset.model.dart';
|
|||||||
import 'package:immich_mobile/models/backup/error_upload_asset.model.dart';
|
import 'package:immich_mobile/models/backup/error_upload_asset.model.dart';
|
||||||
import 'package:immich_mobile/models/backup/success_upload_asset.model.dart';
|
import 'package:immich_mobile/models/backup/success_upload_asset.model.dart';
|
||||||
import 'package:immich_mobile/providers/backup/error_backup_list.provider.dart';
|
import 'package:immich_mobile/providers/backup/error_backup_list.provider.dart';
|
||||||
|
import 'package:immich_mobile/repositories/album_media.repository.dart';
|
||||||
|
import 'package:immich_mobile/repositories/file_media.repository.dart';
|
||||||
import 'package:immich_mobile/services/background.service.dart';
|
import 'package:immich_mobile/services/background.service.dart';
|
||||||
import 'package:immich_mobile/services/backup.service.dart';
|
import 'package:immich_mobile/services/backup.service.dart';
|
||||||
import 'package:immich_mobile/models/authentication/authentication_state.model.dart';
|
import 'package:immich_mobile/models/authentication/authentication_state.model.dart';
|
||||||
@@ -28,7 +33,7 @@ import 'package:immich_mobile/utils/diff.dart';
|
|||||||
import 'package:isar/isar.dart';
|
import 'package:isar/isar.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
import 'package:photo_manager/photo_manager.dart' show PMProgressHandler;
|
||||||
|
|
||||||
class BackupNotifier extends StateNotifier<BackUpState> {
|
class BackupNotifier extends StateNotifier<BackUpState> {
|
||||||
BackupNotifier(
|
BackupNotifier(
|
||||||
@@ -38,6 +43,8 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
|||||||
this._backgroundService,
|
this._backgroundService,
|
||||||
this._galleryPermissionNotifier,
|
this._galleryPermissionNotifier,
|
||||||
this._db,
|
this._db,
|
||||||
|
this._albumMediaRepository,
|
||||||
|
this._fileMediaRepository,
|
||||||
this.ref,
|
this.ref,
|
||||||
) : super(
|
) : super(
|
||||||
BackUpState(
|
BackUpState(
|
||||||
@@ -86,6 +93,8 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
|||||||
final BackgroundService _backgroundService;
|
final BackgroundService _backgroundService;
|
||||||
final GalleryPermissionNotifier _galleryPermissionNotifier;
|
final GalleryPermissionNotifier _galleryPermissionNotifier;
|
||||||
final Isar _db;
|
final Isar _db;
|
||||||
|
final IAlbumMediaRepository _albumMediaRepository;
|
||||||
|
final IFileMediaRepository _fileMediaRepository;
|
||||||
final Ref ref;
|
final Ref ref;
|
||||||
|
|
||||||
///
|
///
|
||||||
@@ -224,22 +233,24 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
|||||||
Stopwatch stopwatch = Stopwatch()..start();
|
Stopwatch stopwatch = Stopwatch()..start();
|
||||||
// Get all albums on the device
|
// Get all albums on the device
|
||||||
List<AvailableAlbum> availableAlbums = [];
|
List<AvailableAlbum> availableAlbums = [];
|
||||||
List<AssetPathEntity> albums = await PhotoManager.getAssetPathList(
|
List<Album> albums = await _albumMediaRepository.getAll();
|
||||||
hasAll: true,
|
|
||||||
type: RequestType.common,
|
|
||||||
);
|
|
||||||
|
|
||||||
// Map of id -> album for quick album lookup later on.
|
// Map of id -> album for quick album lookup later on.
|
||||||
Map<String, AssetPathEntity> albumMap = {};
|
Map<String, Album> albumMap = {};
|
||||||
|
|
||||||
log.info('Found ${albums.length} local albums');
|
log.info('Found ${albums.length} local albums');
|
||||||
|
|
||||||
for (AssetPathEntity album in albums) {
|
for (Album album in albums) {
|
||||||
AvailableAlbum availableAlbum = AvailableAlbum(albumEntity: album);
|
AvailableAlbum availableAlbum = AvailableAlbum(
|
||||||
|
album: album,
|
||||||
|
assetCount: await ref
|
||||||
|
.read(albumMediaRepositoryProvider)
|
||||||
|
.getAssetCount(album.localId!),
|
||||||
|
);
|
||||||
|
|
||||||
availableAlbums.add(availableAlbum);
|
availableAlbums.add(availableAlbum);
|
||||||
|
|
||||||
albumMap[album.id] = album;
|
albumMap[album.localId!] = album;
|
||||||
}
|
}
|
||||||
state = state.copyWith(availableAlbums: availableAlbums);
|
state = state.copyWith(availableAlbums: availableAlbums);
|
||||||
|
|
||||||
@@ -248,14 +259,18 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
|||||||
final List<BackupAlbum> selectedBackupAlbums =
|
final List<BackupAlbum> selectedBackupAlbums =
|
||||||
await _backupService.selectedAlbumsQuery().findAll();
|
await _backupService.selectedAlbumsQuery().findAll();
|
||||||
|
|
||||||
// Generate AssetPathEntity from id to add to local state
|
|
||||||
final Set<AvailableAlbum> selectedAlbums = {};
|
final Set<AvailableAlbum> selectedAlbums = {};
|
||||||
for (final BackupAlbum ba in selectedBackupAlbums) {
|
for (final BackupAlbum ba in selectedBackupAlbums) {
|
||||||
final albumAsset = albumMap[ba.id];
|
final albumAsset = albumMap[ba.id];
|
||||||
|
|
||||||
if (albumAsset != null) {
|
if (albumAsset != null) {
|
||||||
selectedAlbums.add(
|
selectedAlbums.add(
|
||||||
AvailableAlbum(albumEntity: albumAsset, lastBackup: ba.lastBackup),
|
AvailableAlbum(
|
||||||
|
album: albumAsset,
|
||||||
|
assetCount:
|
||||||
|
await _albumMediaRepository.getAssetCount(albumAsset.localId!),
|
||||||
|
lastBackup: ba.lastBackup,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
log.severe('Selected album not found');
|
log.severe('Selected album not found');
|
||||||
@@ -268,7 +283,13 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
|||||||
|
|
||||||
if (albumAsset != null) {
|
if (albumAsset != null) {
|
||||||
excludedAlbums.add(
|
excludedAlbums.add(
|
||||||
AvailableAlbum(albumEntity: albumAsset, lastBackup: ba.lastBackup),
|
AvailableAlbum(
|
||||||
|
album: albumAsset,
|
||||||
|
assetCount: await ref
|
||||||
|
.read(albumMediaRepositoryProvider)
|
||||||
|
.getAssetCount(albumAsset.localId!),
|
||||||
|
lastBackup: ba.lastBackup,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
log.severe('Excluded album not found');
|
log.severe('Excluded album not found');
|
||||||
@@ -297,23 +318,24 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
|||||||
final Set<BackupCandidate> assetsFromExcludedAlbums = {};
|
final Set<BackupCandidate> assetsFromExcludedAlbums = {};
|
||||||
|
|
||||||
for (final album in state.selectedBackupAlbums) {
|
for (final album in state.selectedBackupAlbums) {
|
||||||
final assetCount = await album.albumEntity.assetCountAsync;
|
final assetCount = await ref
|
||||||
|
.read(albumMediaRepositoryProvider)
|
||||||
|
.getAssetCount(album.album.localId!);
|
||||||
|
|
||||||
if (assetCount == 0) {
|
if (assetCount == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
final assets = await album.albumEntity.getAssetListRange(
|
final assets = await ref
|
||||||
start: 0,
|
.read(albumMediaRepositoryProvider)
|
||||||
end: assetCount,
|
.getAssets(album.album.localId!);
|
||||||
);
|
|
||||||
|
|
||||||
// Add album's name to the asset info
|
// Add album's name to the asset info
|
||||||
for (final asset in assets) {
|
for (final asset in assets) {
|
||||||
List<String> albumNames = [album.name];
|
List<String> albumNames = [album.name];
|
||||||
|
|
||||||
final existingAsset = assetsFromSelectedAlbums.firstWhereOrNull(
|
final existingAsset = assetsFromSelectedAlbums.firstWhereOrNull(
|
||||||
(a) => a.asset.id == asset.id,
|
(a) => a.asset.localId == asset.localId,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (existingAsset != null) {
|
if (existingAsset != null) {
|
||||||
@@ -331,16 +353,17 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (final album in state.excludedBackupAlbums) {
|
for (final album in state.excludedBackupAlbums) {
|
||||||
final assetCount = await album.albumEntity.assetCountAsync;
|
final assetCount = await ref
|
||||||
|
.read(albumMediaRepositoryProvider)
|
||||||
|
.getAssetCount(album.album.localId!);
|
||||||
|
|
||||||
if (assetCount == 0) {
|
if (assetCount == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
final assets = await album.albumEntity.getAssetListRange(
|
final assets = await ref
|
||||||
start: 0,
|
.read(albumMediaRepositoryProvider)
|
||||||
end: assetCount,
|
.getAssets(album.album.localId!);
|
||||||
);
|
|
||||||
|
|
||||||
for (final asset in assets) {
|
for (final asset in assets) {
|
||||||
assetsFromExcludedAlbums.add(
|
assetsFromExcludedAlbums.add(
|
||||||
@@ -360,14 +383,14 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
|||||||
|
|
||||||
// Find asset that were backup from selected albums
|
// Find asset that were backup from selected albums
|
||||||
final Set<String> selectedAlbumsBackupAssets =
|
final Set<String> selectedAlbumsBackupAssets =
|
||||||
Set.from(allUniqueAssets.map((e) => e.asset.id));
|
Set.from(allUniqueAssets.map((e) => e.asset.localId));
|
||||||
|
|
||||||
selectedAlbumsBackupAssets
|
selectedAlbumsBackupAssets
|
||||||
.removeWhere((assetId) => !allAssetsInDatabase.contains(assetId));
|
.removeWhere((assetId) => !allAssetsInDatabase.contains(assetId));
|
||||||
|
|
||||||
// Remove duplicated asset from all unique assets
|
// Remove duplicated asset from all unique assets
|
||||||
allUniqueAssets.removeWhere(
|
allUniqueAssets.removeWhere(
|
||||||
(candidate) => duplicatedAssetIds.contains(candidate.asset.id),
|
(candidate) => duplicatedAssetIds.contains(candidate.asset.localId),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (allUniqueAssets.isEmpty) {
|
if (allUniqueAssets.isEmpty) {
|
||||||
@@ -454,7 +477,7 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
|||||||
|
|
||||||
final hasPermission = _galleryPermissionNotifier.hasPermission;
|
final hasPermission = _galleryPermissionNotifier.hasPermission;
|
||||||
if (hasPermission) {
|
if (hasPermission) {
|
||||||
await PhotoManager.clearFileCache();
|
await _fileMediaRepository.clearFileCache();
|
||||||
|
|
||||||
if (state.allUniqueAssets.isEmpty) {
|
if (state.allUniqueAssets.isEmpty) {
|
||||||
log.info("No Asset On Device - Abort Backup Process");
|
log.info("No Asset On Device - Abort Backup Process");
|
||||||
@@ -465,7 +488,7 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
|||||||
Set<BackupCandidate> assetsWillBeBackup = Set.from(state.allUniqueAssets);
|
Set<BackupCandidate> assetsWillBeBackup = Set.from(state.allUniqueAssets);
|
||||||
// Remove item that has already been backed up
|
// Remove item that has already been backed up
|
||||||
for (final assetId in state.allAssetsInDatabase) {
|
for (final assetId in state.allAssetsInDatabase) {
|
||||||
assetsWillBeBackup.removeWhere((e) => e.asset.id == assetId);
|
assetsWillBeBackup.removeWhere((e) => e.asset.localId == assetId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (assetsWillBeBackup.isEmpty) {
|
if (assetsWillBeBackup.isEmpty) {
|
||||||
@@ -531,7 +554,8 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
|||||||
state = state.copyWith(
|
state = state.copyWith(
|
||||||
allUniqueAssets: state.allUniqueAssets
|
allUniqueAssets: state.allUniqueAssets
|
||||||
.where(
|
.where(
|
||||||
(candidate) => candidate.asset.id != result.candidate.asset.id,
|
(candidate) =>
|
||||||
|
candidate.asset.localId != result.candidate.asset.localId,
|
||||||
)
|
)
|
||||||
.toSet(),
|
.toSet(),
|
||||||
);
|
);
|
||||||
@@ -539,11 +563,11 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
|||||||
state = state.copyWith(
|
state = state.copyWith(
|
||||||
selectedAlbumsBackupAssetsIds: {
|
selectedAlbumsBackupAssetsIds: {
|
||||||
...state.selectedAlbumsBackupAssetsIds,
|
...state.selectedAlbumsBackupAssetsIds,
|
||||||
result.candidate.asset.id,
|
result.candidate.asset.localId!,
|
||||||
},
|
},
|
||||||
allAssetsInDatabase: [
|
allAssetsInDatabase: [
|
||||||
...state.allAssetsInDatabase,
|
...state.allAssetsInDatabase,
|
||||||
result.candidate.asset.id,
|
result.candidate.asset.localId!,
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -552,7 +576,7 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
|||||||
state.selectedAlbumsBackupAssetsIds.length ==
|
state.selectedAlbumsBackupAssetsIds.length ==
|
||||||
0) {
|
0) {
|
||||||
final latestAssetBackup = state.allUniqueAssets
|
final latestAssetBackup = state.allUniqueAssets
|
||||||
.map((candidate) => candidate.asset.modifiedDateTime)
|
.map((candidate) => candidate.asset.fileModifiedAt)
|
||||||
.reduce(
|
.reduce(
|
||||||
(v, e) => e.isAfter(v) ? e : v,
|
(v, e) => e.isAfter(v) ? e : v,
|
||||||
);
|
);
|
||||||
@@ -741,6 +765,8 @@ final backupProvider =
|
|||||||
ref.watch(backgroundServiceProvider),
|
ref.watch(backgroundServiceProvider),
|
||||||
ref.watch(galleryPermissionNotifier.notifier),
|
ref.watch(galleryPermissionNotifier.notifier),
|
||||||
ref.watch(dbProvider),
|
ref.watch(dbProvider),
|
||||||
|
ref.watch(albumMediaRepositoryProvider),
|
||||||
|
ref.watch(fileMediaRepositoryProvider),
|
||||||
ref,
|
ref,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import 'package:fluttertoast/fluttertoast.dart';
|
|||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:immich_mobile/models/backup/backup_candidate.model.dart';
|
import 'package:immich_mobile/models/backup/backup_candidate.model.dart';
|
||||||
import 'package:immich_mobile/models/backup/success_upload_asset.model.dart';
|
import 'package:immich_mobile/models/backup/success_upload_asset.model.dart';
|
||||||
|
import 'package:immich_mobile/repositories/file_media.repository.dart';
|
||||||
import 'package:immich_mobile/services/background.service.dart';
|
import 'package:immich_mobile/services/background.service.dart';
|
||||||
import 'package:immich_mobile/models/backup/backup_state.model.dart';
|
import 'package:immich_mobile/models/backup/backup_state.model.dart';
|
||||||
import 'package:immich_mobile/models/backup/current_upload_asset.model.dart';
|
import 'package:immich_mobile/models/backup/current_upload_asset.model.dart';
|
||||||
@@ -27,7 +28,7 @@ import 'package:immich_mobile/utils/backup_progress.dart';
|
|||||||
import 'package:isar/isar.dart';
|
import 'package:isar/isar.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
import 'package:photo_manager/photo_manager.dart' show PMProgressHandler;
|
||||||
|
|
||||||
final manualUploadProvider =
|
final manualUploadProvider =
|
||||||
StateNotifierProvider<ManualUploadNotifier, ManualUploadState>((ref) {
|
StateNotifierProvider<ManualUploadNotifier, ManualUploadState>((ref) {
|
||||||
@@ -193,17 +194,10 @@ class ManualUploadNotifier extends StateNotifier<ManualUploadState> {
|
|||||||
_backupProvider.updateBackupProgress(BackUpProgressEnum.manualInProgress);
|
_backupProvider.updateBackupProgress(BackUpProgressEnum.manualInProgress);
|
||||||
|
|
||||||
if (ref.read(galleryPermissionNotifier.notifier).hasPermission) {
|
if (ref.read(galleryPermissionNotifier.notifier).hasPermission) {
|
||||||
await PhotoManager.clearFileCache();
|
await ref.read(fileMediaRepositoryProvider).clearFileCache();
|
||||||
|
|
||||||
// We do not have 1:1 mapping of all AssetEntity fields to Asset. This results in cases
|
final allAssetsFromDevice =
|
||||||
// where platform specific fields such as `subtype` used to detect platform specific assets such as
|
allManualUploads.where((e) => e.isLocal && !e.isRemote).toList();
|
||||||
// LivePhoto in iOS is lost when we directly fetch the local asset from Asset using Asset.local
|
|
||||||
List<AssetEntity?> allAssetsFromDevice = await Future.wait(
|
|
||||||
allManualUploads
|
|
||||||
// Filter local only assets
|
|
||||||
.where((e) => e.isLocal && !e.isRemote)
|
|
||||||
.map((e) => e.local!.obtainForNewProperties()),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (allAssetsFromDevice.length != allManualUploads.length) {
|
if (allAssetsFromDevice.length != allManualUploads.length) {
|
||||||
_log.warning(
|
_log.warning(
|
||||||
@@ -221,11 +215,17 @@ class ManualUploadNotifier extends StateNotifier<ManualUploadState> {
|
|||||||
await _backupService.buildUploadCandidates(
|
await _backupService.buildUploadCandidates(
|
||||||
selectedBackupAlbums,
|
selectedBackupAlbums,
|
||||||
excludedBackupAlbums,
|
excludedBackupAlbums,
|
||||||
|
useTimeFilter: false,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Extrack candidate from allAssetsFromDevice.nonNulls
|
// Extrack candidate from allAssetsFromDevice
|
||||||
final uploadAssets = candidates
|
final uploadAssets = candidates.where(
|
||||||
.where((e) => allAssetsFromDevice.nonNulls.contains(e.asset));
|
(candidate) =>
|
||||||
|
allAssetsFromDevice.firstWhereOrNull(
|
||||||
|
(asset) => asset.localId == candidate.asset.localId,
|
||||||
|
) !=
|
||||||
|
null,
|
||||||
|
);
|
||||||
|
|
||||||
if (uploadAssets.isEmpty) {
|
if (uploadAssets.isEmpty) {
|
||||||
debugPrint("[_startUpload] No Assets to upload - Abort Process");
|
debugPrint("[_startUpload] No Assets to upload - Abort Process");
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import 'package:flutter/painting.dart';
|
|||||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
import 'package:immich_mobile/entities/store.entity.dart';
|
import 'package:immich_mobile/entities/store.entity.dart';
|
||||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
import 'package:photo_manager/photo_manager.dart' show ThumbnailSize;
|
||||||
|
|
||||||
/// The local image provider for an asset
|
/// The local image provider for an asset
|
||||||
class ImmichLocalImageProvider extends ImageProvider<ImmichLocalImageProvider> {
|
class ImmichLocalImageProvider extends ImageProvider<ImmichLocalImageProvider> {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import 'package:cached_network_image/cached_network_image.dart';
|
|||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/painting.dart';
|
import 'package:flutter/painting.dart';
|
||||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
import 'package:photo_manager/photo_manager.dart' show ThumbnailSize;
|
||||||
|
|
||||||
/// The local image provider for an asset
|
/// The local image provider for an asset
|
||||||
/// Only viable
|
/// Only viable
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:immich_mobile/entities/album.entity.dart';
|
||||||
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
|
import 'package:immich_mobile/entities/user.entity.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/album.interface.dart';
|
||||||
|
import 'package:immich_mobile/providers/db.provider.dart';
|
||||||
|
import 'package:isar/isar.dart';
|
||||||
|
|
||||||
|
final albumRepositoryProvider =
|
||||||
|
Provider((ref) => AlbumRepository(ref.watch(dbProvider)));
|
||||||
|
|
||||||
|
class AlbumRepository implements IAlbumRepository {
|
||||||
|
final Isar _db;
|
||||||
|
|
||||||
|
AlbumRepository(
|
||||||
|
this._db,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<int> count({bool? local}) {
|
||||||
|
if (local == true) return _db.albums.where().localIdIsNotNull().count();
|
||||||
|
if (local == false) return _db.albums.where().remoteIdIsNotNull().count();
|
||||||
|
return _db.albums.count();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Album> create(Album album) =>
|
||||||
|
_db.writeTxn(() => _db.albums.store(album));
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Album?> getByName(String name, {bool? shared, bool? remote}) {
|
||||||
|
var query = _db.albums.filter().nameEqualTo(name);
|
||||||
|
if (shared != null) {
|
||||||
|
query = query.sharedEqualTo(shared);
|
||||||
|
}
|
||||||
|
if (remote == true) {
|
||||||
|
query = query.localIdIsNull();
|
||||||
|
} else if (remote == false) {
|
||||||
|
query = query.remoteIdIsNull();
|
||||||
|
}
|
||||||
|
return query.findFirst();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Album> update(Album album) =>
|
||||||
|
_db.writeTxn(() => _db.albums.store(album));
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> delete(int albumId) =>
|
||||||
|
_db.writeTxn(() => _db.albums.delete(albumId));
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<Album>> getAll({bool? shared}) {
|
||||||
|
final baseQuery = _db.albums.filter();
|
||||||
|
QueryBuilder<Album, Album, QAfterFilterCondition>? query;
|
||||||
|
if (shared != null) {
|
||||||
|
query = baseQuery.sharedEqualTo(true);
|
||||||
|
}
|
||||||
|
return query?.findAll() ?? _db.albums.where().findAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Album?> getById(int id) => _db.albums.get(id);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> removeUsers(Album album, List<User> users) =>
|
||||||
|
_db.writeTxn(() => album.sharedUsers.update(unlink: users));
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> addAssets(Album album, List<Asset> assets) =>
|
||||||
|
_db.writeTxn(() => album.assets.update(link: assets));
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> removeAssets(Album album, List<Asset> assets) =>
|
||||||
|
_db.writeTxn(() => album.assets.update(unlink: assets));
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Album> recalculateMetadata(Album album) async {
|
||||||
|
album.startDate = await album.assets.filter().fileCreatedAtProperty().min();
|
||||||
|
album.endDate = await album.assets.filter().fileCreatedAtProperty().max();
|
||||||
|
album.lastModifiedAssetTimestamp =
|
||||||
|
await album.assets.filter().updatedAtProperty().max();
|
||||||
|
return album;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:immich_mobile/entities/album.entity.dart';
|
||||||
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
|
import 'package:immich_mobile/entities/store.entity.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/album_media.interface.dart';
|
||||||
|
import 'package:immich_mobile/repositories/asset_media.repository.dart';
|
||||||
|
import 'package:photo_manager/photo_manager.dart' hide AssetType;
|
||||||
|
|
||||||
|
final albumMediaRepositoryProvider = Provider((ref) => AlbumMediaRepository());
|
||||||
|
|
||||||
|
class AlbumMediaRepository implements IAlbumMediaRepository {
|
||||||
|
@override
|
||||||
|
Future<List<Album>> getAll() async {
|
||||||
|
final List<AssetPathEntity> assetPathEntities =
|
||||||
|
await PhotoManager.getAssetPathList(
|
||||||
|
hasAll: true,
|
||||||
|
filterOption: FilterOptionGroup(containsPathModified: true),
|
||||||
|
);
|
||||||
|
return assetPathEntities.map(_toAlbum).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<String>> getAssetIds(String albumId) async {
|
||||||
|
final album = await AssetPathEntity.fromId(albumId);
|
||||||
|
final List<AssetEntity> assets =
|
||||||
|
await album.getAssetListRange(start: 0, end: 0x7fffffffffffffff);
|
||||||
|
return assets.map((e) => e.id).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<int> getAssetCount(String albumId) async {
|
||||||
|
final album = await AssetPathEntity.fromId(albumId);
|
||||||
|
return album.assetCountAsync;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<Asset>> getAssets(
|
||||||
|
String albumId, {
|
||||||
|
int start = 0,
|
||||||
|
int end = 0x7fffffffffffffff,
|
||||||
|
DateTime? modifiedFrom,
|
||||||
|
DateTime? modifiedUntil,
|
||||||
|
bool orderByModificationDate = false,
|
||||||
|
}) async {
|
||||||
|
final onDevice = await AssetPathEntity.fromId(
|
||||||
|
albumId,
|
||||||
|
filterOption: FilterOptionGroup(
|
||||||
|
containsPathModified: true,
|
||||||
|
orders: orderByModificationDate
|
||||||
|
? [const OrderOption(type: OrderOptionType.updateDate)]
|
||||||
|
: [],
|
||||||
|
imageOption: const FilterOption(needTitle: true),
|
||||||
|
videoOption: const FilterOption(needTitle: true),
|
||||||
|
updateTimeCond: modifiedFrom == null && modifiedUntil == null
|
||||||
|
? null
|
||||||
|
: DateTimeCond(
|
||||||
|
min: modifiedFrom ?? DateTime.utc(-271820),
|
||||||
|
max: modifiedUntil ?? DateTime.utc(275760),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
final List<AssetEntity> assets =
|
||||||
|
await onDevice.getAssetListRange(start: start, end: end);
|
||||||
|
return assets.map(AssetMediaRepository.toAsset).toList().cast();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Album> get(
|
||||||
|
String id, {
|
||||||
|
DateTime? modifiedFrom,
|
||||||
|
DateTime? modifiedUntil,
|
||||||
|
}) async {
|
||||||
|
final assetPathEntity = await AssetPathEntity.fromId(id);
|
||||||
|
return _toAlbum(assetPathEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Album _toAlbum(AssetPathEntity assetPathEntity) {
|
||||||
|
final Album album = Album(
|
||||||
|
name: assetPathEntity.name,
|
||||||
|
createdAt:
|
||||||
|
assetPathEntity.lastModified?.toUtc() ?? DateTime.now().toUtc(),
|
||||||
|
modifiedAt:
|
||||||
|
assetPathEntity.lastModified?.toUtc() ?? DateTime.now().toUtc(),
|
||||||
|
shared: false,
|
||||||
|
activityEnabled: false,
|
||||||
|
);
|
||||||
|
album.owner.value = Store.get(StoreKey.currentUser);
|
||||||
|
album.localId = assetPathEntity.id;
|
||||||
|
album.isAll = assetPathEntity.isAll;
|
||||||
|
return album;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:immich_mobile/entities/album.entity.dart';
|
||||||
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
|
import 'package:immich_mobile/entities/user.entity.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/asset.interface.dart';
|
||||||
|
import 'package:immich_mobile/providers/db.provider.dart';
|
||||||
|
import 'package:isar/isar.dart';
|
||||||
|
|
||||||
|
final assetRepositoryProvider =
|
||||||
|
Provider((ref) => AssetRepository(ref.watch(dbProvider)));
|
||||||
|
|
||||||
|
class AssetRepository implements IAssetRepository {
|
||||||
|
final Isar _db;
|
||||||
|
|
||||||
|
AssetRepository(
|
||||||
|
this._db,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<Asset>> getByAlbum(Album album, {User? notOwnedBy}) {
|
||||||
|
var query = album.assets.filter();
|
||||||
|
if (notOwnedBy != null) {
|
||||||
|
query = query.not().ownerIdEqualTo(notOwnedBy.isarId);
|
||||||
|
}
|
||||||
|
return query.findAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> deleteById(List<int> ids) =>
|
||||||
|
_db.writeTxn(() => _db.assets.deleteAll(ids));
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
|
import 'package:immich_mobile/entities/exif_info.entity.dart';
|
||||||
|
import 'package:immich_mobile/entities/store.entity.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/asset_media.interface.dart';
|
||||||
|
import 'package:photo_manager/photo_manager.dart' hide AssetType;
|
||||||
|
|
||||||
|
final assetMediaRepositoryProvider = Provider((ref) => AssetMediaRepository());
|
||||||
|
|
||||||
|
class AssetMediaRepository implements IAssetMediaRepository {
|
||||||
|
@override
|
||||||
|
Future<List<String>> deleteAll(List<String> ids) =>
|
||||||
|
PhotoManager.editor.deleteWithIds(ids);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Asset?> get(String id) async {
|
||||||
|
final entity = await AssetEntity.fromId(id);
|
||||||
|
return toAsset(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Asset? toAsset(AssetEntity? local) {
|
||||||
|
if (local == null) return null;
|
||||||
|
final Asset asset = Asset(
|
||||||
|
checksum: "",
|
||||||
|
localId: local.id,
|
||||||
|
ownerId: Store.get(StoreKey.currentUser).isarId,
|
||||||
|
fileCreatedAt: local.createDateTime,
|
||||||
|
fileModifiedAt: local.modifiedDateTime,
|
||||||
|
updatedAt: local.modifiedDateTime,
|
||||||
|
durationInSeconds: local.duration,
|
||||||
|
type: AssetType.values[local.typeInt],
|
||||||
|
fileName: local.title!,
|
||||||
|
width: local.width,
|
||||||
|
height: local.height,
|
||||||
|
isFavorite: local.isFavorite,
|
||||||
|
);
|
||||||
|
if (asset.fileCreatedAt.year == 1970) {
|
||||||
|
asset.fileCreatedAt = asset.fileModifiedAt;
|
||||||
|
}
|
||||||
|
if (local.latitude != null) {
|
||||||
|
asset.exifInfo = ExifInfo(lat: local.latitude, long: local.longitude);
|
||||||
|
}
|
||||||
|
asset.local = local;
|
||||||
|
return asset;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:immich_mobile/entities/backup_album.entity.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/backup.interface.dart';
|
||||||
|
import 'package:immich_mobile/providers/db.provider.dart';
|
||||||
|
import 'package:isar/isar.dart';
|
||||||
|
|
||||||
|
final backupRepositoryProvider =
|
||||||
|
Provider((ref) => BackupRepository(ref.watch(dbProvider)));
|
||||||
|
|
||||||
|
class BackupRepository implements IBackupRepository {
|
||||||
|
final Isar _db;
|
||||||
|
|
||||||
|
BackupRepository(
|
||||||
|
this._db,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<String>> getIdsBySelection(BackupSelection backup) =>
|
||||||
|
_db.backupAlbums.filter().selectionEqualTo(backup).idProperty().findAll();
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/file_media.interface.dart';
|
||||||
|
import 'package:immich_mobile/repositories/asset_media.repository.dart';
|
||||||
|
import 'package:photo_manager/photo_manager.dart' hide AssetType;
|
||||||
|
|
||||||
|
final fileMediaRepositoryProvider = Provider((ref) => FileMediaRepository());
|
||||||
|
|
||||||
|
class FileMediaRepository implements IFileMediaRepository {
|
||||||
|
@override
|
||||||
|
Future<Asset?> saveImage(
|
||||||
|
Uint8List data, {
|
||||||
|
required String title,
|
||||||
|
String? relativePath,
|
||||||
|
}) async {
|
||||||
|
final entity = await PhotoManager.editor
|
||||||
|
.saveImage(data, title: title, relativePath: relativePath);
|
||||||
|
return AssetMediaRepository.toAsset(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Asset?> saveLivePhoto({
|
||||||
|
required File image,
|
||||||
|
required File video,
|
||||||
|
required String title,
|
||||||
|
}) async {
|
||||||
|
final entity = await PhotoManager.editor.darwin.saveLivePhoto(
|
||||||
|
imageFile: image,
|
||||||
|
videoFile: video,
|
||||||
|
title: title,
|
||||||
|
);
|
||||||
|
return AssetMediaRepository.toAsset(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<Asset?> saveVideo(
|
||||||
|
File file, {
|
||||||
|
required String title,
|
||||||
|
String? relativePath,
|
||||||
|
}) async {
|
||||||
|
final entity = await PhotoManager.editor.saveVideo(
|
||||||
|
file,
|
||||||
|
title: title,
|
||||||
|
relativePath: relativePath,
|
||||||
|
);
|
||||||
|
return AssetMediaRepository.toAsset(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> clearFileCache() => PhotoManager.clearFileCache();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> enableBackgroundAccess() =>
|
||||||
|
PhotoManager.setIgnorePermissionCheck(true);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> requestExtendedPermissions() =>
|
||||||
|
PhotoManager.requestPermissionExtend();
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:immich_mobile/entities/user.entity.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/user.interface.dart';
|
||||||
|
import 'package:immich_mobile/providers/db.provider.dart';
|
||||||
|
import 'package:isar/isar.dart';
|
||||||
|
|
||||||
|
final userRepositoryProvider =
|
||||||
|
Provider((ref) => UserRepository(ref.watch(dbProvider)));
|
||||||
|
|
||||||
|
class UserRepository implements IUserRepository {
|
||||||
|
final Isar _db;
|
||||||
|
|
||||||
|
UserRepository(
|
||||||
|
this._db,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<List<User>> getByIds(List<String> ids) async =>
|
||||||
|
(await _db.users.getAllById(ids)).cast();
|
||||||
|
}
|
||||||
@@ -63,7 +63,6 @@ import 'package:immich_mobile/services/api.service.dart';
|
|||||||
import 'package:immich_mobile/widgets/asset_grid/asset_grid_data_structure.dart';
|
import 'package:immich_mobile/widgets/asset_grid/asset_grid_data_structure.dart';
|
||||||
import 'package:isar/isar.dart';
|
import 'package:isar/isar.dart';
|
||||||
import 'package:maplibre_gl/maplibre_gl.dart';
|
import 'package:maplibre_gl/maplibre_gl.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart' hide LatLng;
|
|
||||||
|
|
||||||
part 'router.gr.dart';
|
part 'router.gr.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ class AlbumOptionsRouteArgs {
|
|||||||
class AlbumPreviewRoute extends PageRouteInfo<AlbumPreviewRouteArgs> {
|
class AlbumPreviewRoute extends PageRouteInfo<AlbumPreviewRouteArgs> {
|
||||||
AlbumPreviewRoute({
|
AlbumPreviewRoute({
|
||||||
Key? key,
|
Key? key,
|
||||||
required AssetPathEntity album,
|
required Album album,
|
||||||
List<PageRouteInfo>? children,
|
List<PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
AlbumPreviewRoute.name,
|
AlbumPreviewRoute.name,
|
||||||
@@ -218,7 +218,7 @@ class AlbumPreviewRouteArgs {
|
|||||||
|
|
||||||
final Key? key;
|
final Key? key;
|
||||||
|
|
||||||
final AssetPathEntity album;
|
final Album album;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
|
|||||||
@@ -5,6 +5,11 @@ import 'dart:io';
|
|||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/album.interface.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/album_media.interface.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/asset.interface.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/backup.interface.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/user.interface.dart';
|
||||||
import 'package:immich_mobile/models/albums/album_add_asset_response.model.dart';
|
import 'package:immich_mobile/models/albums/album_add_asset_response.model.dart';
|
||||||
import 'package:immich_mobile/entities/backup_album.entity.dart';
|
import 'package:immich_mobile/entities/backup_album.entity.dart';
|
||||||
import 'package:immich_mobile/entities/album.entity.dart';
|
import 'package:immich_mobile/entities/album.entity.dart';
|
||||||
@@ -12,21 +17,27 @@ import 'package:immich_mobile/entities/asset.entity.dart';
|
|||||||
import 'package:immich_mobile/entities/store.entity.dart';
|
import 'package:immich_mobile/entities/store.entity.dart';
|
||||||
import 'package:immich_mobile/entities/user.entity.dart';
|
import 'package:immich_mobile/entities/user.entity.dart';
|
||||||
import 'package:immich_mobile/providers/api.provider.dart';
|
import 'package:immich_mobile/providers/api.provider.dart';
|
||||||
import 'package:immich_mobile/providers/db.provider.dart';
|
import 'package:immich_mobile/repositories/album.repository.dart';
|
||||||
|
import 'package:immich_mobile/repositories/asset.repository.dart';
|
||||||
|
import 'package:immich_mobile/repositories/backup.repository.dart';
|
||||||
|
import 'package:immich_mobile/repositories/album_media.repository.dart';
|
||||||
|
import 'package:immich_mobile/repositories/user.repository.dart';
|
||||||
import 'package:immich_mobile/services/api.service.dart';
|
import 'package:immich_mobile/services/api.service.dart';
|
||||||
import 'package:immich_mobile/services/sync.service.dart';
|
import 'package:immich_mobile/services/sync.service.dart';
|
||||||
import 'package:immich_mobile/services/user.service.dart';
|
import 'package:immich_mobile/services/user.service.dart';
|
||||||
import 'package:isar/isar.dart';
|
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:openapi/api.dart';
|
import 'package:openapi/api.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
|
||||||
|
|
||||||
final albumServiceProvider = Provider(
|
final albumServiceProvider = Provider(
|
||||||
(ref) => AlbumService(
|
(ref) => AlbumService(
|
||||||
ref.watch(apiServiceProvider),
|
ref.watch(apiServiceProvider),
|
||||||
ref.watch(userServiceProvider),
|
ref.watch(userServiceProvider),
|
||||||
ref.watch(syncServiceProvider),
|
ref.watch(syncServiceProvider),
|
||||||
ref.watch(dbProvider),
|
ref.watch(albumRepositoryProvider),
|
||||||
|
ref.watch(assetRepositoryProvider),
|
||||||
|
ref.watch(userRepositoryProvider),
|
||||||
|
ref.watch(backupRepositoryProvider),
|
||||||
|
ref.watch(albumMediaRepositoryProvider),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -34,7 +45,11 @@ class AlbumService {
|
|||||||
final ApiService _apiService;
|
final ApiService _apiService;
|
||||||
final UserService _userService;
|
final UserService _userService;
|
||||||
final SyncService _syncService;
|
final SyncService _syncService;
|
||||||
final Isar _db;
|
final IAlbumRepository _albumRepository;
|
||||||
|
final IAssetRepository _assetRepository;
|
||||||
|
final IUserRepository _userRepository;
|
||||||
|
final IBackupRepository _backupAlbumRepository;
|
||||||
|
final IAlbumMediaRepository _albumMediaRepository;
|
||||||
final Logger _log = Logger('AlbumService');
|
final Logger _log = Logger('AlbumService');
|
||||||
Completer<bool> _localCompleter = Completer()..complete(false);
|
Completer<bool> _localCompleter = Completer()..complete(false);
|
||||||
Completer<bool> _remoteCompleter = Completer()..complete(false);
|
Completer<bool> _remoteCompleter = Completer()..complete(false);
|
||||||
@@ -43,16 +58,13 @@ class AlbumService {
|
|||||||
this._apiService,
|
this._apiService,
|
||||||
this._userService,
|
this._userService,
|
||||||
this._syncService,
|
this._syncService,
|
||||||
this._db,
|
this._albumRepository,
|
||||||
|
this._assetRepository,
|
||||||
|
this._userRepository,
|
||||||
|
this._backupAlbumRepository,
|
||||||
|
this._albumMediaRepository,
|
||||||
);
|
);
|
||||||
|
|
||||||
QueryBuilder<BackupAlbum, BackupAlbum, QAfterFilterCondition>
|
|
||||||
selectedAlbumsQuery() =>
|
|
||||||
_db.backupAlbums.filter().selectionEqualTo(BackupSelection.select);
|
|
||||||
QueryBuilder<BackupAlbum, BackupAlbum, QAfterFilterCondition>
|
|
||||||
excludedAlbumsQuery() =>
|
|
||||||
_db.backupAlbums.filter().selectionEqualTo(BackupSelection.exclude);
|
|
||||||
|
|
||||||
/// Checks all selected device albums for changes of albums and their assets
|
/// Checks all selected device albums for changes of albums and their assets
|
||||||
/// Updates the local database and returns `true` if there were any changes
|
/// Updates the local database and returns `true` if there were any changes
|
||||||
Future<bool> refreshDeviceAlbums() async {
|
Future<bool> refreshDeviceAlbums() async {
|
||||||
@@ -65,22 +77,18 @@ class AlbumService {
|
|||||||
final Stopwatch sw = Stopwatch()..start();
|
final Stopwatch sw = Stopwatch()..start();
|
||||||
bool changes = false;
|
bool changes = false;
|
||||||
try {
|
try {
|
||||||
final List<String> excludedIds =
|
final List<String> excludedIds = await _backupAlbumRepository
|
||||||
await excludedAlbumsQuery().idProperty().findAll();
|
.getIdsBySelection(BackupSelection.exclude);
|
||||||
final List<String> selectedIds =
|
final List<String> selectedIds = await _backupAlbumRepository
|
||||||
await selectedAlbumsQuery().idProperty().findAll();
|
.getIdsBySelection(BackupSelection.select);
|
||||||
if (selectedIds.isEmpty) {
|
if (selectedIds.isEmpty) {
|
||||||
final numLocal = await _db.albums.where().localIdIsNotNull().count();
|
final numLocal = await _albumRepository.count(local: true);
|
||||||
if (numLocal > 0) {
|
if (numLocal > 0) {
|
||||||
_syncService.removeAllLocalAlbumsAndAssets();
|
_syncService.removeAllLocalAlbumsAndAssets();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final List<AssetPathEntity> onDevice =
|
final List<Album> onDevice = await _albumMediaRepository.getAll();
|
||||||
await PhotoManager.getAssetPathList(
|
|
||||||
hasAll: true,
|
|
||||||
filterOption: FilterOptionGroup(containsPathModified: true),
|
|
||||||
);
|
|
||||||
_log.info("Found ${onDevice.length} device albums");
|
_log.info("Found ${onDevice.length} device albums");
|
||||||
Set<String>? excludedAssets;
|
Set<String>? excludedAssets;
|
||||||
if (excludedIds.isNotEmpty) {
|
if (excludedIds.isNotEmpty) {
|
||||||
@@ -96,13 +104,15 @@ class AlbumService {
|
|||||||
_log.info("Found ${excludedAssets.length} assets to exclude");
|
_log.info("Found ${excludedAssets.length} assets to exclude");
|
||||||
}
|
}
|
||||||
// remove all excluded albums
|
// remove all excluded albums
|
||||||
onDevice.removeWhere((e) => excludedIds.contains(e.id));
|
onDevice.removeWhere((e) => excludedIds.contains(e.localId));
|
||||||
_log.info(
|
_log.info(
|
||||||
"Ignoring ${excludedIds.length} excluded albums resulting in ${onDevice.length} device albums",
|
"Ignoring ${excludedIds.length} excluded albums resulting in ${onDevice.length} device albums",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
final hasAll = selectedIds
|
final hasAll = selectedIds
|
||||||
.map((id) => onDevice.firstWhereOrNull((a) => a.id == id))
|
.map(
|
||||||
|
(id) => onDevice.firstWhereOrNull((album) => album.localId == id),
|
||||||
|
)
|
||||||
.whereNotNull()
|
.whereNotNull()
|
||||||
.any((a) => a.isAll);
|
.any((a) => a.isAll);
|
||||||
if (hasAll) {
|
if (hasAll) {
|
||||||
@@ -114,7 +124,7 @@ class AlbumService {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// keep only the explicitly selected albums
|
// keep only the explicitly selected albums
|
||||||
onDevice.removeWhere((e) => !selectedIds.contains(e.id));
|
onDevice.removeWhere((e) => !selectedIds.contains(e.localId));
|
||||||
_log.info("'Recents' is not selected, keeping only selected albums");
|
_log.info("'Recents' is not selected, keeping only selected albums");
|
||||||
}
|
}
|
||||||
changes =
|
changes =
|
||||||
@@ -128,15 +138,15 @@ class AlbumService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<Set<String>> _loadExcludedAssetIds(
|
Future<Set<String>> _loadExcludedAssetIds(
|
||||||
List<AssetPathEntity> albums,
|
List<Album> albums,
|
||||||
List<String> excludedAlbumIds,
|
List<String> excludedAlbumIds,
|
||||||
) async {
|
) async {
|
||||||
final Set<String> result = HashSet<String>();
|
final Set<String> result = HashSet<String>();
|
||||||
for (AssetPathEntity a in albums) {
|
for (Album album in albums) {
|
||||||
if (excludedAlbumIds.contains(a.id)) {
|
if (excludedAlbumIds.contains(album.localId)) {
|
||||||
final List<AssetEntity> assets =
|
final assetIds =
|
||||||
await a.getAssetListRange(start: 0, end: 0x7fffffffffffffff);
|
await _albumMediaRepository.getAssetIds(album.localId!);
|
||||||
result.addAll(assets.map((e) => e.id));
|
result.addAll(assetIds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@@ -194,8 +204,8 @@ class AlbumService {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
if (remote != null) {
|
if (remote != null) {
|
||||||
Album album = await Album.remote(remote);
|
final Album album = await Album.remote(remote);
|
||||||
await _db.writeTxn(() => _db.albums.store(album));
|
await _albumRepository.create(album);
|
||||||
return album;
|
return album;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -212,8 +222,7 @@ class AlbumService {
|
|||||||
for (int round = 0;; round++) {
|
for (int round = 0;; round++) {
|
||||||
final proposedName = "$baseName${round == 0 ? "" : " ($round)"}";
|
final proposedName = "$baseName${round == 0 ? "" : " ($round)"}";
|
||||||
|
|
||||||
if (null ==
|
if (null == await _albumRepository.getByName(proposedName)) {
|
||||||
await _db.albums.filter().nameEqualTo(proposedName).findFirst()) {
|
|
||||||
return proposedName;
|
return proposedName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -268,20 +277,15 @@ class AlbumService {
|
|||||||
|
|
||||||
Future<void> _updateAssets(
|
Future<void> _updateAssets(
|
||||||
int albumId, {
|
int albumId, {
|
||||||
Iterable<Asset> add = const [],
|
List<Asset> add = const [],
|
||||||
Iterable<Asset> remove = const [],
|
List<Asset> remove = const [],
|
||||||
}) {
|
}) async {
|
||||||
return _db.writeTxn(() async {
|
final album = await _albumRepository.getById(albumId);
|
||||||
final album = await _db.albums.get(albumId);
|
if (album == null) return;
|
||||||
if (album == null) return;
|
await _albumRepository.addAssets(album, add);
|
||||||
await album.assets.update(link: add, unlink: remove);
|
await _albumRepository.removeAssets(album, remove);
|
||||||
album.startDate =
|
await _albumRepository.recalculateMetadata(album);
|
||||||
await album.assets.filter().fileCreatedAtProperty().min();
|
await _albumRepository.update(album);
|
||||||
album.endDate = await album.assets.filter().fileCreatedAtProperty().max();
|
|
||||||
album.lastModifiedAssetTimestamp =
|
|
||||||
await album.assets.filter().updatedAtProperty().max();
|
|
||||||
await _db.albums.put(album);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> addAdditionalUserToAlbum(
|
Future<bool> addAdditionalUserToAlbum(
|
||||||
@@ -298,13 +302,9 @@ class AlbumService {
|
|||||||
AddUsersDto(albumUsers: albumUsers),
|
AddUsersDto(albumUsers: albumUsers),
|
||||||
);
|
);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
album.sharedUsers
|
album.sharedUsers.addAll(await _userRepository.getByIds(sharedUserIds));
|
||||||
.addAll((await _db.users.getAllById(sharedUserIds)).cast());
|
|
||||||
album.shared = result.shared;
|
album.shared = result.shared;
|
||||||
await _db.writeTxn(() async {
|
await _albumRepository.update(album);
|
||||||
await _db.albums.put(album);
|
|
||||||
await album.sharedUsers.save();
|
|
||||||
});
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -321,7 +321,7 @@ class AlbumService {
|
|||||||
);
|
);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
album.activityEnabled = enabled;
|
album.activityEnabled = enabled;
|
||||||
await _db.writeTxn(() => _db.albums.put(album));
|
await _albumRepository.update(album);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -332,29 +332,29 @@ class AlbumService {
|
|||||||
|
|
||||||
Future<bool> deleteAlbum(Album album) async {
|
Future<bool> deleteAlbum(Album album) async {
|
||||||
try {
|
try {
|
||||||
final userId = Store.get(StoreKey.currentUser).isarId;
|
final user = Store.get(StoreKey.currentUser);
|
||||||
if (album.owner.value?.isarId == userId) {
|
if (album.owner.value?.isarId == user.isarId) {
|
||||||
await _apiService.albumsApi.deleteAlbum(album.remoteId!);
|
await _apiService.albumsApi.deleteAlbum(album.remoteId!);
|
||||||
}
|
}
|
||||||
if (album.shared) {
|
if (album.shared) {
|
||||||
final foreignAssets =
|
final foreignAssets =
|
||||||
await album.assets.filter().not().ownerIdEqualTo(userId).findAll();
|
await _assetRepository.getByAlbum(album, notOwnedBy: user);
|
||||||
await _db.writeTxn(() => _db.albums.delete(album.id));
|
await _albumRepository.delete(album.id);
|
||||||
final List<Album> albums =
|
|
||||||
await _db.albums.filter().sharedEqualTo(true).findAll();
|
final List<Album> albums = await _albumRepository.getAll(shared: true);
|
||||||
final List<Asset> existing = [];
|
final List<Asset> existing = [];
|
||||||
for (Album a in albums) {
|
for (Album album in albums) {
|
||||||
existing.addAll(
|
existing.addAll(
|
||||||
await a.assets.filter().not().ownerIdEqualTo(userId).findAll(),
|
await _assetRepository.getByAlbum(album, notOwnedBy: user),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
final List<int> idsToRemove =
|
final List<int> idsToRemove =
|
||||||
_syncService.sharedAssetsToRemove(foreignAssets, existing);
|
_syncService.sharedAssetsToRemove(foreignAssets, existing);
|
||||||
if (idsToRemove.isNotEmpty) {
|
if (idsToRemove.isNotEmpty) {
|
||||||
await _db.writeTxn(() => _db.assets.deleteAll(idsToRemove));
|
await _assetRepository.deleteById(idsToRemove);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
await _db.writeTxn(() => _db.albums.delete(album.id));
|
await _albumRepository.delete(album.id);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -390,7 +390,7 @@ class AlbumService {
|
|||||||
: response
|
: response
|
||||||
.where((e) => e.success)
|
.where((e) => e.success)
|
||||||
.map((e) => assets.firstWhere((a) => a.remoteId == e.id));
|
.map((e) => assets.firstWhere((a) => a.remoteId == e.id));
|
||||||
await _updateAssets(album.id, remove: toRemove);
|
await _updateAssets(album.id, remove: toRemove.toList());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -410,12 +410,10 @@ class AlbumService {
|
|||||||
);
|
);
|
||||||
|
|
||||||
album.sharedUsers.remove(user);
|
album.sharedUsers.remove(user);
|
||||||
await _db.writeTxn(() async {
|
await _albumRepository.removeUsers(album, [user]);
|
||||||
await album.sharedUsers.update(unlink: [user]);
|
final a = await _albumRepository.getById(album.id);
|
||||||
final a = await _db.albums.get(album.id);
|
// trigger watcher
|
||||||
// trigger watcher
|
await _albumRepository.update(a!);
|
||||||
await _db.albums.put(a!);
|
|
||||||
});
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -436,7 +434,7 @@ class AlbumService {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
album.name = newAlbumTitle;
|
album.name = newAlbumTitle;
|
||||||
await _db.writeTxn(() => _db.albums.put(album));
|
await _albumRepository.update(album);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -445,14 +443,8 @@ class AlbumService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Album?> getAlbumByName(String name, bool remoteOnly) async {
|
Future<Album?> getAlbumByName(String name, bool remoteOnly) =>
|
||||||
return _db.albums
|
_albumRepository.getByName(name, remote: remoteOnly ? true : null);
|
||||||
.filter()
|
|
||||||
.optional(remoteOnly, (q) => q.localIdIsNull())
|
|
||||||
.nameEqualTo(name)
|
|
||||||
.sharedEqualTo(false)
|
|
||||||
.findFirst();
|
|
||||||
}
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Add the uploaded asset to the selected albums
|
/// Add the uploaded asset to the selected albums
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ class AssetService {
|
|||||||
|
|
||||||
for (BackupCandidate candidate in candidates) {
|
for (BackupCandidate candidate in candidates) {
|
||||||
final asset = remoteAssets.firstWhereOrNull(
|
final asset = remoteAssets.firstWhereOrNull(
|
||||||
(a) => a.localId == candidate.asset.id,
|
(a) => a.localId == candidate.asset.localId,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (asset != null) {
|
if (asset != null) {
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|||||||
import 'package:immich_mobile/main.dart';
|
import 'package:immich_mobile/main.dart';
|
||||||
import 'package:immich_mobile/models/backup/backup_candidate.model.dart';
|
import 'package:immich_mobile/models/backup/backup_candidate.model.dart';
|
||||||
import 'package:immich_mobile/models/backup/success_upload_asset.model.dart';
|
import 'package:immich_mobile/models/backup/success_upload_asset.model.dart';
|
||||||
|
import 'package:immich_mobile/repositories/album.repository.dart';
|
||||||
|
import 'package:immich_mobile/repositories/asset.repository.dart';
|
||||||
|
import 'package:immich_mobile/repositories/backup.repository.dart';
|
||||||
|
import 'package:immich_mobile/repositories/album_media.repository.dart';
|
||||||
|
import 'package:immich_mobile/repositories/file_media.repository.dart';
|
||||||
|
import 'package:immich_mobile/repositories/user.repository.dart';
|
||||||
import 'package:immich_mobile/services/album.service.dart';
|
import 'package:immich_mobile/services/album.service.dart';
|
||||||
import 'package:immich_mobile/services/hash.service.dart';
|
import 'package:immich_mobile/services/hash.service.dart';
|
||||||
import 'package:immich_mobile/services/localization.service.dart';
|
import 'package:immich_mobile/services/localization.service.dart';
|
||||||
@@ -30,7 +36,7 @@ import 'package:immich_mobile/utils/diff.dart';
|
|||||||
import 'package:immich_mobile/utils/http_ssl_cert_override.dart';
|
import 'package:immich_mobile/utils/http_ssl_cert_override.dart';
|
||||||
import 'package:isar/isar.dart';
|
import 'package:isar/isar.dart';
|
||||||
import 'package:path_provider_ios/path_provider_ios.dart';
|
import 'package:path_provider_ios/path_provider_ios.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
import 'package:photo_manager/photo_manager.dart' show PMProgressHandler;
|
||||||
|
|
||||||
final backgroundServiceProvider = Provider(
|
final backgroundServiceProvider = Provider(
|
||||||
(ref) => BackgroundService(),
|
(ref) => BackgroundService(),
|
||||||
@@ -355,14 +361,34 @@ class BackgroundService {
|
|||||||
AppSettingsService settingService = AppSettingsService();
|
AppSettingsService settingService = AppSettingsService();
|
||||||
AppSettingsService settingsService = AppSettingsService();
|
AppSettingsService settingsService = AppSettingsService();
|
||||||
PartnerService partnerService = PartnerService(apiService, db);
|
PartnerService partnerService = PartnerService(apiService, db);
|
||||||
HashService hashService = HashService(db, this);
|
AlbumRepository albumRepository = AlbumRepository(db);
|
||||||
SyncService syncSerive = SyncService(db, hashService);
|
AssetRepository assetRepository = AssetRepository(db);
|
||||||
|
UserRepository userRepository = UserRepository(db);
|
||||||
|
BackupRepository backupAlbumRepository = BackupRepository(db);
|
||||||
|
AlbumMediaRepository albumMediaRepository = AlbumMediaRepository();
|
||||||
|
FileMediaRepository fileMediaRepository = FileMediaRepository();
|
||||||
|
HashService hashService = HashService(db, this, albumMediaRepository);
|
||||||
|
SyncService syncSerive = SyncService(db, hashService, albumMediaRepository);
|
||||||
UserService userService =
|
UserService userService =
|
||||||
UserService(apiService, db, syncSerive, partnerService);
|
UserService(apiService, db, syncSerive, partnerService);
|
||||||
AlbumService albumService =
|
AlbumService albumService = AlbumService(
|
||||||
AlbumService(apiService, userService, syncSerive, db);
|
apiService,
|
||||||
BackupService backupService =
|
userService,
|
||||||
BackupService(apiService, db, settingService, albumService);
|
syncSerive,
|
||||||
|
albumRepository,
|
||||||
|
assetRepository,
|
||||||
|
userRepository,
|
||||||
|
backupAlbumRepository,
|
||||||
|
albumMediaRepository,
|
||||||
|
);
|
||||||
|
BackupService backupService = BackupService(
|
||||||
|
apiService,
|
||||||
|
db,
|
||||||
|
settingService,
|
||||||
|
albumService,
|
||||||
|
albumMediaRepository,
|
||||||
|
fileMediaRepository,
|
||||||
|
);
|
||||||
|
|
||||||
final selectedAlbums = backupService.selectedAlbumsQuery().findAllSync();
|
final selectedAlbums = backupService.selectedAlbumsQuery().findAllSync();
|
||||||
final excludedAlbums = backupService.excludedAlbumsQuery().findAllSync();
|
final excludedAlbums = backupService.excludedAlbumsQuery().findAllSync();
|
||||||
@@ -370,7 +396,7 @@ class BackgroundService {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
await PhotoManager.setIgnorePermissionCheck(true);
|
await fileMediaRepository.enableBackgroundAccess();
|
||||||
|
|
||||||
do {
|
do {
|
||||||
final bool backupOk = await _runBackup(
|
final bool backupOk = await _runBackup(
|
||||||
|
|||||||
@@ -6,9 +6,13 @@ import 'package:cancellation_token_http/http.dart' as http;
|
|||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:immich_mobile/entities/album.entity.dart';
|
||||||
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
import 'package:immich_mobile/entities/backup_album.entity.dart';
|
import 'package:immich_mobile/entities/backup_album.entity.dart';
|
||||||
import 'package:immich_mobile/entities/duplicated_asset.entity.dart';
|
import 'package:immich_mobile/entities/duplicated_asset.entity.dart';
|
||||||
import 'package:immich_mobile/entities/store.entity.dart';
|
import 'package:immich_mobile/entities/store.entity.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/album_media.interface.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/file_media.interface.dart';
|
||||||
import 'package:immich_mobile/models/backup/backup_candidate.model.dart';
|
import 'package:immich_mobile/models/backup/backup_candidate.model.dart';
|
||||||
import 'package:immich_mobile/models/backup/current_upload_asset.model.dart';
|
import 'package:immich_mobile/models/backup/current_upload_asset.model.dart';
|
||||||
import 'package:immich_mobile/models/backup/error_upload_asset.model.dart';
|
import 'package:immich_mobile/models/backup/error_upload_asset.model.dart';
|
||||||
@@ -16,6 +20,8 @@ import 'package:immich_mobile/models/backup/success_upload_asset.model.dart';
|
|||||||
import 'package:immich_mobile/providers/api.provider.dart';
|
import 'package:immich_mobile/providers/api.provider.dart';
|
||||||
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
||||||
import 'package:immich_mobile/providers/db.provider.dart';
|
import 'package:immich_mobile/providers/db.provider.dart';
|
||||||
|
import 'package:immich_mobile/repositories/album_media.repository.dart';
|
||||||
|
import 'package:immich_mobile/repositories/file_media.repository.dart';
|
||||||
import 'package:immich_mobile/services/album.service.dart';
|
import 'package:immich_mobile/services/album.service.dart';
|
||||||
import 'package:immich_mobile/services/api.service.dart';
|
import 'package:immich_mobile/services/api.service.dart';
|
||||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||||
@@ -24,7 +30,7 @@ import 'package:logging/logging.dart';
|
|||||||
import 'package:openapi/api.dart';
|
import 'package:openapi/api.dart';
|
||||||
import 'package:path/path.dart' as p;
|
import 'package:path/path.dart' as p;
|
||||||
import 'package:permission_handler/permission_handler.dart' as pm;
|
import 'package:permission_handler/permission_handler.dart' as pm;
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
import 'package:photo_manager/photo_manager.dart' show PMProgressHandler;
|
||||||
|
|
||||||
final backupServiceProvider = Provider(
|
final backupServiceProvider = Provider(
|
||||||
(ref) => BackupService(
|
(ref) => BackupService(
|
||||||
@@ -32,6 +38,8 @@ final backupServiceProvider = Provider(
|
|||||||
ref.watch(dbProvider),
|
ref.watch(dbProvider),
|
||||||
ref.watch(appSettingsServiceProvider),
|
ref.watch(appSettingsServiceProvider),
|
||||||
ref.watch(albumServiceProvider),
|
ref.watch(albumServiceProvider),
|
||||||
|
ref.watch(albumMediaRepositoryProvider),
|
||||||
|
ref.watch(fileMediaRepositoryProvider),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -42,12 +50,16 @@ class BackupService {
|
|||||||
final Logger _log = Logger("BackupService");
|
final Logger _log = Logger("BackupService");
|
||||||
final AppSettingsService _appSetting;
|
final AppSettingsService _appSetting;
|
||||||
final AlbumService _albumService;
|
final AlbumService _albumService;
|
||||||
|
final IAlbumMediaRepository _albumMediaRepository;
|
||||||
|
final IFileMediaRepository _fileMediaRepository;
|
||||||
|
|
||||||
BackupService(
|
BackupService(
|
||||||
this._apiService,
|
this._apiService,
|
||||||
this._db,
|
this._db,
|
||||||
this._appSetting,
|
this._appSetting,
|
||||||
this._albumService,
|
this._albumService,
|
||||||
|
this._albumMediaRepository,
|
||||||
|
this._fileMediaRepository,
|
||||||
);
|
);
|
||||||
|
|
||||||
Future<List<String>?> getDeviceBackupAsset() async {
|
Future<List<String>?> getDeviceBackupAsset() async {
|
||||||
@@ -86,44 +98,17 @@ class BackupService {
|
|||||||
List<BackupAlbum> excludedBackupAlbums, {
|
List<BackupAlbum> excludedBackupAlbums, {
|
||||||
bool useTimeFilter = true,
|
bool useTimeFilter = true,
|
||||||
}) async {
|
}) async {
|
||||||
final filter = FilterOptionGroup(
|
|
||||||
containsPathModified: true,
|
|
||||||
orders: [const OrderOption(type: OrderOptionType.updateDate)],
|
|
||||||
// title is needed to create Assets
|
|
||||||
imageOption: const FilterOption(needTitle: true),
|
|
||||||
videoOption: const FilterOption(needTitle: true),
|
|
||||||
);
|
|
||||||
final now = DateTime.now();
|
final now = DateTime.now();
|
||||||
|
|
||||||
final List<AssetPathEntity?> selectedAlbums =
|
|
||||||
await _loadAlbumsWithTimeFilter(
|
|
||||||
selectedBackupAlbums,
|
|
||||||
filter,
|
|
||||||
now,
|
|
||||||
useTimeFilter: useTimeFilter,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (selectedAlbums.every((e) => e == null)) {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
final List<AssetPathEntity?> excludedAlbums =
|
|
||||||
await _loadAlbumsWithTimeFilter(
|
|
||||||
excludedBackupAlbums,
|
|
||||||
filter,
|
|
||||||
now,
|
|
||||||
useTimeFilter: useTimeFilter,
|
|
||||||
);
|
|
||||||
|
|
||||||
final Set<BackupCandidate> toAdd = await _fetchAssetsAndUpdateLastBackup(
|
final Set<BackupCandidate> toAdd = await _fetchAssetsAndUpdateLastBackup(
|
||||||
selectedAlbums,
|
|
||||||
selectedBackupAlbums,
|
selectedBackupAlbums,
|
||||||
now,
|
now,
|
||||||
useTimeFilter: useTimeFilter,
|
useTimeFilter: useTimeFilter,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (toAdd.isEmpty) return {};
|
||||||
|
|
||||||
final Set<BackupCandidate> toRemove = await _fetchAssetsAndUpdateLastBackup(
|
final Set<BackupCandidate> toRemove = await _fetchAssetsAndUpdateLastBackup(
|
||||||
excludedAlbums,
|
|
||||||
excludedBackupAlbums,
|
excludedBackupAlbums,
|
||||||
now,
|
now,
|
||||||
useTimeFilter: useTimeFilter,
|
useTimeFilter: useTimeFilter,
|
||||||
@@ -132,92 +117,62 @@ class BackupService {
|
|||||||
return toAdd.difference(toRemove);
|
return toAdd.difference(toRemove);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<AssetPathEntity?>> _loadAlbumsWithTimeFilter(
|
|
||||||
List<BackupAlbum> albums,
|
|
||||||
FilterOptionGroup filter,
|
|
||||||
DateTime now, {
|
|
||||||
bool useTimeFilter = true,
|
|
||||||
}) async {
|
|
||||||
List<AssetPathEntity?> result = [];
|
|
||||||
for (BackupAlbum backupAlbum in albums) {
|
|
||||||
try {
|
|
||||||
final optionGroup = useTimeFilter
|
|
||||||
? filter.copyWith(
|
|
||||||
updateTimeCond: DateTimeCond(
|
|
||||||
// subtract 2 seconds to prevent missing assets due to rounding issues
|
|
||||||
min: backupAlbum.lastBackup
|
|
||||||
.subtract(const Duration(seconds: 2)),
|
|
||||||
max: now,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: filter;
|
|
||||||
|
|
||||||
final AssetPathEntity album =
|
|
||||||
await AssetPathEntity.obtainPathFromProperties(
|
|
||||||
id: backupAlbum.id,
|
|
||||||
optionGroup: optionGroup,
|
|
||||||
maxDateTimeToNow: false,
|
|
||||||
);
|
|
||||||
|
|
||||||
result.add(album);
|
|
||||||
} on StateError {
|
|
||||||
// either there are no assets matching the filter criteria OR the album no longer exists
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<Set<BackupCandidate>> _fetchAssetsAndUpdateLastBackup(
|
Future<Set<BackupCandidate>> _fetchAssetsAndUpdateLastBackup(
|
||||||
List<AssetPathEntity?> localAlbums,
|
|
||||||
List<BackupAlbum> backupAlbums,
|
List<BackupAlbum> backupAlbums,
|
||||||
DateTime now, {
|
DateTime now, {
|
||||||
bool useTimeFilter = true,
|
bool useTimeFilter = true,
|
||||||
}) async {
|
}) async {
|
||||||
Set<BackupCandidate> candidate = {};
|
Set<BackupCandidate> candidates = {};
|
||||||
|
|
||||||
for (int i = 0; i < localAlbums.length; i++) {
|
for (final BackupAlbum backupAlbum in backupAlbums) {
|
||||||
final localAlbum = localAlbums[i];
|
final Album localAlbum;
|
||||||
if (localAlbum == null) {
|
try {
|
||||||
|
localAlbum = await _albumMediaRepository.get(backupAlbum.id);
|
||||||
|
} on StateError {
|
||||||
|
// the album no longer exists
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (useTimeFilter &&
|
if (useTimeFilter &&
|
||||||
localAlbum.lastModified?.isBefore(backupAlbums[i].lastBackup) ==
|
localAlbum.modifiedAt.isBefore(backupAlbum.lastBackup)) {
|
||||||
true) {
|
continue;
|
||||||
|
}
|
||||||
|
final List<Asset> assets;
|
||||||
|
try {
|
||||||
|
assets = await _albumMediaRepository.getAssets(
|
||||||
|
backupAlbum.id,
|
||||||
|
modifiedFrom: useTimeFilter
|
||||||
|
?
|
||||||
|
// subtract 2 seconds to prevent missing assets due to rounding issues
|
||||||
|
backupAlbum.lastBackup.subtract(const Duration(seconds: 2))
|
||||||
|
: null,
|
||||||
|
modifiedUntil: useTimeFilter ? now : null,
|
||||||
|
);
|
||||||
|
} on StateError {
|
||||||
|
// either there are no assets matching the filter criteria OR the album no longer exists
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
final assets = await localAlbum.getAssetListRange(
|
|
||||||
start: 0,
|
|
||||||
end: await localAlbum.assetCountAsync,
|
|
||||||
);
|
|
||||||
|
|
||||||
// Add album's name to the asset info
|
// Add album's name to the asset info
|
||||||
for (final asset in assets) {
|
for (final asset in assets) {
|
||||||
List<String> albumNames = [localAlbum.name];
|
List<String> albumNames = [localAlbum.name];
|
||||||
|
|
||||||
final existingAsset = candidate.firstWhereOrNull(
|
final existingAsset = candidates.firstWhereOrNull(
|
||||||
(a) => a.asset.id == asset.id,
|
(candidate) => candidate.asset.localId == asset.localId,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (existingAsset != null) {
|
if (existingAsset != null) {
|
||||||
albumNames.addAll(existingAsset.albumNames);
|
albumNames.addAll(existingAsset.albumNames);
|
||||||
candidate.remove(existingAsset);
|
candidates.remove(existingAsset);
|
||||||
}
|
}
|
||||||
|
|
||||||
candidate.add(
|
candidates.add(BackupCandidate(asset: asset, albumNames: albumNames));
|
||||||
BackupCandidate(
|
|
||||||
asset: asset,
|
|
||||||
albumNames: albumNames,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
backupAlbums[i].lastBackup = now;
|
backupAlbum.lastBackup = now;
|
||||||
}
|
}
|
||||||
|
|
||||||
return candidate;
|
return candidates;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a new list of assets not yet uploaded
|
/// Returns a new list of assets not yet uploaded
|
||||||
@@ -230,7 +185,7 @@ class BackupService {
|
|||||||
|
|
||||||
final Set<String> duplicatedAssetIds = await getDuplicatedAssetIds();
|
final Set<String> duplicatedAssetIds = await getDuplicatedAssetIds();
|
||||||
candidates.removeWhere(
|
candidates.removeWhere(
|
||||||
(candidate) => duplicatedAssetIds.contains(candidate.asset.id),
|
(candidate) => duplicatedAssetIds.contains(candidate.asset.localId),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (candidates.isEmpty) {
|
if (candidates.isEmpty) {
|
||||||
@@ -243,7 +198,7 @@ class BackupService {
|
|||||||
final CheckExistingAssetsResponseDto? duplicates =
|
final CheckExistingAssetsResponseDto? duplicates =
|
||||||
await _apiService.assetsApi.checkExistingAssets(
|
await _apiService.assetsApi.checkExistingAssets(
|
||||||
CheckExistingAssetsDto(
|
CheckExistingAssetsDto(
|
||||||
deviceAssetIds: candidates.map((c) => c.asset.id).toList(),
|
deviceAssetIds: candidates.map((c) => c.asset.localId!).toList(),
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -259,7 +214,7 @@ class BackupService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (existing.isNotEmpty) {
|
if (existing.isNotEmpty) {
|
||||||
candidates.removeWhere((c) => existing.contains(c.asset.id));
|
candidates.removeWhere((c) => existing.contains(c.asset.localId));
|
||||||
}
|
}
|
||||||
|
|
||||||
return candidates;
|
return candidates;
|
||||||
@@ -278,7 +233,7 @@ class BackupService {
|
|||||||
|
|
||||||
// DON'T KNOW WHY BUT THIS HELPS BACKGROUND BACKUP TO WORK ON IOS
|
// DON'T KNOW WHY BUT THIS HELPS BACKGROUND BACKUP TO WORK ON IOS
|
||||||
if (Platform.isIOS) {
|
if (Platform.isIOS) {
|
||||||
await PhotoManager.requestPermissionExtend();
|
await _fileMediaRepository.requestExtendedPermissions();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -289,9 +244,9 @@ class BackupService {
|
|||||||
List<BackupCandidate> _sortPhotosFirst(List<BackupCandidate> candidates) {
|
List<BackupCandidate> _sortPhotosFirst(List<BackupCandidate> candidates) {
|
||||||
return candidates.sorted(
|
return candidates.sorted(
|
||||||
(a, b) {
|
(a, b) {
|
||||||
final cmp = a.asset.typeInt - b.asset.typeInt;
|
final cmp = a.asset.type.index - b.asset.type.index;
|
||||||
if (cmp != 0) return cmp;
|
if (cmp != 0) return cmp;
|
||||||
return a.asset.createDateTime.compareTo(b.asset.createDateTime);
|
return a.asset.fileCreatedAt.compareTo(b.asset.fileCreatedAt);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -325,13 +280,13 @@ class BackupService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (final candidate in candidates) {
|
for (final candidate in candidates) {
|
||||||
final AssetEntity entity = candidate.asset;
|
final Asset asset = candidate.asset;
|
||||||
File? file;
|
File? file;
|
||||||
File? livePhotoFile;
|
File? livePhotoFile;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final isAvailableLocally =
|
final isAvailableLocally =
|
||||||
await entity.isLocallyAvailable(isOrigin: true);
|
await asset.local!.isLocallyAvailable(isOrigin: true);
|
||||||
|
|
||||||
// Handle getting files from iCloud
|
// Handle getting files from iCloud
|
||||||
if (!isAvailableLocally && Platform.isIOS) {
|
if (!isAvailableLocally && Platform.isIOS) {
|
||||||
@@ -342,39 +297,41 @@ class BackupService {
|
|||||||
|
|
||||||
onCurrentAsset(
|
onCurrentAsset(
|
||||||
CurrentUploadAsset(
|
CurrentUploadAsset(
|
||||||
id: entity.id,
|
id: asset.localId!,
|
||||||
fileCreatedAt: entity.createDateTime.year == 1970
|
fileCreatedAt: asset.fileCreatedAt.year == 1970
|
||||||
? entity.modifiedDateTime
|
? asset.fileModifiedAt
|
||||||
: entity.createDateTime,
|
: asset.fileCreatedAt,
|
||||||
fileName: await entity.titleAsync,
|
fileName: asset.fileName,
|
||||||
fileType: _getAssetType(entity.type),
|
fileType: _getAssetType(asset.type),
|
||||||
iCloudAsset: true,
|
iCloudAsset: true,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
file = await entity.loadFile(progressHandler: pmProgressHandler);
|
file =
|
||||||
if (entity.isLivePhoto) {
|
await asset.local!.loadFile(progressHandler: pmProgressHandler);
|
||||||
livePhotoFile = await entity.loadFile(
|
if (asset.local!.isLivePhoto) {
|
||||||
|
livePhotoFile = await asset.local!.loadFile(
|
||||||
withSubtype: true,
|
withSubtype: true,
|
||||||
progressHandler: pmProgressHandler,
|
progressHandler: pmProgressHandler,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (entity.type == AssetType.video) {
|
if (asset.type == AssetType.video) {
|
||||||
file = await entity.originFile;
|
file = await asset.local!.originFile;
|
||||||
} else {
|
} else {
|
||||||
file = await entity.originFile.timeout(const Duration(seconds: 5));
|
file = await asset.local!.originFile
|
||||||
if (entity.isLivePhoto) {
|
.timeout(const Duration(seconds: 5));
|
||||||
livePhotoFile = await entity.originFileWithSubtype
|
if (asset.local!.isLivePhoto) {
|
||||||
|
livePhotoFile = await asset.local!.originFileWithSubtype
|
||||||
.timeout(const Duration(seconds: 5));
|
.timeout(const Duration(seconds: 5));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
String originalFileName = await entity.titleAsync;
|
String originalFileName = asset.fileName;
|
||||||
|
|
||||||
if (entity.isLivePhoto) {
|
if (asset.local!.isLivePhoto) {
|
||||||
if (livePhotoFile == null) {
|
if (livePhotoFile == null) {
|
||||||
_log.warning(
|
_log.warning(
|
||||||
"Failed to obtain motion part of the livePhoto - $originalFileName",
|
"Failed to obtain motion part of the livePhoto - $originalFileName",
|
||||||
@@ -398,31 +355,31 @@ class BackupService {
|
|||||||
|
|
||||||
baseRequest.headers.addAll(ApiService.getRequestHeaders());
|
baseRequest.headers.addAll(ApiService.getRequestHeaders());
|
||||||
baseRequest.headers["Transfer-Encoding"] = "chunked";
|
baseRequest.headers["Transfer-Encoding"] = "chunked";
|
||||||
baseRequest.fields['deviceAssetId'] = entity.id;
|
baseRequest.fields['deviceAssetId'] = asset.localId!;
|
||||||
baseRequest.fields['deviceId'] = deviceId;
|
baseRequest.fields['deviceId'] = deviceId;
|
||||||
baseRequest.fields['fileCreatedAt'] =
|
baseRequest.fields['fileCreatedAt'] =
|
||||||
entity.createDateTime.toUtc().toIso8601String();
|
asset.fileCreatedAt.toUtc().toIso8601String();
|
||||||
baseRequest.fields['fileModifiedAt'] =
|
baseRequest.fields['fileModifiedAt'] =
|
||||||
entity.modifiedDateTime.toUtc().toIso8601String();
|
asset.fileModifiedAt.toUtc().toIso8601String();
|
||||||
baseRequest.fields['isFavorite'] = entity.isFavorite.toString();
|
baseRequest.fields['isFavorite'] = asset.isFavorite.toString();
|
||||||
baseRequest.fields['duration'] = entity.videoDuration.toString();
|
baseRequest.fields['duration'] = asset.duration.toString();
|
||||||
baseRequest.files.add(assetRawUploadData);
|
baseRequest.files.add(assetRawUploadData);
|
||||||
|
|
||||||
onCurrentAsset(
|
onCurrentAsset(
|
||||||
CurrentUploadAsset(
|
CurrentUploadAsset(
|
||||||
id: entity.id,
|
id: asset.localId!,
|
||||||
fileCreatedAt: entity.createDateTime.year == 1970
|
fileCreatedAt: asset.fileCreatedAt.year == 1970
|
||||||
? entity.modifiedDateTime
|
? asset.fileModifiedAt
|
||||||
: entity.createDateTime,
|
: asset.fileCreatedAt,
|
||||||
fileName: originalFileName,
|
fileName: originalFileName,
|
||||||
fileType: _getAssetType(entity.type),
|
fileType: _getAssetType(asset.type),
|
||||||
fileSize: file.lengthSync(),
|
fileSize: file.lengthSync(),
|
||||||
iCloudAsset: false,
|
iCloudAsset: false,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
String? livePhotoVideoId;
|
String? livePhotoVideoId;
|
||||||
if (entity.isLivePhoto && livePhotoFile != null) {
|
if (asset.local!.isLivePhoto && livePhotoFile != null) {
|
||||||
livePhotoVideoId = await uploadLivePhotoVideo(
|
livePhotoVideoId = await uploadLivePhotoVideo(
|
||||||
originalFileName,
|
originalFileName,
|
||||||
livePhotoFile,
|
livePhotoFile,
|
||||||
@@ -448,16 +405,16 @@ class BackupService {
|
|||||||
final errorMessage = error['message'] ?? error['error'];
|
final errorMessage = error['message'] ?? error['error'];
|
||||||
|
|
||||||
debugPrint(
|
debugPrint(
|
||||||
"Error(${error['statusCode']}) uploading ${entity.id} | $originalFileName | Created on ${entity.createDateTime} | ${error['error']}",
|
"Error(${error['statusCode']}) uploading ${asset.localId} | $originalFileName | Created on ${asset.fileCreatedAt} | ${error['error']}",
|
||||||
);
|
);
|
||||||
|
|
||||||
onError(
|
onError(
|
||||||
ErrorUploadAsset(
|
ErrorUploadAsset(
|
||||||
asset: entity,
|
asset: asset,
|
||||||
id: entity.id,
|
id: asset.localId!,
|
||||||
fileCreatedAt: entity.createDateTime,
|
fileCreatedAt: asset.fileCreatedAt,
|
||||||
fileName: originalFileName,
|
fileName: originalFileName,
|
||||||
fileType: _getAssetType(entity.type),
|
fileType: _getAssetType(candidate.asset.type),
|
||||||
errorMessage: errorMessage,
|
errorMessage: errorMessage,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -473,7 +430,7 @@ class BackupService {
|
|||||||
bool isDuplicate = false;
|
bool isDuplicate = false;
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
isDuplicate = true;
|
isDuplicate = true;
|
||||||
duplicatedAssetIds.add(entity.id);
|
duplicatedAssetIds.add(asset.localId!);
|
||||||
}
|
}
|
||||||
|
|
||||||
onSuccess(
|
onSuccess(
|
||||||
|
|||||||
@@ -8,17 +8,19 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|||||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
import 'package:immich_mobile/entities/exif_info.entity.dart';
|
import 'package:immich_mobile/entities/exif_info.entity.dart';
|
||||||
import 'package:immich_mobile/entities/store.entity.dart';
|
import 'package:immich_mobile/entities/store.entity.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/file_media.interface.dart';
|
||||||
import 'package:immich_mobile/providers/db.provider.dart';
|
import 'package:immich_mobile/providers/db.provider.dart';
|
||||||
|
import 'package:immich_mobile/repositories/file_media.repository.dart';
|
||||||
import 'package:immich_mobile/services/api.service.dart';
|
import 'package:immich_mobile/services/api.service.dart';
|
||||||
import 'package:immich_mobile/utils/diff.dart';
|
import 'package:immich_mobile/utils/diff.dart';
|
||||||
import 'package:isar/isar.dart';
|
import 'package:isar/isar.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart' show PhotoManager;
|
|
||||||
|
|
||||||
/// Finds duplicates originating from missing EXIF information
|
/// Finds duplicates originating from missing EXIF information
|
||||||
class BackupVerificationService {
|
class BackupVerificationService {
|
||||||
final Isar _db;
|
final Isar _db;
|
||||||
|
final IFileMediaRepository _fileMediaRepository;
|
||||||
|
|
||||||
BackupVerificationService(this._db);
|
BackupVerificationService(this._db, this._fileMediaRepository);
|
||||||
|
|
||||||
/// Returns at most [limit] assets that were backed up without exif
|
/// Returns at most [limit] assets that were backed up without exif
|
||||||
Future<List<Asset>> findWronglyBackedUpAssets({int limit = 100}) async {
|
Future<List<Asset>> findWronglyBackedUpAssets({int limit = 100}) async {
|
||||||
@@ -71,6 +73,7 @@ class BackupVerificationService {
|
|||||||
auth: Store.get(StoreKey.accessToken),
|
auth: Store.get(StoreKey.accessToken),
|
||||||
endpoint: Store.get(StoreKey.serverEndpoint),
|
endpoint: Store.get(StoreKey.serverEndpoint),
|
||||||
rootIsolateToken: isolateToken,
|
rootIsolateToken: isolateToken,
|
||||||
|
fileMediaRepository: _fileMediaRepository,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
final upper = compute(
|
final upper = compute(
|
||||||
@@ -81,6 +84,7 @@ class BackupVerificationService {
|
|||||||
auth: Store.get(StoreKey.accessToken),
|
auth: Store.get(StoreKey.accessToken),
|
||||||
endpoint: Store.get(StoreKey.serverEndpoint),
|
endpoint: Store.get(StoreKey.serverEndpoint),
|
||||||
rootIsolateToken: isolateToken,
|
rootIsolateToken: isolateToken,
|
||||||
|
fileMediaRepository: _fileMediaRepository,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
toDelete = await lower + await upper;
|
toDelete = await lower + await upper;
|
||||||
@@ -93,6 +97,7 @@ class BackupVerificationService {
|
|||||||
auth: Store.get(StoreKey.accessToken),
|
auth: Store.get(StoreKey.accessToken),
|
||||||
endpoint: Store.get(StoreKey.serverEndpoint),
|
endpoint: Store.get(StoreKey.serverEndpoint),
|
||||||
rootIsolateToken: isolateToken,
|
rootIsolateToken: isolateToken,
|
||||||
|
fileMediaRepository: _fileMediaRepository,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -106,12 +111,13 @@ class BackupVerificationService {
|
|||||||
String auth,
|
String auth,
|
||||||
String endpoint,
|
String endpoint,
|
||||||
RootIsolateToken rootIsolateToken,
|
RootIsolateToken rootIsolateToken,
|
||||||
|
IFileMediaRepository fileMediaRepository,
|
||||||
}) tuple,
|
}) tuple,
|
||||||
) async {
|
) async {
|
||||||
assert(tuple.deleteCandidates.length == tuple.originals.length);
|
assert(tuple.deleteCandidates.length == tuple.originals.length);
|
||||||
final List<Asset> result = [];
|
final List<Asset> result = [];
|
||||||
BackgroundIsolateBinaryMessenger.ensureInitialized(tuple.rootIsolateToken);
|
BackgroundIsolateBinaryMessenger.ensureInitialized(tuple.rootIsolateToken);
|
||||||
await PhotoManager.setIgnorePermissionCheck(true);
|
await tuple.fileMediaRepository.enableBackgroundAccess();
|
||||||
final ApiService apiService = ApiService();
|
final ApiService apiService = ApiService();
|
||||||
apiService.setEndpoint(tuple.endpoint);
|
apiService.setEndpoint(tuple.endpoint);
|
||||||
apiService.setAccessToken(tuple.auth);
|
apiService.setAccessToken(tuple.auth);
|
||||||
@@ -228,5 +234,6 @@ class BackupVerificationService {
|
|||||||
final backupVerificationServiceProvider = Provider(
|
final backupVerificationServiceProvider = Provider(
|
||||||
(ref) => BackupVerificationService(
|
(ref) => BackupVerificationService(
|
||||||
ref.watch(dbProvider),
|
ref.watch(dbProvider),
|
||||||
|
ref.watch(fileMediaRepositoryProvider),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ import 'dart:io';
|
|||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:immich_mobile/entities/album.entity.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/album_media.interface.dart';
|
||||||
|
import 'package:immich_mobile/repositories/album_media.repository.dart';
|
||||||
import 'package:immich_mobile/services/background.service.dart';
|
import 'package:immich_mobile/services/background.service.dart';
|
||||||
import 'package:immich_mobile/entities/android_device_asset.entity.dart';
|
import 'package:immich_mobile/entities/android_device_asset.entity.dart';
|
||||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
@@ -11,38 +14,46 @@ import 'package:immich_mobile/providers/db.provider.dart';
|
|||||||
import 'package:immich_mobile/extensions/string_extensions.dart';
|
import 'package:immich_mobile/extensions/string_extensions.dart';
|
||||||
import 'package:isar/isar.dart';
|
import 'package:isar/isar.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
|
||||||
|
|
||||||
class HashService {
|
class HashService {
|
||||||
HashService(this._db, this._backgroundService);
|
HashService(this._db, this._backgroundService, this._albumMediaRepository);
|
||||||
final Isar _db;
|
final Isar _db;
|
||||||
final BackgroundService _backgroundService;
|
final BackgroundService _backgroundService;
|
||||||
|
final IAlbumMediaRepository _albumMediaRepository;
|
||||||
final _log = Logger('HashService');
|
final _log = Logger('HashService');
|
||||||
|
|
||||||
/// Returns all assets that were successfully hashed
|
/// Returns all assets that were successfully hashed
|
||||||
Future<List<Asset>> getHashedAssets(
|
Future<List<Asset>> getHashedAssets(
|
||||||
AssetPathEntity album, {
|
Album album, {
|
||||||
int start = 0,
|
int start = 0,
|
||||||
int end = 0x7fffffffffffffff,
|
int end = 0x7fffffffffffffff,
|
||||||
|
DateTime? modifiedFrom,
|
||||||
|
DateTime? modifiedUntil,
|
||||||
Set<String>? excludedAssets,
|
Set<String>? excludedAssets,
|
||||||
}) async {
|
}) async {
|
||||||
final entities = await album.getAssetListRange(start: start, end: end);
|
final entities = await _albumMediaRepository.getAssets(
|
||||||
|
album.localId!,
|
||||||
|
start: start,
|
||||||
|
end: end,
|
||||||
|
modifiedFrom: modifiedFrom,
|
||||||
|
modifiedUntil: modifiedUntil,
|
||||||
|
);
|
||||||
final filtered = excludedAssets == null
|
final filtered = excludedAssets == null
|
||||||
? entities
|
? entities
|
||||||
: entities.where((e) => !excludedAssets.contains(e.id)).toList();
|
: entities.where((e) => !excludedAssets.contains(e.localId!)).toList();
|
||||||
return _hashAssets(filtered);
|
return _hashAssets(filtered);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Converts a list of [AssetEntity]s to [Asset]s including only those
|
/// Processes a list of local [Asset]s, storing their hash and returning only those
|
||||||
/// that were successfully hashed. Hashes are looked up in a DB table
|
/// that were successfully hashed. Hashes are looked up in a DB table
|
||||||
/// [AndroidDeviceAsset] / [IOSDeviceAsset] by local id. Only missing
|
/// [AndroidDeviceAsset] / [IOSDeviceAsset] by local id. Only missing
|
||||||
/// entries are newly hashed and added to the DB table.
|
/// entries are newly hashed and added to the DB table.
|
||||||
Future<List<Asset>> _hashAssets(List<AssetEntity> assetEntities) async {
|
Future<List<Asset>> _hashAssets(List<Asset> assets) async {
|
||||||
const int batchFileCount = 128;
|
const int batchFileCount = 128;
|
||||||
const int batchDataSize = 1024 * 1024 * 1024; // 1GB
|
const int batchDataSize = 1024 * 1024 * 1024; // 1GB
|
||||||
|
|
||||||
final ids = assetEntities
|
final ids = assets
|
||||||
.map(Platform.isAndroid ? (a) => a.id.toInt() : (a) => a.id)
|
.map(Platform.isAndroid ? (a) => a.localId!.toInt() : (a) => a.localId!)
|
||||||
.toList();
|
.toList();
|
||||||
final List<DeviceAsset?> hashes = await _lookupHashes(ids);
|
final List<DeviceAsset?> hashes = await _lookupHashes(ids);
|
||||||
final List<DeviceAsset> toAdd = [];
|
final List<DeviceAsset> toAdd = [];
|
||||||
@@ -50,22 +61,16 @@ class HashService {
|
|||||||
|
|
||||||
int bytes = 0;
|
int bytes = 0;
|
||||||
|
|
||||||
for (int i = 0; i < assetEntities.length; i++) {
|
for (int i = 0; i < assets.length; i++) {
|
||||||
if (hashes[i] != null) {
|
if (hashes[i] != null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
final file = await assetEntities[i].originFile;
|
final file = await assets[i].local!.originFile;
|
||||||
if (file == null) {
|
if (file == null) {
|
||||||
final fileName = await assetEntities[i].titleAsync.catchError((error) {
|
final fileName = assets[i].fileName;
|
||||||
_log.warning(
|
|
||||||
"Failed to get title for asset ${assetEntities[i].id}",
|
|
||||||
);
|
|
||||||
|
|
||||||
return "";
|
|
||||||
});
|
|
||||||
|
|
||||||
_log.warning(
|
_log.warning(
|
||||||
"Failed to get file for asset ${assetEntities[i].id}, name: $fileName, created on: ${assetEntities[i].createDateTime}, skipping",
|
"Failed to get file for asset ${assets[i].localId}, name: $fileName, created on: ${assets[i].fileCreatedAt}, skipping",
|
||||||
);
|
);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -86,7 +91,7 @@ class HashService {
|
|||||||
if (toHash.isNotEmpty) {
|
if (toHash.isNotEmpty) {
|
||||||
await _processBatch(toHash, toAdd);
|
await _processBatch(toHash, toAdd);
|
||||||
}
|
}
|
||||||
return _mapAllHashedAssets(assetEntities, hashes);
|
return _getHashedAssets(assets, hashes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Lookup hashes of assets by their local ID
|
/// Lookup hashes of assets by their local ID
|
||||||
@@ -133,15 +138,16 @@ class HashService {
|
|||||||
return hashes;
|
return hashes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Converts [AssetEntity]s that were successfully hashed to [Asset]s
|
/// Returns all successfully hashed [Asset]s with their hash value set
|
||||||
List<Asset> _mapAllHashedAssets(
|
List<Asset> _getHashedAssets(
|
||||||
List<AssetEntity> assets,
|
List<Asset> assets,
|
||||||
List<DeviceAsset?> hashes,
|
List<DeviceAsset?> hashes,
|
||||||
) {
|
) {
|
||||||
final List<Asset> result = [];
|
final List<Asset> result = [];
|
||||||
for (int i = 0; i < assets.length; i++) {
|
for (int i = 0; i < assets.length; i++) {
|
||||||
if (hashes[i] != null && hashes[i]!.hash.isNotEmpty) {
|
if (hashes[i] != null && hashes[i]!.hash.isNotEmpty) {
|
||||||
result.add(Asset.local(assets[i], hashes[i]!.hash));
|
assets[i].byteHash = hashes[i]!.hash;
|
||||||
|
result.add(assets[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@@ -152,5 +158,6 @@ final hashServiceProvider = Provider(
|
|||||||
(ref) => HashService(
|
(ref) => HashService(
|
||||||
ref.watch(dbProvider),
|
ref.watch(dbProvider),
|
||||||
ref.watch(backgroundServiceProvider),
|
ref.watch(backgroundServiceProvider),
|
||||||
|
ref.watch(albumMediaRepositoryProvider),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,21 +3,27 @@ import 'dart:io';
|
|||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:immich_mobile/extensions/response_extensions.dart';
|
import 'package:immich_mobile/extensions/response_extensions.dart';
|
||||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/file_media.interface.dart';
|
||||||
import 'package:immich_mobile/providers/api.provider.dart';
|
import 'package:immich_mobile/providers/api.provider.dart';
|
||||||
|
import 'package:immich_mobile/repositories/file_media.repository.dart';
|
||||||
import 'package:immich_mobile/services/api.service.dart';
|
import 'package:immich_mobile/services/api.service.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
|
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
|
|
||||||
final imageViewerServiceProvider =
|
final imageViewerServiceProvider = Provider(
|
||||||
Provider((ref) => ImageViewerService(ref.watch(apiServiceProvider)));
|
(ref) => ImageViewerService(
|
||||||
|
ref.watch(apiServiceProvider),
|
||||||
|
ref.watch(fileMediaRepositoryProvider),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
class ImageViewerService {
|
class ImageViewerService {
|
||||||
final ApiService _apiService;
|
final ApiService _apiService;
|
||||||
|
final IFileMediaRepository _fileMediaRepository;
|
||||||
final Logger _log = Logger("ImageViewerService");
|
final Logger _log = Logger("ImageViewerService");
|
||||||
|
|
||||||
ImageViewerService(this._apiService);
|
ImageViewerService(this._apiService, this._fileMediaRepository);
|
||||||
|
|
||||||
Future<bool> downloadAsset(Asset asset) async {
|
Future<bool> downloadAsset(Asset asset) async {
|
||||||
File? imageFile;
|
File? imageFile;
|
||||||
@@ -46,7 +52,7 @@ class ImageViewerService {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
AssetEntity? entity;
|
Asset? resultAsset;
|
||||||
|
|
||||||
final tempDir = await getTemporaryDirectory();
|
final tempDir = await getTemporaryDirectory();
|
||||||
videoFile = await File('${tempDir.path}/livephoto.mov').create();
|
videoFile = await File('${tempDir.path}/livephoto.mov').create();
|
||||||
@@ -54,24 +60,21 @@ class ImageViewerService {
|
|||||||
videoFile.writeAsBytesSync(motionResponse.bodyBytes);
|
videoFile.writeAsBytesSync(motionResponse.bodyBytes);
|
||||||
imageFile.writeAsBytesSync(imageResponse.bodyBytes);
|
imageFile.writeAsBytesSync(imageResponse.bodyBytes);
|
||||||
|
|
||||||
entity = await PhotoManager.editor.darwin.saveLivePhoto(
|
resultAsset = await _fileMediaRepository.saveLivePhoto(
|
||||||
imageFile: imageFile,
|
image: imageFile,
|
||||||
videoFile: videoFile,
|
video: videoFile,
|
||||||
title: asset.fileName,
|
title: asset.fileName,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (entity == null) {
|
if (resultAsset == null) {
|
||||||
_log.warning(
|
_log.warning(
|
||||||
"Asset cannot be saved as a live photo. This is most likely a motion photo. Saving only the image file",
|
"Asset cannot be saved as a live photo. This is most likely a motion photo. Saving only the image file",
|
||||||
);
|
);
|
||||||
|
resultAsset = await _fileMediaRepository
|
||||||
entity = await PhotoManager.editor.saveImage(
|
.saveImage(imageResponse.bodyBytes, title: asset.fileName);
|
||||||
imageResponse.bodyBytes,
|
|
||||||
title: asset.fileName,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity != null;
|
return resultAsset != null;
|
||||||
} else {
|
} else {
|
||||||
var res = await _apiService.assetsApi
|
var res = await _apiService.assetsApi
|
||||||
.downloadAssetWithHttpInfo(asset.remoteId!);
|
.downloadAssetWithHttpInfo(asset.remoteId!);
|
||||||
@@ -81,11 +84,11 @@ class ImageViewerService {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final AssetEntity? entity;
|
final Asset? resultAsset;
|
||||||
final relativePath = Platform.isAndroid ? 'DCIM/Immich' : null;
|
final relativePath = Platform.isAndroid ? 'DCIM/Immich' : null;
|
||||||
|
|
||||||
if (asset.isImage) {
|
if (asset.isImage) {
|
||||||
entity = await PhotoManager.editor.saveImage(
|
resultAsset = await _fileMediaRepository.saveImage(
|
||||||
res.bodyBytes,
|
res.bodyBytes,
|
||||||
title: asset.fileName,
|
title: asset.fileName,
|
||||||
relativePath: relativePath,
|
relativePath: relativePath,
|
||||||
@@ -94,13 +97,13 @@ class ImageViewerService {
|
|||||||
final tempDir = await getTemporaryDirectory();
|
final tempDir = await getTemporaryDirectory();
|
||||||
videoFile = await File('${tempDir.path}/${asset.fileName}').create();
|
videoFile = await File('${tempDir.path}/${asset.fileName}').create();
|
||||||
videoFile.writeAsBytesSync(res.bodyBytes);
|
videoFile.writeAsBytesSync(res.bodyBytes);
|
||||||
entity = await PhotoManager.editor.saveVideo(
|
resultAsset = await _fileMediaRepository.saveVideo(
|
||||||
videoFile,
|
videoFile,
|
||||||
title: asset.fileName,
|
title: asset.fileName,
|
||||||
relativePath: relativePath,
|
relativePath: relativePath,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return entity != null;
|
return resultAsset != null;
|
||||||
}
|
}
|
||||||
} catch (error, stack) {
|
} catch (error, stack) {
|
||||||
_log.severe("Error saving downloaded asset", error, stack);
|
_log.severe("Error saving downloaded asset", error, stack);
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ import 'package:immich_mobile/entities/etag.entity.dart';
|
|||||||
import 'package:immich_mobile/entities/exif_info.entity.dart';
|
import 'package:immich_mobile/entities/exif_info.entity.dart';
|
||||||
import 'package:immich_mobile/entities/store.entity.dart';
|
import 'package:immich_mobile/entities/store.entity.dart';
|
||||||
import 'package:immich_mobile/entities/user.entity.dart';
|
import 'package:immich_mobile/entities/user.entity.dart';
|
||||||
|
import 'package:immich_mobile/interfaces/album_media.interface.dart';
|
||||||
import 'package:immich_mobile/providers/db.provider.dart';
|
import 'package:immich_mobile/providers/db.provider.dart';
|
||||||
|
import 'package:immich_mobile/repositories/album_media.repository.dart';
|
||||||
import 'package:immich_mobile/services/hash.service.dart';
|
import 'package:immich_mobile/services/hash.service.dart';
|
||||||
import 'package:immich_mobile/utils/async_mutex.dart';
|
import 'package:immich_mobile/utils/async_mutex.dart';
|
||||||
import 'package:immich_mobile/extensions/collection_extensions.dart';
|
import 'package:immich_mobile/extensions/collection_extensions.dart';
|
||||||
@@ -17,19 +19,23 @@ import 'package:immich_mobile/utils/diff.dart';
|
|||||||
import 'package:isar/isar.dart';
|
import 'package:isar/isar.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:openapi/api.dart';
|
import 'package:openapi/api.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
|
||||||
|
|
||||||
final syncServiceProvider = Provider(
|
final syncServiceProvider = Provider(
|
||||||
(ref) => SyncService(ref.watch(dbProvider), ref.watch(hashServiceProvider)),
|
(ref) => SyncService(
|
||||||
|
ref.watch(dbProvider),
|
||||||
|
ref.watch(hashServiceProvider),
|
||||||
|
ref.watch(albumMediaRepositoryProvider),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
class SyncService {
|
class SyncService {
|
||||||
final Isar _db;
|
final Isar _db;
|
||||||
final HashService _hashService;
|
final HashService _hashService;
|
||||||
|
final IAlbumMediaRepository _albumMediaRepository;
|
||||||
final AsyncMutex _lock = AsyncMutex();
|
final AsyncMutex _lock = AsyncMutex();
|
||||||
final Logger _log = Logger('SyncService');
|
final Logger _log = Logger('SyncService');
|
||||||
|
|
||||||
SyncService(this._db, this._hashService);
|
SyncService(this._db, this._hashService, this._albumMediaRepository);
|
||||||
|
|
||||||
// public methods:
|
// public methods:
|
||||||
|
|
||||||
@@ -68,7 +74,7 @@ class SyncService {
|
|||||||
/// Syncs all device albums and their assets to the database
|
/// Syncs all device albums and their assets to the database
|
||||||
/// Returns `true` if there were any changes
|
/// Returns `true` if there were any changes
|
||||||
Future<bool> syncLocalAlbumAssetsToDb(
|
Future<bool> syncLocalAlbumAssetsToDb(
|
||||||
List<AssetPathEntity> onDevice, [
|
List<Album> onDevice, [
|
||||||
Set<String>? excludedAssets,
|
Set<String>? excludedAssets,
|
||||||
]) =>
|
]) =>
|
||||||
_lock.run(() => _syncLocalAlbumAssetsToDb(onDevice, excludedAssets));
|
_lock.run(() => _syncLocalAlbumAssetsToDb(onDevice, excludedAssets));
|
||||||
@@ -492,7 +498,7 @@ class SyncService {
|
|||||||
/// Syncs all device albums and their assets to the database
|
/// Syncs all device albums and their assets to the database
|
||||||
/// Returns `true` if there were any changes
|
/// Returns `true` if there were any changes
|
||||||
Future<bool> _syncLocalAlbumAssetsToDb(
|
Future<bool> _syncLocalAlbumAssetsToDb(
|
||||||
List<AssetPathEntity> onDevice, [
|
List<Album> onDevice, [
|
||||||
Set<String>? excludedAssets,
|
Set<String>? excludedAssets,
|
||||||
]) async {
|
]) async {
|
||||||
onDevice.sort((a, b) => a.id.compareTo(b.id));
|
onDevice.sort((a, b) => a.id.compareTo(b.id));
|
||||||
@@ -504,16 +510,15 @@ class SyncService {
|
|||||||
final bool anyChanges = await diffSortedLists(
|
final bool anyChanges = await diffSortedLists(
|
||||||
onDevice,
|
onDevice,
|
||||||
inDb,
|
inDb,
|
||||||
compare: (AssetPathEntity a, Album b) => a.id.compareTo(b.localId!),
|
compare: (Album a, Album b) => a.localId!.compareTo(b.localId!),
|
||||||
both: (AssetPathEntity ape, Album album) => _syncAlbumInDbAndOnDevice(
|
both: (Album a, Album b) => _syncAlbumInDbAndOnDevice(
|
||||||
ape,
|
a,
|
||||||
album,
|
b,
|
||||||
deleteCandidates,
|
deleteCandidates,
|
||||||
existing,
|
existing,
|
||||||
excludedAssets,
|
excludedAssets,
|
||||||
),
|
),
|
||||||
onlyFirst: (AssetPathEntity ape) =>
|
onlyFirst: (Album a) => _addAlbumFromDevice(a, existing, excludedAssets),
|
||||||
_addAlbumFromDevice(ape, existing, excludedAssets),
|
|
||||||
onlySecond: (Album a) => _removeAlbumFromDb(a, deleteCandidates),
|
onlySecond: (Album a) => _removeAlbumFromDb(a, deleteCandidates),
|
||||||
);
|
);
|
||||||
_log.fine(
|
_log.fine(
|
||||||
@@ -541,58 +546,65 @@ class SyncService {
|
|||||||
/// returns `true` if there were any changes
|
/// returns `true` if there were any changes
|
||||||
/// Accumulates asset candidates to delete and those already existing in DB
|
/// Accumulates asset candidates to delete and those already existing in DB
|
||||||
Future<bool> _syncAlbumInDbAndOnDevice(
|
Future<bool> _syncAlbumInDbAndOnDevice(
|
||||||
AssetPathEntity ape,
|
Album deviceAlbum,
|
||||||
Album album,
|
Album dbAlbum,
|
||||||
List<Asset> deleteCandidates,
|
List<Asset> deleteCandidates,
|
||||||
List<Asset> existing, [
|
List<Asset> existing, [
|
||||||
Set<String>? excludedAssets,
|
Set<String>? excludedAssets,
|
||||||
bool forceRefresh = false,
|
bool forceRefresh = false,
|
||||||
]) async {
|
]) async {
|
||||||
if (!forceRefresh && !await _hasAssetPathEntityChanged(ape, album)) {
|
if (!forceRefresh && !await _hasAlbumChangeOnDevice(deviceAlbum, dbAlbum)) {
|
||||||
_log.fine("Local album ${ape.name} has not changed. Skipping sync.");
|
_log.fine(
|
||||||
|
"Local album ${deviceAlbum.name} has not changed. Skipping sync.",
|
||||||
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!forceRefresh &&
|
if (!forceRefresh &&
|
||||||
excludedAssets == null &&
|
excludedAssets == null &&
|
||||||
await _syncDeviceAlbumFast(ape, album)) {
|
await _syncDeviceAlbumFast(deviceAlbum, dbAlbum)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// general case, e.g. some assets have been deleted or there are excluded albums on iOS
|
// general case, e.g. some assets have been deleted or there are excluded albums on iOS
|
||||||
final inDb = await album.assets
|
final inDb = await dbAlbum.assets
|
||||||
.filter()
|
.filter()
|
||||||
.ownerIdEqualTo(Store.get(StoreKey.currentUser).isarId)
|
.ownerIdEqualTo(Store.get(StoreKey.currentUser).isarId)
|
||||||
.sortByChecksum()
|
.sortByChecksum()
|
||||||
.findAll();
|
.findAll();
|
||||||
assert(inDb.isSorted(Asset.compareByChecksum), "inDb not sorted!");
|
assert(inDb.isSorted(Asset.compareByChecksum), "inDb not sorted!");
|
||||||
final int assetCountOnDevice = await ape.assetCountAsync;
|
final int assetCountOnDevice =
|
||||||
final List<Asset> onDevice =
|
await _albumMediaRepository.getAssetCount(deviceAlbum.localId!);
|
||||||
await _hashService.getHashedAssets(ape, excludedAssets: excludedAssets);
|
final List<Asset> onDevice = await _hashService.getHashedAssets(
|
||||||
|
deviceAlbum,
|
||||||
|
excludedAssets: excludedAssets,
|
||||||
|
);
|
||||||
_removeDuplicates(onDevice);
|
_removeDuplicates(onDevice);
|
||||||
// _removeDuplicates sorts `onDevice` by checksum
|
// _removeDuplicates sorts `onDevice` by checksum
|
||||||
final (toAdd, toUpdate, toDelete) = _diffAssets(onDevice, inDb);
|
final (toAdd, toUpdate, toDelete) = _diffAssets(onDevice, inDb);
|
||||||
if (toAdd.isEmpty &&
|
if (toAdd.isEmpty &&
|
||||||
toUpdate.isEmpty &&
|
toUpdate.isEmpty &&
|
||||||
toDelete.isEmpty &&
|
toDelete.isEmpty &&
|
||||||
album.name == ape.name &&
|
dbAlbum.name == deviceAlbum.name &&
|
||||||
ape.lastModified != null &&
|
dbAlbum.modifiedAt.isAtSameMomentAs(deviceAlbum.modifiedAt)) {
|
||||||
album.modifiedAt.isAtSameMomentAs(ape.lastModified!)) {
|
|
||||||
// changes only affeted excluded albums
|
// changes only affeted excluded albums
|
||||||
_log.fine(
|
_log.fine(
|
||||||
"Only excluded assets in local album ${ape.name} changed. Stopping sync.",
|
"Only excluded assets in local album ${deviceAlbum.name} changed. Stopping sync.",
|
||||||
);
|
);
|
||||||
if (assetCountOnDevice !=
|
if (assetCountOnDevice !=
|
||||||
_db.eTags.getByIdSync(ape.eTagKeyAssetCount)?.assetCount) {
|
_db.eTags.getByIdSync(deviceAlbum.eTagKeyAssetCount)?.assetCount) {
|
||||||
await _db.writeTxn(
|
await _db.writeTxn(
|
||||||
() => _db.eTags.put(
|
() => _db.eTags.put(
|
||||||
ETag(id: ape.eTagKeyAssetCount, assetCount: assetCountOnDevice),
|
ETag(
|
||||||
|
id: deviceAlbum.eTagKeyAssetCount,
|
||||||
|
assetCount: assetCountOnDevice,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
_log.fine(
|
_log.fine(
|
||||||
"Syncing local album ${ape.name}. ${toAdd.length} assets to add, ${toUpdate.length} to update, ${toDelete.length} to delete",
|
"Syncing local album ${deviceAlbum.name}. ${toAdd.length} assets to add, ${toUpdate.length} to update, ${toDelete.length} to delete",
|
||||||
);
|
);
|
||||||
final (existingInDb, updated) = await _linkWithExistingFromDb(toAdd);
|
final (existingInDb, updated) = await _linkWithExistingFromDb(toAdd);
|
||||||
_log.fine(
|
_log.fine(
|
||||||
@@ -600,28 +612,31 @@ class SyncService {
|
|||||||
);
|
);
|
||||||
deleteCandidates.addAll(toDelete);
|
deleteCandidates.addAll(toDelete);
|
||||||
existing.addAll(existingInDb);
|
existing.addAll(existingInDb);
|
||||||
album.name = ape.name;
|
dbAlbum.name = deviceAlbum.name;
|
||||||
album.modifiedAt = ape.lastModified ?? DateTime.now();
|
dbAlbum.modifiedAt = deviceAlbum.modifiedAt;
|
||||||
if (album.thumbnail.value != null &&
|
if (dbAlbum.thumbnail.value != null &&
|
||||||
toDelete.contains(album.thumbnail.value)) {
|
toDelete.contains(dbAlbum.thumbnail.value)) {
|
||||||
album.thumbnail.value = null;
|
dbAlbum.thumbnail.value = null;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await _db.writeTxn(() async {
|
await _db.writeTxn(() async {
|
||||||
await _db.assets.putAll(updated);
|
await _db.assets.putAll(updated);
|
||||||
await _db.assets.putAll(toUpdate);
|
await _db.assets.putAll(toUpdate);
|
||||||
await album.assets
|
await dbAlbum.assets
|
||||||
.update(link: existingInDb + updated, unlink: toDelete);
|
.update(link: existingInDb + updated, unlink: toDelete);
|
||||||
await _db.albums.put(album);
|
await _db.albums.put(dbAlbum);
|
||||||
album.thumbnail.value ??= await album.assets.filter().findFirst();
|
dbAlbum.thumbnail.value ??= await dbAlbum.assets.filter().findFirst();
|
||||||
await album.thumbnail.save();
|
await dbAlbum.thumbnail.save();
|
||||||
await _db.eTags.put(
|
await _db.eTags.put(
|
||||||
ETag(id: ape.eTagKeyAssetCount, assetCount: assetCountOnDevice),
|
ETag(
|
||||||
|
id: deviceAlbum.eTagKeyAssetCount,
|
||||||
|
assetCount: assetCountOnDevice,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
_log.info("Synced changes of local album ${ape.name} to DB");
|
_log.info("Synced changes of local album ${deviceAlbum.name} to DB");
|
||||||
} on IsarError catch (e) {
|
} on IsarError catch (e) {
|
||||||
_log.severe("Failed to update synced album ${ape.name} in DB", e);
|
_log.severe("Failed to update synced album ${deviceAlbum.name} in DB", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -629,45 +644,45 @@ class SyncService {
|
|||||||
|
|
||||||
/// fast path for common case: only new assets were added to device album
|
/// fast path for common case: only new assets were added to device album
|
||||||
/// returns `true` if successfull, else `false`
|
/// returns `true` if successfull, else `false`
|
||||||
Future<bool> _syncDeviceAlbumFast(AssetPathEntity ape, Album album) async {
|
Future<bool> _syncDeviceAlbumFast(Album deviceAlbum, Album dbAlbum) async {
|
||||||
if (!(ape.lastModified ?? DateTime.now()).isAfter(album.modifiedAt)) {
|
if (!deviceAlbum.modifiedAt.isAfter(dbAlbum.modifiedAt)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final int totalOnDevice = await ape.assetCountAsync;
|
final int totalOnDevice =
|
||||||
|
await _albumMediaRepository.getAssetCount(deviceAlbum.localId!);
|
||||||
final int lastKnownTotal =
|
final int lastKnownTotal =
|
||||||
(await _db.eTags.getById(ape.eTagKeyAssetCount))?.assetCount ?? 0;
|
(await _db.eTags.getById(deviceAlbum.eTagKeyAssetCount))?.assetCount ??
|
||||||
final AssetPathEntity? modified = totalOnDevice > lastKnownTotal
|
0;
|
||||||
? await ape.fetchPathProperties(
|
if (totalOnDevice <= lastKnownTotal) {
|
||||||
filterOptionGroup: FilterOptionGroup(
|
|
||||||
updateTimeCond: DateTimeCond(
|
|
||||||
min: album.modifiedAt.add(const Duration(seconds: 1)),
|
|
||||||
max: ape.lastModified ?? DateTime.now(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: null;
|
|
||||||
if (modified == null) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final List<Asset> newAssets = await _hashService.getHashedAssets(modified);
|
final List<Asset> newAssets = await _hashService.getHashedAssets(
|
||||||
|
deviceAlbum,
|
||||||
|
modifiedFrom: dbAlbum.modifiedAt.add(const Duration(seconds: 1)),
|
||||||
|
modifiedUntil: deviceAlbum.modifiedAt,
|
||||||
|
);
|
||||||
|
|
||||||
if (totalOnDevice != lastKnownTotal + newAssets.length) {
|
if (totalOnDevice != lastKnownTotal + newAssets.length) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
album.modifiedAt = ape.lastModified ?? DateTime.now();
|
dbAlbum.modifiedAt = deviceAlbum.modifiedAt;
|
||||||
_removeDuplicates(newAssets);
|
_removeDuplicates(newAssets);
|
||||||
final (existingInDb, updated) = await _linkWithExistingFromDb(newAssets);
|
final (existingInDb, updated) = await _linkWithExistingFromDb(newAssets);
|
||||||
try {
|
try {
|
||||||
await _db.writeTxn(() async {
|
await _db.writeTxn(() async {
|
||||||
await _db.assets.putAll(updated);
|
await _db.assets.putAll(updated);
|
||||||
await album.assets.update(link: existingInDb + updated);
|
await dbAlbum.assets.update(link: existingInDb + updated);
|
||||||
await _db.albums.put(album);
|
await _db.albums.put(dbAlbum);
|
||||||
await _db.eTags
|
await _db.eTags.put(
|
||||||
.put(ETag(id: ape.eTagKeyAssetCount, assetCount: totalOnDevice));
|
ETag(id: deviceAlbum.eTagKeyAssetCount, assetCount: totalOnDevice),
|
||||||
|
);
|
||||||
});
|
});
|
||||||
_log.info("Fast synced local album ${ape.name} to DB");
|
_log.info("Fast synced local album ${deviceAlbum.name} to DB");
|
||||||
} on IsarError catch (e) {
|
} on IsarError catch (e) {
|
||||||
_log.severe("Failed to fast sync local album ${ape.name} to DB", e);
|
_log.severe(
|
||||||
|
"Failed to fast sync local album ${deviceAlbum.name} to DB",
|
||||||
|
e,
|
||||||
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -677,14 +692,15 @@ class SyncService {
|
|||||||
/// Adds a new album from the device to the database and Accumulates all
|
/// Adds a new album from the device to the database and Accumulates all
|
||||||
/// assets already existing in the database to the list of `existing` assets
|
/// assets already existing in the database to the list of `existing` assets
|
||||||
Future<void> _addAlbumFromDevice(
|
Future<void> _addAlbumFromDevice(
|
||||||
AssetPathEntity ape,
|
Album album,
|
||||||
List<Asset> existing, [
|
List<Asset> existing, [
|
||||||
Set<String>? excludedAssets,
|
Set<String>? excludedAssets,
|
||||||
]) async {
|
]) async {
|
||||||
_log.info("Syncing a new local album to DB: ${ape.name}");
|
_log.info("Syncing a new local album to DB: ${album.name}");
|
||||||
final Album a = Album.local(ape);
|
final assets = await _hashService.getHashedAssets(
|
||||||
final assets =
|
album,
|
||||||
await _hashService.getHashedAssets(ape, excludedAssets: excludedAssets);
|
excludedAssets: excludedAssets,
|
||||||
|
);
|
||||||
_removeDuplicates(assets);
|
_removeDuplicates(assets);
|
||||||
final (existingInDb, updated) = await _linkWithExistingFromDb(assets);
|
final (existingInDb, updated) = await _linkWithExistingFromDb(assets);
|
||||||
_log.info(
|
_log.info(
|
||||||
@@ -692,15 +708,15 @@ class SyncService {
|
|||||||
);
|
);
|
||||||
await upsertAssetsWithExif(updated);
|
await upsertAssetsWithExif(updated);
|
||||||
existing.addAll(existingInDb);
|
existing.addAll(existingInDb);
|
||||||
a.assets.addAll(existingInDb);
|
album.assets.addAll(existingInDb);
|
||||||
a.assets.addAll(updated);
|
album.assets.addAll(updated);
|
||||||
final thumb = existingInDb.firstOrNull ?? updated.firstOrNull;
|
final thumb = existingInDb.firstOrNull ?? updated.firstOrNull;
|
||||||
a.thumbnail.value = thumb;
|
album.thumbnail.value = thumb;
|
||||||
try {
|
try {
|
||||||
await _db.writeTxn(() => _db.albums.store(a));
|
await _db.writeTxn(() => _db.albums.store(album));
|
||||||
_log.info("Added a new local album to DB: ${ape.name}");
|
_log.info("Added a new local album to DB: ${album.name}");
|
||||||
} on IsarError catch (e) {
|
} on IsarError catch (e) {
|
||||||
_log.severe("Failed to add new local album ${ape.name} to DB", e);
|
_log.severe("Failed to add new local album ${album.name} to DB", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -798,12 +814,15 @@ class SyncService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// returns `true` if the albums differ on the surface
|
/// returns `true` if the albums differ on the surface
|
||||||
Future<bool> _hasAssetPathEntityChanged(AssetPathEntity a, Album b) async {
|
Future<bool> _hasAlbumChangeOnDevice(
|
||||||
return a.name != b.name ||
|
Album deviceAlbum,
|
||||||
a.lastModified == null ||
|
Album dbAlbum,
|
||||||
!a.lastModified!.isAtSameMomentAs(b.modifiedAt) ||
|
) async {
|
||||||
await a.assetCountAsync !=
|
return deviceAlbum.name != dbAlbum.name ||
|
||||||
(await _db.eTags.getById(a.eTagKeyAssetCount))?.assetCount;
|
!deviceAlbum.modifiedAt.isAtSameMomentAs(dbAlbum.modifiedAt) ||
|
||||||
|
await _albumMediaRepository.getAssetCount(deviceAlbum.localId!) !=
|
||||||
|
(await _db.eTags.getById(deviceAlbum.eTagKeyAssetCount))
|
||||||
|
?.assetCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> _removeAllLocalAlbumsAndAssets() async {
|
Future<bool> _removeAllLocalAlbumsAndAssets() async {
|
||||||
|
|||||||
@@ -12,6 +12,16 @@ dynamic upgradeDto(dynamic value, String targetType) {
|
|||||||
addDefault(value, 'tags', TagsResponse().toJson());
|
addDefault(value, 'tags', TagsResponse().toJson());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'UserResponseDto':
|
||||||
|
if (value is Map) {
|
||||||
|
addDefault(value, 'profileChangedAt', DateTime.now().toIso8601String());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'UserAdminResponseDto':
|
||||||
|
if (value is Map) {
|
||||||
|
addDefault(value, 'profileChangedAt', DateTime.now().toIso8601String());
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,8 +59,6 @@ class DraggableScrollbar extends StatefulWidget {
|
|||||||
|
|
||||||
final Function(bool scrolling) scrollStateListener;
|
final Function(bool scrolling) scrollStateListener;
|
||||||
|
|
||||||
final double viewPortHeight;
|
|
||||||
|
|
||||||
DraggableScrollbar.semicircle({
|
DraggableScrollbar.semicircle({
|
||||||
super.key,
|
super.key,
|
||||||
Key? scrollThumbKey,
|
Key? scrollThumbKey,
|
||||||
@@ -69,7 +67,6 @@ class DraggableScrollbar extends StatefulWidget {
|
|||||||
required this.controller,
|
required this.controller,
|
||||||
required this.itemPositionsListener,
|
required this.itemPositionsListener,
|
||||||
required this.scrollStateListener,
|
required this.scrollStateListener,
|
||||||
required this.viewPortHeight,
|
|
||||||
this.heightScrollThumb = 48.0,
|
this.heightScrollThumb = 48.0,
|
||||||
this.backgroundColor = Colors.white,
|
this.backgroundColor = Colors.white,
|
||||||
this.padding,
|
this.padding,
|
||||||
@@ -254,7 +251,7 @@ class DraggableScrollbarState extends State<DraggableScrollbar>
|
|||||||
}
|
}
|
||||||
|
|
||||||
double get barMaxScrollExtent =>
|
double get barMaxScrollExtent =>
|
||||||
widget.viewPortHeight -
|
(context.size?.height ?? 0) -
|
||||||
widget.heightScrollThumb -
|
widget.heightScrollThumb -
|
||||||
(widget.heightOffset ?? 0);
|
(widget.heightOffset ?? 0);
|
||||||
|
|
||||||
@@ -340,8 +337,8 @@ class DraggableScrollbarState extends State<DraggableScrollbar>
|
|||||||
_thumbAnimationController.forward();
|
_thumbAnimationController.forward();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itemPos < maxItemCount) {
|
if (itemPosition < maxItemCount) {
|
||||||
_currentItem = itemPos;
|
_currentItem = itemPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
_fadeoutTimer?.cancel();
|
_fadeoutTimer?.cancel();
|
||||||
@@ -365,25 +362,35 @@ class DraggableScrollbarState extends State<DraggableScrollbar>
|
|||||||
widget.scrollStateListener(true);
|
widget.scrollStateListener(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
int get itemPos {
|
int get itemPosition {
|
||||||
int numberOfItems = widget.child.itemCount;
|
int numberOfItems = widget.child.itemCount;
|
||||||
return ((_barOffset / barMaxScrollExtent) * numberOfItems).toInt();
|
return ((_barOffset / barMaxScrollExtent) * numberOfItems).toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
void _jumpToBarPos() {
|
void _jumpToBarPosition() {
|
||||||
if (itemPos > maxItemCount - 1) {
|
if (itemPosition > maxItemCount - 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_currentItem = itemPos;
|
_currentItem = itemPosition;
|
||||||
|
|
||||||
|
/// If the bar is at the bottom but the item position is still smaller than the max item count (due to rounding error)
|
||||||
|
/// jump to the end of the list
|
||||||
|
if (barMaxScrollExtent - _barOffset < 10 && itemPosition < maxItemCount) {
|
||||||
|
widget.controller.jumpTo(
|
||||||
|
index: maxItemCount,
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
widget.controller.jumpTo(
|
widget.controller.jumpTo(
|
||||||
index: itemPos,
|
index: itemPosition,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer? dragHaltTimer;
|
Timer? dragHaltTimer;
|
||||||
int lastTimerPos = 0;
|
int lastTimerPosition = 0;
|
||||||
|
|
||||||
void _onVerticalDragUpdate(DragUpdateDetails details) {
|
void _onVerticalDragUpdate(DragUpdateDetails details) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -400,8 +407,8 @@ class DraggableScrollbarState extends State<DraggableScrollbar>
|
|||||||
_barOffset = barMaxScrollExtent;
|
_barOffset = barMaxScrollExtent;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itemPos != lastTimerPos) {
|
if (itemPosition != lastTimerPosition) {
|
||||||
lastTimerPos = itemPos;
|
lastTimerPosition = itemPosition;
|
||||||
dragHaltTimer?.cancel();
|
dragHaltTimer?.cancel();
|
||||||
widget.scrollStateListener(true);
|
widget.scrollStateListener(true);
|
||||||
|
|
||||||
@@ -413,7 +420,7 @@ class DraggableScrollbarState extends State<DraggableScrollbar>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
_jumpToBarPos();
|
_jumpToBarPosition();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -426,7 +433,7 @@ class DraggableScrollbarState extends State<DraggableScrollbar>
|
|||||||
});
|
});
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
_jumpToBarPos();
|
_jumpToBarPosition();
|
||||||
_isDragInProcess = false;
|
_isDragInProcess = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -264,7 +264,6 @@ class ImmichAssetGridViewState extends ConsumerState<ImmichAssetGridView> {
|
|||||||
|
|
||||||
final child = (useDragScrolling && ModalRoute.of(context) != null)
|
final child = (useDragScrolling && ModalRoute.of(context) != null)
|
||||||
? DraggableScrollbar.semicircle(
|
? DraggableScrollbar.semicircle(
|
||||||
viewPortHeight: context.height,
|
|
||||||
scrollStateListener: dragScrolling,
|
scrollStateListener: dragScrolling,
|
||||||
itemPositionsListener: _itemPositionsListener,
|
itemPositionsListener: _itemPositionsListener,
|
||||||
controller: _itemScrollController,
|
controller: _itemScrollController,
|
||||||
|
|||||||
@@ -183,23 +183,13 @@ class AlbumInfoCard extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 2.0),
|
padding: const EdgeInsets.only(top: 2.0),
|
||||||
child: FutureBuilder(
|
child: Text(
|
||||||
builder: ((context, snapshot) {
|
album.assetCount.toString() +
|
||||||
if (snapshot.hasData) {
|
(album.isAll ? " (${'backup_all'.tr()})" : ""),
|
||||||
return Text(
|
style: TextStyle(
|
||||||
snapshot.data.toString() +
|
fontSize: 12,
|
||||||
(album.isAll
|
color: Colors.grey[600],
|
||||||
? " (${'backup_all'.tr()})"
|
),
|
||||||
: ""),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12,
|
|
||||||
color: Colors.grey[600],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return const Text("0");
|
|
||||||
}),
|
|
||||||
future: album.assetCount,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -208,7 +198,7 @@ class AlbumInfoCard extends HookConsumerWidget {
|
|||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
context.pushRoute(
|
context.pushRoute(
|
||||||
AlbumPreviewRoute(album: album.albumEntity),
|
AlbumPreviewRoute(album: album.album),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'package:auto_route/auto_route.dart';
|
import 'package:auto_route/auto_route.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
|
||||||
import 'package:fluttertoast/fluttertoast.dart';
|
import 'package:fluttertoast/fluttertoast.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||||
@@ -24,19 +23,10 @@ class AlbumInfoListTile extends HookConsumerWidget {
|
|||||||
ref.watch(backupProvider).selectedBackupAlbums.contains(album);
|
ref.watch(backupProvider).selectedBackupAlbums.contains(album);
|
||||||
final bool isExcluded =
|
final bool isExcluded =
|
||||||
ref.watch(backupProvider).excludedBackupAlbums.contains(album);
|
ref.watch(backupProvider).excludedBackupAlbums.contains(album);
|
||||||
final assetCount = useState(0);
|
|
||||||
final syncAlbum = ref
|
final syncAlbum = ref
|
||||||
.watch(appSettingsServiceProvider)
|
.watch(appSettingsServiceProvider)
|
||||||
.getSetting(AppSettingsEnum.syncAlbums);
|
.getSetting(AppSettingsEnum.syncAlbums);
|
||||||
|
|
||||||
useEffect(
|
|
||||||
() {
|
|
||||||
album.assetCount.then((value) => assetCount.value = value);
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
[album],
|
|
||||||
);
|
|
||||||
|
|
||||||
buildTileColor() {
|
buildTileColor() {
|
||||||
if (isSelected) {
|
if (isSelected) {
|
||||||
return context.isDarkTheme
|
return context.isDarkTheme
|
||||||
@@ -117,11 +107,11 @@ class AlbumInfoListTile extends HookConsumerWidget {
|
|||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
subtitle: Text(assetCount.value.toString()),
|
subtitle: Text(album.assetCount.toString()),
|
||||||
trailing: IconButton(
|
trailing: IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
context.pushRoute(
|
context.pushRoute(
|
||||||
AlbumPreviewRoute(album: album.albumEntity),
|
AlbumPreviewRoute(album: album.album),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
|||||||
@@ -2,18 +2,19 @@ import 'dart:io';
|
|||||||
|
|
||||||
import 'package:auto_route/auto_route.dart';
|
import 'package:auto_route/auto_route.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||||
import 'package:immich_mobile/extensions/theme_extensions.dart';
|
import 'package:immich_mobile/extensions/theme_extensions.dart';
|
||||||
import 'package:immich_mobile/models/backup/backup_state.model.dart';
|
import 'package:immich_mobile/models/backup/backup_state.model.dart';
|
||||||
import 'package:immich_mobile/providers/backup/backup.provider.dart';
|
import 'package:immich_mobile/providers/backup/backup.provider.dart';
|
||||||
import 'package:immich_mobile/providers/backup/error_backup_list.provider.dart';
|
import 'package:immich_mobile/providers/backup/error_backup_list.provider.dart';
|
||||||
import 'package:immich_mobile/providers/backup/manual_upload.provider.dart';
|
import 'package:immich_mobile/providers/backup/manual_upload.provider.dart';
|
||||||
|
import 'package:immich_mobile/repositories/asset_media.repository.dart';
|
||||||
import 'package:immich_mobile/routing/router.dart';
|
import 'package:immich_mobile/routing/router.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
import 'package:immich_mobile/widgets/common/immich_thumbnail.dart';
|
||||||
|
|
||||||
class CurrentUploadingAssetInfoBox extends HookConsumerWidget {
|
class CurrentUploadingAssetInfoBox extends HookConsumerWidget {
|
||||||
const CurrentUploadingAssetInfoBox({super.key});
|
const CurrentUploadingAssetInfoBox({super.key});
|
||||||
@@ -148,17 +149,6 @@ class CurrentUploadingAssetInfoBox extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
buildAssetThumbnail() async {
|
|
||||||
var assetEntity = await AssetEntity.fromId(asset.id);
|
|
||||||
|
|
||||||
if (assetEntity != null) {
|
|
||||||
return assetEntity.thumbnailDataWithSize(
|
|
||||||
const ThumbnailSize(500, 500),
|
|
||||||
quality: 100,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
buildiCloudDownloadProgerssBar() {
|
buildiCloudDownloadProgerssBar() {
|
||||||
if (asset.iCloudAsset != null && asset.iCloudAsset!) {
|
if (asset.iCloudAsset != null && asset.iCloudAsset!) {
|
||||||
return Padding(
|
return Padding(
|
||||||
@@ -239,8 +229,8 @@ class CurrentUploadingAssetInfoBox extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FutureBuilder<Uint8List?>(
|
return FutureBuilder<Asset?>(
|
||||||
future: buildAssetThumbnail(),
|
future: ref.read(assetMediaRepositoryProvider).get(asset.id),
|
||||||
builder: (context, thumbnail) => ListTile(
|
builder: (context, thumbnail) => ListTile(
|
||||||
isThreeLine: true,
|
isThreeLine: true,
|
||||||
leading: AnimatedCrossFade(
|
leading: AnimatedCrossFade(
|
||||||
@@ -250,9 +240,8 @@ class CurrentUploadingAssetInfoBox extends HookConsumerWidget {
|
|||||||
child: thumbnail.hasData
|
child: thumbnail.hasData
|
||||||
? ClipRRect(
|
? ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
child: Image.memory(
|
child: ImmichThumbnail(
|
||||||
thumbnail.data!,
|
asset: thumbnail.data,
|
||||||
fit: BoxFit.cover,
|
|
||||||
width: 50,
|
width: 50,
|
||||||
height: 50,
|
height: 50,
|
||||||
),
|
),
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user