dav: exclude locals

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/653/head
Varun Patil 2023-05-08 19:09:50 -07:00
parent 6642e0c577
commit 41a9e306cb
1 changed files with 4 additions and 1 deletions

View File

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