Compare commits

..

1 Commits

Author SHA1 Message Date
Daniel Dietzler cc6e767091 feat: user agnostic database restore 2026-07-03 14:14:31 +02:00
23 changed files with 90 additions and 53 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
[
{
"label": "v3.0.1",
"url": "https://docs.v3.0.1.archive.immich.app"
"label": "v3.0.0",
"url": "https://docs.v3.0.0.archive.immich.app"
},
{
"label": "v2.7.5",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "immich-e2e",
"version": "3.0.1",
"version": "3.0.0",
"description": "",
"main": "index.js",
"type": "module",
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "immich-ml"
version = "3.0.1"
version = "3.0.0"
description = ""
authors = [{ name = "Hau Tran", email = "alex.tran1502@gmail.com" }]
requires-python = ">=3.11,<4.0"
+1 -1
View File
@@ -974,7 +974,7 @@ wheels = [
[[package]]
name = "immich-ml"
version = "3.0.1"
version = "3.0.0"
source = { editable = "." }
dependencies = [
{ name = "aiocache" },
+4 -4
View File
@@ -22,8 +22,8 @@ platform :android do
task: 'bundle',
build_type: 'Release',
properties: {
"android.injected.version.code" => 3054,
"android.injected.version.name" => "3.0.1",
"android.injected.version.code" => 3053,
"android.injected.version.name" => "3.0.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', track: 'beta')
@@ -35,8 +35,8 @@ platform :android do
task: 'bundle',
build_type: 'Release',
properties: {
"android.injected.version.code" => 3054,
"android.injected.version.name" => "3.0.1",
"android.injected.version.code" => 3053,
"android.injected.version.name" => "3.0.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')
+1 -1
View File
@@ -78,7 +78,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.1</string>
<string>3.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@@ -25,7 +25,6 @@ enum SyncMigrationTask {
v20260128_CopyExifWidthHeightToAsset, // Asset table has incorrect width and height for video ratio calculations.
v20260128_ResetAssetV1, // Asset v2.5.0 has width and height information that were edited assets.
v20260597_ResetAssetV1AssetV2, // Assets didn't include the uploadedAt column.
v20260701_ResetAlbumsV1, // Album user migration dropped the owner. Sync fresh albums from the server to re-populate them.
}
class SyncStreamService {
@@ -104,12 +103,6 @@ class SyncStreamService {
}
Future<void> _runPreSyncTasks(List<String> migrations, SemVer semVer) async {
if (!migrations.contains(SyncMigrationTask.v20260701_ResetAlbumsV1.name)) {
_logger.info("Running pre-sync task: v20260701_ResetAlbumsV1");
await _syncApiRepository.deleteSyncAck([SyncEntityType.albumV1]);
migrations.add(SyncMigrationTask.v20260701_ResetAlbumsV1.name);
}
if (!migrations.contains(SyncMigrationTask.v20260128_ResetExifV1.name)) {
_logger.info("Running pre-sync task: v20260128_ResetExifV1");
await _syncApiRepository.deleteSyncAck([
+1 -1
View File
@@ -3,7 +3,7 @@ Immich API
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 3.0.1
- API version: 3.0.0
- Generator version: 7.22.0
- Build package: org.openapitools.codegen.languages.DartClientCodegen
+1 -1
View File
@@ -2,7 +2,7 @@ name: immich_mobile
description: Immich - selfhosted backup media file on mobile phone
publish_to: 'none'
version: 3.0.1+3054
version: 3.0.0+3053
environment:
sdk: '>=3.12.0 <4.0.0'
+1 -1
View File
@@ -16206,7 +16206,7 @@
"info": {
"title": "Immich",
"description": "Immich API",
"version": "3.0.1",
"version": "3.0.0",
"contact": {}
},
"tags": [
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "immich-monorepo",
"version": "3.0.1",
"version": "3.0.0",
"description": "Monorepo for Immich",
"type": "module",
"private": true,
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@immich/cli",
"version": "3.0.1",
"version": "3.0.0",
"description": "Command Line Interface (CLI) for Immich",
"repository": {
"type": "git",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@immich/sdk",
"version": "3.0.1",
"version": "3.0.0",
"description": "Auto-generated TypeScript SDK for the Immich API",
"repository": {
"type": "git",
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* Immich
* 3.0.1
* 3.0.0
* DO NOT MODIFY - This file has been generated using oazapfts.
* See https://www.npmjs.com/package/oazapfts
*/
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "immich",
"version": "3.0.1",
"version": "3.0.0",
"description": "",
"author": "",
"private": true,
+67 -1
View File
@@ -407,7 +407,7 @@ export class DatabaseBackupService {
progressCb?.('restore', progress);
});
await pipeline(sqlStream, progressSource, psql, progressSink);
await pipeline(sqlStream, createSqlOwnerTransformStream(databaseUsername), progressSource, psql, progressSink);
try {
progressCb?.('migrations', 0.9);
@@ -572,3 +572,69 @@ function createSqlProgressStreams(cb: (progress: number) => void) {
return [source, sink];
}
function createSqlOwnerTransformStream(databaseUsername: string) {
const OWNER_MARKER_START = new TextEncoder().encode('OWNER TO ');
const DATA_MARKER_START = new TextEncoder().encode('FROM stdin');
const LINE_END = new TextEncoder().encode(';');
const owner = new TextEncoder().encode(databaseUsername);
let ownerSequenceIndex = 0;
let replacingOwnerIndex = 0;
let replacingOwner = false;
let readingDataIndex = 0;
let dataPart = false;
return new PassThrough({
transform(chunk, _encoding, callback) {
let result = chunk;
if (!dataPart) {
for (let index = 0; index < result.length; index++) {
if (replacingOwner) {
if (result[index] === LINE_END[0]) {
result = Buffer.concat([result.slice(0, index), owner.slice(replacingOwnerIndex), result.slice(index)]);
replacingOwnerIndex = owner.length;
} else {
result[index] = owner[replacingOwnerIndex];
replacingOwnerIndex++;
}
}
if (replacingOwnerIndex === owner.length) {
replacingOwner = false;
}
if (result[index] === OWNER_MARKER_START[ownerSequenceIndex]) {
ownerSequenceIndex++;
} else {
ownerSequenceIndex = 0;
}
if (ownerSequenceIndex === OWNER_MARKER_START.length) {
ownerSequenceIndex = 0;
replacingOwner = true;
replacingOwnerIndex = 0;
}
if (result[index] === DATA_MARKER_START[readingDataIndex]) {
readingDataIndex++;
} else {
readingDataIndex = 0;
}
if (readingDataIndex === DATA_MARKER_START.length) {
dataPart = true;
break;
}
}
}
this.push(result);
callback();
},
});
}
@@ -381,8 +381,6 @@ describe(TranscodingService.name, () => {
'50',
'-keyint_min',
'50',
'-ac',
'2',
'-copyts',
'-r',
'50130000/2012441',
-5
View File
@@ -200,11 +200,6 @@ export class BaseConfig implements VideoCodecSWConfig {
const options = ['-c:v', videoCodec, '-c:a', audioCodec, '-map', `0:${videoStream.index}`, '-map_metadata', '-1'];
if (audioStream) {
options.push('-map', `0:${audioStream.index}`);
// If there are more than 2 channels sometimes the channel config is broken when re-encoded
// TODO: Store the number of channels in the db and then set it during the transcoding: -channel_layout 5.1
if ([TranscodeTarget.All, TranscodeTarget.Audio].includes(target)) {
options.push('-ac', '2');
}
}
if (this.getBFrames() > -1) {
options.push('-bf', `${this.getBFrames()}`);
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "immich-web",
"version": "3.0.1",
"version": "3.0.0",
"license": "GNU Affero General Public License version 3",
"type": "module",
"scripts": {
@@ -5,7 +5,6 @@
import { assetViewerManager } from '$lib/managers/asset-viewer-manager.svelte';
import { castManager } from '$lib/managers/cast-manager.svelte';
import { featureFlagsManager } from '$lib/managers/feature-flags-manager.svelte';
import { authManager } from '$lib/managers/auth-manager.svelte';
import { mediaCapabilitiesManager } from '$lib/managers/media-capabilities-manager.svelte';
import { autoPlayVideo, lang, loopVideo as loopVideoPreference } from '$lib/stores/preferences.store';
import { getAssetHlsSessionUrl, getAssetHlsUrl, getAssetMediaUrl, getAssetPlaybackUrl } from '$lib/utils';
@@ -151,15 +150,6 @@
},
},
useMediaCapabilities: false,
xhrSetup: (xhr: XMLHttpRequest, url: string) => {
const authenticatedUrl = new URL(url, globalThis.location.origin);
for (const [key, value] of Object.entries(authManager.params)) {
if (value) {
authenticatedUrl.searchParams.set(key, value as string);
}
}
xhr.open('GET', authenticatedUrl.toString());
},
};
const releaseSession = () => {
@@ -101,9 +101,7 @@
{description}
</p>
{:else}
<div class="pb-2">
{@render descriptionSnippet?.()}
</div>
{@render descriptionSnippet?.()}
{/if}
{#if inputType !== SettingInputFieldType.PASSWORD}
@@ -25,7 +25,7 @@ export class GCastDestination implements ICastDestination {
private currentUrl: string | null = null;
async initialize(): Promise<boolean> {
if (!authManager.authenticated || !authManager.preferences.cast.gCastEnabled) {
if (!authManager.authenticated || authManager.preferences.cast.gCastEnabled) {
this.isAvailable = false;
return false;
}
@@ -34,7 +34,6 @@
import {
type AlbumResponseDto,
type AssetResponseDto,
AssetVisibility,
getPerson,
getTagById,
type MetadataSearchDto,
@@ -142,10 +141,8 @@
try {
const { albums, assets } =
('query' in searchDto || 'queryAssetId' in searchDto) && smartSearchEnabled
? await searchSmart({
smartSearchDto: { visibility: AssetVisibility.Timeline, ...searchDto, language: $lang },
})
: await searchAssets({ metadataSearchDto: { visibility: AssetVisibility.Timeline, ...searchDto } });
? await searchSmart({ smartSearchDto: { ...searchDto, language: $lang } })
: await searchAssets({ metadataSearchDto: searchDto });
searchResultAlbums.push(...albums.items);
searchResultAssets.push(...assets.items);