diff options
Diffstat (limited to 'viewer/src/store')
-rw-r--r-- | viewer/src/store/galleryStore.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/viewer/src/store/galleryStore.ts b/viewer/src/store/galleryStore.ts index 8a611ea..179fbe2 100644 --- a/viewer/src/store/galleryStore.ts +++ b/viewer/src/store/galleryStore.ts | |||
@@ -44,6 +44,10 @@ export default class GalleryStore extends VuexModule { | |||
44 | // Pushes all tags for a root item (and its children) to the index | 44 | // Pushes all tags for a root item (and its children) to the index |
45 | private static pushTagsForItem(index: Tag.Index, item: Gallery.Item) { | 45 | private static pushTagsForItem(index: Tag.Index, item: Gallery.Item) { |
46 | console.log("IndexingTagsFor: ", item.path); | 46 | console.log("IndexingTagsFor: ", item.path); |
47 | if (item.properties.type === "directory") { | ||
48 | item.properties.items.forEach(item => this.pushTagsForItem(index, item)); | ||
49 | return; // Directories are not indexed | ||
50 | } | ||
47 | for (const tag of item.tags) { | 51 | for (const tag of item.tags) { |
48 | const parts = tag.split('.'); | 52 | const parts = tag.split('.'); |
49 | let lastPart: string | null = null; | 53 | let lastPart: string | null = null; |
@@ -54,8 +58,6 @@ export default class GalleryStore extends VuexModule { | |||
54 | lastPart = part; | 58 | lastPart = part; |
55 | } | 59 | } |
56 | } | 60 | } |
57 | if (item.properties.type === "directory") | ||
58 | item.properties.items.forEach(item => this.pushTagsForItem(index, item)); | ||
59 | } | 61 | } |
60 | 62 | ||
61 | // Searches for an item by path from a root item (navigation) | 63 | // Searches for an item by path from a root item (navigation) |