diff --git a/src/services/dav/base.ts b/src/services/dav/base.ts index 90cf766c..7973201a 100644 --- a/src/services/dav/base.ts +++ b/src/services/dav/base.ts @@ -7,8 +7,8 @@ import { IFileInfo, IPhoto } from '../../types'; import { genFileInfo } from '../FileUtils'; import { API } from '../API'; import { getAlbumFileInfos } from './albums'; -import * as utils from '../Utils'; import client from '../DavClient'; +import * as utils from '../Utils'; export const props = ` @@ -53,6 +53,9 @@ export async function getFiles(photos: IPhoto[]): Promise { // Get file infos let fileInfos: IFileInfo[] = []; + // Remove any local photos + photos = photos.filter((photo) => !(photo.flag & utils.constants.c.FLAG_IS_LOCAL)); + // Get file IDs array const fileIds = photos.map((photo) => photo.fileid);