Private download
This commit is contained in:
@@ -37,7 +37,11 @@ module.exports = (sequelize, DataTypes, Model) => {
|
||||
await this.build(data).validate();
|
||||
// console.log('validate', val);
|
||||
|
||||
let res = await tr_client.addUrl(data.magnetLink);
|
||||
let options = {
|
||||
'download-dir': data.isPrivate === 'true' ? `${conf.privateDownloadLocation}/${data.added_by}` : undefined,
|
||||
};
|
||||
|
||||
let res = await tr_client.addUrl(data.magnetLink, options);
|
||||
|
||||
return await super.create({
|
||||
magnetLink: data.magnetLink,
|
||||
|
||||
Reference in New Issue
Block a user