Merge pull request 'Private download' (#9) from private into master
Reviewed-on: #9
This commit was merged in pull request #9.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
privateDownloadLocation: '/media/torrents-zfs',
|
||||||
ldap: {
|
ldap: {
|
||||||
url: 'ldap://10.1.0.55:389',
|
url: 'ldap://10.1.0.55:389',
|
||||||
bindDN: 'cn=ldapclient service,ou=people,dc=theta42,dc=com',
|
bindDN: 'cn=ldapclient service,ou=people,dc=theta42,dc=com',
|
||||||
|
|||||||
4
conf/development.js
Normal file
4
conf/development.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
};
|
||||||
@@ -37,7 +37,11 @@ module.exports = (sequelize, DataTypes, Model) => {
|
|||||||
await this.build(data).validate();
|
await this.build(data).validate();
|
||||||
// console.log('validate', val);
|
// 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({
|
return await super.create({
|
||||||
magnetLink: data.magnetLink,
|
magnetLink: data.magnetLink,
|
||||||
|
|||||||
2130
package-lock.json
generated
2130
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -101,6 +101,7 @@
|
|||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#tbp_proxy_torrent_dialog{
|
#tbp_proxy_torrent_dialog{
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
overflow-x: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tbp_proxy_torrent_dialog progress{
|
#tbp_proxy_torrent_dialog progress{
|
||||||
@@ -238,14 +239,14 @@
|
|||||||
<input type="text" name="hashString" value="{{{hashString}}}" readonly/>
|
<input type="text" name="hashString" value="{{{hashString}}}" readonly/>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p style="display:none">
|
<p>
|
||||||
<legend>Public Download:</legend>
|
<legend>Public Download:</legend>
|
||||||
|
|
||||||
<label for="radio-1" title="The download will appare in the communal download folder">Public</label>
|
<label for="radio-1" title="The download will appare in the communal download folder">Public</label>
|
||||||
<input type="radio" name="isPrivate" id="radio-1" value="true" checked readonly/>
|
<input type="radio" name="isPrivate" id="radio-1" value="false" checked readonly/>
|
||||||
|
|
||||||
<label for="radio-2" title="Only you(and the admins) will be able to see this download">Private</label>
|
<label for="radio-2" title="Only you(and the admins) will be able to see this download">Private</label>
|
||||||
<input type="radio" name="isPrivate" id="radio-2" value="false" readonly/>
|
<input type="radio" name="isPrivate" id="radio-2" value="true" readonly/>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p style="display:none">
|
<p style="display:none">
|
||||||
@@ -260,7 +261,7 @@
|
|||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<button type="submit">Start Download</button>
|
<button type="submit">Start Download</button>
|
||||||
<button onclick="$('#tbp_proxy_torrent_add_dialog').dialog('close')">Cancel</button>
|
<button type="reset" onclick="$('#tbp_proxy_torrent_add_dialog').dialog('close')">Cancel</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -307,7 +308,12 @@
|
|||||||
$( "#tbp_proxy_torrent_dialog" ).dialog(commonDialogOptions);
|
$( "#tbp_proxy_torrent_dialog" ).dialog(commonDialogOptions);
|
||||||
|
|
||||||
$( "#tbp_proxy_torrent_dialog_opener" ).on( "click", function() {
|
$( "#tbp_proxy_torrent_dialog_opener" ).on( "click", function() {
|
||||||
$( "#tbp_proxy_torrent_dialog" ).parent().css({position:"fixed", 'margin-right': "2em", 'margin-top': '3em'}).end().dialog( "open" );
|
if($( "#tbp_proxy_torrent_dialog" ).dialog( "isOpen" )){
|
||||||
|
$( "#tbp_proxy_torrent_dialog" ).dialog( "close" )
|
||||||
|
}else{
|
||||||
|
$( "#tbp_proxy_torrent_dialog" ).parent().css({position:"fixed", 'margin-right': "2em", 'margin-top': '3em'}).end().dialog( "open" );
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user