diff --git a/cmdduplicate/duplicate.go b/cmdduplicate/duplicate.go index da751ac7..bfc791ae 100644 --- a/cmdduplicate/duplicate.go +++ b/cmdduplicate/duplicate.go @@ -121,7 +121,7 @@ func DuplicateCommand(ctx context.Context, ic *immich.ImmichClient, log *logger. sort.Slice(l, func(i, j int) bool { return l[i].ExifInfo.FileSizeInByte < l[j].ExifInfo.FileSizeInByte }) for p, a := range duplicate[k] { if p < len(l)-1 { - log.OK(" %s %dx%d, %s, %s to be deleted", a.OriginalFileName, a.ExifInfo.ExifImageWidth, a.ExifInfo.ExifImageHeight, ui.FormatBytes(a.ExifInfo.FileSizeInByte), a.OriginalPath) + log.OK(" delete %s %dx%d, %s, %s", a.OriginalFileName, a.ExifInfo.ExifImageWidth, a.ExifInfo.ExifImageHeight, ui.FormatBytes(a.ExifInfo.FileSizeInByte), a.OriginalPath) delete = append(delete, a.ID) r, err := app.Immich.GetAssetAlbums(ctx, a.ID) if err != nil { @@ -132,7 +132,7 @@ func DuplicateCommand(ctx context.Context, ic *immich.ImmichClient, log *logger. } } } else { - log.OK(" %s %dx%d, %s, %s to be kept", a.OriginalFileName, a.ExifInfo.ExifImageWidth, a.ExifInfo.ExifImageHeight, ui.FormatBytes(a.ExifInfo.FileSizeInByte), a.OriginalPath) + log.OK(" keep %s %dx%d, %s, %s", a.OriginalFileName, a.ExifInfo.ExifImageWidth, a.ExifInfo.ExifImageHeight, ui.FormatBytes(a.ExifInfo.FileSizeInByte), a.OriginalPath) yes := app.AssumeYes if !app.AssumeYes { r, err := ui.ConfirmYesNo(ctx, "Proceed?", "n") diff --git a/immich/assets/googlephotos.go b/immich/assets/googlephotos.go index 1f884add..b2451b06 100644 --- a/immich/assets/googlephotos.go +++ b/immich/assets/googlephotos.go @@ -64,7 +64,57 @@ func (fsys *GooglePhotosAssetBrowser) Browse(ctx context.Context) chan *LocalAss if err == nil && md != nil && len(md.URL) > 0 { ext := strings.ToLower(path.Ext(md.Title)) switch ext { - case ".jpg", ".jpeg", ".png", ".mp4", ".heic", ".mov", ".gif": + case ".3fr", + ".ari", + ".arw", + ".avif", + ".cap", + ".cin", + ".cr2", + ".cr3", + ".crw", + ".dcr", + ".dng", + ".erf", + ".fff", + ".gif", + ".heic", + ".heif", + ".iiq", + ".insp", + ".jpeg", + ".jpg", + ".jxl", + ".k25", + ".kdc", + ".mrw", + ".nef", + ".orf", + ".ori", + ".pef", + ".png", + ".raf", + ".raw", + ".rwl", + ".sr2", + ".srf", + ".srw", + ".tif", + ".tiff", + ".webp", + ".x3f", + ".3gp", + ".avi", + ".flv", + ".insv", + ".m2ts", + ".mkv", + ".mov", + ".mp4", + ".mpg", + ".mts", + ".webm", + ".wmv": case "": // Few titles don't have extension. Assume .jpg ext = ".jpg" diff --git a/immich/assets/localassets.go b/immich/assets/localassets.go index 457bac0e..03434ace 100644 --- a/immich/assets/localassets.go +++ b/immich/assets/localassets.go @@ -51,7 +51,57 @@ func (fsys LocalAssetBrowser) Browse(ctx context.Context) chan *LocalAssetFile { } ext := strings.ToLower(path.Ext(name)) switch ext { - case ".jpg", ".jpeg", ".png", ".mp4", ".heic", ".mov", ".gif": + case ".3fr", + ".ari", + ".arw", + ".avif", + ".cap", + ".cin", + ".cr2", + ".cr3", + ".crw", + ".dcr", + ".dng", + ".erf", + ".fff", + ".gif", + ".heic", + ".heif", + ".iiq", + ".insp", + ".jpeg", + ".jpg", + ".jxl", + ".k25", + ".kdc", + ".mrw", + ".nef", + ".orf", + ".ori", + ".pef", + ".png", + ".raf", + ".raw", + ".rwl", + ".sr2", + ".srf", + ".srw", + ".tif", + ".tiff", + ".webp", + ".x3f", + ".3gp", + ".avi", + ".flv", + ".insv", + ".m2ts", + ".mkv", + ".mov", + ".mp4", + ".mpg", + ".mts", + ".webm", + ".wmv": s, err := d.Info() diff --git a/readme.md b/readme.md index bc5ea7f0..f7d5e528 100644 --- a/readme.md +++ b/readme.md @@ -246,9 +246,61 @@ Additionally, deploying a Node.js program on user machines presents challenges. # Release notes -- Improvement of duplicate command +- Improvement of duplicate command (issue#13) - `-yes` option to assume Yes to all questions - `-date` to limit the check to a a given date range +- Accept same type of files than the server (issue#15) + - .3fr + - .ari + - .arw + - .avif + - .cap + - .cin + - .cr2 + - .cr3 + - .crw + - .dcr + - .dng + - .erf + - .fff + - .gif + - .heic + - .heif + - .iiq + - .insp + - .jpeg + - .jpg + - .jxl + - .k25 + - .kdc + - .mrw + - .nef + - .orf + - .ori + - .pef + - .png + - .raf + - .raw + - .rwl + - .sr2 + - .srf + - .srw + - .tif + - .tiff + - .webp + - .x3f + - .3gp + - .avi + - .flv + - .insv + - .m2ts + - .mkv + - .mov + - .mp4 + - .mpg + - .mts + - .webm + - .wmv" ### Release 0.2.2