1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-25 02:04:15 +02:00

package update and bugfix

This commit is contained in:
Patrik J. Braun 2018-12-02 20:57:16 +01:00
parent 66d793fe05
commit 5ea5e465b7
8 changed files with 103 additions and 56 deletions

View File

@ -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)
[<img src="https://camo.githubusercontent.com/a7b268f2785656ab3ca7b1cbb1633ee5affceb8f/68747470733a2f2f64677a6f7139623561736a67312e636c6f756466726f6e742e6e65742f70726f64756374696f6e2f696d616765732f6c61796f75742f6c6f676f2d6865616465722e706e67" alt="Browser Stack" height="31px" style="background: cornflowerblue;">](https://www.browserstack.com)

View File

@ -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
};
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
};
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;
}
try {
localStorage.setItem(key, JSON.stringify(tmp));
} catch (e) {
this.reset();
console.error(e);
}
}
@ -134,8 +157,12 @@ export class GalleryCacheService {
return;
}
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

View File

@ -44,3 +44,10 @@
margin: 0;
font-size: 1.2rem;
}
.dir-link{
cursor: pointer;
}
.dir-link:hover{
text-decoration: underline;
}

View File

@ -10,7 +10,9 @@
<span class="details-icon oi oi-image"></span>
</div>
<div class="col-10">
<div class="details-main">
<div class="details-main dir-link" title="{{FullPath}}"
[routerLink]="['/gallery', DirectoryPath]"
[queryParams]="queryService.getParams()">
{{media.name}}
</div>
<div class="details-sub row">

View File

