Compare commits

...

32 Commits

Author SHA1 Message Date
Alex
2f5cc3059a Merge pull request #799 from AnTheMaker/patch-1 2022-10-09 11:00:25 -05:00
An | Anton Röhm
4355485581 lower z-index of #immich-scrubbable-scrollbar 2022-10-09 16:55:10 +02:00
An | Anton Röhm
342c3254cb add z-index to #account-info-panel 2022-10-09 16:54:21 +02:00
Alex
5fc82dfaa2 Merge pull request #793 from immich-app/fix/update-reverse-geocoder
Update local-reverse-geocoder to 0.12.5
2022-10-08 15:40:42 -05:00
Alex Tran
9bfacaa39a Specific specific type for enum value for openapi generator to work correctly 2022-10-07 14:30:15 -05:00
Alex Tran
a2882a4908 Added additional type to enum of openapi 2022-10-07 14:26:16 -05:00
Alex
1adc64a352 chore: add GitHub action to generate SDK in Rust/Typescript/Dart 2022-10-07 09:52:11 -05:00
Alex Tran
c28863966b Remove build on PR 2022-10-07 09:50:04 -05:00
Alex Tran
14dc679332 Added SDK to Rust 2022-10-07 09:46:10 -05:00
Alex Tran
17085dd8a0 Added SDK to Rust 2022-10-07 09:39:22 -05:00
Alex Tran
82b8313da0 Fix test 2022-10-07 09:16:45 -05:00
Alex Tran
4f7e764fa0 Fix typing 2022-10-07 09:15:05 -05:00
Alex
d52da8bbea Merge pull request #794 from immich-app/792-bug-encoded-videos-are-not-removed-when-original-asset-is-deleted
fix(server): Delete encoded video when deleting file
2022-10-07 08:47:56 -05:00
Alex Tran
cdddcad784 fix(server): Delete encoded video when deleting file 2022-10-07 08:47:13 -05:00
bo0tzz
38767cad0f Update local-reverse-geocoder to 0.12.5
This version includes a fix to the error handling in that library, which
was causing our code to silently fail and loop.
See https://github.com/tomayac/local-reverse-geocoder/issues/58 for more detail.
2022-10-07 12:14:27 +02:00
Alex Tran
c3d7dda61f Added generation for dart 2022-10-06 17:23:05 -05:00
Alex Tran
c4e32ce159 Rename repo 2022-10-06 16:15:36 -05:00
Alex Tran
6355a07dc4 Added github token custom 2022-10-06 16:09:15 -05:00
Alex Tran
0e3fb41e73 fixed 2022-10-06 15:48:38 -05:00
Alex Tran
fdac5af5ee Added github token 2022-10-06 15:47:47 -05:00
Alex Tran
0e509ceafa Added permissionf or github bot 2022-10-06 15:45:30 -05:00
Alex Tran
fc255b558d fix 2022-10-06 15:40:01 -05:00
Alex Tran
9e54e30011 git push force 2022-10-06 15:38:38 -05:00
Alex Tran
77312ce2e0 Force push 2022-10-06 15:37:03 -05:00
Alex Tran
9a6d29d6e7 Add global config for git 2022-10-06 15:34:42 -05:00
Alex Tran
2cb7517f64 Fix url 2022-10-06 15:33:07 -05:00
Alex Tran
3228882fc0 Authenticate 2022-10-06 15:32:19 -05:00
Alex Tran
6804e3dc73 Fixed 2022-10-06 15:27:31 -05:00
Alex Tran
f9af61a5ca Manually push to repo 2022-10-06 15:21:17 -05:00
Alex Tran
a94b443f13 Push to typescript sdk repo 2022-10-06 15:11:09 -05:00
Alex Tran
fd06aa2135 Add workflow to PR to test 2022-10-06 15:04:24 -05:00
Alex Tran
dd0f40559d added github action file' 2022-10-06 14:59:54 -05:00
9 changed files with 128 additions and 25 deletions

83
.github/workflows/openapi-generator.yml vendored Normal file
View File

