92e6c4fe1e
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)
16 lines
358 B
Go
16 lines
358 B
Go
package rnd
|
|
|
|
import (
|
|
"strconv"
|
|
"time"
|
|
)
|
|
|
|
// GenerateUID returns a unique id with prefix as string.
|
|
func GenerateUID(prefix byte) string {
|
|
result := make([]byte, 0, 16)
|
|
result = append(result, prefix)
|
|
result = append(result, strconv.FormatInt(time.Now().UTC().Unix(), 36)[0:6]...)
|
|
result = append(result, GenerateToken(9)...)
|
|
|
|
return string(result)
|
|
}
|