diff --git a/.vscode/settings.json b/.vscode/settings.json index ca8dfaf..7bb33ee 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,5 +7,6 @@ "https://json.schemastore.org/kustomization.json": "file:///home/cj/Documents/futureporn-monorepo/clusters/production/infrastructure.yaml" }, "editor.tabSize": 2, - "editor.formatOnSave": true + "editor.formatOnSave": true, + "git.ignoreLimitWarning": true } \ No newline at end of file diff --git a/playbooks/do-nothing/publish.abs b/playbooks/do-nothing/publish.abs index d5aeb02..a96b102 100644 --- a/playbooks/do-nothing/publish.abs +++ b/playbooks/do-nothing/publish.abs @@ -19,7 +19,8 @@ echo(" * Remote pin the IPFS CID") echo(" [Press Enter When Complete...]") _ = stdin() -echo(" * Create magnet link. ex: `torf ~/Downloads/projektmelody-chaturbate-2025-08-25.mp4 --notorrent --notracker --webseed https://futureporn-b2.b-cdn.net/projektmelody-chaturbate-2025-08-25.mp4'") +echo(" * Create magnet link. ex: `mktorrent --web-seed https://futureporn-b2.b-cdn.net/projektmelody-fansly-2025-08-27.mp4 ~/Documents/voddo/projektmelody-fansly-2025-08-27.mp4`") +echo(" * Create magnet link. ex: `torf ~/Downloads/projektmelody-chaturbate-2025-08-27.mp4 --notorrent --notracker`") echo(" [Press Enter When Complete...]") _ = stdin() diff --git a/services/our/package.json b/services/our/package.json index d88b0c1..237c906 100644 --- a/services/our/package.json +++ b/services/our/package.json @@ -1,7 +1,7 @@ { "name": "futureporn", "private": true, - "version": "2.4.14", + "version": "2.5.0", "type": "module", "scripts": { "dev": "concurrently npm:dev:serve npm:dev:build npm:dev:worker npm:dev:compose npm:dev:sftp", @@ -101,4 +101,4 @@ "prisma": { "seed": "tsx prisma/seed.ts" } -} +} \ No newline at end of file diff --git a/services/our/src/utils/s3.ts b/services/our/src/utils/s3.ts index 832edfc..c1108f1 100644 --- a/services/our/src/utils/s3.ts +++ b/services/our/src/utils/s3.ts @@ -6,6 +6,7 @@ import { import { readFile } from 'fs/promises'; import { env } from '../config/env' // adjust this path based on your project structure import logger from "./logger"; +import { getNanoSpawn } from "./nanoSpawn"; let client: S3Client | null = null @@ -24,33 +25,38 @@ export async function uploadFile( if (!mimetype) throw new Error('uploadFile requires mimetype as fifth param'); logger.debug(`[uploadFile] filePath=${filePath} with key=${key} bucket=${bucket}`); - try { - // Read file content from disk - const fileBuffer = await readFile(filePath); + const spawn = await getNanoSpawn(); + await spawn('b2', ['file', 'upload', bucket, filePath, key]) - // Upload to S3 - await s3Client.send( - new PutObjectCommand({ - Bucket: bucket, - Key: key, - Body: fileBuffer, - ContentType: mimetype, // or determine dynamically if needed - }), - ); + return key - return key; + // try { + // // Read file content from disk + // const fileBuffer = await readFile(filePath); - } catch (caught) { - if (caught instanceof S3ServiceException) { - logger.error( - `Error from S3 while uploading to ${bucket}. ${caught.name}: ${caught.message}`, - ); - } else { - logger.error(`Unexpected error during upload:`, caught); - } + // // Upload to S3 + // await s3Client.send( + // new PutObjectCommand({ + // Bucket: bucket, + // Key: key, + // Body: fileBuffer, + // ContentType: mimetype, // or determine dynamically if needed + // }), + // ); - throw new Error(`Failed to upload ${filePath} to s3://${bucket}/${key}`); - } + // return key; + + // } catch (caught) { + // if (caught instanceof S3ServiceException) { + // logger.error( + // `Error from S3 while uploading to ${bucket}. ${caught.name}: ${caught.message}`, + // ); + // } else { + // logger.error(`Unexpected error during upload:`, caught); + // } + + // throw new Error(`Failed to upload ${filePath} to s3://${bucket}/${key}`); + // } } diff --git a/services/rssapp/index.js b/services/rssapp/index.js index adcd1d5..7d5c247 100644 --- a/services/rssapp/index.js +++ b/services/rssapp/index.js @@ -40,7 +40,8 @@ async function getJson(username) { const formatted = formatTwitterDate(sinceDate); const { defaultDatasetId } = await client.actor('kaitoeasyapi/twitter-x-data-tweet-scraper-pay-per-result-cheapest').call({ - searchTerms: [`from:${username} since:${formatted}`] + searchTerms: [`from:${username} since:${formatted}`], + maxItems: 15, }); // Fetches results from the actor's dataset.