diff --git a/convex/actions.ts b/convex/actions.ts index 9a10d68..1c569d7 100644 --- a/convex/actions.ts +++ b/convex/actions.ts @@ -5,7 +5,6 @@ import { api } from "./_generated/api" import * as fs from "node:fs/promises" import * as fsSync from "node:fs" import * as music from "music-metadata" -import * as os from "node:os" import * as path from "node:path" import { ConvexError } from "convex/values" @@ -15,7 +14,7 @@ import { action, type ActionCtx } from "./_generated/server" const DATA_DIR = process.env.CONVEX_SITE_URL?.includes("127.0.0.1") ? "/Volumes/FastStorage/Apple Music" : process.env.DATA || "/data" -const HLS_CACHE_DIR = path.join(os.tmpdir(), "../otunes-hls") +const HLS_CACHE_DIR = "/tmp/otunes" const HLS_MAX_IDLE_MS = 30 * 60 * 1000 async function cleanHlsStreamsOlderThan(maxIdleMs: number) { @@ -23,8 +22,6 @@ async function cleanHlsStreamsOlderThan(maxIdleMs: number) { let checked = 0 let removed = 0 let failed = 0 - console.log(os.tmpdir()) - console.log(HLS_CACHE_DIR) let entries: fsSync.Dirent[] = [] try { diff --git a/lib/server-hls.ts b/lib/server-hls.ts index e166aed..1acfb1a 100644 --- a/lib/server-hls.ts +++ b/lib/server-hls.ts @@ -47,7 +47,7 @@ export function selectHlsSourceCodec( } function hlsCacheRoot() { - return path.join(os.tmpdir(), "otunes-hls") + return "/tmp/otunes" } async function hlsJobKey(