Routing: Prefix frontend UI routes with /library #840 #2466

Also improves migrations and updates the db schema docs.

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2022-10-15 21:54:11 +02:00
parent 3bad6820d7
commit e3bb8b19dd
202 changed files with 3189 additions and 2608 deletions

View File

@@ -6,7 +6,7 @@ import (
"github.com/photoprism/photoprism/internal/query"
"github.com/photoprism/photoprism/internal/service"
"github.com/photoprism/photoprism/internal/get"
"github.com/photoprism/photoprism/internal/thumb"
)
@@ -40,7 +40,7 @@ func CacheKey(ns, uid, name string) string {
// RemoveFromFolderCache removes an item from the folder cache e.g. after indexing.
func RemoveFromFolderCache(rootName string) {
cache := service.FolderCache()
cache := get.FolderCache()
cacheKey := fmt.Sprintf("folder:%s:%t:%t", rootName, true, false)
@@ -55,7 +55,7 @@ func RemoveFromFolderCache(rootName string) {
// RemoveFromAlbumCoverCache removes covers by album UID e.g. after adding or removing photos.
func RemoveFromAlbumCoverCache(uid string) {
cache := service.CoverCache()
cache := get.CoverCache()
for thumbName := range thumb.Sizes {
cacheKey := CacheKey(albumCover, uid, string(thumbName))
@@ -72,7 +72,7 @@ func RemoveFromAlbumCoverCache(uid string) {
// FlushCoverCache clears the complete cover cache.
func FlushCoverCache() {
service.CoverCache().Flush()
get.CoverCache().Flush()
if err := query.UpdateCovers(); err != nil {
log.Error(err)