mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
temp
This commit is contained in:
parent
f8aa0433a3
commit
a24194164d
2 changed files with 7 additions and 6 deletions
|
|
@ -70,9 +70,6 @@ func (t *ImportTask) ImportPerformers(ctx context.Context) {
|
|||
|
||||
logger.Progressf("[performers] %d of %d", index, len(t.Mappings.Performers))
|
||||
|
||||
// generate checksum from performer name rather than image
|
||||
checksum := utils.MD5FromString(performerJSON.Name)
|
||||
|
||||
// Process the base 64 encoded image string
|
||||
_, imageData, err := utils.ProcessBase64Image(performerJSON.Image)
|
||||
if err != nil {
|
||||
|
|
@ -81,6 +78,8 @@ func (t *ImportTask) ImportPerformers(ctx context.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
checksum := utils.MD5FromBytes(imageData)
|
||||
|
||||
// Populate a new performer from the input
|
||||
newPerformer := models.Performer{
|
||||
Image: imageData,
|
||||
|
|
@ -168,9 +167,6 @@ func (t *ImportTask) ImportStudios(ctx context.Context) {
|
|||
|
||||
logger.Progressf("[studios] %d of %d", index, len(t.Mappings.Studios))
|
||||
|
||||
// generate checksum from studio name rather than image
|
||||
checksum := utils.MD5FromString(studioJSON.Name)
|
||||
|
||||
// Process the base 64 encoded image string
|
||||
_, imageData, err := utils.ProcessBase64Image(studioJSON.Image)
|
||||
if err != nil {
|
||||
|
|
@ -179,6 +175,8 @@ func (t *ImportTask) ImportStudios(ctx context.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
checksum := utils.MD5FromBytes(imageData)
|
||||
|
||||
// Populate a new studio from the input
|
||||
newStudio := models.Studio{
|
||||
Image: imageData,
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ func (t *SQLiteDate) Scan(value interface{}) error {
|
|||
|
||||
// Value implements the driver Valuer interface.
|
||||
func (t SQLiteDate) Value() (driver.Value, error) {
|
||||
if !t.Valid {
|
||||
return nil, nil
|
||||
}
|
||||
result, err := utils.ParseDateStringAsFormat(t.String, "2006-01-02")
|
||||
if err != nil {
|
||||
logger.Debugf("sqlite date conversion error: %s", err.Error())
|
||||
|
|
|
|||
Loading…
Reference in a new issue