You've already forked pigallery2
mirror of
https://github.com/bpatrik/pigallery2.git
synced 2026-05-16 09:21:12 +02:00
Improve missing cache handling
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
<!--Info box -->
|
||||
<div class="info rounded-bottom">
|
||||
{{album.name}} ({{album.cache.itemCount}})
|
||||
{{album.name}} ({{album.cache?.itemCount}})
|
||||
<ng-icon *ngIf="CanUpdate && !album.locked"
|
||||
(click)="deleteAlbum($event)"
|
||||
class="info-button delete float-end"
|
||||
|
||||
@@ -62,7 +62,7 @@ export class AlbumComponent implements OnInit, OnDestroy {
|
||||
ngOnInit(): void {
|
||||
if (this.album?.cache?.cover) {
|
||||
this.thumbnail = this.thumbnailService.getThumbnail(
|
||||
new Media(this.album.cache.cover, this.size, this.size)
|
||||
new Media(this.album.cache?.cover, this.size, this.size)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ export class GallerySortingService {
|
||||
Config.Gallery.enableDirectorySortingByDate === true
|
||||
) {
|
||||
c.directories.sort(
|
||||
(a, b) => (a.cache.oldestMedia || a.lastModified) - (b.cache.oldestMedia || b.lastModified)
|
||||
(a, b) => (a.cache?.oldestMedia || a.lastModified) - (b.cache?.oldestMedia || b.lastModified)
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user