MCPcopy Index your code
hub / github.com/ollm/OpenComic / read

Function read

scripts/reading/progress.js:302–328  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

300}
301
302async function read(path)
303{
304 const readingProgress = storage.get('readingProgress');
305 const paths = await findReadingProgressPaths(path, true);
306
307 for(let key of paths)
308 {
309 key = relative.path(key);
310
311 const progress = readingProgress[key];
312 const pages = await countPages(key);
313
314 readingProgress[key] = {
315 ...progress,
316 ...{
317 page: pages,
318 pages: pages,
319 percent: 100,
320 completed: true,
321 }
322 };
323 }
324
325 storage.set('readingProgress', readingProgress);
326 updateProgress(path);
327
328}
329
330async function unread(path)
331{

Callers

nothing calls this directly

Calls 3

findReadingProgressPathsFunction · 0.85
countPagesFunction · 0.85
updateProgressFunction · 0.85

Tested by

no test coverage detected