Skip to content

Commit

Permalink
Merge branch 'next' of github.com:simulot/immich-go into next
Browse files Browse the repository at this point in the history
  • Loading branch information
simulot committed Dec 24, 2024
2 parents d3999e9 + daae2cb commit f447792
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions adapters/folder/readFolder.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ func (la *LocalAssetBrowser) parseDir(ctx context.Context, fsys fs.FS, dir strin
}

switch mediaType {
case filetypes.TypeUseless:
la.log.Record(ctx, fileevent.DiscoveredUseless, fshelper.FSName(fsys, name))
continue
case filetypes.TypeImage:
la.log.Record(ctx, fileevent.DiscoveredImage, fshelper.FSName(fsys, name))
case filetypes.TypeVideo:
Expand Down
8 changes: 4 additions & 4 deletions adapters/folder/readFolder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ func TestInMemLocalAssets(t *testing.T) {
expectedCounts: fileevent.NewCounts().Set(fileevent.DiscoveredImage, 7).
Set(fileevent.DiscoveredDiscarded, 8).Value(),
},

{
name: "motion picture",
flags: ImportFolderOptions{
Expand All @@ -239,13 +238,14 @@ func TestInMemLocalAssets(t *testing.T) {
addFile("motion/20231227_152817.MP4", t0),
},
expectedFiles: []string{
"motion/PXL_20210102_221126856.MP.jpg", "motion/PXL_20210102_221126856.MP",
"motion/PXL_20210102_221126856.MP~2.jpg", "motion/PXL_20210102_221126856.MP~2",
"motion/PXL_20210102_221126856.MP.jpg",
"motion/PXL_20210102_221126856.MP~2.jpg",
"motion/20231227_152817.jpg", "motion/20231227_152817.MP4",
"motion/nomotion.MP4",
},
expectedCounts: fileevent.NewCounts().Set(fileevent.DiscoveredImage, 3).
Set(fileevent.DiscoveredVideo, 4).Value(),
Set(fileevent.DiscoveredVideo, 2).
Set(fileevent.DiscoveredUseless, 2).Value(),
},

{
Expand Down
1 change: 0 additions & 1 deletion adapters/googlePhotos/testgp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ func TestBrowse(t *testing.T) {
{
"issue68MPFiles", issue68MPFiles,
sortFileResult([]fileResult{
{name: "PXL_20221228_185930354.MP", size: 1, title: "PXL_20221228_185930354.MP"},
{name: "PXL_20221228_185930354.MP.jpg", size: 2, title: "PXL_20221228_185930354.MP.jpg"},
}),
},
Expand Down
2 changes: 1 addition & 1 deletion internal/exif/direct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func Test_MetadataFromDirectRead(t *testing.T) {
name: "read JPG",
fileName: "DATA/PXL_20231006_063000139.jpg",
want: &assets.Metadata{
DateTaken: time.Date(2023, 10, 6, 8, 30, 0, 0, time.Local), // 2023:10:06 06:29:56Z
DateTaken: time.Date(2023, 10, 6, 8, 30, 0, int(139*time.Millisecond), time.Local), // 2023:10:06 06:29:56Z
Latitude: +48.8583736,
Longitude: +2.2919010,
},
Expand Down

0 comments on commit f447792

Please sign in to comment.