@@ -0,0 +1,83 @@
name: Generate OpenAPI SDK
on:
workflow_dispatch:
push:
branches: [main]
jobs:
generate-typescript-axios:
runs-on: ubuntu-latest
name: OpenAPI Generator
steps:
# Checkout your code
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
# Use the action to generate a client package
# This uses the default path for the openapi document and thus assumes there is an openapi.json in the current workspace.
- name: Generate Typescript Axios Client
uses: openapi-generators/openapitools-generator-action@v1
with:
generator: typescript-axios
generator-tag: v6.2.0
openapi-file: server/immich-openapi-specs.json
# Do something with the generated client (likely publishing it somewhere)
- name: Push to typescript repo
run: |
git config --global init.defaultBranch main
git config --global pull.rebase false
git config --global user.email "alex.tran1502@gmail.com"
git config --global user.name "Alex Tran"
cd typescript-axios-client
git init
git add .
git commit -m "Update SDK"
git remote add origin https://immich-app:"${{ secrets.GH_TOKEN }}"@github.com/immich-app/immich-sdk-typescript-axios.git
git pull origin main --allow-unrelated-histories
git push origin main 2>&1 | grep -v 'To https'
- name: Generate Dart SDK
uses: openapi-generators/openapitools-generator-action@v1
with:
generator: dart
generator-tag: v6.2.0
openapi-file: server/immich-openapi-specs.json
- name: Push to Dart repo
run: |
git config --global init.defaultBranch main
git config --global pull.rebase false
git config --global user.email "alex.tran1502@gmail.com"
git config --global user.name "Alex Tran"
cd dart-client
git init
git add .
git commit -m "Update SDK"
git remote add origin https://immich-app:"${{ secrets.GH_TOKEN }}"@github.com/immich-app/immich-sdk-dart.git
git pull origin main --allow-unrelated-histories
git push origin main 2>&1 | grep -v 'To https'
- name: Generate Rust SDK
uses: openapi-generators/openapitools-generator-action@v1
with:
generator: rust
generator-tag: v6.2.0
openapi-file: server/immich-openapi-specs.json
- name: Push to Rust repo
run: |
git config --global init.defaultBranch main
git config --global pull.rebase false
git config --global user.email "alex.tran1502@gmail.com"
git config --global user.name "Alex Tran"
cd rust-client
git init
git add .
git commit -m "Update SDK"
git remote add origin https://immich-app:"${{ secrets.GH_TOKEN }}"@github.com/immich-app/immich-sdk-rust.git
git pull origin main --allow-unrelated-histories
git push origin main 2>&1 | grep -v 'To https'

View File

@@ -9,10 +9,11 @@ export enum GetAssetThumbnailFormatEnum {
export class GetAssetThumbnailDto {
@IsOptional()
@ApiProperty({
type: String,
enum: GetAssetThumbnailFormatEnum,
default: GetAssetThumbnailFormatEnum.WEBP,
required: false,
enumName: 'ThumbnailFormat',
})
format = GetAssetThumbnailFormatEnum.WEBP;
format: GetAssetThumbnailFormatEnum = GetAssetThumbnailFormatEnum.WEBP;
}

View File

@@ -14,8 +14,9 @@ export class GetJobDto {
message: `params must be one of ${Object.values(JobId).join()}`,
})
@ApiProperty({
type: String,
enum: JobId,
enumName: 'JobId',
})
jobId!: string;
jobId!: JobId;
}

View File

@@ -46,6 +46,14 @@ export class BackgroundTaskProcessor {
}
});
}
if (asset.encodedVideoPath) {
fs.unlink(asset.encodedVideoPath, (err) => {
if (err) {
console.log('error deleting ', asset.encodedVideoPath);
}
});
}
}
}
}

View File

