getDurationFromFile,
listForApi,
listByUrlAndMagnet,
- listByUrls,
+ listByUrl,
listOwned,
listOwnedByAuthor,
listRemotes,
const tasks = []
if (video.isOwned()) {
- const videoPath = pathUtils.join(constants.CONFIG.STORAGE.UPLOAD_DIR, video.filename)
+ const videoPath = pathUtils.join(constants.CONFIG.STORAGE.VIDEOS_DIR, video.filename)
this.podUrl = constants.CONFIG.WEBSERVER.URL
tasks.push(
this.find({ podUrl: fromUrl, magnetUri: magnetUri }, callback)
}
-function listByUrls (fromUrls, callback) {
- this.find({ podUrl: { $in: fromUrls } }, callback)
+function listByUrl (fromUrl, callback) {
+ this.find({ podUrl: fromUrl }, callback)
}
function listOwned (callback) {
}
function removeFile (video, callback) {
- fs.unlink(constants.CONFIG.STORAGE.UPLOAD_DIR + video.filename, callback)
+ fs.unlink(constants.CONFIG.STORAGE.VIDEOS_DIR + video.filename, callback)
}
// Maybe the torrent is not seeded, but we catch the error to don't stop the removing process