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:
Michael Mayer
2022-04-15 09:42:07 +02:00
parent 0a9f6a72bc
commit 92e6c4fe1e
335 changed files with 3606 additions and 2708 deletions

View File

@@ -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")