diff --git a/package.json b/package.json index 39c29eb7..745d5e47 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Calvin Montgomery", "name": "CyTube", "description": "Online media synchronizer and chat", - "version": "3.70.0", + "version": "3.70.1", "repository": { "url": "http://github.com/calzoneman/sync" }, diff --git a/src/ffmpeg.js b/src/ffmpeg.js index 43963ead..377d3cbe 100644 --- a/src/ffmpeg.js +++ b/src/ffmpeg.js @@ -8,6 +8,8 @@ var path = require("path"); import { callOnce } from './util/call-once'; +const CYTUBE_VERSION = require('../package.json').version; + const LOGGER = require('@calzoneman/jsli')('ffmpeg'); const ECODE_MESSAGES = { ENOTFOUND: e => ( @@ -155,8 +157,11 @@ function testUrl(url, cb, params = { redirCount: 0, cookie: '' }) { var transport = (data.protocol === "https:") ? https : http; data.method = "HEAD"; + data.headers = { + 'User-Agent': `CyTube/${CYTUBE_VERSION}` + }; if (cookie) { - data.headers = { 'Cookie': cookie }; + data.headers['Cookie'] = cookie; } try { @@ -170,6 +175,7 @@ function testUrl(url, cb, params = { redirCount: 0, cookie: '' }) { "on the website hosting the link. For best results, use " + "a direct link. See https://git.io/vrE75 for details."); } + const nextParams = { redirCount: redirCount + 1, cookie: cookie + getCookie(res)