From 1f2c0171b1fd8ccafa0e3db3f7afb1dcaf889f79 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Wed, 15 Apr 2020 14:29:40 +0200 Subject: [PATCH] Backend: Change titles of unknown photos Signed-off-by: Michael Mayer --- internal/photoprism/index_mediafile.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/internal/photoprism/index_mediafile.go b/internal/photoprism/index_mediafile.go index 46c9304ca..784401354 100644 --- a/internal/photoprism/index_mediafile.go +++ b/internal/photoprism/index_mediafile.go @@ -222,19 +222,7 @@ func (ind *Index) MediaFile(m *MediaFile, o IndexOptions, originalName string) ( if len(labels) > 0 && labels[0].Priority >= -1 && labels[0].Uncertainty <= 85 && labels[0].Name != "" { photo.PhotoTitle = fmt.Sprintf("%s / %s", txt.Title(labels[0].Name), m.DateCreated().Format("2006")) } else if !photo.TakenAtLocal.IsZero() { - var daytimeString string - hour := photo.TakenAtLocal.Hour() - - switch { - case hour < 17: - daytimeString = "Unknown" - case hour < 20: - daytimeString = "Sunset" - default: - daytimeString = "Unknown" - } - - photo.PhotoTitle = fmt.Sprintf("%s / %s", daytimeString, photo.TakenAtLocal.Format("2006")) + photo.PhotoTitle = fmt.Sprintf("Unknown / %s", photo.TakenAtLocal.Format("2006")) } else { photo.PhotoTitle = "Unknown" }