Skip to content

Commit

Permalink
upload: update the list of supported file (issue #15)
Browse files Browse the repository at this point in the history
  • Loading branch information
laaqxdze1k committed Sep 16, 2023
1 parent 17f3b6b commit a736b6a
Show file tree
Hide file tree
Showing 4 changed files with 157 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmdduplicate/duplicate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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")
Expand Down
52 changes: 51 additions & 1 deletion immich/assets/googlephotos.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
52 changes: 51 additions & 1 deletion immich/assets/localassets.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
54 changes: 53 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a736b6a

Please sign in to comment.