Fixed index file for single post fetching.

This commit is contained in:
2018-07-01 01:07:32 +02:00
parent 240146e554
commit c639503667
6 changed files with 52 additions and 38 deletions

View File

@@ -7,6 +7,8 @@ const ffmpeg = require('fluent-ffmpeg');
function save(requestedFilepath, streams, item, post) {
const filepath = requestedFilepath.split('/').map(component => {
console.log(component);
if(config.library.truncate && component.length > config.library.truncate.limit) {
return component.slice(0, config.library.truncate.limit - config.library.truncate.truncator.length) + config.library.truncate.truncator;
}
@@ -14,6 +16,8 @@ function save(requestedFilepath, streams, item, post) {
return component;
}).join(path.sep);
console.log(filepath);
const pathComponents = path.parse(filepath);
// allow for single stream argument