added stage for metadata extraction

This commit is contained in:
Abhinav 2022-02-09 10:32:14 +05:30
parent 95a7b871f6
commit 858315c897
3 changed files with 6 additions and 3 deletions

View file

@ -25,6 +25,7 @@ export const NULL_LOCATION: Location = { latitude: null, longitude: null };
export enum UPLOAD_STAGES {
START,
READING_GOOGLE_METADATA_FILES,
EXTRACTING_METADATA,
UPLOADING,
FINISH,
}

View file

@ -92,11 +92,12 @@ class UploadManager {
);
}
if (mediaFiles.length) {
UIService.setUploadStage(UPLOAD_STAGES.START);
UIService.setUploadStage(UPLOAD_STAGES.EXTRACTING_METADATA);
await this.extractMetadataFromFiles(mediaFiles);
uploadService.setMetadataAndFileTypeInfoMap(
this.metadataAndFileTypeInfoMap
);
UIService.setUploadStage(UPLOAD_STAGES.START);
await this.uploadMediaFiles(mediaFiles);
}
UIService.setUploadStage(UPLOAD_STAGES.FINISH);

View file

@ -103,9 +103,10 @@ const englishConstants = {
UPLOAD: {
0: 'preparing to upload',
1: 'reading google metadata files',
2: (fileCounter) =>
2: 'reading file metadata to organize file',
3: (fileCounter) =>
`${fileCounter.finished} / ${fileCounter.total} files backed up`,
3: 'backup complete',
4: 'backup complete',
},
UPLOADING_FILES: 'file upload',
FILE_NOT_UPLOADED_LIST: 'the following files were not uploaded',