From b2b04df23b850f596e604c0acdf474eba2da320b Mon Sep 17 00:00:00 2001 From: Florent Date: Sun, 25 Jul 2021 16:59:42 +0200 Subject: [PATCH] Adapt main.ts to use PeerTubeRequester.prototype.uploadFromUrl --- src/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 3cb66d4..722f149 100644 --- a/src/main.ts +++ b/src/main.ts @@ -54,7 +54,7 @@ async function register({ await addListeners(settings["ytb-urls"]); }); - myManager.on("newEntries", (entries: any) => { + myManager.on("newEntries", async (entries: any) => { const datas = listenersDataBinding.get(entries.addressListener); if (!datas) return; @@ -64,7 +64,7 @@ async function register({ JSON.stringify(entries) ); for (const item of entries.items) - peertube.apiRequest({ + await peertube.uploadFromUrl({ channelId: datas.channelId, targetUrl: item.link, });