MCPcopy
hub / github.com/ollm/OpenComic / getFileName

Function getFileName

scripts/opds.js:618–625  ·  view source on GitHub ↗
(link)

Source from the content-addressed store, hash-verified

616}
617
618function getFileName(link)
619{
620 const basename = p.basename(link.href);
621 const fileName = link.publicationTitle || p.parse(basename).name;
622 const ext = compatible.extension.get(link.mime) || app.extname(basename);
623
624 return fileName.replace(/[\\\/:*?\"<>|]/g, '')+(ext ? '.'+ext : '');
625}
626
627function addUrlFunctions(items, currentUrl, mainPath)
628{

Callers 1

downloadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected