mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-18 06:09:58 +00:00
twitter & stream: formatting
This commit is contained in:
parent
a7eb548c2b
commit
e27c02c55e
2 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue