mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-12-10 11:10:35 +02:00
fixing tslint issue
This commit is contained in:
parent
228811bac0
commit
f853efa3c1
@ -217,13 +217,12 @@ export class MetadataLoader {
|
||||
metadata.rating = (parseInt(exif.Rating.value, 10) as any);
|
||||
}
|
||||
if (exif.subject && exif.subject.value && exif.subject.value.length > 0) {
|
||||
if (metadata.keywords == undefined) {
|
||||
if (metadata.keywords === undefined) {
|
||||
metadata.keywords = [];
|
||||
}
|
||||
for (let i = 0; i < exif.subject.value.length; i++) {
|
||||
const kw = exif.subject.value[i].description;
|
||||
if (metadata.keywords.indexOf(kw) == -1) {
|
||||
metadata.keywords.push(kw);
|
||||
for (const kw of exif.subject.value) {
|
||||
if (metadata.keywords.indexOf(kw.description) === -1) {
|
||||
metadata.keywords.push(kw.description);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -218,8 +218,6 @@ export class GalleryGridComponent implements OnChanges, OnInit, AfterViewInit, O
|
||||
|
||||
/**
|
||||
* Makes sure that the photo with the given mediaString is visible on the screen
|
||||
* @param mediaStringId
|
||||
* @private
|
||||
*/
|
||||
private renderUpToMedia(mediaStringId: string): void {
|
||||
const index = this.media.findIndex((p): boolean => this.queryService.getMediaStringId(p) === mediaStringId);
|
||||
|
@ -6,6 +6,8 @@ import {ProjectPath} from '../../../../../src/backend/ProjectPath';
|
||||
import {Utils} from '../../../../../src/common/Utils';
|
||||
|
||||
describe('DiskMangerWorker', () => {
|
||||
// loading default settings (this might have been changed by other tests
|
||||
Config.loadSync();
|
||||
|
||||
it('should parse metadata', async () => {
|
||||
Config.Server.Media.folder = path.join(__dirname, '/../../../assets');
|
||||
|
Loading…
Reference in New Issue
Block a user