7.2: small improvements

- increased video length to 5 hours from 3 hours.
- fixed clickable area for urgent notice.
- possibly fixed random 0kb files.
This commit is contained in:
wukko
2023-08-29 23:24:00 +06:00
parent 8dcb6d8ea7
commit 055eff92da
5 changed files with 15 additions and 6 deletions

View File

@@ -205,7 +205,9 @@ export function celebrationsEmoji() {
}
export function urgentNotice(obj) {
if (obj.visible) {
return `<div id="urgent-notice" class="urgent-notice explanation" onclick="${obj.action}">${emoji(obj.emoji, 18)} ${obj.text}</div>`
return `<div id="urgent-notice" class="urgent-notice explanation">` +
`<span class="urgent-text" onclick="${obj.action}">${emoji(obj.emoji, 18)} ${obj.text}</span>` +
`</div>`
}
return ``
}

View File

@@ -16,7 +16,8 @@ export async function streamDefault(streamInfo, res) {
res.setHeader('Content-disposition', `attachment; filename="${streamInfo.isAudioOnly ? `${streamInfo.filename}.${streamInfo.audioFormat}` : regFilename}"`);
const { body: stream, headers } = await request(streamInfo.urls, {
headers: { 'user-agent': genericUserAgent }
headers: { 'user-agent': genericUserAgent },
maxRedirections: 16
});
res.setHeader('content-type', headers['content-type']);
@@ -33,7 +34,9 @@ export async function streamLiveRender(streamInfo, res) {
try {
if (streamInfo.urls.length !== 2) return fail(res);
let { body: audio } = await request(streamInfo.urls[1]);
let { body: audio } = await request(streamInfo.urls[1], {
maxRedirections: 16
});
let format = streamInfo.filename.split('.')[streamInfo.filename.split('.').length - 1],
args = [