diff --git a/README.md b/README.md
index 32ef2a8..ab4e925 100644
--- a/README.md
+++ b/README.md
@@ -147,7 +147,8 @@ apt-get install build-essential libkrb5-dev gcc g++
* EXIF orientation tag:
* There is no nice way to handle EXIF orientation tag properly.
The page handles these photos, but might cause same error in the user experience (e.g.: the pages loads those photos slower. See issue [#11](https://github.com/bpatrik/pigallery2/issues/11))
-
+* Video support on weak servers (like raspberry pi) with low upload rate
+ * video playback may use up too much resources and the server might not response for a while. A solution might be to down scale / convert the video files to lower bitrate.
## Credits
Crossbrowser testing sponsored by [Browser Stack](https://www.browserstack.com)
[](https://www.browserstack.com)
diff --git a/frontend/app/gallery/cache.gallery.service.ts b/frontend/app/gallery/cache.gallery.service.ts
index a5ad661..66b87ac 100644
--- a/frontend/app/gallery/cache.gallery.service.ts
+++ b/frontend/app/gallery/cache.gallery.service.ts
@@ -28,7 +28,15 @@ export class GalleryCacheService {
localStorage.clear();
localStorage.setItem(GalleryCacheService.VERSION, DataStructureVersion.toString());
}
+ }
+ private reset() {
+ try {
+ localStorage.clear();
+ localStorage.setItem(GalleryCacheService.VERSION, DataStructureVersion.toString());
+ } catch (e) {
+
+ }
}
@@ -51,7 +59,12 @@ export class GalleryCacheService {
timestamp: Date.now(),
item: items
};
- localStorage.setItem(GalleryCacheService.AUTO_COMPLETE_PREFIX + text, JSON.stringify(tmp));
+ try {
+ localStorage.setItem(GalleryCacheService.AUTO_COMPLETE_PREFIX + text, JSON.stringify(tmp));
+ } catch (e) {
+ this.reset();
+ console.error(e);
+ }
}
public getInstantSearch(text: string): SearchResultDTO {
@@ -73,7 +86,12 @@ export class GalleryCacheService {
timestamp: Date.now(),
item: searchResult
};
- localStorage.setItem(GalleryCacheService.INSTANT_SEARCH_PREFIX + text, JSON.stringify(tmp));
+ try {
+ localStorage.setItem(GalleryCacheService.INSTANT_SEARCH_PREFIX + text, JSON.stringify(tmp));
+ } catch (e) {
+ this.reset();
+ console.error(e);
+ }
}
@@ -103,7 +121,12 @@ export class GalleryCacheService {
if (typeof type !== 'undefined') {
key += GalleryCacheService.SEARCH_TYPE_PREFIX + type;
}
- localStorage.setItem(key, JSON.stringify(tmp));
+ try {
+ localStorage.setItem(key, JSON.stringify(tmp));
+ } catch (e) {
+ this.reset();
+ console.error(e);
+ }
}
@@ -134,8 +157,12 @@ export class GalleryCacheService {
return;
}
- localStorage.setItem(key, JSON.stringify(directory));
-
+ try {
+ localStorage.setItem(key, JSON.stringify(directory));
+ } catch (e) {
+ this.reset();
+ console.error(e);
+ }
directory.directories.forEach((dir: DirectoryDTO) => {
const sub_key = GalleryCacheService.CONTENT_PREFIX + Utils.concatUrls(dir.path, dir.name);
if (localStorage.getItem(sub_key) == null) { // don't override existing
diff --git a/frontend/app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.css b/frontend/app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.css
index db6d1ab..7b3e503 100644
--- a/frontend/app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.css
+++ b/frontend/app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.css
@@ -44,3 +44,10 @@
margin: 0;
font-size: 1.2rem;
}
+
+.dir-link{
+ cursor: pointer;
+}
+.dir-link:hover{
+ text-decoration: underline;
+}
diff --git a/frontend/app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html b/frontend/app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html
index 8a7ccd9..10258de 100644
--- a/frontend/app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html
+++ b/frontend/app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html
@@ -10,7 +10,9 @@