server: rTorrent: avoid relying on type coercion of RPC value

This commit is contained in:
Jesse Chan
2022-05-29 15:32:28 -07:00
parent 503f80b098
commit 3098cf6d88

View File

@@ -103,7 +103,7 @@ export const getAddTorrentPropertiesCalls = ({
Pick<AddTorrentByFileOptions, 'destination' | 'isBasePath' | 'isSequential' | 'isInitialSeeding' | 'tags'>
>) => {
const result: Array<string> = [
'd.tied_to_file.set=',
'd.tied_to_file.set=""',
`d.custom.set=addtime,${Math.round(Date.now() / 1000)}`,
`${isBasePath ? 'd.directory_base.set' : 'd.directory.set'}="${destination}"`,
];