Transcripts for podcasts and audiobooks: the show's own, or speech-to-text on your server (whisper service)
build-container / build (push) Successful in 13m20s
build-container / build (push) Successful in 13m20s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e984f11a94
commit
0534bf7c4b
10 files changed
+228
-8
No files matched your search
+10
-1
@@ -113,4 +113,13 @@ async function handle(req, res) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { handle, enabled };
|
||||
/** For transcripts: where an episode came from (its feed, its id in that feed, its file). Anyone may ask about the shows on their own list only. */
|
||||
async function feedInfo(me, itemId) {
|
||||
if (!BASE || !/^[\w-]+$/.test(String(itemId))) return null;
|
||||
const f = (o, k) => o && (o[k] !== undefined ? o[k] : o[k.toLowerCase()]);
|
||||
const it = await (await podgrab('/podcastitems/' + itemId)).json().catch(() => null); if (!it) return null;
|
||||
const pid = f(it, 'PodcastID') || f(it, 'podcastId'); if (!pid || !(await mySubs(me)).includes(pid)) return null;
|
||||
const sh = await (await podgrab('/podcasts/' + pid)).json().catch(() => null);
|
||||
return { guid: f(it, 'GUID') || f(it, 'guid') || '', fileUrl: f(it, 'FileURL') || f(it, 'fileUrl') || '', feedUrl: (sh && (f(sh, 'URL') || f(sh, 'url'))) || '' };
|
||||
}
|
||||
module.exports = { handle, enabled, feedInfo };
|
||||
Reference in new issue
Block a user