mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Download: Add Disabled, Originals, MediaRaw & MediaSidecar Flags #2234
Extends DownloadSettings with 4 additional options: - Name: File name pattern for downloaded files (existed) - Disabled: Disables downloads - Originals: Only download files stored in "originals" folder - MediaRaw: Include RAW image files - MediaSidecar: Include metadata sidecar files (JSON, XMP, YAML)
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
func TestUpdate(t *testing.T) {
|
||||
var r = rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
t.Run("IDMissing", func(t *testing.T) {
|
||||
uid := rnd.PPID('p')
|
||||
uid := rnd.GenerateUID('p')
|
||||
m := &Photo{ID: 0, PhotoUID: uid, UpdatedAt: TimeStamp(), CreatedAt: TimeStamp(), PhotoTitle: "Foo"}
|
||||
updatedAt := m.UpdatedAt
|
||||
|
||||
@@ -42,7 +42,7 @@ func TestUpdate(t *testing.T) {
|
||||
})
|
||||
t.Run("NotUpdated", func(t *testing.T) {
|
||||
id := 99999 + r.Intn(10000)
|
||||
uid := rnd.PPID('p')
|
||||
uid := rnd.GenerateUID('p')
|
||||
m := &Photo{ID: uint(id), PhotoUID: uid, UpdatedAt: time.Now(), CreatedAt: TimeStamp(), PhotoTitle: "Foo"}
|
||||
updatedAt := m.UpdatedAt
|
||||
|
||||
@@ -85,7 +85,7 @@ func TestUpdate(t *testing.T) {
|
||||
t.Run("NonExistentKeys", func(t *testing.T) {
|
||||
m := PhotoFixtures.Pointer("Photo01")
|
||||
m.ID = uint(99999 + r.Intn(10000))
|
||||
m.PhotoUID = rnd.PPID('p')
|
||||
m.PhotoUID = rnd.GenerateUID('p')
|
||||
updatedAt := m.UpdatedAt
|
||||
if err := Update(m, "ID", "PhotoUID"); err == nil {
|
||||
t.Fatal("error expected")
|
||||
|
||||
Reference in New Issue
Block a user