@@ -39,20 +39,20 @@ function geocoderLookup(points: { latitude: number; longitude: number }[]) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
geocoder.lookUp(points, 1, (err, addresses) => {
resolve(addresses[0][0]);
resolve(addresses[0][0] as GeoData);
});
});
}
const geocodingPrecisionLevels = ['cities15000', 'cities5000', 'cities1000', 'cities500'];
export interface AdminCode {
export type AdminCode = {
name: string;
asciiName: string;
geoNameId: string;
}
};
export interface GeoData {
export type GeoData = {
geoNameId: string;
name: string;
asciiName: string;
@@ -63,8 +63,8 @@ export interface GeoData {
featureCode: string;
countryCode: string;
cc2?: any;
admin1Code?: AdminCode;
admin2Code?: AdminCode;
admin1Code?: AdminCode | string;
admin2Code?: AdminCode | string;
admin3Code?: any;
admin4Code?: any;
population: string;
@@ -73,7 +73,7 @@ export interface GeoData {
timezone: string;
modificationDate: string;
distance: number;
}
};
@Processor(QueueNameEnum.METADATA_EXTRACTION)
export class MetadataExtractionProcessor {
@@ -123,10 +123,22 @@ export class MetadataExtractionProcessor {
const city = geoCodeInfo.name;
let state = '';
if (geoCodeInfo.admin2Code?.name) state += geoCodeInfo.admin2Code.name;
if (geoCodeInfo.admin1Code?.name) {
if (geoCodeInfo.admin2Code?.name) state += ', ';
state += geoCodeInfo.admin1Code.name;
if (geoCodeInfo.admin2Code) {
const adminCode2 = geoCodeInfo.admin2Code as AdminCode;
state += adminCode2.name;
}
if (geoCodeInfo.admin1Code) {
const adminCode1 = geoCodeInfo.admin1Code as AdminCode;
if (geoCodeInfo.admin2Code) {
const adminCode2 = geoCodeInfo.admin2Code as AdminCode;
if (adminCode2.name) {
state += ', ';
}
}
state += adminCode1.name;
}
return { country, state, city };

View File

@@ -36,7 +36,7 @@
"geo-tz": "^7.0.2",
"i18n-iso-countries": "^7.5.0",
"joi": "^17.5.0",
"local-reverse-geocoder": "^0.12.2",
"local-reverse-geocoder": "^0.12.5",
"lodash": "^4.17.21",
"luxon": "^3.0.3",
"passport": "^0.6.0",
@@ -7661,12 +7661,11 @@
}
},
"node_modules/local-reverse-geocoder": {
"version": "0.12.2",
"resolved": "https://registry.npmjs.org/local-reverse-geocoder/-/local-reverse-geocoder-0.12.2.tgz",
"integrity": "sha512-kTSvDxGTuJoqx619jmHFoGCqFpBi0PPwyd7PDOLZCyo8mMEwJSMx713+ksOCihGpzUfO3hcclE7z/T43sY/IaA==",
"version": "0.12.5",
"resolved": "https://registry.npmjs.org/local-reverse-geocoder/-/local-reverse-geocoder-0.12.5.tgz",
"integrity": "sha512-FaH8+T29K9PQRiiqYlt+M9Qvq9GlSnWEnX0FTDXgPrNzQ9SWWYGEvO5uODwAD6sep9z19u/K/+Z3cw4AGVW97Q==",
"dependencies": {
"async": "^3.2.4",
"cors": "^2.8.5",
"csv-parse": "^5.3.0",
"debug": "^4.3.4",
"kdt": "^0.1.0",
@@ -17109,12 +17108,11 @@
"dev": true
},
"local-reverse-geocoder": {
"version": "0.12.2",
"resolved": "https://registry.npmjs.org/local-reverse-geocoder/-/local-reverse-geocoder-0.12.2.tgz",
"integrity": "sha512-kTSvDxGTuJoqx619jmHFoGCqFpBi0PPwyd7PDOLZCyo8mMEwJSMx713+ksOCihGpzUfO3hcclE7z/T43sY/IaA==",
"version": "0.12.5",
"resolved": "https://registry.npmjs.org/local-reverse-geocoder/-/local-reverse-geocoder-0.12.5.tgz",
"integrity": "sha512-FaH8+T29K9PQRiiqYlt+M9Qvq9GlSnWEnX0FTDXgPrNzQ9SWWYGEvO5uODwAD6sep9z19u/K/+Z3cw4AGVW97Q==",
"requires": {
"async": "^3.2.4",
"cors": "^2.8.5",
"csv-parse": "^5.3.0",
"debug": "^4.3.4",
"kdt": "^0.1.0",

View File

@@ -55,7 +55,7 @@
"geo-tz": "^7.0.2",
"i18n-iso-countries": "^7.5.0",
"joi": "^17.5.0",
"local-reverse-geocoder": "^0.12.2",
"local-reverse-geocoder": "^0.12.5",
"lodash": "^4.17.21",
"luxon": "^3.0.3",
"passport": "^0.6.0",

View File

@@ -119,7 +119,7 @@
in:fade={{ duration: 100 }}
out:fade={{ duration: 100 }}
id="account-info-panel"
class="absolute right-[25px] top-[75px] bg-white shadow-lg rounded-2xl w-[360px] text-center"
class="absolute right-[25px] top-[75px] bg-white shadow-lg rounded-2xl w-[360px] text-center z-[100]"
use:clickOutside
on:out-click={() => (shouldShowAccountInfoPanel = false)}
>

View File

@@ -94,7 +94,7 @@
<div
id="immich-scrubbable-scrollbar"
class="fixed right-0 bg-immich-bg z-[999] hover:cursor-row-resize select-none "
class="fixed right-0 bg-immich-bg z-[50] hover:cursor-row-resize select-none "
style:width={isDragging ? '100vw' : '60px'}
style:background-color={isDragging ? 'transparent' : 'transparent'}
on:mouseenter={() => (isHover = true)}