mirror of
https://github.com/Tusko/vimeo-private-downloader.git
synced 2025-08-14 10:37:38 -07:00
fix paths
This commit is contained in:
parent
38e9233ef7
commit
be851ef9bc
2 changed files with 7 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
|||
const list = [
|
||||
{
|
||||
name: '1. Introduction',
|
||||
url: 'https://60vod-adaptive.akamaized.net/exp=1584616359~acl=%2F290272859%2F%2A~hmac=d8b0da041d43093909c4f58cf017b6ce204f085f18435b1c1ed60b6ca3708dbc/290272859/sep/video/1099558424,1099558420,1099557256,1099557251/master.json?base64_init=1'
|
||||
name: '1. Introduction "Double Quotes" \'SingleQuotes\' \\ can I use it?',
|
||||
url: 'https://60vod-adaptive.akamaized.net/exp=1585247356~acl=%2F290272859%2F%2A~hmac=9e480e2a6d726afd2f54bdacd7c959c00fb8d1fb1d6225aaf73b1205bef6eb5b/290272859/sep/video/1099558424,1099558420,1099557256,1099557251/master.json?base64_init=1'
|
||||
},
|
||||
// {
|
||||
// name: '2.1. Интро',
|
||||
|
|
|
@ -75,7 +75,8 @@ function loadVideo(num) {
|
|||
}
|
||||
|
||||
function processFile(type, baseUrl, initData, segments, filename, cb) {
|
||||
if (fs.existsSync('./parts/' + filename)) {
|
||||
const filePath = `./parts/${filename}`;
|
||||
if (fs.existsSync(filePath)) {
|
||||
log("⚠️", ` ${filename} - ${type} already exists`);
|
||||
cb();
|
||||
}
|
||||
|
@ -83,13 +84,13 @@ function processFile(type, baseUrl, initData, segments, filename, cb) {
|
|||
const segmentsUrl = segments.map(seg => baseUrl + seg.url);
|
||||
|
||||
const initBuffer = Buffer.from(initData, "base64");
|
||||
fs.writeFileSync(filename, initBuffer);
|
||||
fs.writeFileSync(filePath, initBuffer);
|
||||
|
||||
const output = fs.createWriteStream(filename, {
|
||||
const output = fs.createWriteStream(filePath, {
|
||||
flags: "a"
|
||||
});
|
||||
|
||||
combineSegments(type, 0, segmentsUrl, output, filename, err => {
|
||||
combineSegments(type, 0, segmentsUrl, output, filePath, err => {
|
||||
if (err) {
|
||||
log("⚠️", ` ${err}`);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue