twitter & stream: formatting

This commit is contained in:
wukko 2023-12-17 23:50:04 +06:00
parent a7eb548c2b
commit e27c02c55e
2 changed files with 2 additions and 3 deletions

View file

@ -2,9 +2,9 @@ import { genericUserAgent } from "../../config.js";
import { createStream } from "../../stream/manage.js";
// fix all videos affected by the container bug in twitter muxer (took them over two weeks to fix it????)
const TWITTER_EPOCH = 1288834974657n;
const badContainerStart = new Date(1701446400000);
const badContainerEnd = new Date(1702605600000);
const TWITTER_EPOCH = 1288834974657n;
function needsFixing(media) {
const representativeId = media.source_status_id_str ?? media.id_str;

View file

@ -18,9 +18,8 @@ streamCache.on("expired", (key) => {
const streamSalt = randomBytes(64).toString('hex');
export function createStream(obj) {
let lifespan = streamLifespan
let streamID = nanoid(),
exp = Math.floor(new Date().getTime()) + lifespan,
exp = Math.floor(new Date().getTime()) + streamLifespan,
ghmac = sha256(`${streamID},${obj.service},${exp}`, streamSalt);
if (!streamCache.has(streamID)) {