@ -4,6 +4,7 @@ import {Config} from '../../../../../common/config/public/Config';
import {MediaDTO} from '../../../../../common/entities/MediaDTO';
import {VideoDTO, VideoMetadata} from '../../../../../common/entities/VideoDTO';
import {Utils} from '../../../../../common/Utils';
import {QueryService} from '../../../model/query.service';
@Component({
selector: 'app-info-panel',
@ -16,7 +17,7 @@ export class InfoPanelLightboxComponent {
public mapEnabled = true;
constructor(public elementRef: ElementRef) {
constructor(public queryService: QueryService) {
this.mapEnabled = Config.Client.Map.enabled;
}
@ -28,6 +29,15 @@ export class InfoPanelLightboxComponent {
return (this.media.metadata.size.width * this.media.metadata.size.height / 1000000).toFixed(2);
}
get FullPath(): string {
return Utils.concatUrls(this.media.directory.path, this.media.directory.name, this.media.name);
}
get DirectoryPath() {
return Utils.concatUrls(this.media.directory.path, this.media.directory.name);
}
calcSize(size: number) {
const postFixes = ['B', 'KB', 'MB', 'GB', 'TB'];

View File

@ -186,14 +186,6 @@
</context-group>
<target>Too many results to show. Refine your search.</target>
</trans-unit>
<trans-unit id="24f166827601febff9ec90329582bc637781def8" datatype="html">
<source>Searching for:</source>
<context-group purpose="location">
<context context-type="sourcefile">app/gallery/gallery.component.html</context>
<context context-type="linenumber">51</context>
</context-group>
<target>Searching for:</target>
</trans-unit>
<trans-unit id="121cc5391cd2a5115bc2b3160379ee5b36cd7716" datatype="html">
<source>Settings</source>
<context-group purpose="location">
@ -295,11 +287,19 @@
</context-group>
<target>Months</target>
</trans-unit>
<trans-unit id="24f166827601febff9ec90329582bc637781def8" datatype="html">
<source>Searching for:</source>
<context-group purpose="location">
<context context-type="sourcefile">app/gallery/navigator/navigator.gallery.component.html</context>
<context context-type="linenumber">12</context>
</context-group>
<target>Searching for:</target>
</trans-unit>
<trans-unit id="064ce5140698af55532d5c8c6355e4605d2bcc1b" datatype="html">
<source>items</source>
<context-group purpose="location">
<context context-type="sourcefile">app/gallery/navigator/navigator.gallery.component.html</context>
<context context-type="linenumber">12</context>
<context context-type="linenumber">26</context>
</context-group>
<target>items</target>
</trans-unit>
@ -343,7 +343,7 @@
<source>duration</source>
<context-group purpose="location">
<context context-type="sourcefile">app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html</context>
<context context-type="linenumber">48</context>
<context context-type="linenumber">50</context>
</context-group>
<target>duration</target>
</trans-unit>
@ -351,7 +351,7 @@
<source>bit rate</source>
<context-group purpose="location">
<context context-type="sourcefile">app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html</context>
<context context-type="linenumber">49</context>
<context context-type="linenumber">51</context>
</context-group>
<target>bit rate</target>
</trans-unit>
@ -1695,13 +1695,13 @@
</context-group>
<target>Map</target>
</trans-unit>
<trans-unit id="6bf63e55f9a54c6d0e7a5ee7ed3e3f3ab412fa61" datatype="html">
<source>Meta files</source>
<trans-unit id="3610ff97c9b9af9a23aa02a1a05d561c8fa03f42" datatype="html">
<source>Meta file</source>
<context-group purpose="location">
<context context-type="sourcefile">frontend/app/settings/metafiles/metafile.settings.component.ts</context>
<context context-type="linenumber">1</context>
</context-group>
<target>Meta files</target>
<target>Meta file</target>
</trans-unit>
<trans-unit id="c2a9de3714f5767b174d0424bc8abe2dc37acc41" datatype="html">
<source>Other</source>

View File

@ -186,14 +186,6 @@
</context-group>
<target>Túl sok eredmény jelenik meg. Pontosítsa a keresést.</target>
</trans-unit>
<trans-unit id="24f166827601febff9ec90329582bc637781def8" datatype="html">
<source>Searching for:</source>
<context-group purpose="location">
<context context-type="sourcefile">app/gallery/gallery.component.html</context>
<context context-type="linenumber">51</context>
</context-group>
<target>Keresés:</target>
</trans-unit>
<trans-unit id="121cc5391cd2a5115bc2b3160379ee5b36cd7716" datatype="html">
<source>Settings</source>
<context-group purpose="location">
@ -295,11 +287,19 @@
</context-group>
<target>Hónapok</target>
</trans-unit>
<trans-unit id="24f166827601febff9ec90329582bc637781def8" datatype="html">
<source>Searching for:</source>
<context-group purpose="location">
<context context-type="sourcefile">app/gallery/navigator/navigator.gallery.component.html</context>
<context context-type="linenumber">12</context>
</context-group>
<target>Keresés:</target>
</trans-unit>
<trans-unit id="064ce5140698af55532d5c8c6355e4605d2bcc1b" datatype="html">
<source>items</source>
<context-group purpose="location">
<context context-type="sourcefile">app/gallery/navigator/navigator.gallery.component.html</context>
<context context-type="linenumber">12</context>
<context context-type="linenumber">26</context>
</context-group>
<target>elem</target>
</trans-unit>
@ -343,7 +343,7 @@
<source>duration</source>
<context-group purpose="location">
<context context-type="sourcefile">app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html</context>
<context context-type="linenumber">48</context>
<context context-type="linenumber">50</context>
</context-group>
<target>hossz</target>
</trans-unit>
@ -351,7 +351,7 @@
<source>bit rate</source>
<context-group purpose="location">
<context context-type="sourcefile">app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html</context>
<context context-type="linenumber">49</context>
<context context-type="linenumber">51</context>
</context-group>
<target>bit ráta</target>
</trans-unit>
@ -1695,13 +1695,13 @@
</context-group>
<target>Térkép</target>
</trans-unit>
<trans-unit id="6bf63e55f9a54c6d0e7a5ee7ed3e3f3ab412fa61" datatype="html">
<source>Meta files</source>
<trans-unit id="3610ff97c9b9af9a23aa02a1a05d561c8fa03f42" datatype="html">
<source>Meta file</source>
<context-group purpose="location">
<context context-type="sourcefile">frontend/app/settings/metafiles/metafile.settings.component.ts</context>
<context context-type="linenumber">1</context>
</context-group>
<target>Metafájlok</target>
<target>Meta fájl</target>
</trans-unit>
<trans-unit id="c2a9de3714f5767b174d0424bc8abe2dc37acc41" datatype="html">
<source>Other</source>

View File

@ -1,6 +1,6 @@
{
"name": "pigallery2",
"version": "1.2.9",
"version": "1.4.9",
"description": "This is a photo gallery optimised for running low resource servers (especially on raspberry pi)",
"author": "Patrik J. Braun",
"homepage": "https://github.com/bpatrik/PiGallery2",
@ -35,7 +35,7 @@
"ejs": "2.6.1",
"express": "4.16.4",
"fluent-ffmpeg": "2.1.2",
"jimp": "0.5.6",
"jimp": "0.6.0",
"locale": "0.1.0",
"reflect-metadata": "0.1.12",
"sqlite3": "4.0.4",
@ -47,20 +47,20 @@
},
"devDependencies": {
"@agm/core": "1.0.0-beta.5",
"@angular-devkit/build-angular": "0.10.6",
"@angular-devkit/build-optimizer": "0.10.6",
"@angular/animations": "7.1.0",
"@angular/cli": "7.0.6",
"@angular/common": "7.1.0",
"@angular/compiler": "7.1.0",
"@angular/compiler-cli": "7.1.0",
"@angular/core": "7.1.0",
"@angular/forms": "7.1.0",
"@angular/http": "7.1.0",
"@angular/language-service": "7.1.0",
"@angular/platform-browser": "7.1.0",
"@angular/platform-browser-dynamic": "7.1.0",
"@angular/router": "7.1.0",
"@angular-devkit/build-angular": "0.11.0",
"@angular-devkit/build-optimizer": "0.11.0",
"@angular/animations": "7.1.1",
"@angular/cli": "7.1.0",
"@angular/common": "7.1.1",
"@angular/compiler": "7.1.1",
"@angular/compiler-cli": "7.1.1",
"@angular/core": "7.1.1",
"@angular/forms": "7.1.1",
"@angular/http": "7.1.1",
"@angular/language-service": "7.1.1",
"@angular/platform-browser": "7.1.1",
"@angular/platform-browser-dynamic": "7.1.1",
"@angular/router": "7.1.1",
"@ngx-translate/i18n-polyfill": "1.0.0",
"@types/bcryptjs": "2.4.2",
"@types/chai": "4.1.7",
@ -71,7 +71,7 @@
"@types/fluent-ffmpeg": "2.1.8",
"@types/gm": "1.18.2",
"@types/jasmine": "3.3.0",
"@types/node": "10.12.10",
"@types/node": "10.12.11",
"@types/sharp": "0.21.0",
"@types/winston": "2.3.9",
"bootstrap": "4.1.3",
@ -88,9 +88,9 @@
"jasmine-core": "3.3.0",
"jasmine-spec-reporter": "4.2.1",
"jw-bootstrap-switch-ng2": "2.0.2",
"karma": "3.1.1",
"karma": "3.1.3",
"karma-chrome-launcher": "2.2.0",
"karma-cli": "1.0.1",
"karma-cli": "2.0.0",
"karma-coverage-istanbul-reporter": "2.0.4",
"karma-jasmine": "2.0.1",
"karma-jasmine-html-reporter": "1.4.0",