Application is useful for people who are lazy like me and do not want to create torrent tasks manually.
Application does following things:
- Scan for new torrents,
- user defines titles of torrents to be scanned (recommendation is to use it with TV shows),
- application scans internet for this torrents,
- findings are locally stored in json file.
- Prepare or create task for DownloadStation on Synology device:
- creates new torrent tasks via Synology DownloadStation API,
- saves torrent files in directory, directory is pointed out for automatic scan by DownloadStation.
- Trigger torrent task straight from link. Supported protocols are: (http, https, ftp, ftps, sftp, magnet, thunder, flashget, qqdl.
TIP 1: Application can download *.torrent files to given location. If user has torrent client like BitTorrent, BitComet, BitLord, uTorrent and that client has directory scanning option, then user can set client to scan for new *.torrent files added to download folder and automatically launch task for this torrents.
User interface is simple. TODO: Add some screens.
Basically it has 3 buttons and defined few shortcuts.
Download Favourites
- triggers scanning and creating torrent task for defined titles.Download from link
- triggers creating torrent task from given link.Download by IMDB ID
- triggers creating torrent task for given imdb id. Set of imdb ids is kept locally and it is updated each time 'Download Favourites' is pressed. It can be found at./settings/imdbTitleMap.json
Shortcuts are described on main window of UI.
Whole configuration is located in application.properties file. In order to work user has to set up application first. Further in this intro you will find hwo to set up program.
application.properties
has several parameters that could be changed in different ways.
query.page
defines how many times request for new torrents is executed. Default value is 1.
Greater value equals longer program execution time.
torrent.age
is age of the torrent given in days. This parameter is required on order to have filtering torrents
by creation date. If not specified then no filtering by date will be applied. If parameter for instance set as 2
days, then torrents older than 2 days will be filtered out.
task.creation.method
method of task creation. Possible values: REST
, COPY_FILE
. When REST is set than program
will create torrent task by calling DownloadStation API. With this option program can be run from whole internet.
When COPY_FILE is set, then program will download torrent files and save them in specified directory. I use this option when program is launched from LAN
.
When COPY_FILE option is used then torrent.file.location is mandatory. This parameter specifies location of directory, where downloaded torrents will be saved
When REST option is set all below parameters are mandatory.
torrent.url.type
what link to use in order to create task. Default value is torrent.
Possible values magnet
,torrent
.
synology.http.username
login to Synology server. If you specified here, it will override username given as run
parameter.
synology.http.password
password to Synology server. If you specified here, it will override password given as run
parameter.
synology.server.url
url of Synology device. When user wants to use url address from LAN than one may
use for instance 192.168.0.103
(In my LAN this is address of Synlogy server).
synology.server.port
port used to communication with Synology device. For http is 5000 and for https is 5001.
If 5000 is given then http
protocol is used otherwise https
is used. If you do not have valid https certificate
use port 5000, otherwise program will not be able to make request to your Synology server.
synology.download.folder
location where completed torrents will be saved. Location should start from one of the
shared folders. For instance when downloads
is the name of directory then downloads
is the value of this
parameter.
If user wants to see torrent matching result, one can specify result.filePath
property. This is location of
directory where json files with matched torrents will be stored. If not given (value is empty or property deleted)
than no result will be saved.
There is one more settings file, that contains shows which should be filtered from all torrents. This file is
shows.json
. Sample content is here:
{
"id" : 1,
"title" : "Game of Thrones",
"baseWords" : "HDTV,720p,x264",
"matchPrecision" : 3
}
It contains id
, title
, baseWords
and matchPrecision
properties.
- id
simple unique number which starts from 1 added automatically,
- title
title of the torrent (TV show),
- baseWards
additional words that title may contains (name of the codec, resolution etc.),
- matchPrecision
how many words from title
and baseWards
should torrent contains to be considered
as matched.
Json is generated automatically by application and can be found at ./settings/shows.json
- The words in
baseWards
has to be comma separated. Otherwise there will be only one phrase defined. - If
matchPrecision
is not specified, then match precision is equal to number of commas inbaseWards
plus 1.
Real scenario: I want to find and create torrent task for TV show titled Game of Thrones. Show should contain following additional words: HDTV,720p,x264 and only 2 of them should taking in to account while matching torrent. The json representation of this case is:
{
"id" : 1, //created auctomatically
"title" : "Game of Thrones",
"baseWords" : "HDTV,720p,x264",
"matchPrecision" : 2
}