diff --git a/package.json b/package.json index d160429..c2ec6be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.15.8", + "version": "1.15.9", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view", "main": "index.js", "scripts": { diff --git a/src/lib/synology-tasks.ts b/src/lib/synology-tasks.ts index 6a660e2..8f4deca 100644 --- a/src/lib/synology-tasks.ts +++ b/src/lib/synology-tasks.ts @@ -125,13 +125,22 @@ export const fetchSynologyTasks = async (serverUrl: string, username: string, pa throw new Error(`List not found: ${listId}`); } + // Use VTODO filter to ensure we get tasks, not just events const objects = await client.fetchCalendarObjects({ calendar: targetCalendar, + filters: [{ + 'comp-filter': { + _attributes: { name: 'VCALENDAR' }, + 'comp-filter': { + _attributes: { name: 'VTODO' }, + }, + }, + }], }); const parsedTasks: any[] = []; - objects.forEach(obj => { + objects.forEach((obj) => { const data = (obj as any).data; if (!data) return;