Example
This is a script to upload torrents automatically when them complete downloading.
Prepare
- Install
nodejs
in your Windows - Create work directory in 'Documents' folder and copy everything to it
C:\Users\%USERNAME%\Document\qptUpload
- Install
npm
and get modules calledutorrent-api
andqingyingpt-api
OR copy the folder from GitHub tonode-modules
folder
qingyingpt-api utorrent-api - Configure utorrent
Settings->Advanced->WebUI
Like this:- Enable WebUI
- Enable Auth (username, password)
- Specify Listening Port
- Add Default Download Folder
- Configure utorrent
Settings->Advanced->RunProgram
Like this:
node C:\Users\%USERNAME%\Documents\qptUpload\qpt-ut.js %K %D %N %T %L %F
Config
config.json
contains 2 part: utorrent client and qingyingpt api access- username password addr port dir - the same as utorrent settings
(dir - the utorrent's torrents default directory) - id hash key - the information from QingyingPT
- username password addr port dir - the same as utorrent settings
prefix.json
contain the array which filters the entries and calls the templates- type - 'regexp' or 'string'
- s - the checking string
- t - the partition of tracker URL
- details - file name of the template
preset
folder stores templates associated withprefix.json
- Line 1 - Subtitle
- Line 2 - Category
- Line 3 - Source
- Line 4 - IMDb URL
- Line 5 - Douban URL
- Line 6 - "description----"
- Line 7~Fin - Description
preset\example
is an example for uploading game templates
NOTE
- Replace
%USERNAME%
with%USERNAME%
- JSON files need
"
and\
,
between array's items