Compare commits

...

1108 Commits

Author SHA1 Message Date
kaso17
fb3065a919 Add PiXELHD tracker 2017-01-17 19:47:47 +01:00
kaso17
93e1022269 Superbits: remove dupe argument 2017-01-17 17:50:11 +01:00
kaso17
61a7bb4d10 Add Hardbay tracker 2017-01-17 17:49:43 +01:00
kaso17
cf4b3eb2c1 Add AOX tracker 2017-01-17 17:12:01 +01:00
kaso17
8e1b2feaec Cardigann: add prepend filter 2017-01-17 17:10:50 +01:00
kaso17
bba11aae9b Add GODS tracker 2017-01-17 16:05:57 +01:00
kaso17
d46fe3f3c7 Add eStone tracker 2017-01-17 15:01:39 +01:00
kaso17
ccf5112211 Cardigann: add support for filters on error messages 2017-01-17 15:00:59 +01:00
kaso17
208761f28c Bitspyder: add support for alternative style 2017-01-17 13:28:18 +01:00
kaso17
6972103891 Ethor.net (Thor's Land): use username/password/captcha login 2017-01-17 12:33:36 +01:00
kaso17
7c0d619f2f Cardigann: set referer on captcha request 2017-01-17 12:32:11 +01:00
kaso17
7bdbc4a025 IPTorrents: Don't set the Description 2017-01-17 08:32:44 +01:00
kaso17
b4e5009b2f IPTorrents: update categories 2017-01-17 08:28:36 +01:00
kaso17
77841cd4c4 IPTorrents: fix link selector 2017-01-17 08:19:25 +01:00
kaso17
df85d334a3 don't set publish_date if it's not available 2017-01-16 18:52:56 +01:00
kaso17
0846ea6a98 use ISO 8601 strict for publish_date and make it UTC 2017-01-16 18:45:18 +01:00
Devin Buhl
945f3f9c7f Add PublishDate to Potato feed for Radarr (#934) 2017-01-16 18:25:22 +01:00
kaso17
8b1381aba6 improve imdbid validation 2017-01-16 18:17:13 +01:00
kaso17
be74b3af7c AnimeBytes: fix warning 2017-01-16 18:14:41 +01:00
kaso17
ef7902b378 IPTorrents: add support for imdb search 2017-01-16 18:14:28 +01:00
kaso17
c2e3d0e225 Add imdbid validation 2017-01-16 18:08:02 +01:00
kaso17
0c02767d8f TorrentDay: enable IMDB search 2017-01-16 17:31:41 +01:00
kaso17
33c5ce86f7 TehConnection: enable IMDB search & fix BannerUrl 2017-01-16 17:30:31 +01:00
kaso17
1c9213e7f1 PassThePopcorn: enable IMDB search 2017-01-16 17:23:51 +01:00
kaso17
af1aa408c9 Add support for movie-search 2017-01-16 17:23:19 +01:00
kaso17
716fe0e6b6 Torznab: change content type for t=caps to xml only 2017-01-16 16:10:21 +01:00
kaso17
3a40e73d43 Abnormal: set encoding 2017-01-16 15:16:05 +01:00
kaso17
b6accb02dc DigitalHive: automatically re-login 2017-01-16 12:29:51 +01:00
kaso17
5599b05fb3 Cardigann: improve search URL handling 2017-01-16 12:25:16 +01:00
kaso17
54b14090dd Cardgainn: add support for login input field selectors 2017-01-16 12:24:45 +01:00
kaso17
ad921afe94 AnimeBytes: automatically re-login 2017-01-16 12:23:40 +01:00
kaso17
9b0a03d002 AnimeBytes: Fix DL links 2017-01-16 12:23:15 +01:00
kaso17
29d3930baa AnimeBytes: fix missing encodings 2017-01-16 12:15:18 +01:00
kaso17
29c1ee3cac update mono v3 note 2017-01-13 17:09:36 +01:00
kaso17
33aac7e602 Add WebAPIExceptionHandler 2017-01-13 17:00:02 +01:00
kaso17
331de4247b Bitspyder: use and filter 2017-01-13 13:30:48 +01:00
kaso17
9cecc38189 Rockhard Lossless: use and filter 2017-01-13 13:30:36 +01:00
kaso17
0965274184 Shellift: use and filter 2017-01-13 13:30:14 +01:00
kaso17
ef49f304de The Shinning: remove [TsH] prefix 2017-01-13 13:29:53 +01:00
kaso17
547a607dff Add Bitspyder tracker 2017-01-12 19:13:36 +01:00
kaso17
486760a211 Rockhard Lossless: improve login error handling 2017-01-12 18:36:19 +01:00
kaso17
97a4cd6a1f Add Rockhard Lossless tracker 2017-01-12 18:32:33 +01:00
kaso17
7cb48969be Nachtwerk: fix cats 2017-01-12 18:11:17 +01:00
kaso17
c3d2659b7f Add Nachtwerk tracker 2017-01-12 17:22:34 +01:00
kaso17
9689ea7881 Cardigann: add support for redirects on download selector 2017-01-12 17:18:50 +01:00
kaso17
cba4fe074f Fix New Real World order 2017-01-12 15:31:53 +01:00
kaso17
821e796678 Add Hyperay tracker 2017-01-12 15:31:07 +01:00
kaso17
582784c547 Superbits: cleanup 2017-01-12 13:37:14 +01:00
kaso17
538c455c6a IPTorrents: Add category 65 2017-01-12 13:36:31 +01:00
kaso17
82eaa15537 Add Infinity-T tracker 2017-01-12 12:18:22 +01:00
kaso17
0e7ce1d38d Add Freedom-HD tracker 2017-01-11 18:59:11 +01:00
kaso17
106ce8aa58 Shellife: fix login error selector 2017-01-11 18:24:49 +01:00
kaso17
2baf645351 Add Shellife tracker 2017-01-11 18:17:40 +01:00
kaso17
d9d935c267 Cardigann: add support for append modifier and trim early 2017-01-11 18:16:25 +01:00
kaso17
ef3dfad4aa BeyondHD: add leading/tailing wildcard to search 2017-01-11 17:07:06 +01:00
kaso17
6d275244ef Revert "BeyondHD: strip and filter for specific keywords later"
This reverts commit 40978fbce1.
2017-01-11 17:04:47 +01:00
kaso17
7a25d94b95 Set encoding for omdbapi calls 2017-01-11 14:48:50 +01:00
kaso17
81c9828e4c Add ShareSpaceDB tracker 2017-01-10 19:06:47 +01:00
kaso17
23b0378d2a Revert "Remove Tspate"
This reverts commit ecf295873f.
2017-01-10 18:55:10 +01:00
kaso17
dd029db392 Add FunkyTorrents tracker 2017-01-10 18:52:13 +01:00
kaso17
40978fbce1 BeyondHD: strip and filter for specific keywords later 2017-01-10 17:54:45 +01:00
kaso17
2cc451ebef Shareisland: fix categories and use url encoded wildcard 2017-01-10 16:58:45 +01:00
kaso17
2f6e1e29b1 nCore: set DL/UL factors 2017-01-10 16:18:10 +01:00
kaso17
99c0de285e Revert "Remove nostream"
This reverts commit 1215548b31.
2017-01-09 13:47:53 +01:00
Ashleigh Hopkins
d9afee215d Add support for gzip'd content (affects an IPTorrents alt URL) (#1) (#920) 2017-01-09 13:12:31 +01:00
kaso17
dc8f85d33d Add Superbits tracker 2017-01-06 19:04:46 +01:00
kaso17
1134ef71da Cardigann: add support for GET login 2017-01-06 19:04:26 +01:00
kaso17
c9e5f14687 Add Torrenting tracker 2017-01-06 17:07:52 +01:00
kaso17
dbe7561642 BeyondHD: replace special characters with wildcards 2017-01-06 16:09:22 +01:00
kaso17
9fcb16e535 Remove Freaks Tracking System 2017-01-06 15:17:47 +01:00
kaso17
1215548b31 Remove nostream 2017-01-06 15:16:30 +01:00
kaso17
ecf295873f Remove Tspate 2017-01-06 15:15:07 +01:00
kaso17
8dcc2aedc9 Cardigann: improve resolvePath usage 2017-01-06 15:05:51 +01:00
kaso17
08b3ba0f02 Elite Tracker: Add support for releases without tooltip and guess time for releases with PRE time 2017-01-06 13:30:21 +01:00
kaso17
f587ae3084 Cardigann: add optional field modifier 2017-01-05 19:15:39 +01:00
kaso17
58206b0d33 Add BitHUmen tracker 2017-01-05 19:14:41 +01:00
kaso17
8e5538a11e Avoid concurrent config file writes 2017-01-05 18:08:10 +01:00
kaso17
175bea9269 Automatically load the backup config if the primary one is corrupted 2017-01-05 18:05:14 +01:00
kaso17
33cbc71817 Add RuTracker 2017-01-05 17:36:49 +01:00
kaso17
f7014f4ca2 Add RuTracker 2017-01-05 17:36:36 +01:00
kaso17
874e14018e Add RuTracker 2017-01-05 17:36:05 +01:00
kaso17
922c08da19 Add support for empty captcha images 2017-01-05 17:31:52 +01:00
adamwinn
5fe89a85e9 tenyardtracker: minor changes (#827)
* minor changes for tenyardtracker
2017-01-04 16:20:52 +01:00
kaso17
0bcf922f37 Elite Tracker: improve search 2017-01-04 15:09:58 +01:00
Tentacule
eb485bfa60 Implement Elite-Tracker (#911)
Fixes #782
2017-01-04 12:35:49 +01:00
kaso17
74d0e022ae 7tor: add category mapping 2017-01-04 12:21:43 +01:00
kaso17
0a8675ea7c Add 7tor tracker 2017-01-03 19:01:05 +01:00
kaso17
eed8cb70a3 GFTracker: fix and improve search 2017-01-03 16:09:07 +01:00
kaso17
e476233f07 HttpWebClient: add support for Referrer 2017-01-03 15:04:49 +01:00
kaso17
b8d40b5259 Add M-Team - TP tracker 2017-01-03 14:54:36 +01:00
kaso17
a399e8d0a5 Demonoid: add more detailed audio category mapping 2017-01-03 14:01:11 +01:00
kaso17
db049b2478 Add HDSky tracker 2017-01-03 13:21:07 +01:00
kaso17
03ab411d68 Cardigann: make download method configurable 2017-01-03 13:19:23 +01:00
kaso17
20b9b692f0 x264: upgrade to recaptcha V2 2017-01-02 21:45:15 +01:00
kaso17
f99e104755 Make site link configurable for all indexers 2017-01-02 21:39:28 +01:00
kaso17
8a9648d347 Demonoid: improve search results 2017-01-02 16:27:56 +01:00
kaso17
3ca760145c Torrentech: Add support for AAC category mapping 2017-01-02 15:46:09 +01:00
kaso17
3cf09f5b0f TVChaos UK: Fix and improve search 2017-01-02 15:45:01 +01:00
kaso17
657bb15282 CleanTitle: remove brackets 2016-12-30 17:12:32 +01:00
kaso17
069c64f504 TorrentBD: fix comments field 2016-12-30 16:39:48 +01:00
kaso17
65c1aed251 Add CHBits tracker 2016-12-30 15:20:11 +01:00
kaso17
e8e4289b20 Hounddawgs: fix category handling 2016-12-30 14:10:33 +01:00
Frederik Nielsen
0838a0b258 Add movie categories to HoundDawgs (#902) 2016-12-30 13:50:04 +01:00
kaso17
8e8f143b02 Torrentech: Add compatibility for all themes 2016-12-30 13:39:56 +01:00
kaso17
2e56f662cd Shareisland: fix date parsing 2016-12-29 19:56:52 +01:00
kaso17
440d59a30e Add Torrentech indexer 2016-12-29 19:56:35 +01:00
kaso17
286ef8396a Make FuzzyTime date format selectable 2016-12-29 19:56:18 +01:00
kaso17
772df7a4c1 x264: no longer have to set PublishDate 2016-12-29 15:54:27 +01:00
kaso17
134fd3f4cf Torznap feed: always set pubDate 2016-12-29 15:51:08 +01:00
kaso17
ae8f8f7ccd BitHQ: fix definition 2016-12-29 15:47:39 +01:00
kaso17
f8637051fa PotatoController: set freeleech correctly 2016-12-29 15:47:16 +01:00
kaso17
eb0e82494c Add BitHQ tracker 2016-12-29 15:31:12 +01:00
kaso17
265b949de9 SceneFZ: Fix category parsing for parent categories 2016-12-29 14:39:48 +01:00
kaso17
34acbed7f0 Bit-City Reloaded: cleanup 2016-12-29 12:47:58 +01:00
kaso17
42eb68ba76 Bit-City Reloaded: fix category mapping 2016-12-29 12:39:42 +01:00
kaso17
37591c6da6 MySpleen: add global freeleech check 2016-12-29 12:35:05 +01:00
kaso17
f5a8ad61b9 FANO/New Retro/Secret Cinema/Shareisland/Horror Charnel/Shinning/TSpate/WorldOfP2P: use andmatch filter 2016-12-29 12:21:46 +01:00
kaso17
e064fd8ccd Add support for andmatch Rows filter 2016-12-29 12:19:49 +01:00
kaso17
8a9949ac93 MatchQueryStringAND: add support for character limit 2016-12-29 12:19:25 +01:00
kaso17
40dde036d6 Torrent Syndikat: remove articles from search 2016-12-29 12:15:17 +01:00
kaso17
171205bdee TorrentLeech: Update categories 2016-12-29 12:14:35 +01:00
kaso17
03e0c6d67e TorrentLeech: use AND filter 2016-12-29 12:01:42 +01:00
kaso17
91500c95e6 Secret Cinema: Exclude Secret Pills from search results 2016-12-29 11:36:57 +01:00
kaso17
8a082b0668 Remove FunFile definition (use C# implementation) 2016-12-29 11:07:45 +01:00
kaso17
650b6986f9 TranceTraffic: fix selector for single page search results 2016-12-28 06:56:23 +01:00
kaso17
82fd53226c Add TranceTraffic tracker 2016-12-27 19:13:01 +01:00
kaso17
77fd3e206b Cardigann: improve exception readability 2016-12-27 19:07:32 +01:00
kaso17
3989f35827 Cardigann: Don't use any default cats 2016-12-27 19:06:37 +01:00
kaso17
82376a508a RapideTracker: add details link 2016-12-27 17:09:05 +01:00
kaso17
4f9ce14e2f TorrentSyndikat: use long title 2016-12-26 15:52:26 +01:00
kaso17
60a2ffbe41 TorrentSyndikat: Add global freeleech check 2016-12-26 15:50:08 +01:00
kaso17
15598e3d66 Andraste: Add global freeleech check 2016-12-24 13:12:36 +01:00
kaso17
357be7dda9 HDClub: fix links+login 2016-12-24 08:17:27 +01:00
kaso17
a0aa77519b Add HDClub tracker 2016-12-23 17:35:30 +01:00
kaso17
f3ef590d3f Cardigann: Add support for image captchas 2016-12-23 17:18:37 +01:00
kaso17
d347ea71b8 Abnormal: attempt to fix parsing 2016-12-23 14:57:00 +01:00
kaso17
62f0bdc19c Add RapideTracker tracker 2016-12-23 14:56:31 +01:00
kaso17
e92b925eab Add FANO.IN tracker 2016-12-21 18:18:25 +01:00
kaso17
e8239f4899 IPTorrents: use encoding during login 2016-12-21 17:32:24 +01:00
kaso17
5c855d3b50 HD-Torrents: Allow alternative URLs 2016-12-20 19:45:57 +01:00
kaso17
6dfaff6aad Torrent.Md: remove description 2016-12-20 19:44:24 +01:00
kaso17
849b9e9765 Add Torrents.Md tracker 2016-12-20 19:43:08 +01:00
kaso17
eacfd53466 Add u-Torrent tracker 2016-12-20 13:20:12 +01:00
kaso17
4459697fe5 Cardigann: Don't use empty banner URLs 2016-12-20 13:18:48 +01:00
kaso17
94872affa9 Add DataScene tracker 2016-12-20 12:39:57 +01:00
kaso17
a29064e7fb Add imdb/banner/description to cached results view 2016-12-20 12:07:43 +01:00
kaso17
679cba4297 Avoid line wraps in the size column 2016-12-20 12:05:53 +01:00
kaso17
f155a21ee8 Add banner/description tooltip 2016-12-20 11:50:04 +01:00
kaso17
0913ee4934 Xtreme Zone: add banner 2016-12-20 11:48:53 +01:00
kaso17
1fa0384eb8 Add IMDB label 2016-12-20 10:01:53 +01:00
kaso17
59727fe8fc Xtreme Zone: Fix description 2016-12-20 09:40:08 +01:00
kaso17
28707fa146 ICE Torrent: fix seedersm, leechers, description imdb and add banner 2016-12-20 09:39:53 +01:00
kaso17
f408abe7a4 Cardigann: Add support for minimumratio/minimumseedtime/rageid/tvdbid/banner fields 2016-12-20 09:38:01 +01:00
kaso17
42434c35a1 Add Xtreme Zone tracker 2016-12-19 20:57:38 +01:00
kaso17
df941c54ce IPTorrents: change default URL 2016-12-19 20:25:18 +01:00
kaso17
f2eb4dacd0 ICE Torrent: Fix timezone and add details link 2016-12-19 20:24:58 +01:00
kaso17
9795587e4d Add ICE Torrent tracker 2016-12-19 19:51:54 +01:00
kaso17
15064810f8 Add TorViet tracker 2016-12-18 15:32:46 +01:00
kaso17
fbfee66c7b Shareisland: replace special characters with wildcards 2016-12-18 12:21:53 +01:00
kaso17
53e2d9e9cd Cardigann: Add support for re_replace template function
Example: {{ re_replace .Query.Keywords "[^a-zA-Z0-9]+" "%" }}
2016-12-18 12:20:33 +01:00
kaso17
49fd078a4c Add nostream tracker 2016-12-18 11:46:29 +01:00
kaso17
3dfba7c204 Add notwhat.cd tracker 2016-12-18 11:36:11 +01:00
kaso17
0e59621650 Add QcTorrent tracker 2016-12-17 17:33:34 +01:00
kaso17
c2f4cc97ab Add PassTheHeadphones tracker 2016-12-17 16:49:52 +01:00
kaso17
5fc7fca5c6 CategoryMapping: Add support for the tracker category description 2016-12-17 16:42:50 +01:00
kaso17
7b2dd93f2f TVChaosUK: relogin if necessary 2016-12-17 13:57:40 +01:00
kaso17
a8ddf21081 TVChaosUK: test RSS and scrape search 2016-12-17 13:39:52 +01:00
kaso17
7db50dba49 AlphaReign: Fix category selectors 2016-12-17 13:32:54 +01:00
kaso17
9d30f833da TorrentLeech: Fix date selector 2016-12-17 13:24:57 +01:00
kaso17
bf959f1c29 Apollo: Add uppercase global freeleech selector 2016-12-15 09:52:03 +01:00
kaso17
1cde5c5142 Add Gormogon tracker 2016-12-15 09:32:11 +01:00
kaso17
58a7de145a Cardigann: Add support for non-direct download links 2016-12-15 09:12:28 +01:00
kaso17
9a66289a26 Add more debug output on Download error 2016-12-15 06:56:41 +01:00
kaso17
6201712ce9 HD Torrents: add support for NO RATIO label 2016-12-14 08:55:05 +01:00
kaso17
f921df948c House of Torrents: reset cookies on login 2016-12-14 08:45:40 +01:00
kaso17
059701fbf6 Cardigann: fix re-login caching issue for login method=form indexers 2016-12-14 08:44:56 +01:00
kaso17
addf98e9a3 TorrentDay: change default url back to torrentday.it 2016-12-12 08:34:06 +01:00
kaso17
f124b7e30b TorrentLeech: avoid unnecessary login checks 2016-12-12 08:24:18 +01:00
kaso17
0fc2a3083c TorrentLeech: Fix login parameters/error parsing 2016-12-12 08:16:46 +01:00
kaso17
01141b8cc1 NetHD: fix rows selector 2016-12-12 07:34:03 +01:00
kaso17
be542272d1 BitMeTV: include dead torrents 2016-12-12 07:21:30 +01:00
kaso17
2c4f18128a TorrentLeech: fix relogin detection 2016-12-12 06:48:55 +01:00
kaso17
adbd6c9d0d TorrentLeech: fix DL link 2016-12-11 16:41:02 +01:00
kaso17
a854771950 TorrentLeech: adjust to new design 2016-12-11 16:36:48 +01:00
kaso17
b4fafe2845 bB: normalize spaces in title 2016-12-11 16:12:47 +01:00
kaso17
1050157546 Curl: Fix Bad Request errors 2016-12-11 15:43:39 +01:00
kaso17
6f54958ec0 The Horror Charnel: fix rows selector 2016-12-11 06:18:32 +01:00
kaso17
a53fc1e8cb IWebClient: minor cleanup 2016-12-11 05:57:39 +01:00
kaso17
e0e81ff52b TorrentDay: update to latest URLs/redirect scheme 2016-12-11 05:50:08 +01:00
kaso17
4f86272074 IWebClient: log redirect target 2016-12-11 05:48:43 +01:00
kaso17
d909d0cb60 Norbits: fix language 2016-12-11 05:21:32 +01:00
kaso17
6a18ec23b2 ToTheGloy: fix categories and add IMDB 2016-12-11 05:17:34 +01:00
kaso17
c40c176b72 PreToMe: automatic re-login is necessary 2016-12-10 22:32:41 +01:00
kaso17
55f2951694 House Of Torrents: automatic re-login is necessary 2016-12-10 22:32:31 +01:00
kaso17
5b641a5efc AlphaRatio: automatic re-login is necessary 2016-12-10 22:32:17 +01:00
kaso17
d259f3df0d bB: Add quality to title 2016-12-10 21:32:06 +01:00
kaso17
2ad44cd79b TorrentDay: Add error message on invalid cookies 2016-12-10 18:39:20 +01:00
kaso17
2ffdc1678b Make Cardigann indexers deletable 2016-12-10 18:20:04 +01:00
kaso17
db4717b714 XSpeeds: Login again only if it's necessary 2016-12-10 18:01:45 +01:00
kaso17
6d26fb8f43 LoadValuesFromJson: allow null as input 2016-12-10 17:53:41 +01:00
kaso17
ca2b4110bb Curl: Fix cloudflare challenges 2016-12-10 15:01:35 +01:00
kaso17
606e629cc6 Add ToTheGlory tracker 2016-12-10 13:49:39 +01:00
kaso17
0fd925e945 CurlHelper: FailOnError 2016-12-10 12:54:14 +01:00
kaso17
c3033db8fb Cardigann: cleanup 2016-12-10 11:56:58 +01:00
kaso17
e312a4da09 Curl: add support for request headers 2016-12-10 11:56:23 +01:00
kaso17
467eb453db IWebClient: disable warning 2016-12-10 11:17:56 +01:00
kaso17
7c0e22258a Cardigann: Add support for form login with enctype=multipart/form-data 2016-12-10 11:17:21 +01:00
kaso17
bfdc5043eb JackettUpdater: create missing directories and remove legacy files 2016-12-10 10:48:24 +01:00
kaso17
c2520c86d7 Fix CloudFlare challenges for mono/libcurl 2016-12-10 10:36:42 +01:00
kaso17
fb41b2a543 Fix indexer main categories 2016-12-09 18:31:41 +01:00
kaso17
384c76e27d Add missing languages/encodings 2016-12-09 18:20:58 +01:00
kaso17
eaf84e201f Attempt to fix #820 2016-12-09 17:45:37 +01:00
kaso17
9862ca408a Update PassThePopcorn URLs and encoding 2016-12-09 17:17:19 +01:00
kaso17
fbc48848d6 Add total configured/unconfigured indexers counters (#830) 2016-12-09 17:12:09 +01:00
kaso17
894688337e Add MySpleen tracker (#829) 2016-12-09 17:01:01 +01:00
kaso17
bae4752cad Update README.md 2016-12-09 16:26:21 +01:00
kaso17
58987e3e38 Add NetHD tracker (#828) 2016-12-09 16:21:56 +01:00
kaso17
e63d98acfc SceneFZ: fix and improve search (#825) 2016-12-08 09:47:47 +01:00
kaso17
c44385e9b7 Merge branch 'master' of https://github.com/Jackett/Jackett.git 2016-12-08 07:31:40 +01:00
kaso17
0dd2dcf497 MTV: Fix size 2016-12-08 07:31:31 +01:00
adamwinn
8f8a1af9d9 Add tenyardtracker (#824) 2016-12-08 06:38:18 +01:00
kaso17
369640b464 Add Norbits tracker (#819) 2016-12-06 18:39:21 +01:00
kaso17
a908cec280 Merge branch 'master' of https://github.com/Jackett/Jackett.git 2016-12-06 18:25:32 +01:00
kaso17
aab478e378 XSpeeds: test RSS and search 2016-12-06 18:25:21 +01:00
kaso17
67bf46ccb6 TorznabQuery: add IsTest flag 2016-12-06 18:24:40 +01:00
kaso17
36ccdd287c BIT-HDTV: Fix and improve search (#817) 2016-12-06 15:19:23 +01:00
kaso17
d499c291b9 WebRequest: make encoding configurable (#816) 2016-12-06 14:56:47 +01:00
kaso17
7835da2ea8 Indexer Download: UrlEncode some special chars 2016-12-06 11:13:18 +01:00
kaso17
2b77ca4322 Allow ', [ and ] in search queries 2016-12-06 11:09:10 +01:00
kaso17
d801808270 HD-Torrents: fix and improve search (#815) 2016-12-06 09:52:40 +01:00
kaso17
3f629ba7d2 automatically decode CloudFlare protected emails 2016-12-06 09:40:38 +01:00
kaso17
e34ffcbaa6 WebResult: Add support for headers 2016-12-06 09:39:32 +01:00
kaso17
047bdda088 Allow @ in search 2016-12-06 09:04:40 +01:00
kaso17
777f357cec update screenshot 2016-12-05 18:43:04 +01:00
kaso17
599d1c9c91 Fix Test 2016-12-05 18:25:56 +01:00
kaso17
37dae02a1b Add search buttons for indexers (#812) 2016-12-05 18:20:56 +01:00
kaso17
441023a336 Add Secret Cinema tracker (#811) 2016-12-05 18:01:11 +01:00
kaso17
56d7d42836 TorrentLeech: include 0day and music (#809) 2016-12-05 15:31:17 +01:00
kaso17
59b90d3896 Add SDBits tracker (#807) 2016-12-05 15:14:16 +01:00
kaso17
4283ea5e67 Merge branch 'master' of https://github.com/Jackett/Jackett.git 2016-12-05 15:09:46 +01:00
kaso17
32fa8cf5fd Cardigann: Add support for IMDB 2016-12-05 15:09:43 +01:00
kaso17
412df7c6f6 Sort indexers once all are loaded 2016-12-05 13:03:30 +01:00
kaso17
e275ebba87 UHDBits: genre tags have been removed (#805) 2016-12-05 12:44:49 +01:00
kaso17
c38a2533e1 replace card view with list view (#803) 2016-12-05 12:32:26 +01:00
kaso17
bb6f56bfa6 Add LastError to indexer API (#802) 2016-12-05 11:43:07 +01:00
kaso17
82ae611c81 Cardigann: Fix relogin for method=form (#800) 2016-12-04 20:58:50 +01:00
kaso17
64e537e77d Cardigann: no login needed if there's no login definition (#799) 2016-12-04 20:49:07 +01:00
kaso17
245855c2ab DanishBits: Fix DL link (#798) 2016-12-04 20:37:36 +01:00
kaso17
186136cc86 MyAnonamouse: fix and improve search (#797) 2016-12-04 20:15:01 +01:00
kaso17
0295bc68ab TehConnection: Add new attributes 2016-12-03 19:14:45 +01:00
kaso17
9da7866321 TehConnection: Use release link for details 2016-12-03 19:14:45 +01:00
kaso17
9930430026 TehConnection: Generate title for releases without scene title 2016-12-03 19:14:45 +01:00
kaso17
e56ff204f8 Add language field to indexers (#788) 2016-12-02 18:58:10 +01:00
savahu
6a3374ea86 Corrected ordering of supported trackers (#787) 2016-12-02 18:32:25 +01:00
kaso17
c134e72979 DanishBits: Add new attributes 2016-12-02 14:43:29 +01:00
kaso17
d84bd074c0 Apollo: Add support for global freeleech (#785) 2016-12-02 13:29:45 +01:00
kaso17
51b4326920 Cardigann: Add support for :root pseudo selector 2016-12-02 13:05:00 +01:00
kaso17
253bda68e9 Apollo: Update URL 2016-12-01 08:14:29 +01:00
kaso17
7fa558c743 SceneAccess: Fix login (#776) 2016-12-01 08:02:33 +01:00
kaso17
b01bf3e669 x264: Use now as PublishDate (#775) 2016-12-01 07:49:12 +01:00
kaso17
dd4eaed4fa BeyondHD: Use Login Link (#772) 2016-11-30 18:33:09 +01:00
kaso17
ac4787e292 Fix typo 2016-11-30 06:50:23 +01:00
kaso17
88002d4b53 Add TorrentBD tracker 2016-11-29 19:35:49 +01:00
kaso17
f30ba7fd59 Cardigann: Add basic support for ReCaptcha V2 (#769) 2016-11-29 19:32:50 +01:00
kaso17
470b212f32 Add The Shinning tracker (#767) 2016-11-29 14:20:23 +01:00
kaso17
3ab45960da Add Freaks Tracking System tracker (#762) 2016-11-28 19:41:57 +01:00
kaso17
870c0592fe Cardigann: Make encoding configurable 2016-11-28 19:31:12 +01:00
kaso17
da2a252848 FileList: fix download link and some more improvements (#760) 2016-11-28 16:03:22 +01:00
kaso17
88f73f185c UHDBits: Add details URL (#759) 2016-11-28 08:51:01 +01:00
kaso17
d3cef38f15 Cardigann: Prefere details over comments URL (#758) 2016-11-28 08:50:08 +01:00
kaso17
5292e8f342 IPTorrents: Add TV/x265 category (#757) 2016-11-28 08:28:37 +01:00
kaso17
ef637792c8 Add Blu-bits tracker (#749) 2016-11-27 19:07:33 +01:00
kaso17
09a2e8c084 Add support for parsing "now" time strings (#748) 2016-11-27 15:39:40 +01:00
kaso17
d3161823ad Add Apollo/XANAX tracker (#747)
* AlphaReign: add login test selector

* Add Apollo/XANAX tacker

* Add Apollo/XANAX tracker

* fix readme
2016-11-27 15:22:05 +01:00
kaso17
289844099c AlphaReign: add login test selector 2016-11-26 18:12:15 +01:00
kaso17
98a916b4c1 Cardigann: login again if necessary (#744) 2016-11-26 18:00:53 +01:00
kaso17
69ff142596 ImmortalSeed & FunFile: login again if necessary (#743) 2016-11-26 17:21:50 +01:00
kaso17
80fd717970 XSpeeds: dump feed in case of error (#742) 2016-11-26 16:57:49 +01:00
kaso17
ab083cdec8 CurlHelper: Add NotImplemented/InternalServerError debugging (#730) 2016-11-24 09:17:24 +01:00
kaso17
e16454f30c Add AlphaReign tracker (#729) 2016-11-24 08:40:49 +01:00
kaso17
23c13969ae Cardigann enhancements (#728)
* Cardigann: Use GET for landing site request

* Cardigann: Add support for magnet links
2016-11-24 08:31:39 +01:00
kaso17
dcc3f2df63 Add Ethor tracker (#726) 2016-11-23 10:19:38 +01:00
kaso17
10f7f83ecf Add EoT-Forum tracker (#723) 2016-11-21 19:07:09 +01:00
kaso17
b5e6eac3e3 Cardigann: Add support for DateHeaders (#722) 2016-11-21 18:48:36 +01:00
kaso17
9df337c3c2 Add Tspate tracker (#720) 2016-11-21 17:10:53 +01:00
flightlevel
d2f0e5ada7 MoreThanTv: Fix Times (#719)
Times are UTC, convert to local time
2016-11-21 19:46:53 +11:00
kaso17
d3aa897b1a Torrent Sector Crew: Fix rows selector for people with "Empfohlene Torrents in der Liste anzeigen" disabled. (#718) 2016-11-21 09:24:15 +01:00
kaso17
0abcf401bb Add UHDBits to README (#715) 2016-11-20 13:58:29 +01:00
kaso17
560d257f5b Remove BlueTigers tracker (#714)
https://twitter.com/hashtag/bluetigers
2016-11-20 13:50:57 +01:00
kaso17
1a619e698a Update readme (#713) 2016-11-20 13:22:59 +01:00
kaso17
52aea3de5a Add The Horror Charnel tracker (#712) 2016-11-20 13:09:25 +01:00
kaso17
8fa1268de2 Cardigann: Add support for After rows selector (#711) 2016-11-20 12:49:56 +01:00
kaso17
5a4c1282ef Cardigann: automatically solve simpleCaptchas (#710) 2016-11-20 11:24:29 +01:00
kaso17
3aecc53b5f Hebits: set comments Url (#709) 2016-11-20 10:22:17 +01:00
kaso17
328f652e1b Cardigann: make sure GUID get's set (#708) 2016-11-20 10:15:48 +01:00
kaso17
52a56f5088 TSC: fix ratio (#704) 2016-11-19 13:22:38 +01:00
kaso17
5e4c64bf68 TSC: Add ratio support (#703) 2016-11-19 13:18:22 +01:00
kaso17
930e9db67a Add Torrent Sector Crew tracker (#702) 2016-11-19 12:57:13 +01:00
kaso17
27627aa79e Cardigann: Implement form based login (#701) 2016-11-19 12:46:31 +01:00
kaso17
ddb94e3f92 ParseDateTimeGoLang: normalize spaces first (#700) 2016-11-19 12:39:22 +01:00
kaso17
f1f5b7028d Add TV-Vault tracker (#698) 2016-11-19 11:33:00 +01:00
kaso17
90959c1fc3 Best Friends: Fix parsing for users with waiting time (#696) 2016-11-17 18:57:34 +01:00
kaso17
3f79aa62d9 TorrentHeaven: Make captcha optional and fix login detection (#693) 2016-11-17 07:06:47 +01:00
kaso17
cd1d30fc4f TorrentHeaven: Use long title (#688) 2016-11-16 09:05:23 +01:00
kaso17
3093651f89 The New Retro: fix date parsing (#687) 2016-11-16 08:51:27 +01:00
kaso17
d969305cbe Cardigann: Add support for timeparse/dateparse filters (#686) 2016-11-16 08:45:32 +01:00
kaso17
22119dab16 Add The New Retro tracker (#685) 2016-11-15 19:37:13 +01:00
kaso17
23958ffba7 bB: add new attributes and login again if necessary (#684) 2016-11-15 17:50:22 +01:00
kaso17
d9673501fc Add HD4Free tracker (#683) 2016-11-15 09:17:55 +01:00
kaso17
f9341818da Merge branch 'master' of https://github.com/Jackett/Jackett.git 2016-11-15 08:32:56 +01:00
kaso17
22ab8aca3d DateTimeUtil: Improve FromUnknown parsing 2016-11-15 08:32:40 +01:00
kaso17
dd79de1321 IPTorrents: Add ipt-update.com as alternative and make it the default (#682)
* IPTorrents: Add iptorrents.eu alternative

* Add ipt-update.com as alternative and make it the default

* Add ipt-update.com as alternative and make it the default
2016-11-14 08:34:06 +01:00
kaso17
d8035d4245 UHDBits: add tab filter for URLs 2016-11-14 08:29:30 +01:00
kaso17
4642fa4da0 IPTorrents: Add iptorrents.eu alternative (#678) 2016-11-13 10:23:42 +01:00
kaso17
58ee30aa99 Fix Cardigann definition loading if HOME is not set (#673) 2016-11-10 18:24:35 +01:00
kaso17
5922795587 Fix NULL check for #668 (#672) 2016-11-10 09:16:00 +01:00
kaso17
5eccf08690 IIndexerManagerService: fix typo (#671) 2016-11-10 09:10:16 +01:00
kaso17
037d907028 Make the config saving process more robust (#670) 2016-11-10 09:06:35 +01:00
kaso17
7cfdaf4b41 Make cookie merging more robust (#669) 2016-11-10 08:37:52 +01:00
kaso17
e7918bddbc Add Windows support for the IgnoreSslErrors option (#594) 2016-11-09 18:26:32 +01:00
kaso17
6b253178b6 Transmitthe.Net: add support for new attributes (files/grabs/down-/up-loadvolumefactor) (#665) 2016-11-09 08:58:17 +01:00
kaso17
87448eea31 GetBytes(): add support for TB and default to bytes (#666)
* Default to Bytes if there's no unit

* GetBytes(): add support for TB
2016-11-09 08:57:59 +01:00
kaso17
5e2fa1408e AnimeTorrents: Fix DL link for newbie users (#657) 2016-11-08 06:59:47 +01:00
kaso17
809362e08c Dump DL response if there's an error (#653) 2016-11-06 18:14:15 +01:00
kaso17
c8831b157e TorrentBytes: Login again if the cookies became invalid (#651) 2016-11-06 17:41:22 +01:00
kaso17
2198aebf73 Demonoid: Fix login (#648) 2016-11-05 20:05:45 +01:00
kaso17
f3f8c2aea5 AnimeTorrents: Skip releases which newbie user's can't download yet (#647) 2016-11-05 19:33:44 +01:00
kaso17
83c231749d IPTorrents: Add support for optional captcha (#645) 2016-11-05 19:25:38 +01:00
kaso17
79f3b96c1d XSpeeds: Fix empty search results (#646) 2016-11-05 19:22:32 +01:00
darknessgp
fb1c016704 Comicbooks id is now 7 at Bb. (#640)
Changes the comic book id to use category id 7 to match Bb site.
2016-11-05 18:51:21 +01:00
d2dyno
a3febf8b85 Detailed Windows install help (#642)
Add more detailed instructions for installing on Windows
2016-11-05 18:50:51 +01:00
kaso17
254cec98ad Update XSpeeds categories (#639) 2016-11-04 18:59:58 +01:00
kaso17
9a2ae6aa24 Add missing animetorrents logo (#638) 2016-11-04 18:36:33 +01:00
kaso17
840037aa7f Don't try to unistall service if it isn't installed (#637) 2016-11-04 18:31:19 +01:00
kaso17
dd24f12eac Fix TorrentDay categories (#636) 2016-11-04 18:26:58 +01:00
Jay Otterbein
d1e767bd41 Added method in ParseUtil that strips out every invalid XML character from a string.
Added test for ParseUtil.RemoveInvalidXmlChars() using a snippet of rss from XSeeds that was originally causing problems.
2016-11-04 18:26:39 +01:00
Jay Otterbein
72d3f2ea49 normalized line endings and removed unused usings 2016-11-04 18:26:39 +01:00
Jay Otterbein
5e8e620df9 Code cleanup without changing logic 2016-11-04 18:26:39 +01:00
Jay Otterbein
0a61887474 Removed unused usings 2016-11-04 18:26:39 +01:00
kaso17
2002b9db9d Fix Shareisland encoding and categories (#630) 2016-11-02 20:15:19 +01:00
kaso17
e54e99d8d6 Add Shareisland tracker (#629) 2016-11-02 19:18:33 +01:00
kaso17
c3a5c7afa3 DateTimeUtils: Add support for parsing unix timestamps (#628) 2016-11-02 19:04:56 +01:00
kaso17
6f38081cf1 Cardigann fixes (#627)
* Cardigann: Fix url parsing for absolut urls

* Cardigann: normalize selector result value

* Add support for parsing unix Timestamps

* Revert "Add support for parsing unix Timestamps"

This reverts commit dba033b5a5.
2016-11-02 19:02:39 +01:00
kaso17
58b35b290b Update README.md
Add mono package details
2016-11-02 08:23:35 +01:00
kaso17
8c1086719d Improve error handling on corrupt indexer config files (#624) 2016-11-01 23:13:59 +01:00
kaso17
4074ae197b Add WorldOfP2P tracker 2016-11-01 22:50:38 +01:00
kaso17
3381d67565 Fix Cardigann querystring filter 2016-11-01 22:50:38 +01:00
kaso17
e3c7f3de28 Add support for parsing AM/PM TimeSpans 2016-11-01 22:50:38 +01:00
kaso17
70dfe3a021 Use long title from tooltip if available 2016-11-01 19:52:33 +01:00
kaso17
377dc3f586 Fix Xspeeds torrents with >= 1000 seeders/leechers 2016-11-01 19:52:33 +01:00
kaso17
b1a4a98563 ImmortalSeed: Add support for torrents without tooltip (#620) 2016-11-01 19:51:27 +01:00
kaso17
366b1ff80b Support XSpeeds releases without tooltip (#619) 2016-11-01 19:01:23 +01:00
kaso17
05abb0151e Update CloudFlareUtilities to version 0.3.3 (#618) 2016-11-01 19:01:13 +01:00
kaso17
1bf52b8c1e Add support for SXXEXX search (#615) 2016-11-01 09:22:52 +01:00
kaso17
f0a302f7f4 Fix group_torrent files parsding (#614) 2016-11-01 08:55:49 +01:00
kaso17
a027bfae54 Change TorrentShack to HTTPS (#607) 2016-10-30 20:36:03 +01:00
kaso17
6576770fa0 Add Grabs/DownloadVolumeFactor/UploadVolumeFactor attributes to AnimeTorrents 2016-10-30 20:27:14 +01:00
kaso17
45f6b9f768 Allow empty DL links to support newbie users 2016-10-30 20:27:14 +01:00
kaso17
3dc7aabb6e Add UHDBits tracker (#605) 2016-10-30 20:13:50 +01:00
kaso17
0f5e18492c Load definitions from multiple directories 2016-10-30 19:46:50 +01:00
kaso17
2f140fd2c0 use full exception 2016-10-30 19:46:50 +01:00
kaso17
661c5f2120 Fix UploadVolumeFactor 2016-10-30 19:46:50 +01:00
kaso17
28043e0070 Add support for Case selectors 2016-10-30 19:46:50 +01:00
kaso17
e6bf8918a3 add support for new attributes 2016-10-30 19:46:50 +01:00
kaso17
4737abcf58 remove debugging 2016-10-30 19:46:50 +01:00
kaso17
f7d96c108a default to POST login 2016-10-30 19:46:50 +01:00
kaso17
96017dd3bc Update AngleSharp (#603)
* Update AngleSharp
2016-10-30 17:54:40 +01:00
kaso17
94fd201507 Update AngleSharp (#602) 2016-10-30 17:51:04 +01:00
Jason Light
3dbe5774d7 Re-added AnimeTorrents (#600)
* Fixed cookies not ending in ";" being ignored.
* Re-add AnimeTorrents tracker

* Forgot Project File ~_~

* Updated README.md
2016-10-30 16:24:49 +01:00
kaso17
0a577e64d1 Fix TorrentLeech (#599) 2016-10-30 13:21:32 +01:00
kaso17
64bed2a8b3 Add BJ-Share tracker (#596) 2016-10-29 22:14:38 +02:00
kaso17
2b9b4282f4 Gracefully fail on Cardigann definitions Exceptions (#595) 2016-10-29 18:01:43 +02:00
kaso17
595f006f22 Change definition to Content (#593)
* Change definition to Content

This might fix the System.IO.DirectoryNotFoundException: Directory '.../Definitions' not found issues.
2016-10-29 17:29:13 +02:00
saffroncanoe
0abec9c1b6 Fix IPTorrents POST url (#587) 2016-10-28 07:51:50 +02:00
kaso17
6867c4a234 Add HDME logo 2016-10-27 20:22:54 +02:00
kaso17
4d2759bcd2 Add support for categories to TorrentShack (#585)
* Add support for categories to TorrentShack
2016-10-27 19:25:37 +02:00
kaso17
982c3df1ac Add support for categories to HD-Space (#584)
* Add support for categories to HD-Space
2016-10-27 18:50:58 +02:00
kaso17
3dfe2faa6b Add new attributes to various trackers (#583)
* Use AvistazTracker base

* Revert "Use AvistazTracker base"

This reverts commit 9eba02c758.

* Add new attributes to various trackers

* more DL factors for HDSpace

* new attributes for Fuzer

* add new attributes for ImmortalSeed

* set UploadVolumeFactor for myAmity

* add new attributes to bitmetv
2016-10-27 18:35:31 +11:00
kaso17
21cffe2d35 Add basic support for Cardigann definitions (#571)
* Add basic support for Cardigann definitions

* Add HDME definition

* Fix tests

* support split with negative indexes

* allow FromTimeAgo formats without spaces betwen value and unit

Example: 2h 3m

* Add basic support for Cardigann definitions

* Add HDME definition

* Fix tests

* support split with negative indexes

* allow FromTimeAgo formats without spaces betwen value and unit

Example: 2h 3m
2016-10-27 18:30:03 +11:00
kaso17
fa9bbaa18c Fix ConfigurationDataRecaptchaLogin usage (#579)
Use the existing/loaded configData instead of using blank instances.
2016-10-27 18:26:11 +11:00
kaso17
769ceb016f Use AvistazTracker base (#582) 2016-10-26 17:00:22 +02:00
kaso17
51cb8762b1 Allow AlternateLink configuration for TorrentDay (#577)
* Allow AlternateLink configuration for TorrentDay

* Allow AlternateLink configuration for TorrentDay
2016-10-26 04:25:51 +02:00
RageInvader
f04a97f237 Update TorrentDay.cs (#576) 2016-10-25 19:04:55 +02:00
kaso17
2a020f691c Add missing torznab attributes files, grabs, downloadvolumefactor, uploadvolumefactor (#565)
* Add missing torznap attributes files, grabs, downloadvolumefactor, uploadvolumefactor

* Fix typo
2016-10-25 18:40:46 +02:00
kaso17
5abdd35e1f Allow _, (, ) characters in the search query (#566) 2016-10-25 10:56:13 +02:00
larsjohnsen
5a04e66abe Manual search: Focus text field when opened (#568) 2016-10-25 10:07:31 +02:00
kaso17
0c02c22654 Make TorrentBytes row selector more rebust (#573) 2016-10-25 09:41:30 +02:00
kaso17
cd68d06dc3 Strip special chars from XSpeeds RSS feed (#564) 2016-10-25 09:30:58 +02:00
kaso17
465e607415 Fix ImmortalSeed login (#563) 2016-10-25 08:49:35 +02:00
kaso17
cbf6e45f64 Several small fixes (#562)
* Fix PreToMe search results if no category is specified

* AND filter Andraste results

* AND filter Best Friends results

* AND filter Bit City Reloaded results

* AND filter Freshon results

* AND filter myAmity results

* AND filter SceneTime results

* AND filter NewRealWorld results

* Remove dashes from TorrentLeech queries as they exclude search strings
2016-10-25 08:46:06 +02:00
TouchMyBox
c95d5fd9e2 add digitalhive to Jackett.csproj (#556) 2016-10-17 09:10:46 +02:00
kaso17
5991fd62c1 Update CloudFlareUtilities to version 0.3.2-alpha and remove the UnixLibCurlWebClient reflections and add DigitalHive tracker (#553)
* Update CloudFlareUtilities to 0.3.2-alpha

* Remove CloudFlareUtilities reflections

With CloudFlareUtilities version 0.3.2-alpha reflections are no longer needed

* Add DigitalHive tracker
2016-10-16 16:09:49 +02:00
kaso17
5384f85b5a Allow CloudFlareUtilities loading to fail (#547) 2016-10-12 21:32:41 +02:00
Don Fanning
c33315f59c update demonoid url (#541)
just updating the demonoid url to the current.
2016-10-08 19:00:06 +02:00
kaso17
7eaff55955 Support CloudFlare challenges with mono/libcurl (#538)
* Add CloudFlare support for the libcurl WebClient

* Save config if cookies are updated

If the cookieheader/config isn't updated with e.g. the cf_clearance cookie jackett has to recompute the challenge on every request.
2016-10-07 08:50:15 +02:00
Scott McKenzie
71414b805b Fix typo in SaveConfig (#532) 2016-10-01 19:53:43 +02:00
kaso17
50a06f640f Add SceneTime captcha support (#529)
* Add optional instruction message to RecaptchaLogin

* Add recaptcha support for Scene Time

* Fix Scene Time captcha handling from a remote host
2016-09-29 21:09:20 +02:00
d2dyno
6cab5fbba8 Update Demonoid URL (#527)
Update Demonoid URL. Fix for #522
2016-09-29 21:07:32 +02:00
kaso17
66e3f8eea5 Add TorrentHeaven, Andraste, Torrent Network, myAmity trackers and remove PtN AND filtering (#520)
* Add TorrentHeaven tracker

* Add Andraste tracker

* Remove PtN AND filtering

Not needed anymore.
The torrent search is now using AND by default

* Add Torrent Network tracker

* Add myAmity tracker
2016-09-22 12:27:35 +02:00
kaso17
a26e07210f Add House-of-Torrents, Best Friends New Real World trackers and fix HeBits encoding (#519)
* Add House-of-Torrents tracker

* Add Best Friends tracker

* Fix Hebits encoding

* Add New Real World tracker
2016-09-20 18:41:39 +02:00
flightlevel
e612a826d0 Merge pull request #516 from kaso17/master
Add support for AND filtering search results, use it for the PtN indexer, fix an AvistaZ exception, improve TVChaos UK search, add FunFile tracker
2016-09-19 21:09:20 +10:00
kaso17
4d2240ec6e Fix newznab_api_specification.txt link 2016-09-18 16:31:30 +02:00
kaso17
50fb9ccb5f EuTorrents is now CinemaZ 2016-09-18 16:27:21 +02:00
kaso17
28d3f22fef Add FunFile Tracker 2016-09-18 16:22:59 +02:00
kaso17
8612387e39 Add support for "wk" and "hr" ago format 2016-09-18 16:22:43 +02:00
kaso17
7d93361839 Use wildcards in TVChaos UK search queries
The TVChaos UK search requires an exact match of the search string.
But it seems like they just send the unfiltered search to the SQL server in a like query (LIKE '%$searchstring%').
So we replace any whitespace/special character with % to make the search more usable.
2016-09-18 14:23:04 +02:00
kaso17
9c7ce468ee Fix AvistaZ exception 2016-09-16 19:25:53 +02:00
kaso17
1ad0e93d01 AND filter the title to avoid getting unwanted results 2016-09-16 19:05:10 +02:00
kaso17
b53cbce24a Add MatchQueryStringAND() to AND filter search result titles 2016-09-16 19:03:54 +02:00
kaso17
087635f22a Add reCAPTCHA API version 1 support and add x264 tracker (#507)
* Add reCAPTCHA API version 1 support

* Add x264 tracker
2016-09-13 14:15:51 +02:00
kaso17
0263a5f869 euTorrents is now CinemaZ and PtN/HeBits title bug fix (#498)
* Always return the full release name.

* euTorrents is now CinemaZ

* fix HeBits title parsing

Should fix #500
2016-09-11 19:52:51 +02:00
flightlevel
b910e42668 Merge pull request #495 from flightlevel/germantime
German Time
2016-09-09 15:36:30 +10:00
flightlevel
33b3740fca German Time
German Time on Mono
2016-09-09 15:34:28 +10:00
flightlevel
6d1d78cb92 Merge pull request #494 from flightlevel/german_time
German Timezone
2016-09-09 15:14:04 +10:00
flightlevel
d4c9c6d82b German Timezone
Mono doesn't seem to like Windows Timezone names
2016-09-09 15:11:44 +10:00
flightlevel
485d2705b5 Merge pull request #493 from kaso17/master
Add Torrent-Syndikat, Bit-City Reloaded and PirateTheNet trackers and fix AvistaZ based trackers
2016-09-09 14:50:57 +10:00
kaso17
ecd2b33dfc Add PirateTheNet tracker 2016-09-08 16:52:08 +02:00
kaso17
c12736716d fix AvistaZ tracker 2016-09-07 19:46:03 +02:00
kaso17
c0bdedbae1 Add Bit-City Reloaded tracker 2016-09-07 17:34:36 +02:00
kaso17
2abf4f0ee6 Add Torrent-Syndikat tracker 2016-09-07 14:00:25 +02:00
flightlevel
1fdd165d2e CloudFlare support for Windows (#489)
CloudFlare support for Windows
2016-09-06 21:55:18 +10:00
kaso17
55818f9cb6 Add Ghost City tracker (#488) 2016-09-06 21:50:16 +10:00
betamax2021
a4c670df78 Added Indexer BakaBT (#482) 2016-09-04 18:25:33 +10:00
flightlevel
c8d558c1eb Add BakaBT (#484)
Add BakaBT
2016-09-04 18:24:21 +10:00
flightlevel
f56b51e9e3 TorrentDay: Add HEVC category (#483)
TorrentDay: Add HEVC category
2016-09-04 18:24:02 +10:00
flightlevel
2e966b674c PTP: Add logo (#480)
PTP: Add logo
2016-09-03 12:12:22 +10:00
Mike
aa1e31a110 Rewrote MoreThanTV indexer (#477)
* MTV: Rewrote searching for torrents. Modified title output so sonarr can actually download seasons.

* MTV: Add individual torrent parsing and cleanup.

* MTV: Remove TODO as it's already done.
2016-09-03 12:04:08 +10:00
d2dyno
79418d3b1f Update screenshot (#472)
Use screenshot from more recent version.
2016-08-26 20:12:25 +02:00
d2dyno
76f01273d3 HDSpace category mappings (#469)
* HDSpace category mappings

Add category mappings for HDSpace.

* Fix derp

Remove plus signs (from sloppy copy) and extra comas.

* Fix typo and comma
2016-08-26 18:22:02 +10:00
flightlevel
ef99687187 AlphaRatio: Fix Time (#471)
AlphaRatio: Fix Time
2016-08-26 17:21:04 +10:00
flightlevel
5d03e6ec99 PrivateHD: Date Parsing (#470)
PrivateHD: Date Parsing
2016-08-26 16:27:46 +10:00
flightlevel
3e9165ce4a TorrentDay: Add IMDB search (#466)
TorrentDay: Add IMDB search
2016-08-24 23:02:25 +10:00
flightlevel
2a7a950d63 PrivateHd: Fix parsing (#465)
PrivateHd: Fix parsing
2016-08-24 22:39:26 +10:00
flightlevel
d3d78e48cb TorrentLeech: Add setup info (#460)
TorrentLeech: Add setup info
2016-08-22 20:47:36 +10:00
flightlevel
791471a716 Update Packages (#459)
* Revert "Update packages (#453)"

This reverts commit 593c2f083e.

* Package Update

Package Update
2016-08-22 20:37:49 +10:00
flightlevel
7f7f6680b2 Animebytes: Fix warning (#455)
Animebytes: Fix warning
2016-08-20 19:52:39 +10:00
flightlevel
128591d355 TTN: Fix Parsing (#454)
TTN: Fix Parsing
2016-08-20 19:44:02 +10:00
flightlevel
593c2f083e Update packages (#453)
Update packages
2016-08-20 19:29:26 +10:00
flightlevel
7743267501 Remove FrenchAdn (#452)
Remove FrenchAdn
2016-08-20 18:30:14 +10:00
flightlevel
268f5a8ae5 Demonoid: Fix Parsing (#451)
Demonoid: Fix Parsing
2016-08-20 18:16:59 +10:00
flightlevel
121736358b Revert "Pretome: Remove" (#446) 2016-08-18 20:55:58 +10:00
flightlevel
1b0ea00c88 TTN: Update Login (#445)
TTN: Update Login
2016-08-18 17:29:56 +10:00
flightlevel
4be1c19c50 Enter to search (#444)
Enter to search
2016-08-18 17:23:43 +10:00
flightlevel
aa55849e62 Pretome: Remove (#443)
Pretome: Remove
2016-08-18 17:09:16 +10:00
flightlevel
1d2093fc32 Bluetigers: Add category (#442)
Bluetigers: Add category
2016-08-18 16:15:50 +10:00
flightlevel
5a5d83e5c1 Remove Phxbit (#441)
Remove Phxbit
2016-08-18 16:05:58 +10:00
flightlevel
155632e85d IPT: Update Parsing (#440)
IPT: Update Parsing
2016-08-18 16:05:32 +10:00
Joel Gillman
cac185f747 Update README.md for Linux/OSX installation (#424) 2016-08-05 21:58:56 +10:00
Thomas Gillen
6d0d502bd3 Add music categories to AnimeBytes indexer (#418) 2016-08-05 21:58:29 +10:00
Superpiffer
ccde6fb53b TorrentLeech: Fix login (#412) (#414)
* Fix login #412

* Update TorrentLeech.cs
2016-08-05 21:57:43 +10:00
flightlevel
2afce9f2d9 BeyondHD; Fix Recaptcha (#409)
BeyondHD; Fix Recaptcha
2016-07-27 14:50:53 +10:00
flightlevel
2647457706 SpeedCd: Update URL (#408)
SpeedCd: Update URL
2016-07-27 14:14:57 +10:00
kobik
ac5e69a3b2 New indexer - Hebits.net (#406)
* Added Hebits.net as an indexer - a private Israel tracker

* Added new indexer Hebits to the readme file

* Deleted debug messages leftovers
2016-07-27 14:08:06 +10:00
d2dyno
45fb2a27c3 Updated BeyondHD URL (#390)
Updated BeyondHD to new URL.
2016-07-04 21:58:33 +10:00
Umur Kontacı
fb3d7ae81b Fix builds on case-sensitive filesystems (#377) 2016-06-26 20:32:48 +10:00
Codehhh
9b62e8af71 Add PTP as a new Indexer (#373)
* Added PassThePopcorn Indexer

* Fixed PTP Indexer
2016-06-23 20:34:19 +10:00
flightlevel
3f292b5e47 Freshon: Fix Urls (#374)
Freshon: Fix Urls
2016-06-23 20:28:08 +10:00
Chris Mattera
bd2abddb09 Modified to use new download URL format (#369) 2016-06-21 19:28:55 +10:00
Joel Gillman
5135748d1d Update "issues page" link in README (#358)
The "issues page" link in the Contributing section was pointing to the old repo! I just updated.
2016-06-08 08:53:38 +02:00
flightlevel
0fc3d224ab Allow Custom Data Folder (#355)
Allow Custom Data Folder
2016-05-28 19:40:55 +10:00
flightlevel
ac07cc34cd SpeedCD: Fix Login (#354)
SpeedCD: Fix Login
2016-05-28 19:40:39 +10:00
flightlevel
3730e05f20 TorrentDay: Add Audio (#353)
TorrentDay: Add Audio
2016-05-28 19:40:16 +10:00
flightlevel
2644fd813e Bluetigers fix SSL issue (#346) 2016-05-18 20:33:37 +10:00
flightlevel
ece16d1075 TransmitheNet: Fix Titles with extension (#343) 2016-05-17 23:25:26 +10:00
Fredrik Löwenhamn
3b13fa84a4 Fixed saving alphaRatio json (#342) 2016-05-17 23:04:15 +10:00
flightlevel
cda5ea3207 Update README.md 2016-05-14 22:44:49 +10:00
flightlevel
0746616b43 Revert "SSL Fix by default, Now use TLS (1.2, 1.1, 1) by default" (#339) 2016-05-14 22:42:16 +10:00
JigSaw
28199ab4be SSL Fix by default, Added support of TLS 1.1 & 1.2 (#337)
* SSL Fix by default, Now use TLS (1.2, 1.1, 1) by default
* Workaround to use TLS 1.2 & 1.1 on Mono < 4.3
2016-05-14 00:46:56 +02:00
JigSaw
b29c578adb Fixed FADN Provider (#336)
New Search Engine Template
2016-05-13 23:41:10 +02:00
smarshallsay
b42f2a0972 Deal with carriage return in date string (#325) 2016-04-30 21:48:52 +10:00
hex
040deb2bfb Added SceneFZ tracker (#319)
* Added SceneFZ tracker
* SceneFZ tracker new logo size and updated README
2016-04-26 12:40:54 +02:00
flightlevel
ef8b4e685e Update README.md 2016-04-20 20:14:55 +10:00
flightlevel
364860199c Merge pull request #316 from flightlevel/ttn_url2
TTN: Update search string
2016-04-20 20:11:55 +10:00
flightlevel
3f2a6fd3f7 Merge pull request #313 from coolius/myanonamouse
Added MyAnonamouse tracker
2016-04-19 21:37:15 +10:00
flightlevel
2671cf00e0 Merge pull request #312 from coolius/ipt_alternatelink
Added AlternateLink to IPTorrents
2016-04-19 20:38:20 +10:00
coolius
6a6941d01c Copy myanonamouse logo to output directory 2016-04-18 15:22:50 +01:00
coolius
5b3862bc3d Added MyAnonamouse tracker 2016-04-18 15:02:15 +01:00
coolius
0452f5ad06 Added AlternateLink to IPTorrents 2016-04-18 14:42:53 +01:00
flightlevel
264fc995b2 Merge pull request #307 from flightlevel/ttn_url
TTN: Update search url
2016-04-13 21:51:34 +10:00
flightlevel
acc75acb9c TTN: Update search url
TTN: Update search url
2016-04-13 21:33:14 +10:00
JigSaw
a5b1332f95 Optimized & Fixed FADN Provider
LoginCheck, New Logo, Optimized
2016-04-05 14:52:35 +02:00
JigSaw
8871a631b1 Fix Manga Anime Category for PhxBit Provider
Wrong category fixed
2016-04-03 20:55:37 +02:00
JigSaw
bfb58f53f5 Xthor Provider
French Private Tracker
2016-04-03 20:31:44 +02:00
JigSaw
d14717c88e Merge pull request #294 from JigSawFr/providers/phxbit-fix
Download FIX for PhxBit
2016-04-03 18:57:23 +02:00
JigSawFr
d8ff110d8b DownloadBase & DownloadUrl FIX for PHX 2016-04-03 18:46:46 +02:00
flightlevel
23737d3b19 Add Fuzer to readme 2016-04-01 22:39:37 +11:00
flightlevel
b11516760b Merge pull request #288 from OneBigGuy/master
Add Fuzer.me tracker
2016-04-01 22:38:47 +11:00
JigSaw
3a7f8ce268 Merge pull request #291 from JigSawFr/readme-fix
Cleanup README
2016-03-30 09:37:57 +02:00
JigSawFr
7a5b2e5c6a Cleanup README 2016-03-30 09:36:59 +02:00
OneBigGuy
ead129eda9 Add Fuzer.me tracker 2016-03-30 10:10:46 +03:00
JigSaw
b7cd0aeca8 Merge pull request #290 from Jackett/providers/phxbit
PhxBit Provider
2016-03-30 00:14:56 +02:00
JigSawFr
708b45b02f PHXBIT Provider 2016-03-29 23:54:19 +02:00
OneBigGuy
75f4342499 Merge https://github.com/Jackett/Jackett 2016-03-27 16:51:15 +03:00
OneBigGuy
24ad51ad15 Add Fuzer.me tracker 2016-03-27 16:50:02 +03:00
flightlevel
ecc3dd26db Merge pull request #284 from Jackett/revert-273-freshon--refactor
Revert "Freshon: Use AngleSharp for parsing"
2016-03-25 10:29:05 +11:00
flightlevel
aecee29219 Revert "Freshon: Use AngleSharp for parsing" 2016-03-25 10:16:35 +11:00
flightlevel
bda73dc9c1 Merge pull request #279 from flightlevel/tehconnection
TehConnection: Fix IMDB ID searches
2016-03-20 20:45:59 +11:00
flightlevel
63d2407e4f TehConnection: Fix IMDB ID searches
TehConnection: Fix IMDB ID searches
2016-03-20 20:40:54 +11:00
flightlevel
baf44314e9 Merge pull request #278 from flightlevel/transmithenet
Add Transmithe.Net tracker
2016-03-19 22:43:21 +11:00
flightlevel
29ef28b6d7 Add Transmithe.Net tracker
Add Transmithe.Net tracker
2016-03-19 22:40:00 +11:00
flightlevel
86dad52919 Merge pull request #277 from flightlevel/imdbid--match
Fix IMDB Matching
2016-03-19 22:32:56 +11:00
flightlevel
6ff05656ef Fix IMDB Matching
Comparing number to string was failing when imdb id had a leading zero
2016-03-19 19:13:06 +11:00
flightlevel
71c195cafb Merge pull request #273 from flightlevel/freshon--refactor
Freshon: Use AngleSharp for parsing
2016-03-17 20:56:29 +11:00
flightlevel
dda0ae2485 Freshon: Use AngleSharp for parsing
Freshon: Use AngleSharp for parsing
2016-03-17 20:52:29 +11:00
flightlevel
69dc63c726 Merge pull request #272 from flightlevel/anglesharp-update
Update Anglesharp
2016-03-17 20:51:02 +11:00
flightlevel
ee65721da1 Update Anglesharp
Update Anglesharp
2016-03-17 20:40:17 +11:00
Azerelat
8ffb91f414 Merge pull request #264 from lowet84/master
Updated encryption service for better use with Docker
2016-03-13 10:46:53 +00:00
Fredrik Löwenhamn
50d931b4fb Updated encryptioon service for better use with Docker 2016-03-04 10:05:47 +01:00
flightlevel
6f475b18f3 Merge pull request #259 from flightlevel/ipturl
Fix IPTorrents url encoding
2016-02-27 21:13:30 +11:00
flightlevel
782211d06a Fix IPTorrents url encoding
Fix IPTorrents url encoding
Issue https://github.com/Jackett/Jackett/issues/256
2016-02-27 21:09:19 +11:00
Azerelat
4f5d7a3d54 Make category mapping a little less confusing #255 2016-02-24 18:40:16 +00:00
flightlevel
f26f2d6f25 Merge pull request #249 from flightlevel/tehconnection
TehConnection: Attempt to fix cookie expiration
2016-02-17 23:36:04 +11:00
flightlevel
6ccbfd6443 TehConnection: Attempt to fix cookie expiration
TehConnection: Attempt to fix cookie expiration
2016-02-17 23:30:04 +11:00
flightlevel
c896ed8238 Merge pull request #248 from flightlevel/danishbits
DanishBits: Fix publish time
2016-02-17 22:17:00 +11:00
flightlevel
1879ed89df DanishBits: Fix publish time
DanishBits: Fix publish time
2016-02-17 22:10:36 +11:00
flightlevel
11f99a44d3 Merge pull request #247 from flightlevel/ilovetorrents
ILoveTorrents: Add to readme
2016-02-16 19:42:08 +11:00
flightlevel
f8fcf2fb79 ILoveTorrents: Add to readme
ILoveTorrents: Add to readme
2016-02-16 19:32:18 +11:00
flightlevel
c36a3f558a Merge pull request #246 from lowet84/master
Fixed a bug in the download link.
2016-02-16 19:22:10 +11:00
Fredrik Löwenhamn
07a88919b4 Fixed a bug in the download link.
Added more categories.
2016-02-16 08:02:12 +01:00
Azerelat
d02cb3fefc Merge pull request #245 from lowet84/master
Added support for ILoveTorrents.me
2016-02-15 20:22:45 +00:00
Fredrik Löwenhamn
f05eca3a9f Added support for ILoveTorrents.me 2016-02-15 13:10:06 +01:00
flightlevel
ccc2441a55 Merge pull request #243 from flightlevel/scenetime
SceneTime: Add category mapping and fix search
2016-02-14 15:19:29 +11:00
flightlevel
5aaa402287 SceneTime: Add category mapping and fix search
SceneTime: Add category mapping and fix search
2016-02-14 15:15:09 +11:00
flightlevel
97849dfcaf Merge pull request #242 from flightlevel/scenetime
SceneTime: Fix Column parsing
2016-02-13 17:01:23 +11:00
flightlevel
f2a899eea3 SceneTime: Fix Column parsing
SceneTime: Column numbers seem to be related to user settings, use
column names instead. Add category mapping support
2016-02-13 16:55:23 +11:00
flightlevel
80686c81ee Merge pull request #236 from flightlevel/bitmetvinfo
BitMeTv: Add instructions
2016-02-07 16:49:42 +11:00
flightlevel
189483b2b7 BitMeTv: Add instructions
BitMeTv: Add instructions to turn on SSL
2016-02-07 16:39:20 +11:00
flightlevel
e7cc147121 Merge pull request #235 from flightlevel/scenetimefix
Scenetime: Fix parsing
2016-02-07 16:38:18 +11:00
flightlevel
73f044c0f2 Scenetime: Fix parsing
Scenetime: Fix parsing as per
https://github.com/Jackett/Jackett/issues/231#issuecomment-180289081
2016-02-07 16:22:33 +11:00
flightlevel
a268893475 Merge pull request #227 from Jackett/revert-226-freshonrefactor
Revert "Freshon: Changed parser to AngleSharp"
2016-01-29 23:56:03 +11:00
flightlevel
c20e4d0dfa Revert "Freshon: Changed parser to AngleSharp" 2016-01-29 23:50:23 +11:00
flightlevel
73536b11e2 Merge pull request #226 from flightlevel/freshonrefactor
Freshon: Changed parser to AngleSharp
2016-01-29 23:38:11 +11:00
flightlevel
a35695358d Merge pull request #225 from flightlevel/BasicIndexerMessage
Allow instructions on the basic indexer
2016-01-29 23:31:47 +11:00
flightlevel
7312c8c230 Freshon: Changed parser to AngleSharp
Freshon: Changed parser to AngleSharp
2016-01-29 23:30:12 +11:00
flightlevel
04fea52956 Allow instructions on the basic indexer
Allow instructions on the basic indexer
2016-01-29 23:28:14 +11:00
flightlevel
cd642a48b6 Merge pull request #224 from flightlevel/AddAnglesharp
Add AngleSharp package
2016-01-29 21:36:49 +11:00
flightlevel
89e0498224 Add AngleSharp package 2016-01-29 21:31:23 +11:00
flightlevel
35f9c05cb9 Merge pull request #223 from flightlevel/urlencodetorznabresponse
URL Encode File Name
2016-01-29 21:19:42 +11:00
flightlevel
8a54f9d825 URL Encode File Name
URL Encode file names in proxy link
Issue https://github.com/Jackett/Jackett/issues/222
2016-01-29 21:15:30 +11:00
Azerelat
34caa78de1 Merge pull request #218 from some-guy-23/patch-1
Switched favicon to relative URL
2016-01-28 17:57:27 +00:00
some-guy-23
e28fadbd68 Merge pull request #2 from some-guy-23/patch-2
Switched favicon to relative URL
2016-01-27 14:23:41 -05:00
some-guy-23
0930048d8b Switched favicon to relative URL 2016-01-27 14:22:12 -05:00
some-guy-23
42495e36e5 Switched favicon to relative URL 2016-01-27 14:21:32 -05:00
flightlevel
4f36d19b00 Merge pull request #201 from flightlevel/speedcd
SpeedCd: Fix Query String
2016-01-20 19:50:21 +11:00
flightlevel
2f682ca53f SpeedCd: Fix Query String
SpeedCd: Fix Query String
2016-01-20 19:45:39 +11:00
flightlevel
aa7a33496c Merge pull request #199 from flightlevel/torrentbytesfix
TorrentBytes: Allow for missing category and fix time
2016-01-20 00:29:20 +11:00
flightlevel
1f94dec089 Merge pull request #198 from flightlevel/speedcd
SpeedCd: Change API to parsing
2016-01-20 00:28:38 +11:00
flightlevel
e57cbe3b44 TorrentBytes: Allow for missing category and fix time
TorrentBytes: Allow for missing category and fix time
2016-01-20 00:20:19 +11:00
flightlevel
7b74f981e3 SpeedCd: Change API to parsing
SpeedCD API no longer working, changed to parsing
2016-01-20 00:08:00 +11:00
Azerelat
2901cceea9 Fix cache items not expiring and change redirect to a temp one as we can now change the base path 2016-01-17 13:19:18 +00:00
Azerelat
ea4d0fe701 AnimeBytes Sonarr Fix (Will only fix season 1 but we don't have season info). 2016-01-16 22:36:56 +00:00
Azerelat
02a57533f9 Merge pull request #193 from raspdealer/patch-4
Change below to above inside steps
2016-01-16 21:07:24 +00:00
Azerelat
99f0e9c9f6 Merge pull request #192 from raspdealer/patch-3
Enable SSL on Bluetigers
2016-01-16 21:07:13 +00:00
Raspdealer
d1225c17b2 Change below to above inside steps 2016-01-16 11:47:01 +01:00
Raspdealer
2adecae9bf Enable SSL on Bluetigers 2016-01-16 11:41:51 +01:00
Azerelat
c7aa0d7b0f Fix better reverse proxy support 2016-01-14 20:15:10 +00:00
Azerelat
a69ecf3e06 Merge pull request #179 from tehjojo/master
Better reverse proxy support
2016-01-14 19:29:57 +00:00
Azerelat
9414e7a4b8 Merge pull request #188 from JigSawFr/providers/fnt-remove
Removed FNT provider
2016-01-14 19:20:25 +00:00
Azerelat
d9473781d3 Merge pull request #189 from JigSawFr/providers/bluetigers-ssl-removed
Fixed Disabled SSL on tracker side with BlueTigers Provider
2016-01-14 19:19:57 +00:00
JigSawFr
4952199e68 Fixed Disabled SSL on tracker side with BlueTigers Provider 2016-01-14 16:55:09 +01:00
JigSawFr
388460993d Removed FNT provider 2016-01-14 14:57:00 +01:00
flightlevel
f21c1f0400 Merge pull request #183 from flightlevel/FixNcoreFileNameCase
Fix NCore File Name Casing
2016-01-13 22:56:11 +11:00
flightlevel
4db62bbf63 Fix NCore File Name Casing 2016-01-12 22:49:01 +11:00
Michael Robinson
42ec634cd3 Better reverse proxy support
Added "base path override" config option that makes all links and
redirects work with your reverse proxy.
Fixed post config update reload to work properly.
Make redirects and ajax calls use relative pathing.
2016-01-10 19:59:40 -07:00
Azerelat
a07de4d1e9 Merge pull request #175 from twistedroutes/master
demonoid to support torrentPotato
2016-01-10 20:12:18 +00:00
Azerelat
0361a88856 Merge branch 'master' of https://github.com/Jackett/Jackett.git 2016-01-10 20:06:12 +00:00
Azerelat
a88f248b75 Add logging to updater 2016-01-10 20:06:09 +00:00
twistedpear
82f06d0b46 Added movies category to demonoid - simple version, no subcats - all qualities 2016-01-09 15:11:22 -05:00
Azerelat
10e019a1dd Merge pull request #174 from JigSawFr/providers/abn
Abnormal Provider
2016-01-09 18:46:38 +00:00
Azerelat
173e26c054 SCC queries not uri encoded #170 2016-01-09 18:45:02 +00:00
JigSawFr
24f8d26b2d Updated README 2016-01-09 03:08:39 +01:00
JigSawFr
8ceb8ebbe7 ABN Provider 2016-01-09 03:06:21 +01:00
Azerelat
71c583d359 AnimeBytes Fix stripping of episode number from search term 2016-01-07 00:12:56 +00:00
Azerelat
9d4e8f4bda Merge pull request #160 from twistedroutes/bitsoup
Put GUID back into release
2016-01-06 23:02:34 +00:00
twistedpear
65d2a88591 Put GUID back into release 2016-01-06 16:56:46 -05:00
Azerelat
a04d296b55 Make Un-configured list smaller 2016-01-06 19:53:13 +00:00
Azerelat
79452053ee Merge pull request #153 from JigSawFr/providers/fadn
French-ADN Provider
2016-01-06 18:37:48 +00:00
Azerelat
7ad5fac9c0 Merge pull request #156 from JigSawFr/providers/fnt-hotfix-dl
FNT Provider ~ Download HOTFIX & SSL
2016-01-06 18:36:35 +00:00
JigSawFr
2456a42608 SSL enabled 2016-01-05 20:26:47 +01:00
JigSawFr
3c396ba880 Fix Torrent Files Downloading 2016-01-05 20:25:00 +01:00
JigSawFr
65e4d1e068 Rebase on upstream 2016-01-05 15:41:54 +01:00
JigSawFr
e643134f09 Updated README 2016-01-05 15:33:13 +01:00
JigSawFr
19bc3c7b36 FADN Provider 2016-01-05 15:30:50 +01:00
Azerelat
a50e31ec3f Merge pull request #151 from tehjojo/master
Changed resource paths to be relative
2016-01-04 20:51:51 +00:00
Azerelat
ff96389864 Merge pull request #149 from JigSawFr/providers/fnt
FNT Provider
2016-01-04 20:50:42 +00:00
Azerelat
efd5a8cc98 Merge pull request #150 from JigSawFr/providers/wihd
WiHD Provider ~ Improved
2016-01-04 20:41:15 +00:00
Michael Robinson
d5c59109b1 Changed resource paths to be relative 2016-01-03 20:14:44 -07:00
JigSawFr
4a9fcdbc9b Fixed some typo & removed unecessary comment 2016-01-04 00:47:42 +01:00
JigSawFr
6bea0b009a Upgraded with new functions and improvements,
Empty search return now from all (fixed term before),
Fix Browser XHR request not removed if no result,
Fix some typo
2016-01-04 00:09:32 +01:00
JigSawFr
ff86a15ddd Rebase on upstream 2016-01-03 22:15:04 +01:00
Azerelat
d204ce6f39 Fix TVChaosUK and missing logos 2016-01-03 20:40:59 +00:00
JigSawFr
6bc011f678 FNT Provider 2016-01-03 19:39:53 +01:00
Azerelat
acdf198b05 Merge pull request #137 from JigSawFr/providers/wihd
WiHD Provider
2016-01-03 14:38:18 +00:00
JigSawFr
5f2dfcf499 Updated README 2015-12-29 12:07:34 +01:00
JigSawFr
aa69d1a3b9 Debug logging only if debug level is true 2015-12-29 11:51:52 +01:00
JigSawFr
29bde68337 Cache only used in case of search term 2015-12-29 11:30:55 +01:00
Sébastien Robert
e9ae2d4cd8 WiHD Provider 2015-12-29 11:17:18 +01:00
Azerelat
0ba6188e4b Merge pull request #132 from twistedroutes/master
XSpeeds
2015-12-29 01:31:38 +00:00
twistedpear
283a003aef remember xspeeds cookies if they have changed. This makes future queries much quicker 2015-12-28 12:15:09 -05:00
twistedpear
a50ab9c49b Improved cookie accumulation to reduce roundtrips to the server. 2015-12-28 11:16:53 -05:00
twistedpear
b4e42b4180 Improved the category search - can now use mutli categories 2015-12-28 10:27:02 -05:00
twistedpear
f7efd83e09 Put ProxyConnection back into Startup.cs 2015-12-28 09:53:59 -05:00
twistedpear
f67381d0ac Merge remote-tracking branch 'upstream/master' 2015-12-28 09:46:38 -05:00
garreth.jeremiah@gmail.com
af0c15be2c added notice in log when proxying is used
bitsoup multi category searches look for all cats instead of making multiple queries
2015-12-28 08:42:11 -05:00
Azerelat
4ce6f6b048 Update README.md 2015-12-28 11:50:33 +00:00
Azerelat
828091128e Respect pre-release flag 2015-12-27 22:55:18 +00:00
Azerelat
f8c0b9a80f Merge pull request #133 from some-guy-23/indexer-RevolutionTT
Added new tracker/indexer class for RevolutionTT.me
2015-12-27 21:39:48 +00:00
Azerelat
d598017a03 Fix blackhole downloads #135 2015-12-27 21:25:54 +00:00
Azerelat
aadf25e3b6 Fix update cross platform issues 2015-12-27 21:11:04 +00:00
garreth.jeremiah@gmail.com
f4129dc4a0 Added simple (non-auth) proxy support including processing the second set of headers (server) vs first (proxy). New command line option (-j 127.0.0.1:8888) to set the proxy and port. unfortunatly both -p and -x were already taken
extended refresh header handling to libcurl and safecurl
also some minor tweaks needed to have Curl 'behave' with certain servers by adding accept-language header to Curl
Added ability/template to allow the user to select their own SiteURL (see BitSoup implementation) with a minor update to ConfigurationData class to prevent the "display text" from disappearing on errors.
XSpeeds indexer - updated to handle a case where the returned XML occasionally is null terminated resulting in XML parsing exceptions
BitSoup indexer - added user customizable url selection, including some url validation
BaseIndexer - cleaned up some of my earlier implementation for accumulating cookies.
2015-12-24 22:26:39 -05:00
twistedroutes
f6f27e604a Fixed grabbing the wrong download link. Also updated the comment link 2015-12-22 12:17:49 -05:00
twistedroutes
bc1dd0e9e8 Added Bitsoup tracker. For multi-category searches will perform multiple searches as the tracker search didn't support multiple categories. Recommend to the user to search for "all" instead. Consider changing this approach later. 2015-12-21 22:12:43 -05:00
some-guy-23
6b1dba2dc3 Added RSS feed to RevolutionTT 2015-12-21 20:03:50 -05:00
some-guy-23
e4a47927b9 Fixed RevolutionTT so that login can use username/password (instead of cookie) 2015-12-21 18:18:07 -05:00
some-guy-23
226c27f903 Added new tracker/indexer class for RevolutionTT.me 2015-12-21 16:10:39 -05:00
flightlevel
a69ee65176 Merge pull request #129 from Kantraz/patch-2
Attempt to keep hounddawgs logged in
2015-12-20 11:27:22 +11:00
garreth.jeremiah@gmail.com
5acaf9dbb8 performQuery did not handle the situation where the credentials had timed out or the cloudflare DDoS was re-requested. Added a temporary solution by re-doing the log-in process. It is a little slow, so users of this indexer will see a 20s delay. I will find a way to improve that in a subsequent fix. 2015-12-19 10:40:01 -05:00
garreth.jeremiah@gmail.com
a856aba953 XSpeeds.cs - updated configuration data to give notification to use about the initial delay for handling the CloudFlare DDOS Redirection using a new ConfigurationData class that exploits the seemingly unused DisplayInfo
ConfigurationDataBaseicLoginWithRSSAndDisplay - a ConfigData class that provides a display item member.  I am new to c# so I haven't figured out if I coud have avoided this by added it to the object after instantiation.  Looks possible with expandoobject but I felt that would be changing too much
2015-12-18 13:02:07 -05:00
garreth.jeremiah@gmail.com
ce351dd3aa Corrected typo in response.statusCode to response.StatusCode 2015-12-18 12:08:36 -05:00
garreth.jeremiah@gmail.com
99125386f0 XSpeeds - based on TVCHaosUK. Because f clourflare redirection, needs to hit the site twice. Once for cloudflare DDoS redirection (to obtain all necessary cookies) and second to login. 2015-12-18 12:06:51 -05:00
garreth.jeremiah@gmail.com
44d6ac2f04 Run - added parsing of the http response headers to examine the Refresh header if the response is a 503 (service unavailable). Extract the redirect and redirect delay from the header and follow it. This is to avoid the alternative of trying to calculate the cloudflare challenge/response. 2015-12-18 12:03:38 -05:00
garreth.jeremiah@gmail.com
b5ff430e2d RequestLoginAndFollowRedirect - added "accumulateCookies" which adds cookies from redirection responses. This was needed for xspeeds processing of cloudflare redirection
FollowIfRedirect - during redirects this can keep the cookies
2015-12-18 11:55:53 -05:00
Kantraz
8fcda318ca Attempt to keep hounddawgs logged in 2015-12-16 20:19:59 +01:00
WhatFox
73171c3e45 Remove closed tracker NextGen 2015-12-15 23:35:24 +00:00
WhatFox
c2ec9827cd Fix webui on mono 3.x. Please don't use 3.x :( 2015-12-15 23:27:13 +00:00
flightlevel
03a42af594 Merge pull request #126 from flightlevel/IpTorrentsUrl
IPTorrents: Fix Url
2015-12-14 10:26:01 +11:00
flightlevel
95e3615bfa IPTorrents: Fix Url
IPTorrents: Fix Url
2015-12-14 10:20:40 +11:00
flightlevel
82b69667cb Merge pull request #123 from flightlevel/ftdb
FTDB: Remove tracker
2015-12-09 20:24:56 +11:00
flightlevel
6a831c2884 Merge pull request #122 from flightlevel/speedcdcats
Speed.Cd: Add categories
2015-12-09 20:01:43 +11:00
flightlevel
3e19ca2b85 FTDB: Remove tracker
FTDB: Remove tracker
2015-12-09 19:50:25 +11:00
flightlevel
e1c29b7723 Speed.Cd: Add categories
Speed.Cd: Add categories
2015-12-09 19:45:44 +11:00
flightlevel
1d5498e93e Merge pull request #118 from Kantraz/master
Hounddawgs working againg
2015-12-08 21:59:33 +11:00
flightlevel
a9d4bbdf1d Merge pull request #117 from Diaoul/patch-1
Jackett is available at SynoCommunity
2015-12-08 21:58:51 +11:00
Kantraz
89bfdca5c0 Hounddawgs working againg
Run with "--IgnoreSslErrors true"
2015-12-06 21:43:39 +01:00
Antoine Bertin
0652e9b42d Jackett is available at SynoCommunity 2015-12-06 20:48:10 +01:00
flightlevel
97a5c10017 Merge pull request #114 from OriginalFool/master
Add movie support to Speed.cd
2015-12-06 22:36:35 +11:00
Nic Carroll
a547e4805e Merge remote-tracking branch 'upstream/master' 2015-12-04 17:44:00 -07:00
Nic Carroll
ff71257a0d Merge pull request #1 from OriginalFool/OriginalFool-patch-speed
Speed.cd Patch
2015-12-04 13:03:40 -07:00
Nic Carroll
ccbe704ef3 Add Movie Support to Speed.cd 2015-12-04 13:01:36 -07:00
flightlevel
4e5d3bf538 Merge pull request #112 from BramRoets/master
Speed.cd - login url fix
2015-12-04 22:54:16 +11:00
Bram Roets
a2872fdf77 Speed.cd - login url fix 2015-12-04 10:55:54 +01:00
flightlevel
655b5894e9 Merge pull request #109 from flightlevel/speedcd
SpeedCD- Change login URL
2015-12-02 21:51:48 +11:00
flightlevel
c3642ffcbb SpeedCD- Change login URL
SpeedCD- Change login URL
2015-12-02 21:48:17 +11:00
flightlevel
1978d35b5f Merge pull request #108 from flightlevel/ignoresslerror
Linux: Ignore SSL certificate errors option added
2015-12-02 21:27:41 +11:00
flightlevel
18a2db5af2 Linux: Ignore SSL certificate errors option added
Linux: Ignore SSL certificate errors option added
2015-12-02 21:19:51 +11:00
Nic Carroll
4f800f3f34 Update SpeedCD.cs
Change login url
2015-11-26 00:28:00 -07:00
flightlevel
6262d937d4 Merge pull request #92 from flightlevel/danishbitsaddbacklogo
Add Danishbits logo
2015-11-23 23:42:50 +11:00
flightlevel
41a6ac17c6 Merge pull request #90 from flightlevel/danishbitsfixlogo
Remove Danish Bits Logo
2015-11-23 23:37:07 +11:00
flightlevel
2adfa6a184 Add Danishbits logo
Made extension lowercase for linux
2015-11-23 23:36:32 +11:00
flightlevel
8dfc86b041 Remove Danish Bits Logo
Works on Windows, but not Linux due to uppercase extension
2015-11-23 23:26:15 +11:00
flightlevel
9e52dec2d7 Merge pull request #84 from flightlevel/freshoncategoryandtime
FreshOn: Add Tv Categories and Fix Time
2015-11-21 23:43:27 +11:00
flightlevel
85e7b34a71 Merge pull request #83 from flightlevel/tvcategoryparser
Tv Category Parser
2015-11-21 23:37:34 +11:00
flightlevel
43845c4be2 FreshOn: Add Tv Categories and Fix Time
-Add Tv Categories
-Incorrect time was being returned
2015-11-21 23:32:31 +11:00
flightlevel
7a0264051d Tv Category Parser
Can Determine Torznab TV show category from title if tracker doesn't
supply a category
2015-11-21 22:56:06 +11:00
WhatFox
05b99801f7 Fix enhanced logging not disabling properly 2015-11-21 02:03:57 +00:00
WhatFox
5116330180 #80 Enable logging from the UI. #31 Missing SCC results 2015-11-21 01:22:38 +00:00
flightlevel
cfe6ace07a Update README.md 2015-11-20 21:50:33 +11:00
flightlevel
2eb4356288 Update README.md 2015-11-20 21:37:46 +11:00
flightlevel
1ceff06def Merge pull request #77 from flightlevel/monoautoupdater
Autoupdater: Mono fix
2015-11-20 21:04:27 +11:00
flightlevel
57c4765fab Autoupdater: Mono fix
Autoupdater: Mono fix
2015-11-20 20:58:13 +11:00
flightlevel
f1188d548a Merge pull request #76 from Jackett/revert-71-monodebug
Revert "Debug Mono AutoUpdater"
2015-11-20 20:46:19 +11:00
flightlevel
327100ae6a Revert "Debug Mono AutoUpdater" 2015-11-20 20:46:07 +11:00
flightlevel
3ed887d926 Merge pull request #75 from Jackett/revert-72-monodebug2
Revert "MonoDebug2"
2015-11-20 20:45:41 +11:00
flightlevel
95f96662bf Revert "MonoDebug2" 2015-11-20 20:44:29 +11:00
flightlevel
f8b6b17c29 Merge pull request #72 from flightlevel/monodebug2
MonoDebug2
2015-11-19 22:20:23 +11:00
flightlevel
e6afe4d432 MonoDebug2
MonoDebug2
2015-11-19 22:15:50 +11:00
flightlevel
961f84f74d Merge pull request #71 from flightlevel/monodebug
Debug Mono AutoUpdater
2015-11-19 21:51:18 +11:00
flightlevel
934d5034e2 Debug Mono AutoUpdater
Debug Mono AutoUpdater
2015-11-19 21:47:22 +11:00
WhatFox
2310d08f99 Fix build 2015-11-18 20:03:55 +00:00
WhatFox
61a8585e43 Only allow private trackers 2015-11-18 20:00:26 +00:00
WhatFox
44aa33a7e0 Close tray app when updating 2015-11-18 19:39:40 +00:00
flightlevel
0b74f762a3 Merge pull request #68 from flightlevel/mtvseason
MoreThanTV: Fix season search
2015-11-18 23:00:14 +11:00
flightlevel
89460f1c73 MoreThanTV: Fix season search
MoreThanTV: Fix season search
2015-11-18 22:55:00 +11:00
flightlevel
6fbffb587b Merge pull request #55 from fuffenz/master
Basic support for GFT
2015-11-12 21:55:33 +11:00
Fuffenz
9342496a12 gft 2015-11-11 21:05:40 +01:00
Fuffenz
eb5d6d62f5 Merge remote-tracking branch 'refs/remotes/origin/GFTracker'
Conflicts:
	src/Jackett/Jackett.csproj
2015-11-11 20:58:35 +01:00
WhatFox
a134a77b9f Fix tray blocking updates 2015-11-10 22:18:58 +00:00
WhatFox
ee8464219f Fix windows installer 2015-11-10 22:02:02 +00:00
WhatFox
f8120363f4 Non-change to test updates 2015-11-10 21:27:37 +00:00
WhatFox
716be92693 Merge branch 'master' of https://github.com/Jackett/Jackett 2015-11-10 21:25:44 +00:00
WhatFox
73ea3d899d Fix migration breaking the install 2015-11-10 21:25:01 +00:00
What Fox
376888cd8f Merge pull request #54 from raspdealer/patch-3
Update README.md
2015-11-10 21:01:14 +00:00
WhatFox
bd672a36df Change auto update to use tokens for auth 2015-11-10 20:58:09 +00:00
Raspdealer
d5d0027843 Update README.md 2015-11-10 19:08:28 +01:00
flightlevel
e782456c99 Merge pull request #52 from flightlevel/BlueTigersFixCatParameter
Blue Tigers: Fix Category URL Parameter
2015-11-10 21:11:54 +11:00
flightlevel
d0596febac Blue Tigers: Fix Category URL Parameter
Blue Tigers: Fix Category URL Parameter
2015-11-10 21:10:52 +11:00
WhatFox
a9e14cc4af Auto update #8 2015-11-09 21:59:16 +00:00
flightlevel
35580224c7 Merge pull request #46 from flightlevel/BlueTigersTime
BlueTigers: GMT Time
2015-11-09 22:00:21 +11:00
flightlevel
b8bfa809e8 BlueTigers: GMT Time
BlueTigers: GMT Time
2015-11-09 21:58:38 +11:00
flightlevel
bf508d1700 Merge pull request #45 from flightlevel/BlueTigersCatMap
BlueTigers Category Mapping
2015-11-09 19:59:11 +11:00
flightlevel
601da8c51a BlueTigers Category Mapping
BlueTigers Category Mapping
2015-11-09 19:55:53 +11:00
flightlevel
714748e892 Merge pull request #43 from flightlevel/AssemblyVersion
Update Assembly Versions
2015-11-09 19:45:02 +11:00
flightlevel
6d07008e1f Merge pull request #42 from flightlevel/BeyondHdReCaptcha
BeyondHD: Add ReCaptcha
2015-11-09 19:37:44 +11:00
flightlevel
95abf9bb6a Update Assembly Versions
Update Assembly Versions: Now using AppVeyor for versioning, so not
required
2015-11-09 19:37:09 +11:00
flightlevel
9e7d2a2bee BeyondHD: Add ReCaptcha
BeyondHD: Add ReCaptcha to fix issue
https://github.com/Jackett/Jackett/issues/35
2015-11-09 19:30:09 +11:00
flightlevel
bfe453b4de Merge pull request #40 from flightlevel/bluetigers
Add BlueTigers Indexer
2015-11-08 12:55:37 +11:00
flightlevel
f999e6657b Add BlueTigers Indexer
Adds BlueTigers Indexer. Torznab Category mapping still to come.
2015-11-08 12:48:49 +11:00
flightlevel
02d0f9c5a1 Merge pull request #39 from flightlevel/nuget-update
Update NUGET Packages
2015-11-07 15:36:11 +11:00
flightlevel
4341136ddb Update NUGET Packages
Update NUGET Packages
2015-11-07 15:30:57 +11:00
flightlevel
afd5994d8b Merge pull request #37 from flightlevel/MissingViews
Comment Out Missing Views
2015-11-07 15:02:23 +11:00
flightlevel
a6dbd08dd0 Merge pull request #36 from flightlevel/master
Installer Config: Update AppURL
2015-11-07 14:56:32 +11:00
flightlevel
168aebb0fd Merge pull request #1 from flightlevel/update-installer
Installer Config: Update AppURL
2015-11-07 14:51:41 +11:00
flightlevel
2aa0dc7f4f Installer Config: Update AppURL
Update AppURL to https://github.com/Jackett/Jackett
2015-11-07 14:50:49 +11:00
flightlevel
0d9e687e66 Comment Out Missing Views
Fix errors found by Resharper
2015-11-07 12:20:49 +11:00
camjac251
78d7bceecb Optimized Image Sizes 2015-11-04 10:03:28 -06:00
flightlevel
088187c33f Merge pull request #26 from Jackett/flightlevel-patch-1
nCore: Add category capabilities and mapping
2015-11-03 22:44:08 +11:00
flightlevel
c1483611f6 nCore: Add category capabilities and mapping
Full credit to @gurabli
2015-11-03 22:42:34 +11:00
camjac251
27e0736869 Revert "Building with AppVeyor"
This reverts commit cbc1afb497.
2015-11-02 19:37:11 -06:00
camjac251
cbc1afb497 Building with AppVeyor 2015-11-02 19:18:21 -06:00
flightlevel
e453e3924e Merge pull request #18 from raspdealer/patch-2
Add alt tag in index.html
2015-11-02 20:15:38 +11:00
Raspdealer
e3e7cf4a21 Update index.html
I've got a loading issue yesterday and noticed that this alt tag was missing. Trivial but good for accessibility.
2015-11-02 09:52:44 +01:00
flightlevel
1e17510bcd Merge pull request #17 from raspdealer/patch-1
Update README.md
2015-11-02 19:40:15 +11:00
Raspdealer
5a8fae4b14 Update README.md
There was a mistake on Ubuntu 15.x installation guide link
2015-11-02 09:35:18 +01:00
flightlevel
9c3f76def2 Merge pull request #16 from Jackett/flightlevel-patch-1
Add Ubuntu install instructions
2015-11-02 19:23:22 +11:00
flightlevel
12321eebdd Add Ubuntu install instructions
Add links to HTPC guides
2015-11-02 19:22:29 +11:00
flightlevel
9ef75f8963 Merge pull request #7 from flightlevel/master
MoreThanTV Decode Response
2015-10-30 20:12:19 +11:00
flightlevel
3a0d814903 MoreThanTV Decode Response
MoreThanTV Decode Response to fix issue
https://github.com/zone117x/Jackett/issues/235
2015-10-30 20:10:15 +11:00
WhatFox
058c12175d Update torrentday url 2015-10-29 20:22:47 +00:00
WhatFox
62fdd46c85 Update README.md 2015-10-29 20:07:11 +00:00
What Fox
f8dad55c22 Merge pull request #1 from Inrego/master
Bug fixes, new tracker
2015-10-29 17:27:02 +00:00
René Simonsen
83717cc220 Fixed bug in pagination on NextGen 2015-10-26 21:06:07 +01:00
René Simonsen
09d00eba32 Pagination on NxtGn
I've added support for offset and limit parameters on the NextGen
tracker
2015-10-26 20:48:04 +01:00
René Simonsen
c07fc4de44 Fixes some invalid torrent files
Sonarr would not accept torrents where the keys were not sorted. This
update will sort the keys before sending the file to the downloader to
make the torrent valid for Sonarr.
2015-10-26 20:13:09 +01:00
René Simonsen
ea6f65e725 NextGen url change 2015-10-26 10:20:58 +01:00
René Simonsen
4392219158 Changed download urls
I changed the download urls, because the current way with segments
(having the parameters between slashes) was causing problems with long
encoded urls, since a segment can be no longer than 255 characters. It
was changed to use regular url parameters which have no such limit on
length.
2015-10-26 10:20:14 +01:00
René Simonsen
e56875f1a3 Added new danish tracker: DanishBits
Added a new closed tracker from Denmark. It's easier to get into than
NextGen, and is a good backup for missing episodes on NextGen.
2015-10-24 16:54:32 +02:00
René Simonsen
87b3f7e108 Changed NextGen to completed
NextGen has been tested now, changed to completed.
2015-10-24 16:53:37 +02:00
René Simonsen
97bf0e50b0 Added e-book and audiobook categories 2015-10-23 20:24:05 +02:00
René Simonsen
10e81d15d2 NextGen danish only continued
Additions to the change from last commit that was forgotten before.
2015-10-23 20:04:08 +02:00
René Simonsen
4552e7c1dc Option for only danish categories to NextGen
Added an option to the config of NextGen, so that it only returns
categories with danish content (DK subs or voice).
2015-10-23 19:56:44 +02:00
Fuffenz
a87cdc3443 copy gftracker logo on release build 2015-10-23 13:43:37 +02:00
Fuffenz
b65ab8b435 Basic GFTracker support 2015-10-23 00:31:59 +02:00
KZ
d6cabc0c2d Terrabad at english 2015-10-15 22:12:03 +01:00
KZ
ccd53497af Bump version 2015-10-15 21:54:37 +01:00
flightlevel
9276be829e Fix BitMeTv Release Link
Patch BitMeTV very poor SSL implementation. Fixes issue
https://github.com/zone117x/Jackett/issues/220
2015-10-14 21:09:00 +11:00
KZ
bb7fb1ec37 Fix morethan 2015-10-12 19:58:40 +01:00
Kantraz
1fd78c7072 Integrated hounddawgs 2015-10-12 18:51:47 +02:00
Kantraz
4c9cb1d6e5 URL Update
Tracker changed url again
2015-10-12 16:54:33 +02:00
KZ
502f2a0778 Merge pull request #215 from Kantraz/master
Added new indexer - Hounddawgs.org
2015-10-11 22:48:17 +01:00
Kantraz
8c1c8ba885 Added catmapping and date added 2015-10-09 21:28:23 +02:00
Kantraz
8be7d57d50 Added new indexer - Hounddawgs.org
Added new indexer for Danish private tracker Hounddawgs
It needs to be implemented, can't setup indexer?
2015-10-09 11:34:32 +02:00
KZ
9cd21ba7d0 Bump version 2015-10-08 00:47:13 +01:00
KZ
5c10d64b68 #207 Fix Sceneaccess returning results from archive 2015-10-08 00:45:31 +01:00
KZ
07df789345 FIx Shazbat #208 2015-10-08 00:27:10 +01:00
KZ
45c07d5cbe Merge branch 'master' of https://github.com/zone117x/Jackett.git 2015-10-08 00:17:55 +01:00
KZ
31aa7a9bad Fix Torrentleech #209 2015-10-08 00:17:54 +01:00
KZ
25dd18ebcc Merge pull request #211 from Kantraz/master
Fixed nxtgn.cs
2015-10-07 23:47:22 +01:00
KZ
cc615b498d Merge pull request #204 from flightlevel/master
Fixes BitMeTV searches
2015-10-07 23:35:24 +01:00
Kantraz
461308c32f Fixed nxtg.cs
All tv categories now working
2015-10-07 17:53:49 +02:00
Kantraz
c0f7d0846f Update NxtGn.cs
Tried to get it to work again
2015-10-07 14:28:56 +02:00
flightlevel
3389ea1cb4 Fixes BitMeTV searches
Fixes issue https://github.com/zone117x/Jackett/issues/203
2015-10-05 21:22:01 +11:00
KZ
bd98a950ac Few minor fixes to TehConnection 2015-10-04 12:26:36 +01:00
flightlevel
eb6e178c2f Fix Missing Url Redirect Override 2015-10-04 12:26:25 +01:00
flightlevel
b71cd56d76 Add TehConnection Indexer
Conflicts:
	src/Jackett/Jackett.csproj
2015-10-04 12:26:07 +01:00
KZ
a8c835fb8d Update readme 2015-10-02 18:16:15 +01:00
KZ
67d1435728 Fix indexer styling 2015-10-02 18:15:35 +01:00
KZ
573d36b648 Merge branch 'master' of https://github.com/zone117x/Jackett.git 2015-10-02 17:59:00 +01:00
KZ
9f19802537 Update readme 2015-10-02 17:58:58 +01:00
KZ
0076df1212 Merge pull request #198 from larsjohnsen/style-changes
Style changes
2015-10-02 17:53:55 +01:00
KZ
e7fd955da0 Merge pull request #197 from m0thman/patch-1
Fix RUTor release title parsing
2015-10-02 17:53:22 +01:00
Lars
6595e38b6f Style changes 2015-10-02 16:14:08 +02:00
m0thman
dfa91c46a9 Fix RUTor release title parsing 2015-10-02 12:45:39 +03:00
KZ
b46b36cfd9 Bump version 2015-09-30 21:29:26 +01:00
KZ
305f96b2ec Merge branch 'develop' of https://github.com/zone117x/Jackett.git 2015-09-30 21:21:45 +01:00
KZ
982300ec6e Complete BTNv1 and Fix Cloudfare cookies 2015-09-30 21:21:43 +01:00
KZ
54dfa619d5 Merge pull request #190 from raspdealer/patch-1
Update index.html
2015-09-28 19:58:25 +01:00
Raspdealer
d55e9b6e3d Update index.html
Mistake in display
2015-09-28 20:06:56 +02:00
KZ
53e680ea87 Complete Shazbat, fix category picker on web ui and start btn 2015-09-24 19:55:15 +01:00
KZ
9437765697 Implement Shazbat #151 2015-09-22 21:29:44 +01:00
KZ
61f78a5367 Update T411 Domain 2015-09-21 21:01:14 +01:00
KZ
1c192c6cc9 Update version 2015-09-21 20:54:57 +01:00
KZ
66b8448186 Torrent download bugfix 2015-09-21 20:54:24 +01:00
KZ
353dadba0b Build fix 2015-09-21 20:13:12 +01:00
KZ
4f9c098e6a Update version 2015-09-21 20:05:44 +01:00
KZ
b8d0c75f7e ShowRSS should use raw title #173 2015-09-21 19:58:17 +01:00
KZ
f6240c3cf0 Synology config #182 2015-09-21 19:42:17 +01:00
KZ
38a891ed1c Merge branch 'master' into develop 2015-09-21 19:30:24 +01:00
KZ
ce7b3489be Merge pull request #180 from Kantraz/patch-2
Update NxtGn.cs
2015-09-21 19:28:15 +01:00
KZ
06266e2cc5 #183 T411 Category mapping 2015-09-21 19:26:15 +01:00
KZ
e8bb1680f3 #181 Fix links are not cleaned before being sent to the webui. Fix failed requests not being forwarded to the caller. Add size display to web ui. 2015-09-21 18:48:53 +01:00
Kantraz
8d6dbcf336 Update NxtGn.cs 2015-09-18 14:21:22 +02:00
KZ
7996417c85 Update readme 2015-09-06 22:56:12 +01:00
KZ
f45c58b2bd Update readme 2015-09-06 22:55:37 +01:00
KZ
1c8dfdc8c5 Merge v0.6.4 2015-09-06 22:52:52 +01:00
KZ
f846996841 Bump version 0.6.4 2015-09-06 22:52:02 +01:00
KZ
372bd46c47 Remove shields from website as its slow! 2015-09-04 19:26:00 +01:00
KZ
cf0f355960 Fix torrentday non local login 2015-09-04 19:16:40 +01:00
KZ
b39740848d Torznab removes aprostrophies but filtering is done with them causing items to be incorrectly removed #158 2015-08-31 20:59:35 +01:00
KZ
1e3de38db7 CouchPotato - Change prefilter to allow results with no year #158 2015-08-31 20:52:15 +01:00
KZ
1fa36925ad Fix torrentless magnet links failing on the torrentpotato endpoint #157 2015-08-26 19:38:50 +01:00
KZ
116a9026a0 Fix nxtgn logo size 2015-08-26 17:33:43 +01:00
René Simonsen
61a0c34aef Since CouchPotato will not drop a release that matches by name, even if the IMDB id doesn't match, I've added to Jackett that it doesn't return releases that have an IMDB that doesn't match the one we're searching for.
This should prevent CouchPotato from grabbing wrong movies (for example downloading San Andreas Quake instead of San Andreas).

Updated nxtgn indexer to implement the changed interface in develop compared to master. Implemented missing imdb id on TorrentPotato, and changed JsonResponse to not include null values (to prevent imdb property being shown when we don't know it)

Added thetvdb and imdb id to torznab, as they are part of the torznab specification, albeit optional.

Added imdb ID for movies.

Will now only look at the first 3 pages when searching. To prevent flooding server when searching for a common term.

A category is now assigned to releases.

Changed nxtgn banner to only be copied if newer upon build.

Added support for nxtgn.org

# Conflicts:
#	src/Jackett/Jackett.csproj
2015-08-26 17:25:16 +01:00
KZ
c7656971a2 Implement animetorrents #150 2015-08-25 21:30:32 +01:00
KZ
a2611a5797 Add metatags to the website 2015-08-24 20:46:11 +01:00
KZ
6571f3671c Fix display issue with the readme 2015-08-23 22:34:51 +01:00
KZ
11e41485df Fix display issue with the readme 2015-08-23 22:33:26 +01:00
KZ
7bd3c9a541 Merge pull request #148 from zone117x/develop
Merge v0.6.3
2015-08-23 22:21:06 +01:00
KZ
5893eacc84 Bump version 2015-08-23 22:11:18 +01:00
KZ
e1d28b25a8 Implement EuTorrents 2015-08-23 21:45:52 +01:00
KZ
ccd0e65e66 Implement Avistaz 2015-08-23 21:28:21 +01:00
KZ
f47a5ef13c Update reame 2015-08-23 20:31:12 +01:00
unknown
e566b409b9 Implemented Strike categories 2015-08-22 18:02:41 -06:00
unknown
f39e23fbe8 Implemented BitHDTV categories 2015-08-22 16:06:07 -06:00
unknown
674be2843d RARBG API request throttling 2015-08-22 15:21:29 -06:00
unknown
28bc720ab3 Fix Strike indexer 2015-08-22 15:07:08 -06:00
unknown
748d85f32f Implemented indexer configuration result status to prevent double query test on some indexers 2015-08-22 14:57:13 -06:00
unknown
30ba1793c0 Fix RARBG magnet link 2015-08-19 18:31:51 -06:00
KZ
a4710b43ba PrivateHD category mapping fix 2015-08-19 22:58:21 +01:00
KZ
523929e907 HDTorrents category mapping 2015-08-19 22:51:16 +01:00
KZ
25641229b8 PreToMe category mapping 2015-08-19 22:10:47 +01:00
unknown
7289d763ef Fix for ThePirateBay 2015-08-18 20:21:15 -06:00
unknown
2f680840a7 Do not throw exceptions on parse error 2015-08-18 20:19:44 -06:00
unknown
096fb805a8 BeyondHD bug fix 2015-08-18 20:05:21 -06:00
unknown
95becfd00a Fix for BeyondHD and improved category mapping 2015-08-18 20:03:37 -06:00
unknown
324bb48543 Re-implemented RARGB 2015-08-16 17:24:06 -06:00
unknown
f968bfe852 Added published date to website downloads 2015-08-16 15:51:15 -06:00
KZ
754062c891 Merge pull request #138 from zone117x/develop
Merge v0.6.2
2015-08-16 18:54:55 +01:00
KZ
7e3266489f Fix issue with add indexer not working and rejig the UI a bit. 2015-08-16 18:34:45 +01:00
KZ
e65a8abf5e Display called indexers instead of result indexers 2015-08-14 22:48:51 +01:00
KZ
54af84fcd3 Bump version number 2015-08-14 22:33:02 +01:00
KZ
98446222c9 Metasearch , fix for empty queries being converted to a single space, parent categories are now autoexpanded. 2015-08-14 22:20:51 +01:00
Matthew Little
c45929fe43 Update README.md 2015-08-13 17:35:11 -06:00
Matthew Little
acb4f31d3f Update README.md 2015-08-13 17:19:38 -06:00
Matthew Little
b69a731833 Update README.md 2015-08-13 17:17:38 -06:00
KZ
c6cb71639b Morethan category mapping 2015-08-13 23:41:21 +01:00
KZ
ae8fe6f55b Fix when viewing the cache from a mobile 2015-08-13 23:06:15 +01:00
KZ
7ffce8fb28 Revert project change 2015-08-13 22:54:37 +01:00
KZ
e660c57ccb Category mapping on TorrentLeech and AnimeBytes. Fix sparadic issue where downloads fail due to the url being too long. 2015-08-13 22:51:49 +01:00
KZ
3c0cae7166 Implement web site 2015-08-12 21:33:39 +01:00
unknown
117f18886c no message 2015-08-12 11:31:59 -06:00
unknown
df5f799d46 Progress on using T4 template for newznab category definitions 2015-08-12 11:27:43 -06:00
KZ
90f3e4f657 Improve filelist category mapping 2015-08-11 23:24:55 +01:00
KZ
c8dff6da72 Implement filelist and disable browser caching 2015-08-11 23:10:15 +01:00
KZ
e007d321f6 Prefilter couchpoato results 2015-08-11 19:48:25 +01:00
unknown
2766976c47 Fixed result category mapping for bB and BeyondHD 2015-08-10 20:14:00 -06:00
unknown
18ebf3a95d Implemented BeyondHD categories 2015-08-10 19:59:11 -06:00
unknown
001074b101 Added categories to bB 2015-08-10 19:36:42 -06:00
unknown
9a7fe91eb8 Added additional torznab categories, implemented AlphaRatio categories 2015-08-10 19:15:15 -06:00
KZ
0a2d0b40fb Fix scenetime 2015-08-10 21:46:58 +01:00
KZ
ccde119454 Implement TVChaos UK 2015-08-10 21:33:16 +01:00
KZ
a4406ff96e Merge pull request #135 from zone117x/develop
Merge 6.1
2015-08-09 23:11:58 +01:00
KZ
071e471b3c Bump version number 2015-08-09 23:08:53 +01:00
KZ
d8056918db Fix downloads not being proxied 2015-08-08 20:05:05 +01:00
KZ
ac0842f786 Implement not local/recaptcha login for torrentday 2015-08-08 10:26:29 +01:00
KZ
d1ff05ac13 Implement recaptcha for torrentday (This will only work for localhost) 2015-08-08 00:15:42 +01:00
KZ
6ea759aeab Implement server backhole downloading 2015-08-07 22:57:54 +01:00
KZ
6d0aa05761 Saved password security 2015-08-07 20:09:13 +01:00
KZ
1725550b21 Add category mapping to private hd 2015-08-06 23:23:40 +01:00
KZ
12ce858cf3 RuTor Bugfix 2015-08-06 22:53:53 +01:00
KZ
d14554e45b Implement RuTor 2015-08-06 22:35:35 +01:00
KZ
2b198ef688 Add category mapping to torrentday, make logs viewable from web ui and change log messages to report new/old release count. 2015-08-06 20:07:58 +01:00
Matthew Little
1160a609ca Update README.md 2015-08-06 10:46:55 -06:00
KZ
6baf3bba8c Fix for files not being copied to the output folder 2015-08-05 23:23:32 +01:00
KZ
bcc0b5b6bf Fix Safari not working not working (Untested). Fix cached download links not proxying the torrent download. 2015-08-05 23:00:09 +01:00
KZ
d70b4412ed Fix torrentday 2015-08-05 19:22:02 +01:00
KZ
b72248ab3d Invalid command line options now show errors 2015-08-05 19:13:58 +01:00
unknown
ec6f361241 Implemented Demonoid 2015-08-04 21:07:46 -06:00
unknown
0a8d9d3447 Abstracted & unified indexer config logic (logins are now saved), implemented indexer config migrations, fixed nCore implementation 2015-08-03 15:38:45 -06:00
unknown
5dc7ebaba5 Pulled in Sonarr's libcurl dll mapping, removed LINUX compiler flag from CurlSharp 2015-08-03 11:04:48 -06:00
Matthew Little
fd6b70ef16 Merge pull request #124 from damwthomas/ncore-
Ncore
2015-08-03 11:01:58 -06:00
unknown
517a82f1c7 Removed unneeded instructions from web UI 2015-08-02 20:59:25 -06:00
unknown
59add78cb6 Fix console.csproj to load in MonoDevelop 2015-08-02 16:14:30 -06:00
unknown
868fb8fa20 Fixed version in Inno script 2015-08-02 15:55:23 -06:00
unknown
2d06ab8d70 Distribution script bug fix 2015-08-02 15:13:10 -06:00
unknown
3959fdc976 Fixed "cannot await in body of catch clause" warning 2015-08-02 15:10:51 -06:00
unknown
39db187c78 Fixed installer build script 2015-08-02 14:44:07 -06:00
unknown
eb66e5618f Updated distribution script with mono build 2015-08-02 14:39:56 -06:00
unknown
90f89542e2 build script fix 2015-08-02 14:26:48 -06:00
Matthew Little
62eb3a2f62 Merge pull request #125 from zone117x/develop
Develop
2015-08-02 14:18:39 -06:00
unknown
7a2ff0a60c Fixed indexer card WebUI height 2015-08-02 13:09:22 -06:00
unknown
9fa6995ccb Fixed bB indexer login 2015-08-02 12:44:36 -06:00
unknown
9c03f0c35e Fixed TorrentDay login, fixed nested redirect loops 2015-08-02 12:37:59 -06:00
unknown
a0fd1db52e Fixed Strike 2015-08-02 12:18:06 -06:00
unknown
12e0998556 Fixed Speed.cd login 2015-08-02 12:14:21 -06:00
unknown
dd549b703c Remove support for RARBG (official support now in Sonarr, and recently broke in Jackett anyway) 2015-08-02 12:12:32 -06:00
unknown
c3202979e1 Merge branch 'develop' of https://github.com/zone117x/Jackett into develop 2015-08-02 11:57:09 -06:00
unknown
edb2190799 Fixed Freshon Login 2015-08-02 11:56:52 -06:00
KZ
d4b61fe3a9 Add CouchPotato interface 2015-08-02 18:55:39 +01:00
unknown
478c41fed6 Fixed BitMeTV login, fixed failed login callback failing if async 2015-08-02 11:28:59 -06:00
unknown
394519e779 Fixed BitMeTV login exception crashing app 2015-08-02 10:30:31 -06:00
KZ
2da52edbe5 Update readme 2015-07-31 21:46:17 +01:00
Thomas
3b9d9ff0f8 nCore
Still a problem with the login & search doesn't work anymore with the
RequestStringWithCookiesAndRetry function.
2015-07-31 22:32:18 +02:00
KZ
796bb70421 Fix: Redhat/NSS based libcurl not being able to access certain indexers 2015-07-31 20:27:59 +01:00
Thomas
ecacc0b129 merge
merge
2015-07-31 21:17:56 +02:00
KZ
1606e3379f Implement torrentbytes 2015-07-30 21:09:38 +01:00
KZ
922583ea5d Fix compilation under mono #117. Allow explicit web client selection. Init curl at application start. 2015-07-30 18:50:46 +01:00
KZ
c76137a70c Fix testing indexers 2015-07-29 21:11:30 +01:00
KZ
95402f3d4f #93 Change IPT to be category aware and render availible categories to the front end. 2015-07-29 20:30:28 +01:00
KZ
daf6d8ff50 Update nuget for 4.5 2015-07-29 18:55:08 +01:00
KZ
37cf3e569c Fix AnimeBytes caps, Change to 4.5 #117, change all trackers to retry failed requests 2015-07-29 18:47:51 +01:00
KZ
70b9ecee1b Fix project not copying new tracker logo 2015-07-29 00:58:57 +01:00
KZ
d3e43b290f Upgrade fix and testing an indexer now adds to the cache 2015-07-29 00:56:08 +01:00
KZ
ea069810a5 Add indexer: Immortalseed. Add category mapping framework. 2015-07-29 00:10:04 +01:00
KZ
37587bdc7e #120 Linux defaults to allowing external access. 2015-07-28 20:29:05 +01:00
KZ
499b53e9ed Post refactor fixes 2015-07-28 20:22:23 +01:00
KZ
51042e91fc Indexer refactor complete. This is going to need lots of testing! 2015-07-28 00:06:49 +01:00
KZ
33d85bc4f4 Re-add correctly cased 2015-07-27 18:57:07 +01:00
KZ
84cb7bd62b Remove wrongly cased file 2015-07-27 18:56:42 +01:00
unknown
5689829cee Version increment 2015-07-26 15:47:34 -06:00
unknown
e123884a14 Route fixes 2015-07-26 15:45:35 -06:00
unknown
33b4358696 Distribution fix 2015-07-26 15:20:08 -06:00
unknown
e714d8ab2c Created github distribution app 2015-07-26 15:14:29 -06:00
KZ
7dc8cd3c8a Add anime cap to ipt and remove New tag from PTM 2015-07-26 19:01:08 +01:00
KZ
4ba1ea7000 Add missing IPT anime category 2015-07-26 18:05:16 +01:00
KZ
3478bebebb Change file to lower case and fix console issue 2015-07-26 17:27:04 +01:00
KZ
36ac35f5b5 Change bakabt to lower case as in convention and fix duplicate command line option 2015-07-26 17:15:37 +01:00
unknown
615ee82f22 Revert bakabt casing change 2015-07-26 10:05:34 -06:00
unknown
33aaf723a9 Merge branch 'master' of https://github.com/zone117x/Jackett into develop 2015-07-26 10:04:17 -06:00
unknown
d3ecb66cc2 Fixed logo image requests using Name rather than ID 2015-07-26 10:02:27 -06:00
KZ
b81cdac227 Merge pull request #113 from sdesbure/master
Use correct name for bakabt.png
2015-07-26 16:33:32 +01:00
Sylvain Desbureaux
7eec9b059c use correct name for bakabt.png
older one was not using the correct case, which causes an error on unix (BakaBT.png is the correct not bakabt.png)
2015-07-26 17:07:00 +02:00
KZ
3f146b0061 New: Viewable release cache 2015-07-26 15:22:20 +01:00
KZ
78770ea2d2 Fix wrong description for PTM 2015-07-26 11:57:29 +01:00
KZ
dc1e389708 Fix PTM not parsing dates 2015-07-26 11:53:38 +01:00
KZ
5d2f4aa50e Tweak read me 2015-07-26 11:39:27 +01:00
KZ
a49bbc2c32 Merge changes 2015-07-26 11:36:57 +01:00
KZ
7785c9a532 Fix IPT 2015-07-26 11:27:50 +01:00
unknown
3b4b8ab902 Replaced most indexers' byte size string parsing with shared helper function 2015-07-25 21:53:53 -06:00
unknown
235a2f4f40 Implemented HD-Space 2015-07-25 21:48:18 -06:00
unknown
17d6ee69ff Implemented pretome 2015-07-25 20:33:01 -06:00
KZ
55e0297f81 Merge BakaBT Fix 2015-07-26 01:22:26 +01:00
KZ
f6e2082d3d BakaBT fix minium ratio not set 2015-07-26 01:17:19 +01:00
KZ
d14eb12c00 Merge pull request #108 from zone117x/develop
BakaBT + Switch from x64 back to any cpu
2015-07-26 01:08:16 +01:00
KZ
80da2abe10 Baka BT Remove Season from search query 2015-07-26 01:04:16 +01:00
KZ
aa82506f5f Fix logo not copying 2015-07-26 00:53:45 +01:00
KZ
a2ce89d2da Implement BakaBT, change Console to not build as x64, Add test framework 2015-07-26 00:51:55 +01:00
Matthew Little
9e9a98294b Update README.md 2015-07-25 10:29:28 -06:00
Matthew Little
b9aaef3d59 Update README.md 2015-07-25 10:28:34 -06:00
KZ
db394fe99a Merge pull request #106 from zone117x/develop
Fix SCC not saving and AlphaRatio
2015-07-25 11:49:11 +01:00
KZ
2673d5a796 Fix SCC not saving and AlphaRatio 2015-07-25 11:47:01 +01:00
KZ
e9e8d29697 Resolve Merge conflict 2015-07-25 10:26:01 +01:00
KZ
ef0948f005 Fix SCC and duplicate console option 2015-07-25 10:24:15 +01:00
KZ
e460c0402a Merge fixes from develop 2015-07-25 09:35:25 +01:00
KZ
65be91c932 Make lib curl more stable 2015-07-25 09:34:15 +01:00
unknown
45e8900b94 Fix for SceneTime timezone on mono 2015-07-24 19:25:30 -06:00
unknown
738f6732a7 Fixed extra slashes in URLs 2015-07-24 18:41:24 -06:00
unknown
de19b79054 Fix for SceneTime 2015-07-24 18:27:35 -06:00
unknown
cc5fbec7fa FreshonTV fix 2015-07-24 18:23:31 -06:00
KZ
6b9609b4c9 Merge pull request #105 from zone117x/develop
Merge fixes from testing
2015-07-24 22:54:44 +01:00
KZ
f31f89037c Various bugfixes. 2015-07-24 22:38:31 +01:00
KZ
960720b3e4 Added UI for allowing external access, stop server listening on the old port when changing ports. Config migration bug fixes. 2015-07-24 20:15:08 +01:00
KZ
e71eaa9c97 Merge pull request #104 from zone117x/develop
Command line args.  Supercede pull #102 from sdesbure:master
2015-07-24 00:09:32 +01:00
KZ
84c2b0c8b9 Command line args. Superceade pull #102 from sdesbure:master 2015-07-24 00:07:36 +01:00
KZ
2e7fc987ac Merge branch 'master' of https://github.com/zone117x/Jackett.git 2015-07-23 22:15:41 +01:00
KZ
6ab31b0443 Merge branch 'develop' 2015-07-23 22:14:55 +01:00
KZ
8891c04b84 Fix unreliable torrentleech date parsing 2015-07-23 22:14:36 +01:00
KZ
a894dfa736 Merge pull request #103 from zone117x/develop
Passwords inputs are now the correct type. Fix configure_indexer not returning errors. Fix build warning. Change AB, HDT, MTTV, PHD, ST to use generic web client.
2015-07-23 21:37:42 +01:00
KZ
1622f40942 Passwords inputs are now the correct type. Fix configure_indexer not returning errors. Fix build warning. Change AB, HDT, MTTV, PHD, ST to use generic web client. 2015-07-23 21:36:23 +01:00
Matthew Little
560a413d19 Merge pull request #101 from zone117x/develop
Develop
2015-07-22 23:20:21 -06:00
Matthew Little
29a3768947 Update README.md 2015-07-22 23:18:41 -06:00
unknown
23b844e86f Implemented PrivateHD 2015-07-22 23:16:35 -06:00
unknown
1e5aedea9d Abstracted common "time ago" date string parsing logic 2015-07-22 23:16:13 -06:00
unknown
bb10442216 Fixed bug with download proxy url using indexerName instead of indexerID 2015-07-22 21:21:29 -06:00
Matthew Little
dd0bba9e5e Update README.md 2015-07-22 18:25:08 -06:00
KZ
054ced7b44 Merge remote-tracking branch 'refs/remotes/origin/develop' 2015-07-23 00:10:27 +01:00
KZ
aa34bd8a83 Revert "Revert "Refactored to use the RageID lookup disabled, removed Sonarr API setup""
This reverts commit b3ecee2cc9.
2015-07-23 00:09:55 +01:00
KZ
72605c64cc Couple of bugfixes 2015-07-22 23:48:02 +01:00
KZ
7f53c52767 Fix trackers with non alphanumerics in the name not resolving 2015-07-22 23:06:46 +01:00
KZ
c4d653bc2e 0.5 Rc1 - Reimplement port change+tray, fix IPT+SSC. Installer fixes. 2015-07-22 23:00:52 +01:00
KZ
9ca7f641ad Add missed file 2015-07-20 22:30:08 +01:00
KZ
b1c39c697a Merge pull request #99 from zone117x/feature/ServiceRefactor
Merge Feature/service refactor
2015-07-20 22:26:42 +01:00
KZ
fad2a10bef Merge changes 2015-07-20 22:18:02 +01:00
KZ
4ec5815897 Web auth 2015-07-20 22:08:05 +01:00
unknown
59d3e792b3 Fix loopback & localhost entry points for mono 2015-07-19 18:26:07 -06:00
unknown
69ef08f019 Fix loopback address not working 2015-07-19 18:06:21 -06:00
unknown
211bfbfdf0 readme change 2015-07-19 17:27:03 -06:00
unknown
7746d11ea3 Add bB to readme 2015-07-19 17:26:45 -06:00
unknown
bd480d10b3 Fixed bB cookie persistence 2015-07-19 17:22:08 -06:00
unknown
7961af1431 Fixed AnimeBytes torznab category 2015-07-19 17:20:16 -06:00
unknown
e6e3d93a66 Merge branch 'feature/ServiceRefactor' of https://github.com/zone117x/Jackett into feature/ServiceRefactor 2015-07-19 17:05:40 -06:00
unknown
a9f1daac73 Implemented torznab capabilities feature 2015-07-19 17:05:30 -06:00
KZ
07fe9d1e07 Fix issue #65 - Parsing issues due to culuture differences. 2015-07-19 22:57:15 +01:00
KZ
f6ed903ef5 Add logging 2015-07-19 22:31:36 +01:00
KZ
eaa4d0eb04 Merge branch 'feature/ServiceRefactor' of https://github.com/zone117x/Jackett.git 2015-07-19 21:22:25 +01:00
KZ
63f7a8912b Add missing route 2015-07-19 21:22:23 +01:00
unknown
4d51cecf4f Implemented bB tracker 2015-07-19 14:21:31 -06:00
unknown
03a2800a8c Fix for Strike date change 2015-07-19 14:21:14 -06:00
KZ
d79dd7e73e Fix merge conflict 2015-07-19 21:16:31 +01:00
KZ
b10813e420 Add missing files 2015-07-19 21:15:23 +01:00
unknown
63ba324281 Fixed indexer register by name 2015-07-19 13:38:41 -06:00
unknown
195ec0a94c Indexer ID rather than class name 2015-07-19 13:28:08 -06:00
unknown
c39feb7997 Fixed TestIndexer async Task 2015-07-19 12:25:47 -06:00
unknown
3f4f8c795e Merge branch 'feature/ServiceRefactor' of https://github.com/zone117x/Jackett into feature/ServiceRefactor 2015-07-19 11:37:18 -06:00
unknown
c92caf18c5 Fix indexer class lookup by string when name has non-alphanumeric chars 2015-07-19 11:37:08 -06:00
KZ
ed28770170 Tidy up 2015-07-19 18:31:25 +01:00
KZ
f045a1f350 Bug fix 2015-07-19 18:23:29 +01:00
KZ
75f0cce064 Change indexers to use new api 2015-07-19 18:18:54 +01:00
unknown
555e0d225c Revert "Refactored to use the RageID lookup disabled, removed Sonarr API setup"
This reverts commit b279c871b1.
2015-07-19 10:59:07 -06:00
unknown
705890d5ec Added change port argument to console app 2015-07-19 10:57:33 -06:00
unknown
91f80e054c Added build.bat & installer.iss as solution items 2015-07-19 10:57:05 -06:00
unknown
c81c6b1e68 Minor settings migration bug fix 2015-07-19 10:35:56 -06:00
unknown
7aecb9ac68 Readded SpeedCD to solution 2015-07-19 10:35:34 -06:00
KZ
9b1c0eb0c0 Merge pull request #95 from Kayomani/feature/Refactor2
Feature/refactor2
2015-07-19 15:41:48 +01:00
KZ
e1c70b1e30 Reinstate changes from merge 2015-07-19 15:22:26 +01:00
KZ
133997959f Fix csproj 2015-07-19 15:03:39 +01:00
KZ
f2be137836 Undo Organizational improvements and build warnings fixed 2015-07-19 14:56:48 +01:00
KZ
58911849b7 Tray 2015-07-19 14:33:27 +01:00
KZ
1359ad16f0 Refactor done 2015-07-19 14:22:50 +01:00
unknown
01bf0b8144 Implemented speed.cd 2015-07-18 20:19:09 -06:00
unknown
03843c8833 Organizational improvements and build warnings fixed 2015-07-18 19:03:24 -06:00
unknown
0c49540671 Fixed blocking query in ShowRSS 2015-07-18 19:02:47 -06:00
unknown
f16ebe06df Fix showing console error when settings directory cannot be created 2015-07-18 19:02:29 -06:00
unknown
1a52731cd2 Strike bug fix 2015-07-18 19:00:38 -06:00
KZ
e518a3b58e Interim commit 2015-07-19 01:59:30 +01:00
KZ
33a97b148f Refactor 2015-07-19 01:27:41 +01:00
unknown
7f2aa4ccad Refactored to use the RageID lookup disabled, removed Sonarr API setup 2015-07-18 14:35:02 -06:00
Matthew Little
974565d907 Merge pull request #88 from Kayomani/hotfix/Bugfixes
HDTorrents bugfix, change AnimeBytes to work with RageId queries and reduce sizes of cards to improve presentation with the large number of indexers
2015-07-18 11:03:01 -06:00
KZ
192406892d HDTorrents bugfix and reduce sizes of cards to improve presentation with the large number of indexers 2015-07-18 10:59:18 +01:00
Matthew Little
869d89d663 Merge pull request #85 from sdesbure/master
Add of FrenchTorrentDb site
2015-07-16 18:10:58 -06:00
Matthew Little
64daefb2b6 Merge pull request #81 from damwthomas/ChangingPort
Change port
2015-07-16 18:08:12 -06:00
Sylvain Desbureaux
055ef408f9 done the Download method for FrenchTorrentDb 2015-07-17 00:24:38 +02:00
Sylvain Desbureaux
eff8444d83 reverting src/Jackett/packages.config 2015-07-17 00:20:14 +02:00
Sylvain Desbureaux
91f2fc8c5a only needed changes in src/Jackett/Jackett.csproj 2015-07-17 00:19:41 +02:00
Sylvain Desbureaux
c48711fcd7 No need of Noesis.Javascript 2015-07-16 02:03:19 +02:00
Sylvain Desbureaux
77878fbf4b added FrenchTorrentDb in the list of supported sites 2015-07-16 02:01:39 +02:00
Sylvain Desbureaux
d8a4b1b25a Added FrenchTorrentDb site 2015-07-16 01:59:38 +02:00
ThomasAmpen
79b42c9e2e Change port 2015-07-14 21:07:55 +02:00
unknown
41e0aaa2f5 Readme update 2015-07-13 01:18:10 -06:00
unknown
ef0acb5a7c T411 auto re-fetch token after 48 hours 2015-07-13 01:17:21 -06:00
unknown
b3ba949215 Implemented T411 2015-07-13 01:13:16 -06:00
unknown
21d5ef6c22 App version increment 2015-07-12 23:57:56 -06:00
unknown
0fb395391b Improvement for TPB - combined TV and HDTV search into one 2015-07-12 23:57:14 -06:00
unknown
b864269aaa Don't use https for HD-Torrents (doesn't work on mono) 2015-07-12 23:39:41 -06:00
unknown
4b152b438b App version increment 2015-07-12 20:03:04 -06:00
unknown
3b5f061730 Readme update 2015-07-12 20:01:36 -06:00
unknown
1fd92ee5aa Implemented BeyondHD 2015-07-12 20:01:02 -06:00
unknown
e12daf0be9 Moved AnimeBytes helper class into its main class file 2015-07-12 20:00:47 -06:00
unknown
f929d714ec Implemented SceneTime 2015-07-12 15:43:00 -06:00
unknown
a2fd26dcdc Minor improvements, bug fixes 2015-07-12 13:50:24 -06:00
Matthew Little
34aa6eb9fe Merge pull request #79 from damwthomas/master
HDTorrents
2015-07-12 13:18:01 -06:00
ThomasAmpen
e1ac1041a4 Forgotten parse 2015-07-12 19:58:46 +02:00
ThomasAmpen
72a7935dc3 DeletedExtentionmethod 2015-07-12 19:54:37 +02:00
ThomasAmpen
f2f38605bf BrowserUtil, tryparse added 2015-07-12 19:52:32 +02:00
ThomasAmpen
905d522a9b Merge branch 'zone117x/master' 2015-07-12 18:54:45 +02:00
ThomasAmpen
c67e03c80a pull from master 2015-07-12 18:23:40 +02:00
damwthomas
ab7c1bc7e3 Merge pull request #2 from damwthomas/HDTorrents
Hdtorrents
2015-07-12 17:49:36 +02:00
ThomasAmpen
d49435f805 HDTorrents 2015-07-12 17:48:37 +02:00
Matthew Little
42b3e06cdd Update README.md 2015-07-11 14:34:13 -06:00
unknown
658e112a46 Incremented to app version 0.4.0 2015-07-11 14:30:16 -06:00
unknown
a651dea5a8 Strip most non alphanumeric characters from show titles before searching 2015-07-11 14:23:43 -06:00
unknown
e404389254 Timezone publish date fixes for Bit-HDTV, BitMeTv, and MoreThanTV 2015-07-11 14:06:13 -06:00
ThomasAmpen
25bd39e883 HdTorrents 2015-07-11 21:27:57 +02:00
unknown
97e9f86538 TorrentShack fix for an unlikely bug 2015-07-11 13:26:57 -06:00
unknown
469712c027 Fixes for loading saved cookie problems 2015-07-11 12:54:15 -06:00
unknown
f76ec51c62 Fixed torrent file download for GetStrike 2015-07-11 11:09:52 -06:00
unknown
2a8b5ed6a9 Fix for custom PirateBay url 2015-07-11 11:00:44 -06:00
unknown
2800bee1cb Display app version in web interface 2015-07-11 10:53:18 -06:00
unknown
9573997586 Fixed autostart feature 2015-07-11 10:42:00 -06:00
unknown
7cbad21e0b Changed app settings location to longer require root on unix 2015-07-11 10:29:20 -06:00
unknown
a0987d9b50 Bug fixes for number parsing, fixed ThePirateBay indexer 2015-07-11 10:24:41 -06:00
ThomasAmpen
2ed6859116 Pull from master 2015-07-09 22:24:20 +02:00
Matthew Little
d205fb1ab3 Update README.md 2015-07-09 14:08:13 -06:00
Matthew Little
f02404cd45 Merge pull request #78 from Kayomani/master
Add AnimeBytes Tracker
2015-07-09 13:50:25 -06:00
ThomasAmpen
387f367041 Auth(Still disabled), chaing port, stripped special chars in serie name 2015-07-09 21:38:12 +02:00
KZ
e9d7b21558 Add AnimeBytes Tracker 2015-07-09 18:44:19 +01:00
Matthew Little
de38afd346 Merge pull request #73 from damwthomas/TorrentzSupport
ShowRSS, tbp fix
2015-06-25 15:10:32 -06:00
ThomasAmpen
8806995a65 index cleanup, piratebay size culture fix
tbp wasn't always working correctly depending on your cultureinfo.
Placed the css in a seperate file (custom.css)
placed the js in a seperate file (custom.js)
2015-06-25 21:21:06 +02:00
ThomasAmpen
e3766edc56 Showrss
All.rss support
2015-06-25 19:48:48 +02:00
Matthew Little
53482a6d7d Merge pull request #71 from damwthomas/master
TorrentzSupport
2015-06-24 14:31:38 -06:00
damwthomas
b0f4957d1d Merge pull request #1 from damwthomas/TorrentzSupport
TorrentzSupport
2015-06-22 21:36:11 +02:00
ThomasAmpen
dd98aa6592 TorrentzSupport
TorrentzSupport
2015-06-22 21:34:55 +02:00
Matthew Little
916df7393b Merge pull request #68 from Venxir/master
Various fixes
2015-06-19 15:42:29 -06:00
Venxir
29f72a26d2 Reset cookies with new logindata 2015-06-19 23:00:47 +02:00
Venxir
121f3c0197 Fixed setup button for indexers 2015-06-19 21:11:16 +02:00
Venxir
8fe9d08f35 Updated AlphaRatio indexer for windows clients 2015-06-19 20:24:37 +02:00
Matthew Little
1a162bc3fa Merge pull request #63 from ictibus/master
indexer for scc
2015-06-19 10:15:31 -06:00
unknown
acf5d90945 fixed whitespace 2015-06-13 21:59:50 -05:00
unknown
51ed4166d8 formatting 2015-06-13 21:56:26 -05:00
unknown
1c980f7241 added sceneaccess indexer 2015-06-13 21:46:55 -05:00
zone117x
8e475e1681 Fixed mono bug with httplistener 2015-05-25 18:32:54 -06:00
zone117x
976f42b48c Log parsing errors for rarbg 2015-05-25 17:53:43 -06:00
zone117x
0311c3f9a9 Merge branch 'master' of https://github.com/zone117x/Jackett 2015-05-25 17:52:13 -06:00
zone117x
e2daa21914 Added port and public binding config options 2015-05-25 17:52:02 -06:00
zone117x
68c3f6ed4e Retry http extension 2015-05-25 17:50:54 -06:00
zone117x
c9df7bc47a Added retry logic to morethantv 2015-05-25 17:50:20 -06:00
zone117x
f2749ed311 BitMeTV change 2015-05-25 17:50:09 -06:00
zone117x
6a3cface7a Bug fix for TorrentShack 2015-05-25 17:49:23 -06:00
Matthew Little
9f54f87c62 Merge pull request #51 from d2dyno/patch-4
Update to new ThePirateBay URL
2015-05-19 18:33:11 -06:00
d2dyno
857a123162 Update to new ThePirateBay URL
ThePirateBay changed domain, to a selection of: .mn, .gd, .la, .am, .gs. I selected .gd.
2015-05-19 11:34:41 -04:00
Matthew Little
27f7ec61f0 Merge pull request #47 from conihorse/master
Added AlphaRation Provider & Resource. Based on existing morethan code
2015-05-18 18:21:27 -06:00
conihorse
adc06388e2 Added AlphaRation Provider & Resource. Based on existing morethan provider. 2015-05-18 17:00:19 -06:00
zone117x
d898725704 TorrentDay login fix 2015-05-17 16:40:56 -06:00
zone117x
e93e95a940 Bug fixes for MoreThanTV and TorrentShack date parsing 2015-05-09 12:53:28 -06:00
zone117x
ba419a1b8e Fix for comment link for thepiratebay 2015-05-05 20:03:23 -06:00
zone117x
eb4b068d54 Merge branch 'master' of https://github.com/zone117x/Jackett 2015-05-04 22:38:13 -06:00
zone117x
489c900e00 Do not use https for rarbg 2015-05-04 22:38:01 -06:00
Matthew Little
7753ffdad4 Update README.md 2015-05-04 22:34:47 -06:00
zone117x
4aca537a92 Potential bug fixes and code cleanup 2015-05-04 22:25:28 -06:00
zone117x
c0a7d00ffc Added RARBG 2015-05-04 22:24:39 -06:00
zone117x
68dd53b962 Search all TV categories for the piratebay 2015-05-04 21:29:31 -06:00
zone117x
9ba12621a5 Added TorrentDay 2015-05-04 21:18:49 -06:00
zone117x
1faf5099f5 Added TorrentShack 2015-05-04 20:22:07 -06:00
zone117x
bc8b1d14d5 Added parsing error logging 2015-05-03 22:12:14 -06:00
zone117x
f781deb4a9 Fixed bug with some indexers not passing test 2015-05-03 22:07:37 -06:00
zone117x
8d39a4b1a7 Fixed TorrentLeech 2015-05-03 21:23:47 -06:00
zone117x
edf97f5d05 Merge branch 'master' of https://github.com/zone117x/Jackett 2015-04-27 19:05:20 -06:00
zone117x
507ef9424b Fixed curl not being referenced correctly, fixed missing Strike.cs file 2015-04-27 19:05:08 -06:00
Matthew Little
4cd12332d2 Update README.md 2015-04-26 11:06:43 -06:00
Matthew Little
335e16dd3e Update README.md 2015-04-26 11:05:47 -06:00
zone117x
26f1ba7016 Fixed bug where search queries were unused 2015-04-26 00:51:52 -06:00
zone117x
59cf8c3e9f Fixed log file issues 2015-04-26 00:21:36 -06:00
zone117x
dfd68d16aa Added TorrentLeech 2015-04-25 20:32:03 -06:00
zone117x
9a4c5ffe5c Added getstrike.net 2015-04-25 13:37:03 -06:00
zone117x
8cf45a5e45 Fixed bug with app not exiting, piratebay now works on mono 2015-04-23 20:21:19 -06:00
zone117x
7834411bbd rename 2015-04-23 20:12:02 -06:00
Matthew Little
789f22972c Update README.md 2015-04-23 09:00:52 -06:00
zone117x
bf3759020a MoreThanTv now working on mono with libcurl 2015-04-23 00:44:21 -06:00
zone117x
0530bed226 Some logging changes 2015-04-22 20:04:57 -06:00
402 changed files with 52730 additions and 6901 deletions

3
.gitignore vendored
View File

@@ -194,3 +194,6 @@ FakesAssemblies/
# Visual Studio 6 workspace options file
*.opt
/Build.mono
/Build.windows
/Output

37
Build.bat Normal file
View File

@@ -0,0 +1,37 @@
rmdir /s /q build.windows
rmdir /s /q build.mono
rmdir /s /q Output
cd src
Msbuild Jackett.sln /t:Clean,Build /p:Configuration=Release /verbosity:minimal
cd ..
xcopy src\Jackett.Console\bin\Release build.windows\ /e /y
copy /Y src\Jackett.Service\bin\Release\JackettService.exe build.windows\JackettService.exe
copy /Y src\Jackett.Service\bin\Release\JackettService.exe.config build.windows\JackettService.exe.config
copy /Y src\Jackett.Tray\bin\Release\JackettTray.exe build.windows\JackettTray.exe
copy /Y src\Jackett.Tray\bin\Release\JackettTray.exe.config build.windows\JackettTray.exe.config
copy /Y src\Jackett.Updater\bin\Release\JackettUpdater.exe build.windows\JackettUpdater.exe
copy /Y src\Jackett.Updater\bin\Release\JackettUpdater.exe.config build.windows\JackettUpdater.exe.config
copy /Y LICENSE build.windows\LICENSE
copy /Y README.md build.windows\README.md
cd src
Msbuild Jackett.sln /t:Clean
call "C:\Program Files (x86)\Mono\bin\xbuild.bat" Jackett.sln /t:Build /p:Configuration=Release /verbosity:minimal
cd ..
xcopy src\Jackett.Console\bin\Release build.mono\ /e /y
copy /Y src\Jackett.Service\bin\Release\JackettService.exe build.mono\JackettService.exe
copy /Y src\Jackett.Service\bin\Release\JackettService.exe.config build.mono\JackettService.exe.config
copy /Y src\Jackett.Tray\bin\Release\JackettTray.exe build.mono\JackettTray.exe
copy /Y src\Jackett.Tray\bin\Release\JackettTray.exe.config build.mono\JackettTray.exe.config
copy /Y src\Jackett.Updater\bin\Release\JackettUpdater.exe build.mono\JackettUpdater.exe
copy /Y src\Jackett.Updater\bin\Release\JackettUpdater.exe.config build.mono\JackettUpdater.exe.config
copy /Y LICENSE build.mono\LICENSE
copy /Y README.md build.mono\README.md
copy /Y Upstart.config build.mono\Upstart.config
iscc Installer.iss

63
Installer.iss Normal file
View File

@@ -0,0 +1,63 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Jackett"
#define MyAppVersion GetFileVersion("build.windows/Jackett.dll")
#define MyAppPublisher "Jackett Inc."
#define MyAppURL "https://github.com/Jackett/Jackett"
#define MyAppExeName "JackettTray.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{C2A9FC00-AA48-4F17-9A72-62FBCEE2785B}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
OutputBaseFilename=setup
SetupIconFile=src\Jackett.Console\jackett.ico
UninstallDisplayIcon={commonappdata}\Jackett\JackettConsole.exe
Compression=lzma
SolidCompression=yes
DisableDirPage=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "windowsService"; Description: "Install as a Windows Service"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "build.windows\JackettTray.exe"; DestDir: "{commonappdata}\Jackett"; Flags: ignoreversion
Source: "build.windows\JackettUpdater.exe"; DestDir: "{commonappdata}\Jackett"; Flags: ignoreversion
Source: "build.windows\*"; DestDir: "{commonappdata}\Jackett"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{commonappdata}\Jackett\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{commonappdata}\Jackett\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{commonappdata}\Jackett\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
[Run]
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Uninstall"; Flags: waituntilterminated;
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--ReserveUrls"; Flags: waituntilterminated;
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--MigrateSettings"; Flags: waituntilterminated;
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Install"; Flags: waituntilterminated; Tasks: windowsService
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Start"; Flags: waituntilterminated; Tasks: windowsService
[UninstallRun]
Filename: "{commonappdata}\Jackett\JackettConsole.exe"; Parameters: "--Uninstall"; Flags: waituntilterminated skipifdoesntexist

225
README.md
View File

@@ -1,32 +1,193 @@
# Jackett
### API Access to your favorite trackers
This software creates a [Torznab](https://github.com/Sonarr/Sonarr/wiki/Implementing-a-Torznab-indexer) API server on your machine that any Torznab enabled software can consume. Jackett works as a proxy server: it translates Torznab queries into tracker-site-specific http queries, parses the html response into Torznab results, then sends results back to the requesting software.
Currently [Sonarr](https://sonarr.tv/) is the only software that uses Torznab. [Couchpotato](https://couchpota.to/) will hopefully get Torznab support in the future.
### Download
Download in the [Releases page](https://github.com/zone117x/Jackett/releases)
### Supported Systems
Windows. Tested and working on Linux using Mono. Should also work on OSX.
### Supported Trackers
* [BitMeTV](http://www.bitmetv.org/)
* [MoreThan.tv](https://morethan.tv/)
* [BIT-HDTV](https://www.bit-hdtv.com)
* [Freshon](https://freshon.tv/)
* [IPTorrents](https://iptorrents.com/)
* [The Pirate Bay](https://thepiratebay.se/)
### Additional Trackers
Jackett's framework allows me (and any other volunteering dev) to implement just about any new tracker in 15-60 minutes. If you'd like support for a new tracker then feel free to leave a request on the [issues page](https://github.com/zone117x/Jackett/issues) or contact me on IRC (see below).
### Contact & Support
I can be contact on IRC at [irc.freenode.net#sonarr](http://webchat.freenode.net/?channels=#sonarr)
### Screenshots
![screenshot](http://i.imgur.com/ca3lKif.png "screenshot")
## Jackett
This project is a new fork and is recruiting development help. If you are able to help out please contact us.
Jackett works as a proxy server: it translates queries from apps (Sonarr, SickRage, CouchPotato, Mylar, etc) into tracker-site-specific http queries, parses the html response, then sends results back to the requesting software. This allows for getting recent uploads (like RSS) and performing searches. Jackett is a single repository of maintained indexer scraping & translation logic - removing the burden from other apps.
Developer note: The software implements the [Torznab](https://github.com/Sonarr/Sonarr/wiki/Implementing-a-Torznab-indexer) (with [nZEDb](https://github.com/nZEDb/nZEDb/blob/dev/docs/newznab_api_specification.txt) category numbering) and [TorrentPotato](https://github.com/RuudBurger/CouchPotatoServer/wiki/Couchpotato-torrent-provider) APIs.
#### Supported Systems
* Windows using .NET 4.5
* Linux and OSX using Mono 4 (With v3 you'll experience crashes).
#### Supported Private Trackers
* 7tor
* Abnormal
* AlphaRatio
* AlphaReign
* Andraste
* AnimeBytes
* AnimeTorrents
* AOX
* Apollo (XANAX)
* Avistaz
* BakaBT
* bB
* Best Friends
* BeyondHD
* Bit-City Reloaded
* BIT-HDTV
* BitHQ
* BitHUmen
* BitMeTV
* BitSoup
* Bitspyder
* Blu-bits
* BTN
* CHDBits
* CinemaZ
* DanishBits
* DataScene
* Demonoid
* DigitalHive
* EoT-Forum
* eStone
* Ethor.net (Thor's Land)
* FANO.IN
* FileList
* Freedom-HD
* Freshon
* FunFile
* FunkyTorrents
* Fuzer
* Ghost City
* GODS
* Gormogon
* Hardbay
* HD4Free
* HD-Space
* HD-Torrents
* HDClub
* HDSky
* Hebits
* Hyperay
* Hounddawgs
* House-of-Torrents
* ICE Torrent
* ILoveTorrents
* Immortalseed
* Infinity-T
* IPTorrents
* M-Team - TP
* MoreThanTV
* MyAnonamouse
* myAmity
* MySpleen
* Nachtwerk
* NCore
* NetHD
* New Real World
* NextGen
* Norbits
* nostream
* notwhat.cd
* PassTheHeadphones
* PassThePopcorn
* PirateTheNet
* Pretome
* PrivateHD
* QcTorrent
* RapideTracker
* RevolutionTT
* Rockhard Lossless
* RuTracker
* SceneAccess
* SceneFZ
* SceneTime
* SDBits
* Secret Cinema
* Shareisland
* ShareSpaceDB
* Shazbat
* Shellife
* SpeedCD
* Superbits
* The Horror Charnel
* The New Retro
* The Shinning
* TehConnection
* TenYardTracker
* Torrent Network
* Torrent Sector Crew
* TorrentBD
* TorrentBytes
* TorrentDay
* TorrentHeaven
* Torrenting
* TorrentLeech
* Torrents.Md
* TorrentShack
* Torrent-Syndikat
* ToTheGlory
* TranceTraffic
* TransmitheNet
* TV Chaos UK
* TV-Vault
* u-Torrent
* UHDBits
* World-In-HD
* WorldOfP2P
* x264
* XSpeeds
* Xthor
* Xtreme Zone
#### Installation on Windows
We recommend you install Jackett as a Windows service using the supplied installer. You may also download the zipped version if you would like to configure everything manually.
To get started with using the installer for Jackett, follow the steps below:
1. Download the latest version of the Windows installer, "Jackett.Installer.Windows.exe" from the [releases](https://github.com/Jackett/Jackett/releases/latest) page.
2. When prompted if you would like this app to make changes to your computer, select "yes".
3. If you would like to install Jackett as a Windows Service, make sure the "Install as Windows Service" checkbox is filled.
4. Once the installation has finished, check the "Launch Jackett" box to get started.
5. Navigate your web browser to: http://127.0.0.1:9117
6. You're now ready to begin adding your trackers and using Jackett.
When installed as a service the tray icon acts as a way to open/start/stop Jackett. If you opted to not install it as a service then Jackett will run its web server from the tray tool.
Jackett can also be run from the command line if you would like to see log messages (Ensure the server isn't already running from the tray/service). This can be done by using "JackettConsole.exe" (for Command Prompt), found in the Jackett data folder: "%ProgramData%\Jackett".
#### Installation on Linux/OSX
1. Install [Mono 4](http://www.mono-project.com/download/) or better
* Follow the instructions on the mono website and install the `mono-devel` package.
* On Red Hat/CentOS the `mono-locale-extras` package is also required
2. Install libcurl:
* Debian/Ubunutu: `apt-get install libcurl-dev`
* Redhat/Fedora: `yum install libcurl-devel`
* For other distros see the [Curl docs](http://curl.haxx.se/dlwiz/?type=devel).
3. Download and extract the latest `Jackett.Binaries.Mono.tar.gz` release from the [releases page](https://github.com/Jackett/Jackett/releases) and run Jackett using mono with the command `mono JackettConsole.exe`.
Detailed instructions for [Ubuntu 14.x](http://www.htpcguides.com/install-jackett-on-ubuntu-14-x-for-custom-torrents-in-sonarr/) and [Ubuntu 15.x](http://www.htpcguides.com/install-jackett-ubuntu-15-x-for-custom-torrents-in-sonarr/)
#### Installation on Synology
Jackett is available as beta package from [SynoCommuniy](https://synocommunity.com/)
#### Troubleshooting
* Command line switches
You can pass various options when running via the command line, see --help for details.
* Unable to connect to certain trackers on Linux
Try running with the "--SSLFix true" if you are on Redhat/Fedora/NNS based libcurl. If the tracker is currently configured try removing it and adding it again. Alternatively try running with a different client via --UseClient (Warning: safecurl just executes curl and your details may be seen from the process list). You can also try running with the "--IgnoreSslErrors true" option which is useful if the site has an invalid SSL certificate.
* Enable logging
You can get additional logging with the switches "-t -l". Please post logs if you are unable to resolve your issue with these switches ensuring to remove your username/password/cookies.
#### Creating an issue
Please supply as much information about the problem you are experiencing as possible. Your issue has a much greater chance of being resolved if logs are supplied so that we can see what is going on. Creating an issue with '### isn't working' doesn't help anyone to fix the problem.
### Contributing
All contributions are welcome just send a pull request. Jackett's framework allows our team (and any other volunteering dev) to implement new trackers in an hour or two. If you'd like support for a new tracker but are not a developer then feel free to leave a request on the [issues page](https://github.com/Jackett/Jackett/issues). It is recommended to use Visual studio 2015 when making code changes in this project. We currently only support private trackers.
### Screenshots
![screenshot](https://i.imgur.com/0d1nl7g.png "screenshot")

20
Upstart.config Normal file
View File

@@ -0,0 +1,20 @@
author "sea3pea0"
description "Upstart Script to run NzbDrone as a service on Ubuntu/Debian based systems, as well as others"
#Set username for the process. Should probably be what you use for logging in
setuid {username to run jackett}
setgid users
#This is the install directory. If you installed using a deb package or the NzbDrone Repository you do not need to change this
env DIR=/opt/Jackett
env LD_LIBRARY_PATH=/usr/local/nzbdrone/lib
start on runlevel [2345]
stop on runlevel [016]
respawn
script
chdir $DIR
exec /volume1/@appstore/Mono/usr/bin/mono --debug JackettConsole.exe
end script

View File

@@ -0,0 +1,239 @@
using System;
using System.Runtime.InteropServices;
namespace CurlSharp
{
/// <summary>
/// Called when cURL has debug information for the client.
/// </summary>
/// <remarks>
/// For usage, see the sample <c>Upload.cs</c>.
/// Arguments passed to the recipient include:
/// <list type="table">
/// <listheader>
/// <term>Argument</term>
/// <description>Description</description>
/// </listheader>
/// <item>
/// <term>infoType</term>
/// <description>
/// Type of debug information, see
/// <see cref="CurlInfoType" />.
/// </description>
/// </item>
/// <item>
/// <term>message</term>
/// <description>Debug information as a string.</description>
/// </item>
/// <item>
/// <term>extraData</term>
/// <description>Client-provided extra data.</description>
/// </item>
/// </list>
/// </remarks>
public delegate void CurlDebugCallback(CurlInfoType infoType, String message, Object extraData);
/// <summary>
/// Called when cURL has header data for the client.
/// </summary>
/// <remarks>
/// For usage, see the sample <c>Headers.cs</c>.
/// Arguments passed to the recipient include:
/// <list type="table">
/// <listheader>
/// <term>Argument</term>
/// <description>Description</description>
/// </listheader>
/// <item>
/// <term>buf</term>
/// <description>Header data from cURL to the client.</description>
/// </item>
/// <item>
/// <term>size</term>
/// <description>Size of a character, in bytes.</description>
/// </item>
/// <item>
/// <term>nmemb</term>
/// <description>Number of characters.</description>
/// </item>
/// <item>
/// <term>extraData</term>
/// <description>Client-provided extra data.</description>
/// </item>
/// </list>
/// Your implementation should return the number of bytes (not
/// characters) processed. Usually this is <c>size * nmemb</c>.
/// Return -1 to abort the transfer.
/// </remarks>
public delegate int CurlHeaderCallback(byte[] buf, int size, int nmemb, Object extraData);
/// <summary>
/// Called when cURL needs for the client to perform an
/// IOCTL operation. An example might be when an FTP
/// upload requires rewinding of the input file to deal
/// with a resend occasioned by an error.
/// </summary>
/// <remarks>
/// <list type="table">
/// <listheader>
/// <term>Argument</term>
/// <description>Description</description>
/// </listheader>
/// <item>
/// <term>cmd</term>
/// <description>
/// A <see cref="CurlIoCommand" />; for now, only
/// <c>RestartRead</c> should be passed.
/// </description>
/// </item>
/// <item>
/// <term>extraData</term>
/// <description>
/// Client-provided extra data; in the
/// case of an FTP upload, it might be a
/// <c>FileStream</c> object.
/// </description>
/// </item>
/// </list>
/// Your implementation should return a <see cref="CurlIoError" />,
/// which should be <see cref="CurlIoError.Ok" /> if everything
/// is okay.
/// </remarks>
public delegate CurlIoError CurlIoctlCallback(CurlIoCommand cmd, Object extraData);
/// <summary>
/// Called when cURL wants to report progress.
/// </summary>
/// <remarks>
/// For usage, see the sample <c>Upload.cs</c>.
/// Arguments passed to the recipient include:
/// <list type="table">
/// <listheader>
/// <term>Argument</term>
/// <description>Description</description>
/// </listheader>
/// <item>
/// <term>extraData</term>
/// <description>Client-provided extra data.</description>
/// </item>
/// <item>
/// <term>dlTotal</term>
/// <description>Number of bytes to download.</description>
/// </item>
/// <item>
/// <term>dlNow</term>
/// <description>Number of bytes downloaded so far.</description>
/// </item>
/// <item>
/// <term>ulTotal</term>
/// <description>Number of bytes to upload.</description>
/// </item>
/// <item>
/// <term>ulNow</term>
/// <description>Number of bytes uploaded so far.</description>
/// </item>
/// </list>
/// Your implementation should return 0 to continue, or a non-zero
/// value to abort the transfer.
/// </remarks>
public delegate int CurlProgressCallback(Object extraData, double dlTotal, double dlNow,
double ulTotal, double ulNow);
/// <summary>
/// Called when cURL wants to read data from the client.
/// </summary>
/// <remarks>
/// For usage, see the sample <c>Upload.cs</c>.
/// Arguments passed to the recipient include:
/// <list type="table">
/// <listheader>
/// <term>Argument</term>
/// <description>Description</description>
/// </listheader>
/// <item>
/// <term>buf</term>
/// <description>
/// Buffer into which your client should write data
/// for cURL.
/// </description>
/// </item>
/// <item>
/// <term>size</term>
/// <description>Size of a character, usually 1.</description>
/// </item>
/// <item>
/// <term>nmemb</term>
/// <description>Number of characters.</description>
/// </item>
/// <item>
/// <term>extraData</term>
/// <description>Client-provided extra data.</description>
/// </item>
/// </list>
/// Your implementation should return the number of bytes (not
/// characters) written to <c>buf</c>. Return 0 to abort the transfer.
/// </remarks>
public delegate int CurlReadCallback([Out] byte[] buf, int size, int nmemb, Object extraData);
/// <summary>
/// Called when cURL wants to report an Ssl event.
/// </summary>
/// <remarks>
/// For usage, see the sample <c>SSLGet.cs</c>.
/// Arguments passed to the recipient include:
/// <list type="table">
/// <listheader>
/// <term>Argument</term>
/// <description>Description</description>
/// </listheader>
/// <item>
/// <term>ctx</term>
/// <description>
/// An <see cref="CurlSslContext" /> object that wraps an
/// OpenSSL <c>SSL_CTX</c> pointer.
/// </description>
/// </item>
/// <item>
/// <term>extraData</term>
/// <description>Client-provided extra data.</description>
/// </item>
/// </list>
/// Your implementation should return a <see cref="CurlCode" />,
/// which should be <see cref="CurlCode.Ok" /> if everything
/// is okay.
/// </remarks>
public delegate CurlCode CurlSslContextCallback(CurlSslContext ctx, Object extraData);
/// <summary>
/// Called when cURL has data for the client.
/// </summary>
/// <remarks>
/// For usage, see the example <c>EasyGet.cs</c>.
/// Arguments passed to the delegate implementation include:
/// <list type="table">
/// <listheader>
/// <term>Argument</term>
/// <description>Description</description>
/// </listheader>
/// <item>
/// <term>buf</term>
/// <description>Data cURL is providing to the client.</description>
/// </item>
/// <item>
/// <term>size</term>
/// <description>Size of a character, usually 1.</description>
/// </item>
/// <item>
/// <term>nmemb</term>
/// <description>Number of characters.</description>
/// </item>
/// <item>
/// <term>extraData</term>
/// <description>Client-provided extra data.</description>
/// </item>
/// </list>
/// Your implementation should return the number of bytes (not
/// characters) processed. Return 0 to abort the transfer.
/// </remarks>
public delegate int CurlWriteCallback(byte[] buf, int size, int nmemb, Object extraData);
}

View File

@@ -0,0 +1,75 @@
using System;
namespace CurlSharp
{
/// <summary>
/// Called when <c>cURL</c> wants to lock a shared resource.
/// </summary>
/// <remarks>
/// For a usage example, refer to the <c>ShareDemo.cs</c> sample.
/// Arguments passed to your delegate implementation include:
/// <list type="table">
/// <listheader>
/// <term>Argument</term>
/// <term>Description</term>
/// </listheader>
/// <item>
/// <term>data</term>
/// <term>
/// Type of data to lock; one of the values in the
/// <see cref="CurlLockData" /> enumeration.
/// </term>
/// </item>
/// <item>
/// <term>access</term>
/// <term>
/// Lock access requested; one of the values in the
/// <see cref="CurlLockAccess" /> enumeration.
/// </term>
/// </item>
/// <item>
/// <term>userData</term>
/// <term>
/// Client-provided data that is not touched internally by
/// <c>cURL</c>. This is set via
/// <see cref="CurlShareOption.UserData" /> when calling the
/// <see cref="CurlShare.SetOpt" /> member of the <see cref="CurlShare" />
/// class.
/// </term>
/// </item>
/// </list>
/// </remarks>
public delegate void CurlShareLockCallback(CurlLockData data, CurlLockAccess access, Object userData);
/// <summary>
/// Called when <c>cURL</c> wants to unlock a shared resource.
/// </summary>
/// <remarks>
/// For a usage example, refer to the <c>ShareDemo.cs</c> sample.
/// Arguments passed to your delegate implementation include:
/// <list type="table">
/// <listheader>
/// <term>Argument</term>
/// <term>Description</term>
/// </listheader>
/// <item>
/// <term>data</term>
/// <term>
/// Type of data to unlock; one of the values in the
/// <see cref="CurlLockData" /> enumeration.
/// </term>
/// </item>
/// <item>
/// <term>userData</term>
/// <term>
/// Client-provided data that is not touched internally by
/// <c>cURL</c>. This is set via
/// <see cref="CurlShareOption.UserData" /> when calling the
/// <see cref="CurlShare.SetOpt" /> member of the <see cref="CurlShare" />
/// class.
/// </term>
/// </item>
/// </list>
/// </remarks>
public delegate void CurlShareUnlockCallback(CurlLockData data, Object userData);
}

170
src/CurlSharp/Curl.cs Normal file
View File

@@ -0,0 +1,170 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2013 Dr. Masroor Ehsan (masroore@gmail.com)
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/
using System;
using System.Runtime.InteropServices;
namespace CurlSharp
{
/// <summary>
/// Top-level class for initialization and cleanup.
/// </summary>
/// <remarks>
/// It also implements static methods for capabilities that don't
/// logically belong in a class.
/// </remarks>
public static class Curl
{
// for state management
private static CurlCode _initCode;
/// <summary>
/// Class constructor - initialize global status.
/// </summary>
static Curl()
{
_initCode = CurlCode.FailedInit;
}
// hidden instance stuff
/// <summary>
/// Get the underlying cURL version as a string, example "7.12.2".
/// </summary>
/// <exception cref="System.InvalidOperationException">
/// Thrown if cURL isn't properly initialized.
/// </exception>
public static string Version
{
get
{
EnsureCurl();
return Marshal.PtrToStringAnsi(NativeMethods.curl_version());
}
}
/// <summary>
/// Process-wide initialization -- call only once per process.
/// </summary>
/// <param name="flags">
/// An or'd combination of
/// <see cref="CurlInitFlag" /> members.
/// </param>
/// <returns>
/// A <see cref="CurlCode" />, hopefully
/// <c>CurlCode.Ok</c>.
/// </returns>
public static CurlCode GlobalInit(CurlInitFlag flags)
{
_initCode = NativeMethods.curl_global_init((int)flags);
#if USE_LIBCURLSHIM
if (_initCode == CurlCode.Ok)
NativeMethods.curl_shim_initialize();
#endif
return _initCode;
}
/// <summary>
/// Process-wide cleanup -- call just before exiting process.
/// </summary>
/// <remarks>
/// While it's not necessary that your program call this method
/// before exiting, doing so will prevent leaks of native cURL resources.
/// </remarks>
public static void GlobalCleanup()
{
if (_initCode == CurlCode.Ok)
{
#if USE_LIBCURLSHIM
NativeMethods.curl_shim_cleanup();
#endif
NativeMethods.curl_global_cleanup();
_initCode = CurlCode.FailedInit;
}
}
/// <summary>
/// URL encode a String.
/// </summary>
/// <param name="url">The string to URL encode.</param>
/// <param name="length">
/// Input string length;
/// use 0 for cURL to determine.
/// </param>
/// <returns>A new URL encoded string.</returns>
/// <exception cref="System.InvalidOperationException">
/// Thrown if cURL isn't properly initialized.
/// </exception>
public static string Escape(string url, int length)
{
EnsureCurl();
var p = NativeMethods.curl_escape(url, length);
var s = Marshal.PtrToStringAnsi(p);
NativeMethods.curl_free(p);
return s;
}
/// <summary>
/// URL decode a String.
/// </summary>
/// <param name="url">The string to URL decode.</param>
/// <param name="length">
/// Input string length;
/// use 0 for cURL to determine.
/// </param>
/// <returns>A new URL decoded string.</returns>
/// <exception cref="System.InvalidOperationException">
/// Thrown if cURL isn't properly initialized.
/// </exception>
public static string Unescape(string url, int length)
{
EnsureCurl();
var p = NativeMethods.curl_unescape(url, length);
var s = Marshal.PtrToStringAnsi(p);
NativeMethods.curl_free(p);
return s;
}
/// <summary>
/// Get a <see cref="CurlVersionInfoData" /> object.
/// </summary>
/// <param name="ver">
/// Specify a <see cref="CurlVersion" />, such as
/// <c>CurlVersion.Now</c>.
/// </param>
/// <returns>A <see cref="CurlVersionInfoData" /> object.</returns>
/// <exception cref="System.InvalidOperationException">
/// Thrown if cURL isn't properly initialized.
/// </exception>
public static CurlVersionInfoData GetVersionInfo(CurlVersion ver)
{
EnsureCurl();
return new CurlVersionInfoData(ver);
}
/// <summary>
/// Called by other classes to ensure valid cURL state.
/// </summary>
internal static void EnsureCurl()
{
if (_initCode != CurlCode.Ok)
throw new InvalidOperationException("cURL not initialized");
}
}
}

2116
src/CurlSharp/CurlEasy.cs Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,388 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2014 Dr. Masroor Ehsan (masroore@gmail.com)
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/
using System;
using System.Runtime.InteropServices;
namespace CurlSharp
{
/// <summary>
/// This trivial class wraps the internal <c>curl_forms</c> struct.
/// </summary>
public sealed class CurlForms
{
/// <summary>The <see cref="CurlFormOption" />.</summary>
public CurlFormOption Option;
/// <summary>Value for the option.</summary>
public Object Value;
}
/// <summary>
/// Wraps a section of multipart form data to be submitted via the
/// <see cref="CurlOption.HttpPost" /> option in the
/// <see cref="CurlEasy.SetOpt" /> member of the <see cref="CurlEasy" /> class.
/// </summary>
public class CurlHttpMultiPartForm : IDisposable
{
// the two curlform pointers
private readonly IntPtr[] _pItems;
/// <summary>
/// Constructor
/// </summary>
/// <exception cref="System.InvalidOperationException">
/// This is thrown
/// if <see cref="Curl" /> hasn't bee properly initialized.
/// </exception>
public CurlHttpMultiPartForm()
{
Curl.EnsureCurl();
_pItems = new IntPtr[2];
_pItems[0] = IntPtr.Zero;
_pItems[1] = IntPtr.Zero;
}
/// <summary>
/// Free unmanaged resources.
/// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>
/// Destructor
/// </summary>
~CurlHttpMultiPartForm()
{
Dispose(false);
}
// for CurlEasy.SetOpt()
internal IntPtr GetHandle()
{
return _pItems[0];
}
/// <summary>
/// Add a multi-part form section.
/// </summary>
/// <param name="args">
/// Argument list, as described in the remarks.
/// </param>
/// <returns>
/// A <see cref="CurlFormCode" />, hopefully
/// <c>CurlFormCode.Ok</c>.
/// </returns>
/// <remarks>
/// This is definitely the workhorse method for this class. It
/// should be called in roughly the same manner as
/// <c>curl_formadd()</c>, except you would omit the first two
/// <c>struct curl_httppost**</c> arguments (<c>firstitem</c> and
/// <c>lastitem</c>), which are wrapped in this class. So you should
/// pass arguments in the following sequence:
/// <para>
/// <c>
/// CurlHttpMultiPartForm.AddSection(option1, value1, ..., optionX, valueX,
/// CurlFormOption.End)
/// </c>
/// ;
/// </para>
/// <para>
/// For a complete list of possible options, see the documentation for
/// the <see cref="CurlFormOption" /> enumeration.
/// </para>
/// <note>
/// The pointer options (<c>PtrName</c>, etc.) make an
/// internal copy of the passed <c>byte</c> array. Therefore, any
/// changes you make to the client copy of this array AFTER calling
/// this method, won't be reflected internally with <c>cURL</c>. The
/// purpose of providing the pointer options is to support the
/// posting of non-string binary data.
/// </note>
/// </remarks>
public CurlFormCode AddSection(params object[] args)
{
var nCount = args.Length;
var nRealCount = nCount;
var retCode = CurlFormCode.Ok;
CurlForms[] aForms = null;
// one arg or even number of args is an error
if ((nCount == 1) || (nCount%2 == 0))
return CurlFormCode.Incomplete;
// ensure the last argument is End
var iCode = (CurlFormOption)
Convert.ToInt32(args.GetValue(nCount - 1));
if (iCode != CurlFormOption.End)
return CurlFormCode.Incomplete;
// walk through any passed arrays to get the true number of
// items and ensure the child arrays are properly (and not
// prematurely) terminated with End
for (var i = 0; i < nCount; i += 2)
{
iCode = (CurlFormOption) Convert.ToInt32(args.GetValue(i));
switch (iCode)
{
case CurlFormOption.Array:
{
aForms = args.GetValue(i + 1) as CurlForms[];
if (aForms == null)
return CurlFormCode.Incomplete;
var nFormsCount = aForms.Length;
for (var j = 0; j < nFormsCount; j++)
{
var pcf = aForms.GetValue(j) as CurlForms;
if (pcf == null)
return CurlFormCode.Incomplete;
if (j == nFormsCount - 1)
{
if (pcf.Option != CurlFormOption.End)
return CurlFormCode.Incomplete;
}
else
{
if (pcf.Option == CurlFormOption.End)
return CurlFormCode.Incomplete;
}
}
// -2 accounts for the fact that we're a) not
// including the item with End and b) not
// including Array in what we pass to cURL
nRealCount += 2*(nFormsCount - 2);
break;
}
}
}
// allocate the IntPtr array for the data
var aPointers = new IntPtr[nRealCount];
for (var i = 0; i < nRealCount - 1; i++)
aPointers[i] = IntPtr.Zero;
aPointers[nRealCount - 1] = (IntPtr) CurlFormOption.End;
// now we go through the args
aForms = null;
var formArrayPos = 0;
var argArrayPos = 0;
var ptrArrayPos = 0;
Object obj = null;
while ((retCode == CurlFormCode.Ok) &&
(ptrArrayPos < nRealCount))
{
if (aForms != null)
{
var pcf = aForms.GetValue(formArrayPos++)
as CurlForms;
if (pcf == null)
{
retCode = CurlFormCode.UnknownOption;
break;
}
iCode = pcf.Option;
obj = pcf.Value;
}
else
{
iCode = (CurlFormOption) Convert.ToInt32(
args.GetValue(argArrayPos++));
obj = (iCode == CurlFormOption.End)
? null
: args.GetValue(argArrayPos++);
}
switch (iCode)
{
// handle byte-array pointer-related items
case CurlFormOption.PtrName:
case CurlFormOption.PtrContents:
case CurlFormOption.BufferPtr:
{
var bytes = obj as byte[];
if (bytes == null)
retCode = CurlFormCode.UnknownOption;
else
{
var nLen = bytes.Length;
var ptr = Marshal.AllocHGlobal(nLen);
if (ptr != IntPtr.Zero)
{
aPointers[ptrArrayPos++] = (IntPtr) iCode;
// copy bytes to unmanaged buffer
for (var j = 0; j < nLen; j++)
Marshal.WriteByte(ptr, bytes[j]);
aPointers[ptrArrayPos++] = ptr;
}
else
retCode = CurlFormCode.Memory;
}
break;
}
// length values
case CurlFormOption.NameLength:
case CurlFormOption.ContentsLength:
case CurlFormOption.BufferLength:
aPointers[ptrArrayPos++] = (IntPtr) iCode;
aPointers[ptrArrayPos++] = (IntPtr)
Convert.ToInt32(obj);
break;
// strings
case CurlFormOption.CopyName:
case CurlFormOption.CopyContents:
case CurlFormOption.FileContent:
case CurlFormOption.File:
case CurlFormOption.ContentType:
case CurlFormOption.Filename:
case CurlFormOption.Buffer:
{
aPointers[ptrArrayPos++] = (IntPtr) iCode;
var s = obj as String;
if (s == null)
retCode = CurlFormCode.UnknownOption;
else
{
var p = Marshal.StringToHGlobalAnsi(s);
if (p != IntPtr.Zero)
aPointers[ptrArrayPos++] = p;
else
retCode = CurlFormCode.Memory;
}
break;
}
// array case: already handled
case CurlFormOption.Array:
if (aForms != null)
retCode = CurlFormCode.IllegalArray;
else
{
aForms = obj as CurlForms[];
if (aForms == null)
retCode = CurlFormCode.UnknownOption;
}
break;
// slist
case CurlFormOption.ContentHeader:
{
aPointers[ptrArrayPos++] = (IntPtr) iCode;
var s = obj as CurlSlist;
if (s == null)
retCode = CurlFormCode.UnknownOption;
else
aPointers[ptrArrayPos++] = s.Handle;
break;
}
// erroneous stuff
case CurlFormOption.Nothing:
retCode = CurlFormCode.Incomplete;
break;
// end
case CurlFormOption.End:
if (aForms != null) // end of form
{
aForms = null;
formArrayPos = 0;
}
else
aPointers[ptrArrayPos++] = (IntPtr) iCode;
break;
// default is unknown
default:
retCode = CurlFormCode.UnknownOption;
break;
}
}
// ensure we didn't come up short on parameters
if (ptrArrayPos != nRealCount)
retCode = CurlFormCode.Incomplete;
// if we're OK here, call into curl
if (retCode == CurlFormCode.Ok)
{
#if USE_LIBCURLSHIM
retCode = (CurlFormCode) NativeMethods.curl_shim_formadd(_pItems, aPointers, nRealCount);
#else
retCode = (CurlFormCode) NativeMethods.curl_formadd(ref _pItems[0], ref _pItems[1],
(int) aPointers[0], aPointers[1],
(int) aPointers[2], aPointers[3],
(int) aPointers[4]);
#endif
}
// unmarshal native allocations
for (var i = 0; i < nRealCount - 1; i += 2)
{
iCode = (CurlFormOption) (int) aPointers[i];
switch (iCode)
{
case CurlFormOption.CopyName:
case CurlFormOption.CopyContents:
case CurlFormOption.FileContent:
case CurlFormOption.File:
case CurlFormOption.ContentType:
case CurlFormOption.Filename:
case CurlFormOption.Buffer:
// byte buffer cases
case CurlFormOption.PtrName:
case CurlFormOption.PtrContents:
case CurlFormOption.BufferPtr:
{
if (aPointers[i + 1] != IntPtr.Zero)
Marshal.FreeHGlobal(aPointers[i + 1]);
break;
}
default:
break;
}
}
return retCode;
}
private void Dispose(bool disposing)
{
lock (this)
{
if (disposing)
{
// clean up managed objects
}
// clean up native objects
if (_pItems[0] != IntPtr.Zero)
NativeMethods.curl_formfree(_pItems[0]);
_pItems[0] = IntPtr.Zero;
_pItems[1] = IntPtr.Zero;
}
}
}
}

302
src/CurlSharp/CurlMulti.cs Normal file
View File

@@ -0,0 +1,302 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2014 Dr. Masroor Ehsan (masroore@gmail.com)
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/
using System;
using System.Collections;
using System.Runtime.InteropServices;
namespace CurlSharp
{
/// <summary>
/// Implements the <c>curl_multi_xxx</c> API.
/// </summary>
public class CurlMulti : IDisposable
{
// private members
private readonly Hashtable _htEasy;
private int _maxFd;
private CurlMultiInfo[] _multiInfo;
private bool _bGotMultiInfo;
#if USE_LIBCURLSHIM
private IntPtr _fdSets;
#else
private NativeMethods.fd_set _fd_read, _fd_write, _fd_except;
#endif
private IntPtr _pMulti;
/// <summary>
/// Constructor
/// </summary>
/// <exception cref="System.InvalidOperationException">
/// This is thrown
/// if <see cref="Curl" /> hasn't bee properly initialized.
/// </exception>
/// <exception cref="System.NullReferenceException">
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
/// created successfully.
/// </exception>
public CurlMulti()
{
Curl.EnsureCurl();
_pMulti = NativeMethods.curl_multi_init();
ensureHandle();
_maxFd = 0;
#if USE_LIBCURLSHIM
_fdSets = IntPtr.Zero;
_fdSets = NativeMethods.curl_shim_alloc_fd_sets();
#else
_fd_read = NativeMethods.fd_set.Create();
_fd_read = NativeMethods.fd_set.Create();
_fd_write = NativeMethods.fd_set.Create();
_fd_except = NativeMethods.fd_set.Create();
#endif
_multiInfo = null;
_bGotMultiInfo = false;
_htEasy = new Hashtable();
}
/// <summary>
/// Max file descriptor
/// </summary>
public int MaxFd
{
get { return _maxFd; }
}
/// <summary>
/// Cleanup unmanaged resources.
/// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>
/// Destructor
/// </summary>
~CurlMulti()
{
Dispose(false);
}
private void Dispose(bool disposing)
{
lock (this)
{
// if (disposing) // managed member cleanup
// unmanaged cleanup
if (_pMulti != IntPtr.Zero)
{
NativeMethods.curl_multi_cleanup(_pMulti);
_pMulti = IntPtr.Zero;
}
#if USE_LIBCURLSHIM
if (_fdSets != IntPtr.Zero)
{
NativeMethods.curl_shim_free_fd_sets(_fdSets);
_fdSets = IntPtr.Zero;
}
#else
_fd_read.Cleanup();
_fd_write.Cleanup();
_fd_except.Cleanup();
#endif
}
}
private void ensureHandle()
{
if (_pMulti == IntPtr.Zero)
throw new NullReferenceException("No internal multi handle");
}
/// <summary>
/// Add an CurlEasy object.
/// </summary>
/// <param name="curlEasy">
/// <see cref="CurlEasy" /> object to add.
/// </param>
/// <returns>
/// A <see cref="CurlMultiCode" />, hopefully <c>CurlMultiCode.Ok</c>
/// </returns>
/// <exception cref="System.NullReferenceException">
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
/// created successfully.
/// </exception>
public CurlMultiCode AddHandle(CurlEasy curlEasy)
{
ensureHandle();
var p = curlEasy.Handle;
_htEasy.Add(p, curlEasy);
return NativeMethods.curl_multi_add_handle(_pMulti, p);
}
/// <summary>
/// Remove an CurlEasy object.
/// </summary>
/// <param name="curlEasy">
/// <see cref="CurlEasy" /> object to remove.
/// </param>
/// <returns>
/// A <see cref="CurlMultiCode" />, hopefully <c>CurlMultiCode.Ok</c>
/// </returns>
/// <exception cref="System.NullReferenceException">
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
/// created successfully.
/// </exception>
public CurlMultiCode RemoveHandle(CurlEasy curlEasy)
{
ensureHandle();
var p = curlEasy.Handle;
_htEasy.Remove(p);
return NativeMethods.curl_multi_remove_handle(_pMulti, curlEasy.Handle);
}
/// <summary>
/// Get a string description of an error code.
/// </summary>
/// <param name="errorNum">
/// The <see cref="CurlMultiCode" /> for which to obtain the error
/// string description.
/// </param>
/// <returns>The string description.</returns>
public String StrError(CurlMultiCode errorNum)
{
return Marshal.PtrToStringAnsi(NativeMethods.curl_multi_strerror(errorNum));
}
/// <summary>
/// Read/write data to/from each CurlEasy object.
/// </summary>
/// <param name="runningObjects">
/// The number of <see cref="CurlEasy" /> objects still in process is
/// written by this function to this reference parameter.
/// </param>
/// <returns>
/// A <see cref="CurlMultiCode" />, hopefully <c>CurlMultiCode.Ok</c>
/// </returns>
/// <exception cref="System.NullReferenceException">
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
/// created successfully.
/// </exception>
public CurlMultiCode Perform(ref int runningObjects)
{
ensureHandle();
return NativeMethods.curl_multi_perform(_pMulti, ref runningObjects);
}
/// <summary>
/// Set internal file desriptor information before calling Select.
/// </summary>
/// <returns>
/// A <see cref="CurlMultiCode" />, hopefully <c>CurlMultiCode.Ok</c>
/// </returns>
/// <exception cref="System.NullReferenceException">
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
/// created successfully.
/// </exception>
public CurlMultiCode FdSet()
{
ensureHandle();
#if USE_LIBCURLSHIM
return NativeMethods.curl_shim_multi_fdset(_pMulti, _fdSets, ref _maxFd);
#else
NativeMethods.FD_ZERO(_fd_read);
NativeMethods.FD_ZERO(_fd_write);
NativeMethods.FD_ZERO(_fd_except);
return NativeMethods.curl_multi_fdset(_pMulti, ref _fd_read, ref _fd_write, ref _fd_except, ref _maxFd);
#endif
}
/// <summary>
/// Call <c>select()</c> on the CurlEasy objects.
/// </summary>
/// <param name="timeoutMillis">
/// The timeout for the internal <c>select()</c> call,
/// in milliseconds.
/// </param>
/// <returns>
/// Number or <see cref="CurlEasy" /> objects with pending reads.
/// </returns>
/// <exception cref="System.NullReferenceException">
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
/// created successfully.
/// </exception>
public int Select(int timeoutMillis)
{
ensureHandle();
#if USE_LIBCURLSHIM
return NativeMethods.curl_shim_select(_maxFd + 1, _fdSets, timeoutMillis);
#else
var timeout = NativeMethods.timeval.Create(timeoutMillis);
return NativeMethods.select(_maxFd + 1, ref _fd_read, ref _fd_write, ref _fd_except, ref timeout);
//return NativeMethods.select2(_maxFd + 1, _fd_read, _fd_write, _fd_except, timeout);
#endif
}
/// <summary>
/// Obtain status information for a CurlMulti transfer. Requires
/// CurlSharp be compiled with the libcurlshim helper.
/// </summary>
/// <returns>
/// An array of <see cref="CurlMultiInfo" /> objects, one for each
/// <see cref="CurlEasy" /> object child.
/// </returns>
/// <exception cref="System.NullReferenceException">
/// This is thrown if the native <c>CurlMulti</c> handle wasn't
/// created successfully.
/// </exception>
public CurlMultiInfo[] InfoRead()
{
if (_bGotMultiInfo)
return _multiInfo;
_bGotMultiInfo = true;
#if USE_LIBCURLSHIM
var nMsgs = 0;
var pInfo = NativeMethods.curl_shim_multi_info_read(_pMulti, ref nMsgs);
if (pInfo != IntPtr.Zero)
{
_multiInfo = new CurlMultiInfo[nMsgs];
for (var i = 0; i < nMsgs; i++)
{
var msg = (CurlMessage) Marshal.ReadInt32(pInfo, i*12);
var pEasy = Marshal.ReadIntPtr(pInfo, i*12 + 4);
var code = (CurlCode) Marshal.ReadInt32(pInfo, i*12 + 8);
_multiInfo[i] = new CurlMultiInfo(msg, (CurlEasy) _htEasy[pEasy], code);
}
NativeMethods.curl_shim_multi_info_free(pInfo);
}
return _multiInfo;
#else
throw new NotImplementedException(
"Sorry, CurlMulti.InfoRead is not implemented on this system."
);
#endif
}
}
}

View File

@@ -0,0 +1,65 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2013 Dr. Masroor Ehsan (masroore@gmail.com)
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/
namespace CurlSharp
{
/// <summary>
/// Wraps the <c>cURL</c> struct <c>CURLMsg</c>. This class provides
/// status information following a <see cref="CurlMulti" /> transfer.
/// </summary>
public sealed class CurlMultiInfo
{
// private members
private readonly CurlEasy _mCurlEasy;
private readonly CurlMessage _msg;
private readonly CurlCode _result;
internal CurlMultiInfo(CurlMessage msg, CurlEasy curlEasy, CurlCode result)
{
_msg = msg;
_mCurlEasy = curlEasy;
_result = result;
}
/// <summary>
/// Get the status code from the <see cref="CurlMessage" /> enumeration.
/// </summary>
public CurlMessage Msg
{
get { return _msg; }
}
/// <summary>
/// Get the <see cref="CurlEasy" /> object for this child.
/// </summary>
public CurlEasy CurlEasyHandle
{
get { return _mCurlEasy; }
}
/// <summary>
/// Get the return code for the transfer, as a
/// <see cref="CurlCode" />.
/// </summary>
public CurlCode Result
{
get { return _result; }
}
}
}

276
src/CurlSharp/CurlShare.cs Normal file
View File

@@ -0,0 +1,276 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2013 Dr. Masroor Ehsan (masroore@gmail.com)
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/
using System;
using System.Runtime.InteropServices;
namespace CurlSharp
{
/// <summary>
/// This class provides an infrastructure for serializing access to data
/// shared by multiple <see cref="CurlEasy" /> objects, including cookie data
/// and Dns hosts. It implements the <c>curl_share_xxx</c> API.
/// </summary>
public class CurlShare : IDisposable
{
// private members
private GCHandle _hThis; // for handle extraction
private CurlShareCode _lastErrorCode;
private string _lastErrorDescription;
#if USE_LIBCURLSHIM
private NativeMethods._ShimLockCallback _pDelLock; // lock delegate
private NativeMethods._ShimUnlockCallback _pDelUnlock; // unlock delegate
#endif
private IntPtr _pShare; // share handle
private CurlShareLockCallback _pfLock; // client lock delegate
private CurlShareUnlockCallback _pfUnlock; // client unlock delegate
private IntPtr _ptrThis; // numeric handle
private Object _userData; // user data for delegates
/// <summary>
/// Constructor
/// </summary>
/// <exception cref="System.InvalidOperationException">
/// This is thrown
/// if <see cref="Curl" /> hasn't bee properly initialized.
/// </exception>
/// <exception cref="System.NullReferenceException">
/// This is thrown if
/// the native <c>share</c> handle wasn't created successfully.
/// </exception>
public CurlShare()
{
Curl.EnsureCurl();
_pShare = NativeMethods.curl_share_init();
EnsureHandle();
LockFunction = null;
UnlockFunction = null;
UserData = null;
installDelegates();
}
public object UserData
{
get { return _userData; }
set { _userData = value; }
}
public CurlShareUnlockCallback UnlockFunction
{
get { return _pfUnlock; }
set { _pfUnlock = value; }
}
public CurlShareLockCallback LockFunction
{
get { return _pfLock; }
set { _pfLock = value; }
}
public CurlLockData Share
{
set { setShareOption(CurlShareOption.Share, value); }
}
public CurlLockData Unshare
{
set { setShareOption(CurlShareOption.Unshare, value); }
}
public CurlShareCode LastErrorCode
{
get { return _lastErrorCode; }
}
public string LastErrorDescription
{
get { return _lastErrorDescription; }
}
/// <summary>
/// Cleanup unmanaged resources.
/// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>
/// Destructor
/// </summary>
~CurlShare()
{
Dispose(false);
}
/// <summary>
/// Set options for this object.
/// </summary>
/// <param name="option">
/// One of the values in the <see cref="CurlShareOption" />
/// enumeration.
/// </param>
/// <param name="parameter">
/// An appropriate object based on the value passed in the
/// <c>option</c> argument. See <see cref="CurlShareOption" />
/// for more information about the appropriate parameter type.
/// </param>
/// <returns>
/// A <see cref="CurlShareCode" />, hopefully
/// <c>CurlShareCode.Ok</c>.
/// </returns>
/// <exception cref="System.NullReferenceException">
/// This is thrown if
/// the native <c>share</c> handle wasn't created successfully.
/// </exception>
public CurlShareCode SetOpt(CurlShareOption option, Object parameter)
{
EnsureHandle();
var retCode = CurlShareCode.Ok;
switch (option)
{
case CurlShareOption.LockFunction:
var lf = parameter as CurlShareLockCallback;
if (lf == null)
return CurlShareCode.BadOption;
_pfLock = lf;
break;
case CurlShareOption.UnlockFunction:
var ulf = parameter as CurlShareUnlockCallback;
if (ulf == null)
return CurlShareCode.BadOption;
_pfUnlock = ulf;
break;
case CurlShareOption.Share:
case CurlShareOption.Unshare:
{
var opt = (CurlLockData) Convert.ToInt32(parameter);
retCode = setShareOption(option, opt);
break;
}
case CurlShareOption.UserData:
_userData = parameter;
break;
default:
retCode = CurlShareCode.BadOption;
break;
}
return retCode;
}
private void setLastError(CurlShareCode code, CurlShareOption opt)
{
if (_lastErrorCode == CurlShareCode.Ok && code != CurlShareCode.Ok)
{
_lastErrorCode = code;
_lastErrorDescription = string.Format("Error: {0} setting option {1}", StrError(code), opt);
}
}
private CurlShareCode setShareOption(CurlShareOption option, CurlLockData value)
{
var retCode = (value != CurlLockData.Cookie) && (value != CurlLockData.Dns)
? CurlShareCode.BadOption
: NativeMethods.curl_share_setopt(_pShare, option, (IntPtr) value);
setLastError(retCode, option);
return retCode;
}
/// <summary>
/// Return a String description of an error code.
/// </summary>
/// <param name="errorNum">
/// The <see cref="CurlShareCode" /> for which to obtain the error
/// string description.
/// </param>
/// <returns>The string description.</returns>
public String StrError(CurlShareCode errorNum)
{
return Marshal.PtrToStringAnsi(NativeMethods.curl_share_strerror(errorNum));
}
private void Dispose(bool disposing)
{
lock (this)
{
// if (disposing) cleanup managed objects
if (_pShare != IntPtr.Zero)
{
#if USE_LIBCURLSHIM
NativeMethods.curl_shim_cleanup_share_delegates(_pShare);
#endif
NativeMethods.curl_share_cleanup(_pShare);
_hThis.Free();
_ptrThis = IntPtr.Zero;
_pShare = IntPtr.Zero;
}
}
}
internal IntPtr GetHandle()
{
return _pShare;
}
private void EnsureHandle()
{
if (_pShare == IntPtr.Zero)
throw new NullReferenceException("No internal share handle");
}
private void installDelegates()
{
_hThis = GCHandle.Alloc(this);
_ptrThis = (IntPtr)_hThis;
#if USE_LIBCURLSHIM
_pDelLock = LockDelegate;
_pDelUnlock = UnlockDelegate;
NativeMethods.curl_shim_install_share_delegates(_pShare, _ptrThis, _pDelLock, _pDelUnlock);
#endif
}
internal static void LockDelegate(int data, int access, IntPtr userPtr)
{
var gch = (GCHandle) userPtr;
var share = (CurlShare) gch.Target;
if (share == null)
return;
if (share.LockFunction == null)
return;
share.LockFunction((CurlLockData) data, (CurlLockAccess) access, share.UserData);
}
internal static void UnlockDelegate(int data, IntPtr userPtr)
{
var gch = (GCHandle) userPtr;
var share = (CurlShare) gch.Target;
if (share == null)
return;
if (share.UnlockFunction == null)
return;
share.UnlockFunction((CurlLockData) data, share.UserData);
}
}
}

View File

@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{74420A79-CC16-442C-8B1E-7C1B913844F0}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CurlSharp</RootNamespace>
<AssemblyName>CurlSharp</AssemblyName>
<FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>
</DefineConstants>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Curl.cs" />
<Compile Include="CurlEasy.cs" />
<Compile Include="CurlHttpMultiPartForm.cs" />
<Compile Include="CurlMulti.cs" />
<Compile Include="CurlMultiInfo.cs" />
<Compile Include="CurlShare.cs" />
<Compile Include="CurlSlist.cs" />
<Compile Include="CurlSslContext.cs" />
<Compile Include="CurlVersionInfoData.cs" />
<Compile Include="NativeMethods.cs" />
<Compile Include="Enums\CurlClosePolicy.cs" />
<Compile Include="Enums\CurlCode.cs" />
<Compile Include="Enums\CurlFormCode.cs" />
<Compile Include="Enums\CurlFormOption.cs" />
<Compile Include="Enums\CurlFtpAuth.cs" />
<Compile Include="Enums\CurlFtpSsl.cs" />
<Compile Include="Enums\CurlHttpAuth.cs" />
<Compile Include="Enums\CurlHttpVersion.cs" />
<Compile Include="Enums\CurlInfo.cs" />
<Compile Include="Enums\CurlInfoType.cs" />
<Compile Include="Enums\CurlInitFlag.cs" />
<Compile Include="Enums\CurlIoCommand.cs" />
<Compile Include="Enums\CurlIoError.cs" />
<Compile Include="Enums\CurlIpResolve.cs" />
<Compile Include="Enums\CurlLockAccess.cs" />
<Compile Include="Enums\CurlLockData.cs" />
<Compile Include="Enums\CurlMessage.cs" />
<Compile Include="Enums\CurlMultiCode.cs" />
<Compile Include="Enums\CurlNetrcOption.cs" />
<Compile Include="Enums\CurlOption.cs" />
<Compile Include="Enums\CurlProxyType.cs" />
<Compile Include="Enums\CurlShareCode.cs" />
<Compile Include="Enums\CurlShareOption.cs" />
<Compile Include="Enums\CurlSslVersion.cs" />
<Compile Include="Enums\CurlTimeCond.cs" />
<Compile Include="Enums\CurlVersion.cs" />
<Compile Include="Enums\CurlVersionFeatureBitmask.cs" />
<Compile Include="Callbacks\CurlEasyCallbacks.cs" />
<Compile Include="Callbacks\CurlShareCallbacks.cs" />
<Compile Include="SSLFix.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup />
<ProjectExtensions>
<MonoDevelop>
<Properties>
<Policies>
<TextStylePolicy inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/x-csharp" />
<CSharpFormattingPolicy IndentSwitchBody="True" IndentBlocksInsideExpressions="True" AnonymousMethodBraceStyle="NextLine" PropertyBraceStyle="NextLine" PropertyGetBraceStyle="NextLine" PropertySetBraceStyle="NextLine" EventBraceStyle="NextLine" EventAddBraceStyle="NextLine" EventRemoveBraceStyle="NextLine" StatementBraceStyle="NextLine" ElseNewLinePlacement="NewLine" CatchNewLinePlacement="NewLine" FinallyNewLinePlacement="NewLine" WhileNewLinePlacement="DoNotCare" ArrayInitializerWrapping="DoNotChange" ArrayInitializerBraceStyle="NextLine" BeforeMethodDeclarationParentheses="False" BeforeMethodCallParentheses="False" BeforeConstructorDeclarationParentheses="False" NewLineBeforeConstructorInitializerColon="NewLine" NewLineAfterConstructorInitializerColon="SameLine" BeforeDelegateDeclarationParentheses="False" NewParentheses="False" SpacesBeforeBrackets="False" inheritsSet="Mono" inheritsScope="text/x-csharp" scope="text/x-csharp" />
</Policies>
</Properties>
</MonoDevelop>
</ProjectExtensions>
</Project>

144
src/CurlSharp/CurlSlist.cs Normal file
View File

@@ -0,0 +1,144 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2013 Dr. Masroor Ehsan (masroore@gmail.com)
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace CurlSharp
{
/// <summary>
/// This class wraps a linked list of strings used in <c>cURL</c>. Use it
/// to build string lists where they're required, such as when calling
/// <see cref="CurlEasy.SetOpt" /> with <see cref="CurlOption.Quote" />
/// as the option.
/// </summary>
public class CurlSlist : IDisposable
{
#if !USE_LIBCURLSHIM
[StructLayout(LayoutKind.Sequential)]
private class curl_slist
{
/// char*
[MarshalAs(UnmanagedType.LPStr)] public string data;
/// curl_slist*
public IntPtr next;
}
#endif
private IntPtr _handle;
/// <summary>
/// Constructor
/// </summary>
/// <exception cref="System.InvalidOperationException">
/// This is thrown
/// if <see cref="Curl" /> hasn't bee properly initialized.
/// </exception>
public CurlSlist()
{
Curl.EnsureCurl();
_handle = IntPtr.Zero;
}
public CurlSlist(IntPtr handle)
{
_handle = handle;
}
/// <summary>
/// Read-only copy of the strings stored in the SList
/// </summary>
public List<string> Strings
{
get
{
if (_handle == IntPtr.Zero)
return null;
var strings = new List<string>();
#if !USE_LIBCURLSHIM
var slist = new curl_slist();
Marshal.PtrToStructure(_handle, slist);
while (true)
{
strings.Add(slist.data);
if (slist.next != IntPtr.Zero)
Marshal.PtrToStructure(slist.next, slist);
else
break;
}
#endif
return strings;
}
}
/// <summary>
/// Destructor
/// </summary>
~CurlSlist()
{
Dispose(false);
}
/// <summary>
/// Append a string to the list.
/// </summary>
/// <param name="str">The <c>string</c> to append.</param>
public void Append(string str)
{
#if USE_LIBCURLSHIM
_handle = NativeMethods.curl_shim_add_string_to_slist(_handle, str);
#else
_handle = NativeMethods.curl_slist_append(_handle, str);
#endif
}
/// <summary>
/// Free all internal strings.
/// </summary>
public void Dispose()
{
GC.SuppressFinalize(this);
Dispose(true);
}
internal IntPtr Handle
{
get { return _handle; }
}
private void Dispose(bool disposing)
{
lock (this)
{
if (_handle != IntPtr.Zero)
{
#if USE_LIBCURLSHIM
NativeMethods.curl_shim_free_slist(_handle);
#else
NativeMethods.curl_slist_free_all(_handle);
#endif
_handle = IntPtr.Zero;
}
}
}
}
}

View File

@@ -0,0 +1,49 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2013 Dr. Masroor Ehsan (masroore@gmail.com)
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/
using System;
namespace CurlSharp
{
/// <summary>
/// An instance of this class is passed to the delegate
/// <see cref="CurlSslContextCallback" />, if it's implemented.
/// Within that delegate, the code will have to make native calls to
/// the <c>OpenSSL</c> library with the value returned from the
/// <see cref="CurlSslContext.Context" /> property cast to an
/// <c>SSL_CTX</c> pointer.
/// </summary>
public sealed class CurlSslContext
{
private readonly IntPtr _pvContext;
internal CurlSslContext(IntPtr pvContext)
{
_pvContext = pvContext;
}
/// <summary>
/// Get the underlying OpenSSL context.
/// </summary>
public IntPtr Context
{
get { return _pvContext; }
}
}
}

View File

@@ -0,0 +1,207 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2013 Dr. Masroor Ehsan (masroore@gmail.com)
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/
using System;
using System.Runtime.InteropServices;
namespace CurlSharp
{
/// <summary>
/// This class wraps a <c>curl_version_info_data</c> struct. An instance is
/// obtained by calling <see cref="Curl.GetVersionInfo" />.
/// </summary>
public sealed class CurlVersionInfoData
{
private const int OFFSET_AGE = 0;
private const int OFFSET_VERSION = 4;
private const int OFFSET_VERSION_NUM = 8;
private const int OFFSET_HOST = 12;
private const int OFFSET_FEATURES = 16;
private const int OFFSET_SSL_VERSION = 20;
private const int OFFSET_SSL_VERSION_NUM = 24;
private const int OFFSET_LIBZ_VERSION = 28;
private const int OFFSET_PROTOCOLS = 32;
private const int OFFSET_ARES_VERSION = 36;
private const int OFFSET_ARES_VERSION_NUM = 40;
private const int OFFSET_LIBIDN_VERSION = 44;
private readonly IntPtr m_pVersionInfoData;
internal CurlVersionInfoData(CurlVersion ver)
{
m_pVersionInfoData = NativeMethods.curl_version_info(ver);
}
#if USE_LIBCURLSHIM
/// <summary>
/// Age of this struct, depending on how recent the linked-in
/// <c>libcurl</c> is, as a <see cref="CurlVersion" />.
/// </summary>
public CurlVersion Age
{
get { return (CurlVersion) NativeMethods.curl_shim_get_version_int_value(m_pVersionInfoData, OFFSET_AGE); }
}
/// <summary>
/// Get the internal cURL version, as a <c>string</c>.
/// </summary>
public string Version
{
get
{
return Marshal.PtrToStringAnsi(
NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData, OFFSET_VERSION));
}
}
/// <summary>
/// Get the internal cURL version number, a A 24-bit number created
/// like this: [8 bits major number] | [8 bits minor number] | [8
/// bits patch number]. For example, Version 7.12.2 is <c>0x070C02</c>.
/// </summary>
public int VersionNum
{
get { return NativeMethods.curl_shim_get_version_int_value(m_pVersionInfoData, OFFSET_VERSION_NUM); }
}
/// <summary>
/// Get the host information on which the underlying cURL was built.
/// </summary>
public string Host
{
get
{
return
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData, OFFSET_HOST));
}
}
/// <summary>
/// Get a bitmask of features, containing bits or'd from the
/// <see cref="CurlVersionFeatureBitmask" /> enumeration.
/// </summary>
public int Features
{
get { return NativeMethods.curl_shim_get_version_int_value(m_pVersionInfoData, OFFSET_FEATURES); }
}
/// <summary>
/// Get the Ssl version, if it's linked in.
/// </summary>
public string SslVersion
{
get
{
return
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData,
OFFSET_SSL_VERSION));
}
}
/// <summary>
/// Get the Ssl version number, if Ssl is linked in.
/// </summary>
public int SSLVersionNum
{
get { return NativeMethods.curl_shim_get_version_int_value(m_pVersionInfoData, OFFSET_SSL_VERSION_NUM); }
}
/// <summary>
/// Get the libz version, if libz is linked in.
/// </summary>
public string LibZVersion
{
get
{
return
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData,
OFFSET_LIBZ_VERSION));
}
}
/// <summary>
/// Get the names of the supported protocols.
/// </summary>
public string[] Protocols
{
get
{
var nProts = NativeMethods.curl_shim_get_number_of_protocols(
m_pVersionInfoData, OFFSET_PROTOCOLS);
var aProts = new String[nProts];
for (var i = 0; i < nProts; i++)
{
aProts[i] =
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_protocol_string(m_pVersionInfoData,
OFFSET_PROTOCOLS, i));
}
return aProts;
}
}
/// <summary>
/// Get the ARes version, if ARes is linked in.
/// </summary>
public string ARes
{
get
{
if (Age > CurlVersion.First)
{
return
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData,
OFFSET_ARES_VERSION));
}
return "n.a.";
}
}
/// <summary>
/// Get the ARes version number, if ARes is linked in.
/// </summary>
public int AResNum
{
get
{
if (Age > CurlVersion.First)
{
return NativeMethods.curl_shim_get_version_int_value(m_pVersionInfoData, OFFSET_ARES_VERSION_NUM);
}
return 0;
}
}
/// <summary>
/// Get the libidn version, if libidn is linked in.
/// </summary>
public string LibIdn
{
get
{
if (Age > CurlVersion.Second)
{
return
Marshal.PtrToStringAnsi(NativeMethods.curl_shim_get_version_char_ptr(m_pVersionInfoData,
OFFSET_LIBIDN_VERSION));
}
return "n.a.";
}
}
#endif
}
}

View File

@@ -0,0 +1,46 @@
namespace CurlSharp
{
/// <summary>
/// Contains values used to specify the order in which cached connections
/// are closed. One of these is passed as the
/// <see cref="CurlOption.ClosePolicy" /> option in a call
/// to <see cref="CurlEasy.SetOpt" />
/// </summary>
public enum CurlClosePolicy
{
/// <summary>
/// No close policy. Never use this.
/// </summary>
None = 0,
/// <summary>
/// Close the oldest cached connections first.
/// </summary>
Oldest = 1,
/// <summary>
/// Close the least recently used connections first.
/// </summary>
LeastRecentlyUsed = 2,
/// <summary>
/// Close the connections with the least traffic first.
/// </summary>
LeastTraffic = 3,
/// <summary>
/// Close the slowest connections first.
/// </summary>
Slowest = 4,
/// <summary>
/// Currently unimplemented.
/// </summary>
Callback = 5,
/// <summary>
/// End-of-enumeration marker; do not use in application code.
/// </summary>
Last = 6
};
}

View File

@@ -0,0 +1,403 @@
namespace CurlSharp
{
/// <summary>
/// Status code returned from <see cref="CurlEasy" /> functions.
/// </summary>
public enum CurlCode
{
/// <summary>
/// All fine. Proceed as usual.
/// </summary>
Ok = 0,
/// <summary>
/// Aborted by callback. An internal callback returned "abort"
/// to libcurl.
/// </summary>
AbortedByCallback = 42,
/// <summary>
/// Internal error. A function was called in a bad order.
/// </summary>
BadCallingOrder = 44,
/// <summary>
/// Unrecognized transfer encoding.
/// </summary>
BadContentEncoding = 61,
/// <summary>
/// Attempting FTP resume beyond file size.
/// </summary>
BadDownloadResume = 36,
/// <summary>
/// Internal error. A function was called with a bad parameter.
/// </summary>
BadFunctionArgument = 43,
/// <summary>
/// Bad password entered. An error was signaled when the password was
/// entered. This can also be the result of a "bad password" returned
/// from a specified password callback.
/// </summary>
BadPasswordEntered = 46,
/// <summary>
/// Failed to connect to host or proxy.
/// </summary>
CouldntConnect = 7,
/// <summary>
/// Couldn't resolve host. The given remote host was not resolved.
/// </summary>
CouldntResolveHost = 6,
/// <summary>
/// Couldn't resolve proxy. The given proxy host could not be resolved.
/// </summary>
CouldntResolveProxy = 5,
/// <summary>
/// Very early initialization code failed. This is likely to be an
/// internal error or problem.
/// </summary>
FailedInit = 2,
/// <summary>
/// Maximum file size exceeded.
/// </summary>
FilesizeExceeded = 63,
/// <summary>
/// A file given with FILE:// couldn't be opened. Most likely
/// because the file path doesn't identify an existing file. Did
/// you check file permissions?
/// </summary>
FileCouldntReadFile = 37,
/// <summary>
/// We were denied access when trying to login to an FTP server or
/// when trying to change working directory to the one given in the URL.
/// </summary>
FtpAccessDenied = 9,
/// <summary>
/// An internal failure to lookup the host used for the new
/// connection.
/// </summary>
FtpCantGetHost = 15,
/// <summary>
/// A bad return code on either PASV or EPSV was sent by the FTP
/// server, preventing libcurl from being able to continue.
/// </summary>
FtpCantReconnect = 16,
/// <summary>
/// The FTP SIZE command returned error. SIZE is not a kosher FTP
/// command, it is an extension and not all servers support it. This
/// is not a surprising error.
/// </summary>
FtpCouldntGetSize = 32,
/// <summary>
/// This was either a weird reply to a 'RETR' command or a zero byte
/// transfer complete.
/// </summary>
FtpCouldntRetrFile = 19,
/// <summary>
/// libcurl failed to set ASCII transfer type (TYPE A).
/// </summary>
FtpCouldntSetAscii = 29,
/// <summary>
/// Received an error when trying to set the transfer mode to binary.
/// </summary>
FtpCouldntSetBinary = 17,
/// <summary>
/// FTP couldn't STOR file. The server denied the STOR operation.
/// The error buffer usually contains the server's explanation to this.
/// </summary>
FtpCouldntStorFile = 25,
/// <summary>
/// The FTP REST command returned error. This should never happen
/// if the server is sane.
/// </summary>
FtpCouldntUseRest = 31,
/// <summary>
/// The FTP PORT command returned error. This mostly happen when
/// you haven't specified a good enough address for libcurl to use.
/// See <see cref="CurlOption.FtpPort" />.
/// </summary>
FtpPortFailed = 30,
/// <summary>
/// When sending custom "QUOTE" commands to the remote server, one
/// of the commands returned an error code that was 400 or higher.
/// </summary>
FtpQuoteError = 21,
/// <summary>
/// Requested FTP Ssl level failed.
/// </summary>
FtpSslFailed = 64,
/// <summary>
/// The FTP server rejected access to the server after the password
/// was sent to it. It might be because the username and/or the
/// password were incorrect or just that the server is not allowing
/// you access for the moment etc.
/// </summary>
FtpUserPasswordIncorrect = 10,
/// <summary>
/// FTP servers return a 227-line as a response to a PASV command.
/// If libcurl fails to parse that line, this return code is
/// passed back.
/// </summary>
FtpWeird227Format = 14,
/// <summary>
/// After having sent the FTP password to the server, libcurl expects
/// a proper reply. This error code indicates that an unexpected code
/// was returned.
/// </summary>
FtpWeirdPassReply = 11,
/// <summary>
/// libcurl failed to get a sensible result back from the server as
/// a response to either a PASV or a EPSV command. The server is flawed.
/// </summary>
FtpWeirdPasvReply = 13,
/// <summary>
/// After connecting to an FTP server, libcurl expects to get a
/// certain reply back. This error code implies that it got a strange
/// or bad reply. The given remote server is probably not an
/// OK FTP server.
/// </summary>
FtpWeirdServerReply = 8,
/// <summary>
/// After having sent user name to the FTP server, libcurl expects a
/// proper reply. This error code indicates that an unexpected code
/// was returned.
/// </summary>
FtpWeirdUserReply = 12,
/// <summary>
/// After a completed file transfer, the FTP server did not respond a
/// proper "transfer successful" code.
/// </summary>
FtpWriteError = 20,
/// <summary>
/// Function not found. A required LDAP function was not found.
/// </summary>
FunctionNotFound = 41,
/// <summary>
/// Nothing was returned from the server, and under the circumstances,
/// getting nothing is considered an error.
/// </summary>
GotNothing = 52,
/// <summary>
/// This is an odd error that mainly occurs due to internal confusion.
/// </summary>
HttpPostError = 34,
/// <summary>
/// The HTTP server does not support or accept range requests.
/// </summary>
HttpRangeError = 33,
/// <summary>
/// This is returned if <see cref="CurlOption.FailOnError" />
/// is set TRUE and the HTTP server returns an error code that
/// is >= 400.
/// </summary>
HttpReturnedError = 22,
/// <summary>
/// Interface error. A specified outgoing interface could not be
/// used. Set which interface to use for outgoing connections'
/// source IP address with <see cref="CurlOption.Interface" />.
/// </summary>
InterfaceFailed = 45,
/// <summary>
/// End-of-enumeration marker; do not use in client applications.
/// </summary>
Last = 67,
/// <summary>
/// LDAP cannot bind. LDAP bind operation failed.
/// </summary>
LdapCannotBind = 38,
/// <summary>
/// Invalid LDAP URL.
/// </summary>
LdapInvalidUrl = 62,
/// <summary>
/// LDAP search failed.
/// </summary>
LdapSearchFailed = 39,
/// <summary>
/// Library not found. The LDAP library was not found.
/// </summary>
LibraryNotFound = 40,
/// <summary>
/// Malformat user. User name badly specified. *Not currently used*
/// </summary>
MalformatUser = 24,
/// <summary>
/// This is not an error. This used to be another error code in an
/// old libcurl version and is currently unused.
/// </summary>
Obsolete = 50,
/// <summary>
/// Operation timeout. The specified time-out period was reached
/// according to the conditions.
/// </summary>
OperationTimeouted = 28,
/// <summary>
/// Out of memory. A memory allocation request failed. This is serious
/// badness and things are severely messed up if this ever occurs.
/// </summary>
OutOfMemory = 27,
/// <summary>
/// A file transfer was shorter or larger than expected. This
/// happens when the server first reports an expected transfer size,
/// and then delivers data that doesn't match the previously
/// given size.
/// </summary>
PartialFile = 18,
/// <summary>
/// There was a problem reading a local file or an error returned by
/// the read callback.
/// </summary>
ReadError = 26,
/// <summary>
/// Failure with receiving network data.
/// </summary>
RecvError = 56,
/// <summary>
/// Failed sending network data.
/// </summary>
SendError = 55,
/// <summary>
/// Sending the data requires a rewind that failed.
/// </summary>
SendFailRewind = 65,
/// <summary>
/// CurlShare is in use.
/// </summary>
ShareInUse = 57,
/// <summary>
/// Problem with the CA cert (path? access rights?)
/// </summary>
SslCaCert = 60,
/// <summary>
/// There's a problem with the local client certificate.
/// </summary>
SslCertProblem = 58,
/// <summary>
/// Couldn't use specified cipher.
/// </summary>
SslCipher = 59,
/// <summary>
/// A problem occurred somewhere in the Ssl/TLS handshake. You really
/// want to use the <see cref="CurlEasy.CurlDebugCallback" /> delegate and read
/// the message there as it pinpoints the problem slightly more. It
/// could be certificates (file formats, paths, permissions),
/// passwords, and others.
/// </summary>
SslConnectError = 35,
/// <summary>
/// Failed to initialize Ssl engine.
/// </summary>
SslEngineInitFailed = 66,
/// <summary>
/// The specified crypto engine wasn't found.
/// </summary>
SslEngineNotFound = 53,
/// <summary>
/// Failed setting the selected Ssl crypto engine as default!
/// </summary>
SslEngineSetFailed = 54,
/// <summary>
/// The remote server's Ssl certificate was deemed not OK.
/// </summary>
SslPeerCertificate = 51,
/// <summary>
/// A telnet option string was improperly formatted.
/// </summary>
TelnetOptionSyntax = 49,
/// <summary>
/// Too many redirects. When following redirects, libcurl hit the
/// maximum amount. Set your limit with
/// <see cref="CurlOption.MaxRedirs" />.
/// </summary>
TooManyRedirects = 47,
/// <summary>
/// An option set with <see cref="CurlOption.TelnetOptions" />
/// was not recognized/known. Refer to the appropriate documentation.
/// </summary>
UnknownTelnetOption = 48,
/// <summary>
/// The URL you passed to libcurl used a protocol that this libcurl
/// does not support. The support might be a compile-time option that
/// wasn't used, it can be a misspelled protocol string or just a
/// protocol libcurl has no code for.
/// </summary>
UnsupportedProtocol = 1,
/// <summary>
/// The URL was not properly formatted.
/// </summary>
UrlMalformat = 3,
/// <summary>
/// URL user malformatted. The user-part of the URL syntax was not
/// correct.
/// </summary>
UrlMalformatUser = 4,
/// <summary>
/// An error occurred when writing received data to a local file,
/// or an error was returned to libcurl from a write callback.
/// </summary>
WriteError = 23,
};
}

View File

@@ -0,0 +1,76 @@
/***************************************************************************
*
* Project: libcurl.NET
*
* Copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
* $Id: Enums.cs,v 1.1 2005/02/17 22:47:25 jeffreyphillips Exp $
**************************************************************************/
namespace CurlSharp
{
/// <summary>
/// One of these is returned by <see cref="CurlHttpMultiPartForm.AddSection" />.
/// </summary>
public enum CurlFormCode
{
/// <summary>
/// The section was added properly.
/// </summary>
Ok = 0,
/// <summary>
/// Out-of-memory when adding the section.
/// </summary>
Memory = 1,
/// <summary>
/// Invalid attempt to add the same option more than once to a
/// section.
/// </summary>
OptionTwice = 2,
/// <summary>
/// Invalid attempt to pass a <c>null</c> string or byte array in
/// one of the arguments.
/// </summary>
Null = 3,
/// <summary>
/// Invalid attempt to pass an unrecognized option in one of the
/// arguments.
/// </summary>
UnknownOption = 4,
/// <summary>
/// Incomplete argument lists.
/// </summary>
Incomplete = 5,
/// <summary>
/// Invalid attempt to provide a nested <c>Array</c>.
/// </summary>
IllegalArray = 6,
/// <summary>
/// This will not be returned so long as HTTP is enabled, which
/// it always is in libcurl.NET.
/// </summary>
Disabled = 7,
/// <summary>
/// End-of-enumeration marker; do not use in application code.
/// </summary>
Last = 8
};
}

View File

@@ -0,0 +1,142 @@
namespace CurlSharp
{
/// <summary>
/// These are options available to build a multi-part form section
/// in a call to <see cref="CurlHttpMultiPartForm.AddSection" />
/// </summary>
public enum CurlFormOption
{
/// <summary>
/// Another possibility to send options to
/// <see cref="CurlHttpMultiPartForm.AddSection" /> is this option, that
/// passes a <see cref="CurlForms" /> array reference as its value.
/// Each <see cref="CurlForms" /> array element has a
/// <see cref="CurlFormOption" /> and a <c>string</c>. All available
/// options can be used in an array, except the <c>Array</c>
/// option itself! The last argument in such an array must always be
/// <c>End</c>.
/// </summary>
Array = 8,
/// <summary>
/// Followed by a <c>string</c>, tells libcurl that a buffer is to be
/// used to upload data instead of using a file.
/// </summary>
Buffer = 11,
/// <summary>
/// Followed by an <c>int</c> with the size of the
/// <c>BufferPtr</c> byte array, tells libcurl the length of
/// the data to upload.
/// </summary>
BufferLength = 13,
/// <summary>
/// Followed by a <c>byte[]</c> array, tells libcurl the address of
/// the buffer containing data to upload (as indicated with
/// <c>Buffer</c>). You must also use
/// <c>BufferLength</c> to set the length of the buffer area.
/// </summary>
BufferPtr = 12,
/// <summary>
/// Specifies extra headers for the form POST section. This takes an
/// <see cref="CurlSlist" /> prepared in the usual way using
/// <see cref="CurlSlist.Append" /> and appends the list of headers to
/// those libcurl automatically generates.
/// </summary>
ContentHeader = 15,
/// <summary>
/// Followed by an <c>int</c> setting the length of the contents.
/// </summary>
ContentsLength = 6,
/// <summary>
/// Followed by a <c>string</c> with a content-type will make cURL
/// use this given content-type for this file upload part, possibly
/// instead of an internally chosen one.
/// </summary>
ContentType = 14,
/// <summary>
/// Followed by a <c>string</c> is used for the contents of this part, the
/// actual data to send away. If you'd like it to contain zero bytes,
/// you need to set the length of the name with
/// <c>ContentsLength</c>.
/// </summary>
CopyContents = 4,
/// <summary>
/// Followed by a <c>string</c> used to set the name of this part.
/// If you'd like it to contain zero bytes, you need to set the
/// length of the name with <c>NameLength</c>.
/// </summary>
CopyName = 1,
/// <summary>
/// This should be the last argument to a call to
/// <see cref="CurlHttpMultiPartForm.AddSection" />.
/// </summary>
End = 17,
/// <summary>
/// Followed by a file name, makes this part a file upload part. It
/// sets the file name field to the actual file name used here,
/// it gets the contents of the file and passes as data and sets the
/// content-type if the given file match one of the new internally
/// known file extension. For <c>File</c> the user may send
/// one or more files in one part by providing multiple <c>File</c>
/// arguments each followed by the filename (and each <c>File</c>
/// is allowed to have a <c>ContentType</c>).
/// </summary>
File = 10,
/// <summary>
/// Followed by a file name, and does the file read: the contents
/// will be used in as data in this part.
/// </summary>
FileContent = 7,
/// <summary>
/// Followed by a <c>string</c> file name, will make libcurl use the
/// given name in the file upload part, instead of the actual file
/// name given to <c>File</c>.
/// </summary>
Filename = 16,
/// <summary>
/// Followed by an <c>int</c> setting the length of the name.
/// </summary>
NameLength = 3,
/// <summary>
/// Not used.
/// </summary>
Nothing = 0,
/// <summary>
/// No longer used.
/// </summary>
Obsolete = 9,
/// <summary>
/// No longer used.
/// </summary>
Obsolete2 = 18,
/// <summary>
/// Followed by a <c>byte[]</c> used for the contents of this part.
/// If you'd like it to contain zero bytes, you need to set the
/// length of the name with <c>ContentsLength</c>.
/// </summary>
PtrContents = 5,
/// <summary>
/// Followed by a <c>byte[]</c> used for the name of this part.
/// If you'd like it to contain zero bytes, you need to set the
/// length of the name with <c>NameLength</c>.
/// </summary>
PtrName = 2
};
}

View File

@@ -0,0 +1,31 @@
namespace CurlSharp
{
/// <summary>
/// This enumeration contains values used to specify the FTP Ssl
/// authorization level using the
/// <see cref="CurlOption.FtpSslAuth" /> option when calling
/// <see cref="CurlEasy.SetOpt" />
/// </summary>
public enum CurlFtpAuth
{
/// <summary>
/// Let <c>libcurl</c> decide on the authorization scheme.
/// </summary>
Default = 0,
/// <summary>
/// Use "AUTH Ssl".
/// </summary>
SSL = 1,
/// <summary>
/// Use "AUTH TLS".
/// </summary>
TLS = 2,
/// <summary>
/// End-of-enumeration marker. Do not use in a client application.
/// </summary>
Last = 3
};
}

View File

@@ -0,0 +1,37 @@
namespace CurlSharp
{
/// <summary>
/// This enumeration contains values used to specify the FTP Ssl level
/// using the <see cref="CurlOption.FtpSsl" /> option when calling
/// <see cref="CurlEasy.SetOpt" />
/// </summary>
public enum CurlFtpSsl
{
/// <summary>
/// Don't attempt to use Ssl.
/// </summary>
None = 0,
/// <summary>
/// Try using Ssl, proceed as normal otherwise.
/// </summary>
Try = 1,
/// <summary>
/// Require Ssl for the control connection or fail with
/// <see cref="CurlCode.FtpSslFailed" />.
/// </summary>
Control = 2,
/// <summary>
/// Require Ssl for all communication or fail with
/// <see cref="CurlCode.FtpSslFailed" />.
/// </summary>
All = 3,
/// <summary>
/// End-of-enumeration marker. Do not use in a client application.
/// </summary>
Last = 4
};
}

View File

@@ -0,0 +1,65 @@
namespace CurlSharp
{
/// <summary>
/// This enumeration contains values used to specify the HTTP authentication
/// when using the <see cref="CurlOption.HttpAuth" /> option when
/// calling <see cref="CurlEasy.SetOpt" />
/// </summary>
public enum CurlHttpAuth
{
/// <summary>
/// No authentication.
/// </summary>
None = 0,
/// <summary>
/// HTTP Basic authentication. This is the default choice, and the
/// only method that is in wide-spread use and supported virtually
/// everywhere. This is sending the user name and password over the
/// network in plain text, easily captured by others.
/// </summary>
Basic = 1,
/// <summary>
/// HTTP Digest authentication. Digest authentication is defined
/// in RFC2617 and is a more secure way to do authentication over
/// public networks than the regular old-fashioned Basic method.
/// </summary>
Digest = 2,
/// <summary>
/// HTTP GSS-Negotiate authentication. The GSS-Negotiate (also known
/// as plain "Negotiate") method was designed by Microsoft and is
/// used in their web applications. It is primarily meant as a
/// support for Kerberos5 authentication but may be also used along
/// with another authentication methods. For more information see IETF
/// draft draft-brezak-spnego-http-04.txt.
/// <note>
/// You need to use a version of libcurl.NET built with a suitable
/// GSS-API library for this to work. This is not currently standard.
/// </note>
/// </summary>
GssNegotiate = 4,
/// <summary>
/// HTTP Ntlm authentication. A proprietary protocol invented and
/// used by Microsoft. It uses a challenge-response and hash concept
/// similar to Digest, to prevent the password from being eavesdropped.
/// </summary>
Ntlm = 8,
/// <summary>
/// This is a convenience macro that sets all bits and thus makes
/// libcurl pick any it finds suitable. libcurl will automatically
/// select the one it finds most secure.
/// </summary>
Any = 15, // ~0
/// <summary>
/// This is a convenience macro that sets all bits except Basic
/// and thus makes libcurl pick any it finds suitable. libcurl
/// will automatically select the one it finds most secure.
/// </summary>
AnySafe = 14 // ~Basic
};
}

View File

@@ -0,0 +1,31 @@
namespace CurlSharp
{
/// <summary>
/// Contains values used to specify the HTTP version level when using
/// the <see cref="CurlOption.HttpVersion" /> option in a call
/// to <see cref="CurlEasy.SetOpt" />
/// </summary>
public enum CurlHttpVersion
{
/// <summary>
/// We don't care about what version the library uses. libcurl will
/// use whatever it thinks fit.
/// </summary>
None = 0,
/// <summary>
/// Enforce HTTP 1.0 requests.
/// </summary>
Http1_0 = 1,
/// <summary>
/// Enforce HTTP 1.1 requests.
/// </summary>
Http1_1 = 2,
/// <summary>
/// Last entry in enumeration; do not use in application code.
/// </summary>
Last = 3
};
}

View File

@@ -0,0 +1,222 @@
namespace CurlSharp
{
/// <summary>
/// This enumeration is used to extract information associated with an
/// <see cref="CurlEasy" /> transfer. Specifically, a member of this
/// enumeration is passed as the first argument to
/// CurlEasy.GetInfo specifying the item to retrieve in the
/// second argument, which is a reference to an <c>int</c>, a
/// <c>double</c>, a <c>string</c>, a <c>DateTime</c> or an <c>object</c>.
/// </summary>
public enum CurlInfo
{
/// <summary>
/// The second argument receives the elapsed time, as a <c>double</c>,
/// in seconds, from the start until the connect to the remote host
/// (or proxy) was completed.
/// </summary>
ConnectTime = 0x300005,
/// <summary>
/// The second argument receives, as a <c>double</c>, the content-length
/// of the download. This is the value read from the Content-Length: field.
/// </summary>
ContentLengthDownload = 0x30000F,
/// <summary>
/// The second argument receives, as a <c>double</c>, the specified size
/// of the upload.
/// </summary>
ContentLengthUpload = 0x300010,
/// <summary>
/// The second argument receives, as a <c>string</c>, the content-type of
/// the downloaded object. This is the value read from the Content-Type:
/// field. If you get <c>null</c>, it means that the server didn't
/// send a valid Content-Type header or that the protocol used
/// doesn't support this.
/// </summary>
ContentType = 0x100012,
/// <summary>
/// The second argument receives, as a <c>string</c>, the last
/// used effective URL.
/// </summary>
EffectiveUrl = 0x100001,
/// <summary>
/// The second argument receives, as a <c>long</c>, the remote time
/// of the retrieved document. You should construct a <c>DateTime</c>
/// from this value, as shown in the <c>InfoDemo</c> sample. If you
/// get a date in the distant
/// past, it can be because of many reasons (unknown, the server
/// hides it or the server doesn't support the command that tells
/// document time etc) and the time of the document is unknown. Note
/// that you must tell the server to collect this information before
/// the transfer is made, by using the
/// <see cref="CurlOption.Filetime" /> option to
/// <see cref="CurlEasy.SetOpt" />. (Added in 7.5)
/// </summary>
Filetime = 0x20000E,
/// <summary>
/// The second argument receives an <c>int</c> specifying the total size
/// of all the headers received.
/// </summary>
HeaderSize = 0x20000B,
/// <summary>
/// The second argument receives, as an <c>int</c>, a bitmask indicating
/// the authentication method(s) available. The meaning of the bits is
/// explained in the documentation of
/// <see cref="CurlOption.HttpAuth" />. (Added in 7.10.8)
/// </summary>
HttpAuthAvail = 0x200017,
/// <summary>
/// The second argument receives an <c>int</c> indicating the numeric
/// connect code for the HTTP request.
/// </summary>
HttpConnectCode = 0x200016,
/// <summary>
/// End-of-enumeration marker; do not use in client applications.
/// </summary>
LastOne = 0x1C,
/// <summary>
/// The second argument receives, as a <c>double</c>, the time, in
/// seconds it took from the start until the name resolving was
/// completed.
/// </summary>
NameLookupTime = 0x300004,
/// <summary>
/// Never used.
/// </summary>
None = 0x0,
/// <summary>
/// The second argument receives an <c>int</c> indicating the
/// number of current connections. (Added in 7.13.0)
/// </summary>
NumConnects = 0x20001A,
/// <summary>
/// The second argument receives an <c>int</c> indicating the operating
/// system error number: <c>_errro</c> or <c>GetLastError()</c>,
/// depending on the platform. (Added in 7.12.2)
/// </summary>
OsErrno = 0x200019,
/// <summary>
/// The second argument receives, as a <c>double</c>, the time, in
/// seconds, it took from the start until the file transfer is just about
/// to begin. This includes all pre-transfer commands and negotiations
/// that are specific to the particular protocol(s) involved.
/// </summary>
PreTransferTime = 0x300006,
/// <summary>
/// The second argument receives a reference to the private data
/// associated with the <see cref="CurlEasy" /> object (set with the
/// <see cref="CurlOption.Private" /> option to
/// <see cref="CurlEasy.SetOpt" />. (Added in 7.10.3)
/// </summary>
Private = 0x100015,
/// <summary>
/// The second argument receives, as an <c>int</c>, a bitmask
/// indicating the authentication method(s) available for your
/// proxy authentication. This will be a bitmask of
/// <see cref="CurlHttpAuth" /> enumeration constants.
/// (Added in 7.10.8)
/// </summary>
ProxyAuthAvail = 0x200018,
/// <summary>
/// The second argument receives an <c>int</c> indicating the total
/// number of redirections that were actually followed. (Added in 7.9.7)
/// </summary>
RedirectCount = 0x200014,
/// <summary>
/// The second argument receives, as a <c>double</c>, the total time, in
/// seconds, for all redirection steps include name lookup, connect,
/// pretransfer and transfer before final transaction was started.
/// <c>RedirectTime</c> contains the complete execution
/// time for multiple redirections. (Added in 7.9.7)
/// </summary>
RedirectTime = 0x300013,
/// <summary>
/// The second argument receives an <c>int</c> containing the total size
/// of the issued requests. This is so far only for HTTP requests. Note
/// that this may be more than one request if
/// <see cref="CurlOption.FollowLocation" /> is <c>true</c>.
/// </summary>
RequestSize = 0x20000C,
/// <summary>
/// The second argument receives an <c>int</c> with the last received HTTP
/// or FTP code. This option was known as <c>CURLINFO_HTTP_CODE</c> in
/// libcurl 7.10.7 and earlier.
/// </summary>
ResponseCode = 0x200002,
/// <summary>
/// The second argument receives a <c>double</c> with the total amount of
/// bytes that were downloaded. The amount is only for the latest transfer
/// and will be reset again for each new transfer.
/// </summary>
SizeDownload = 0x300008,
/// <summary>
/// The second argument receives a <c>double</c> with the total amount
/// of bytes that were uploaded.
/// </summary>
SizeUpload = 0x300007,
/// <summary>
/// The second argument receives a <c>double</c> with the average
/// download speed that cURL measured for the complete download.
/// </summary>
SpeedDownload = 0x300009,
/// <summary>
/// The second argument receives a <c>double</c> with the average
/// upload speed that libcurl measured for the complete upload.
/// </summary>
SpeedUpload = 0x30000A,
/// <summary>
/// The second argument receives an <see cref="CurlSlist" /> containing
/// the names of the available Ssl engines.
/// </summary>
SslEngines = 0x40001B,
/// <summary>
/// The second argument receives an <c>int</c> with the result of
/// the certificate verification that was requested (using the
/// <see cref="CurlOption.SslVerifyPeer" /> option in
/// <see cref="CurlEasy.SetOpt" />.
/// </summary>
SslVerifyResult = 0x20000D,
/// <summary>
/// The second argument receives a <c>double</c> specifying the time,
/// in seconds, from the start until the first byte is just about to be
/// transferred. This includes <c>PreTransferTime</c> and
/// also the time the server needs to calculate the result.
/// </summary>
StartTransferTime = 0x300011,
/// <summary>
/// The second argument receives a <c>double</c> indicating the total transaction
/// time in seconds for the previous transfer. This time does not include
/// the connect time, so if you want the complete operation time,
/// you should add the <c>ConnectTime</c>.
/// </summary>
TotalTime = 0x300003,
};
}

View File

@@ -0,0 +1,50 @@
namespace CurlSharp
{
/// <summary>
/// A member of this enumeration is passed as the first parameter to the
/// <see cref="CurlEasy.CurlDebugCallback" /> delegate to which libcurl passes
/// debug messages.
/// </summary>
public enum CurlInfoType
{
/// <summary>
/// The data is informational text.
/// </summary>
Text = 0,
/// <summary>
/// The data is header (or header-like) data received from the peer.
/// </summary>
HeaderIn = 1,
/// <summary>
/// The data is header (or header-like) data sent to the peer.
/// </summary>
HeaderOut = 2,
/// <summary>
/// The data is protocol data received from the peer.
/// </summary>
DataIn = 3,
/// <summary>
/// The data is protocol data sent to the peer.
/// </summary>
DataOut = 4,
/// <summary>
/// The data is Ssl-related data sent to the peer.
/// </summary>
SslDataIn = 5,
/// <summary>
/// The data is Ssl-related data received from the peer.
/// </summary>
SslDataOut = 6,
/// <summary>
/// End of enumeration marker, don't use in a client application.
/// </summary>
End = 7
};
}

View File

@@ -0,0 +1,34 @@
namespace CurlSharp
{
/// <summary>
/// Contains values used to initialize libcurl internally. One of
/// these is passed in the call to <see cref="Curl.GlobalInit" />.
/// </summary>
public enum CurlInitFlag
{
/// <summary>
/// Initialise nothing extra. This sets no bit.
/// </summary>
Nothing = 0,
/// <summary>
/// Initialize Ssl.
/// </summary>
Ssl = 1,
/// <summary>
/// Initialize the Win32 socket libraries.
/// </summary>
Win32 = 2,
/// <summary>
/// Initialize everything possible. This sets all known bits.
/// </summary>
All = 3,
/// <summary>
/// Equivalent to <c>All</c>.
/// </summary>
Default = All
};
}

View File

@@ -0,0 +1,27 @@
namespace CurlSharp
{
/// <summary>
/// Your handler for the <see cref="CurlEasy.CurlIoctlCallback" />
/// delegate is passed one of these values as its first parameter.
/// Right now, the only supported value is
/// <code>RestartRead</code>.
/// </summary>
public enum CurlIoCommand
{
/// <summary>
/// No IOCTL operation; we should never see this.
/// </summary>
Nop = 0,
/// <summary>
/// When this is sent, your callback may need to, for example,
/// rewind a local file that is being sent via FTP.
/// </summary>
RestartRead = 1,
/// <summary>
/// End of enumeration marker, don't use in a client application.
/// </summary>
Last = 2
}
}

View File

@@ -0,0 +1,30 @@
namespace CurlSharp
{
/// <summary>
/// Your handler for the <see cref="CurlEasy.CurlIoctlCallback" /> delegate
/// should return a member of this enumeration.
/// </summary>
public enum CurlIoError
{
/// <summary>
/// Indicate that the callback processed everything okay.
/// </summary>
Ok = 0,
/// <summary>
/// Unknown command sent to callback. Right now, only
/// <code>RestartRead</code> is supported.
/// </summary>
UnknownCommand = 1,
/// <summary>
/// Indicate to libcurl that a restart failed.
/// </summary>
FailRestart = 2,
/// <summary>
/// End of enumeration marker, don't use in a client application.
/// </summary>
Last = 3
}
}

View File

@@ -0,0 +1,26 @@
namespace CurlSharp
{
/// <summary>
/// This enumeration contains values used to specify the IP resolution
/// method when using the <see cref="CurlOption.IpResolve" />
/// option in a call to <see cref="CurlEasy.SetOpt" />
/// </summary>
public enum CurlIpResolve
{
/// <summary>
/// Default, resolves addresses to all IP versions that your system
/// allows.
/// </summary>
Whatever = 0,
/// <summary>
/// Resolve to ipv4 addresses.
/// </summary>
V4 = 1,
/// <summary>
/// Resolve to ipv6 addresses.
/// </summary>
V6 = 2
};
}

View File

@@ -0,0 +1,31 @@
namespace CurlSharp
{
/// <summary>
/// Values containing the type of shared access requested when libcurl
/// calls the <see cref="CurlShare.CurlShareLockCallback" /> delegate.
/// </summary>
public enum CurlLockAccess
{
/// <summary>
/// Unspecified action; the delegate should never receive this.
/// </summary>
None = 0,
/// <summary>
/// The delegate receives this call when libcurl is requesting
/// read access to the shared resource.
/// </summary>
Shared = 1,
/// <summary>
/// The delegate receives this call when libcurl is requesting
/// write access to the shared resource.
/// </summary>
Single = 2,
/// <summary>
/// End-of-enumeration marker; do not use in application code.
/// </summary>
Last = 3
};
}

View File

@@ -0,0 +1,48 @@
namespace CurlSharp
{
/// <summary>
/// Members of this enumeration should be passed to
/// <see cref="CurlShare.SetOpt" /> when it is called with the
/// <c>CurlShare</c> or <c>Unshare</c> options
/// provided in the <see cref="CurlShareOption" /> enumeration.
/// </summary>
public enum CurlLockData
{
/// <summary>
/// Not used.
/// </summary>
None = 0,
/// <summary>
/// Used internally by libcurl.
/// </summary>
Share = 1,
/// <summary>
/// Cookie data will be shared across the <see cref="CurlEasy" /> objects
/// using this shared object.
/// </summary>
Cookie = 2,
/// <summary>
/// Cached Dns hosts will be shared across the <see cref="CurlEasy" />
/// objects using this shared object.
/// </summary>
Dns = 3,
/// <summary>
/// Not supported yet.
/// </summary>
SslSession = 4,
/// <summary>
/// Not supported yet.
/// </summary>
Connect = 5,
/// <summary>
/// End-of-enumeration marker; do not use in application code.
/// </summary>
Last = 6
};
}

View File

@@ -0,0 +1,25 @@
namespace CurlSharp
{
/// <summary>
/// The status code associated with an <see cref="CurlEasy" /> object in a
/// <see cref="CurlMulti" /> operation. One of these is returned in response
/// to reading the <see cref="CurlMultiInfo.Msg" /> property.
/// </summary>
public enum CurlMessage
{
/// <summary>
/// First entry in the enumeration, not used.
/// </summary>
None = 0,
/// <summary>
/// The associated <see cref="CurlEasy" /> object completed.
/// </summary>
Done = 1,
/// <summary>
/// End-of-enumeration marker, not used.
/// </summary>
Last = 2
};
}

View File

@@ -0,0 +1,46 @@
namespace CurlSharp
{
/// <summary>
/// Contains return codes for many of the functions in the
/// <see cref="CurlMulti" /> class.
/// </summary>
public enum CurlMultiCode
{
/// <summary>
/// You should call <see cref="CurlMulti.Perform" /> again before calling
/// <see cref="CurlMulti.Select" />.
/// </summary>
CallMultiPerform = -1,
/// <summary>
/// The function succeded.
/// </summary>
Ok = 0,
/// <summary>
/// The internal <see cref="CurlMulti" /> is bad.
/// </summary>
BadHandle = 1,
/// <summary>
/// One of the <see cref="CurlEasy" /> handles associated with the
/// <see cref="CurlMulti" /> object is bad.
/// </summary>
BadEasyHandle = 2,
/// <summary>
/// Out of memory. This is a severe problem.
/// </summary>
OutOfMemory = 3,
/// <summary>
/// Internal error deep within the libcurl library.
/// </summary>
InternalError = 4,
/// <summary>
/// End-of-enumeration marker, not used.
/// </summary>
Last = 5
};
}

View File

@@ -0,0 +1,43 @@
namespace CurlSharp
{
/// <summary>
/// Contains values used to specify the preference of libcurl between
/// using user names and passwords from your ~/.netrc file, relative to
/// user names and passwords in the URL supplied with
/// <see cref="CurlOption.Url" />. This is passed when using
/// the <see cref="CurlOption.Netrc" /> option in a call
/// to <see cref="CurlEasy.SetOpt" />
/// </summary>
public enum CurlNetrcOption
{
/// <summary>
/// The library will ignore the file and use only the information
/// in the URL. This is the default.
/// </summary>
Ignored = 0,
/// <summary>
/// The use of your ~/.netrc file is optional, and information in the
/// URL is to be preferred. The file will be scanned with the host
/// and user name (to find the password only) or with the host only,
/// to find the first user name and password after that machine,
/// which ever information is not specified in the URL.
/// <para>
/// Undefined values of the option will have this effect.
/// </para>
/// </summary>
Optional = 1,
/// <summary>
/// This value tells the library that use of the file is required,
/// to ignore the information in the URL, and to search the file
/// with the host only.
/// </summary>
Required = 2,
/// <summary>
/// Last entry in enumeration; do not use in application code.
/// </summary>
Last = 3
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,27 @@
namespace CurlSharp
{
/// <summary>
/// This enumeration contains values used to specify the proxy type when
/// using the <see cref="CurlOption.Proxy" /> option when calling
/// <see cref="CurlEasy.SetOpt" />
/// </summary>
public enum CurlProxyType
{
/// <summary>
/// Ordinary HTTP proxy.
/// </summary>
Http = 0,
/// <summary>
/// Use if the proxy supports SOCKS4 user authentication. If you're
/// unfamiliar with this, consult your network administrator.
/// </summary>
Socks4 = 4,
/// <summary>
/// Use if the proxy supports SOCKS5 user authentication. If you're
/// unfamiliar with this, consult your network administrator.
/// </summary>
Socks5 = 5
};
}

View File

@@ -0,0 +1,40 @@
namespace CurlSharp
{
/// <summary>
/// Contains return codes from many of the functions in the
/// <see cref="CurlShare" /> class.
/// </summary>
public enum CurlShareCode
{
/// <summary>
/// The function succeeded.
/// </summary>
Ok = 0,
/// <summary>
/// A bad option was passed to <see cref="CurlShare.SetOpt" />.
/// </summary>
BadOption = 1,
/// <summary>
/// An attempt was made to pass an option to
/// <see cref="CurlShare.SetOpt" /> while the CurlShare object is in use.
/// </summary>
InUse = 2,
/// <summary>
/// The <see cref="CurlShare" /> object's internal handle is invalid.
/// </summary>
Invalid = 3,
/// <summary>
/// Out of memory. This is a severe problem.
/// </summary>
NoMem = 4,
/// <summary>
/// End-of-enumeration marker; do not use in application code.
/// </summary>
Last = 5
};
}

View File

@@ -0,0 +1,53 @@
namespace CurlSharp
{
/// <summary>
/// A member of this enumeration is passed to the function
/// <see cref="CurlShare.SetOpt" /> to configure a <see cref="CurlShare" />
/// transfer.
/// </summary>
public enum CurlShareOption
{
/// <summary>
/// Start-of-enumeration; do not use in application code.
/// </summary>
None = 0,
/// <summary>
/// The parameter, which should be a member of the
/// <see cref="CurlLockData" /> enumeration, specifies a type of
/// data that should be shared.
/// </summary>
Share = 1,
/// <summary>
/// The parameter, which should be a member of the
/// <see cref="CurlLockData" /> enumeration, specifies a type of
/// data that should be unshared.
/// </summary>
Unshare = 2,
/// <summary>
/// The parameter should be a reference to a
/// <see cref="CurlShare.CurlShareLockCallback" /> delegate.
/// </summary>
LockFunction = 3,
/// <summary>
/// The parameter should be a reference to a
/// <see cref="CurlShare.CurlShareUnlockCallback" /> delegate.
/// </summary>
UnlockFunction = 4,
/// <summary>
/// The parameter allows you to specify an object reference that
/// will passed to the <see cref="CurlShare.CurlShareLockCallback" /> delegate and
/// the <see cref="CurlShare.CurlShareUnlockCallback" /> delegate.
/// </summary>
UserData = 5,
/// <summary>
/// End-of-enumeration; do not use in application code.
/// </summary>
Last = 6
};
}

View File

@@ -0,0 +1,36 @@
namespace CurlSharp
{
/// <summary>
/// Contains values used to specify the Ssl version level when using
/// the <see cref="CurlOption.SslVersion" /> option in a call
/// to <see cref="CurlEasy.SetOpt" />
/// </summary>
public enum CurlSslVersion
{
/// <summary>
/// Use whatever version the Ssl library selects.
/// </summary>
Default = 0,
/// <summary>
/// Use TLS version 1.
/// </summary>
Tlsv1 = 1,
/// <summary>
/// Use Ssl version 2. This is not a good option unless it's the
/// only version supported by the remote server.
/// </summary>
Sslv2 = 2,
/// <summary>
/// Use Ssl version 3. This is a preferred option.
/// </summary>
Sslv3 = 3,
/// <summary>
/// Last entry in enumeration; do not use in application code.
/// </summary>
Last = 4
};
}

View File

@@ -0,0 +1,39 @@
namespace CurlSharp
{
/// <summary>
/// Contains values used to specify the time condition when using
/// the <see cref="CurlOption.TimeCondition" /> option in a call
/// to <see cref="CurlEasy.SetOpt" />
/// </summary>
public enum CurlTimeCond
{
/// <summary>
/// Use no time condition.
/// </summary>
None = 0,
/// <summary>
/// The time condition is true if the resource has been modified
/// since the date/time passed in
/// <see cref="CurlOption.TimeValue" />.
/// </summary>
IfModSince = 1,
/// <summary>
/// True if the resource has not been modified since the date/time
/// passed in <see cref="CurlOption.TimeValue" />.
/// </summary>
IfUnmodSince = 2,
/// <summary>
/// True if the resource's last modification date/time equals that
/// passed in <see cref="CurlOption.TimeValue" />.
/// </summary>
LastMod = 3,
/// <summary>
/// Last entry in enumeration; do not use in application code.
/// </summary>
Last = 4
};
}

View File

@@ -0,0 +1,34 @@
namespace CurlSharp
{
/// <summary>
/// A member of this enumeration is passed to the function
/// <see cref="Curl.GetVersionInfo" />
/// </summary>
public enum CurlVersion
{
/// <summary>
/// Capabilities associated with the initial version of libcurl.
/// </summary>
First = 0,
/// <summary>
/// Capabilities associated with the second version of libcurl.
/// </summary>
Second = 1,
/// <summary>
/// Capabilities associated with the third version of libcurl.
/// </summary>
Third = 2,
/// <summary>
/// Same as <c>Third</c>.
/// </summary>
Now = Third,
/// <summary>
/// End-of-enumeration marker; do not use in application code.
/// </summary>
Last = 3
};
}

View File

@@ -0,0 +1,71 @@
namespace CurlSharp
{
/// <summary>
/// A bitmask of libcurl features OR'd together as the value of the
/// property <see cref="CurlVersionInfoData.Features" />. The feature
/// bits are summarized in the table below.
/// </summary>
public enum CurlVersionFeatureBitmask
{
/// <summary>
/// Supports Ipv6.
/// </summary>
Ipv6 = 0x01,
/// <summary>
/// Supports kerberos4 (when using FTP).
/// </summary>
Kerberos64 = 0x02,
/// <summary>
/// Supports Ssl (HTTPS/FTPS).
/// </summary>
Ssl = 0x04,
/// <summary>
/// Supports HTTP deflate using libz.
/// </summary>
LibZ = 0x08,
/// <summary>
/// Supports HTTP Ntlm (added in 7.10.6).
/// </summary>
Ntlm = 0x10,
/// <summary>
/// Supports HTTP GSS-Negotiate (added in 7.10.6).
/// </summary>
GssNegotiate = 0x20,
/// <summary>
/// libcurl was built with extra debug capabilities built-in. This
/// is mainly of interest for libcurl hackers. (added in 7.10.6)
/// </summary>
Debug = 0x40,
/// <summary>
/// libcurl was built with support for asynchronous name lookups,
/// which allows more exact timeouts (even on Windows) and less
/// blocking when using the multi interface. (added in 7.10.7)
/// </summary>
AsynchDns = 0x80,
/// <summary>
/// libcurl was built with support for Spnego authentication
/// (Simple and Protected GSS-API Negotiation Mechanism, defined
/// in RFC 2478.) (added in 7.10.8)
/// </summary>
Spnego = 0x100,
/// <summary>
/// libcurl was built with support for large files.
/// </summary>
LargeFile = 0x200,
/// <summary>
/// libcurl was built with support for IDNA, domain names with
/// international letters.
/// </summary>
Idn = 0x400
};
}

View File

@@ -0,0 +1,402 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2014 Dr. Masroor Ehsan (masroore@gmail.com)
* Portions copyright (c) 2004, 2005 Jeff Phillips (jeff@jeffp.net)
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/
//#define USE_LIBCURLSHIM
using System;
using System.Runtime.InteropServices;
namespace CurlSharp
{
/// <summary>
/// P/Invoke signatures.
/// </summary>
internal static unsafe class NativeMethods
{
#if WIN64
private const string CURL_LIB = "libcurl64.dll";
#if USE_LIBCURLSHIM
private const string CURLSHIM_LIB = "libcurlshim64.dll";
#endif
#else
#if LINUX
private const string CURL_LIB = "libcurl";
#else
private const string CURL_LIB = "libcurl.dll";
#if USE_LIBCURLSHIM
private const string CURLSHIM_LIB = "libcurlshim.dll";
#endif
#endif
#endif
#if !USE_LIBCURLSHIM
#if LINUX
private const string WINSOCK_LIB = "libc";
#else
private const string WINSOCK_LIB = "ws2_32.dll";
#endif
#endif
// internal delegates from cURL
// libcurl imports
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlCode curl_global_init (int flags);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern void curl_global_cleanup ();
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern IntPtr curl_escape (String url, int length);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern IntPtr curl_unescape (String url, int length);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern void curl_free (IntPtr p);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr curl_version ();
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr curl_easy_init ();
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern void curl_easy_cleanup (IntPtr pCurl);
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate int _CurlGenericCallback (IntPtr ptr, int sz, int nmemb, IntPtr userdata);
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate int _CurlProgressCallback (
IntPtr extraData, double dlTotal, double dlNow, double ulTotal, double ulNow);
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate int _CurlDebugCallback (
IntPtr ptrCurl, CurlInfoType infoType, string message, int size, IntPtr ptrUserData);
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate int _CurlSslCtxCallback (IntPtr ctx, IntPtr parm);
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate CurlIoError _CurlIoctlCallback (CurlIoCommand cmd, IntPtr parm);
// curl_easy_setopt() overloads
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlCode curl_easy_setopt (IntPtr pCurl, CurlOption opt, IntPtr parm);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlCode curl_easy_setopt (IntPtr pCurl, CurlOption opt, string parm);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlCode curl_easy_setopt (IntPtr pCurl, CurlOption opt, byte[] parm);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlCode curl_easy_setopt (IntPtr pCurl, CurlOption opt, long parm);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlCode curl_easy_setopt (IntPtr pCurl, CurlOption opt, bool parm);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl, EntryPoint = "curl_easy_setopt")]
internal static extern CurlCode curl_easy_setopt_cb (IntPtr pCurl, CurlOption opt, _CurlGenericCallback parm);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl, EntryPoint = "curl_easy_setopt")]
internal static extern CurlCode curl_easy_setopt_cb (IntPtr pCurl, CurlOption opt, _CurlProgressCallback parm);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl, EntryPoint = "curl_easy_setopt")]
internal static extern CurlCode curl_easy_setopt_cb (IntPtr pCurl, CurlOption opt, _CurlDebugCallback parm);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl, EntryPoint = "curl_easy_setopt")]
internal static extern CurlCode curl_easy_setopt_cb (IntPtr pCurl, CurlOption opt, _CurlSslCtxCallback parm);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl, EntryPoint = "curl_easy_setopt")]
internal static extern CurlCode curl_easy_setopt_cb (IntPtr pCurl, CurlOption opt, _CurlIoctlCallback parm);
#if !USE_LIBCURLSHIM
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlMultiCode curl_multi_fdset (IntPtr pmulti,
[In, Out] ref fd_set read_fd_set,
[In, Out] ref fd_set write_fd_set,
[In, Out] ref fd_set exc_fd_set,
[In, Out] ref int max_fd);
[StructLayout (LayoutKind.Sequential)]
internal struct fd_set
{
internal uint fd_count;
//[MarshalAs(UnmanagedType.ByValArray, SizeConst = FD_SETSIZE)] internal IntPtr[] fd_array;
internal fixed uint fd_array[FD_SETSIZE];
internal const int FD_SETSIZE = 64;
internal void Cleanup ()
{
//fd_array = null;
}
internal static fd_set Create ()
{
return new fd_set {
//fd_array = new IntPtr[FD_SETSIZE],
fd_count = 0
};
}
internal static fd_set Create (IntPtr socket)
{
var handle = Create ();
handle.fd_count = 1;
handle.fd_array [0] = (uint)socket;
return handle;
}
}
internal static void FD_ZERO (fd_set fds)
{
for (var i = 0; i < fd_set.FD_SETSIZE; i++) {
//fds.fd_array[i] = (IntPtr) 0;
fds.fd_array [i] = 0;
}
fds.fd_count = 0;
}
[StructLayout (LayoutKind.Sequential)]
internal struct timeval
{
/// <summary>
/// Time interval, in seconds.
/// </summary>
internal int tv_sec;
/// <summary>
/// Time interval, in microseconds.
/// </summary>
internal int tv_usec;
internal static timeval Create (int milliseconds)
{
return new timeval {
tv_sec = milliseconds / 1000,
tv_usec = (milliseconds % 1000) * 1000
};
}
};
[DllImport (WINSOCK_LIB, EntryPoint = "select")]
internal static extern int select (
int nfds, // number of sockets, (ignored in winsock)
[In, Out] ref fd_set readfds, // read sockets to watch
[In, Out] ref fd_set writefds, // write sockets to watch
[In, Out] ref fd_set exceptfds, // error sockets to watch
ref timeval timeout);
//[DllImport(WINSOCK_LIB, EntryPoint = "select")]
//internal static extern int select(int ndfs, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, timeval* timeout);
#endif
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlCode curl_easy_perform (IntPtr pCurl);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr curl_easy_duphandle (IntPtr pCurl);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr curl_easy_strerror (CurlCode err);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlCode curl_easy_getinfo (IntPtr pCurl, CurlInfo info, ref IntPtr pInfo);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlCode curl_easy_getinfo (IntPtr pCurl, CurlInfo info, ref double dblVal);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern void curl_easy_reset (IntPtr pCurl);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr curl_multi_init ();
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlMultiCode curl_multi_cleanup (IntPtr pmulti);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlMultiCode curl_multi_add_handle (IntPtr pmulti, IntPtr peasy);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlMultiCode curl_multi_remove_handle (IntPtr pmulti, IntPtr peasy);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr curl_multi_strerror (CurlMultiCode errorNum);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlMultiCode curl_multi_perform (IntPtr pmulti, ref int runningHandles);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern void curl_formfree (IntPtr pForm);
#if !USE_LIBCURLSHIM
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern int curl_formadd (ref IntPtr pHttppost, ref IntPtr pLastPost,
int codeFirst, IntPtr bufFirst,
int codeNext, IntPtr bufNext,
int codeLast);
#endif
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr curl_share_init ();
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlShareCode curl_share_cleanup (IntPtr pShare);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr curl_share_strerror (CurlShareCode errorCode);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlShareCode curl_share_setopt (IntPtr pShare, CurlShareOption optCode, IntPtr option);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
internal static extern IntPtr curl_slist_append (IntPtr slist, string data);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlShareCode curl_slist_free_all (IntPtr pList);
[DllImport (CURL_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr curl_version_info (CurlVersion ver);
#if USE_LIBCURLSHIM
// libcurlshim imports
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern void curl_shim_initialize();
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern void curl_shim_cleanup();
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr curl_shim_alloc_strings();
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl,
CharSet = CharSet.Ansi)]
internal static extern IntPtr curl_shim_add_string_to_slist(
IntPtr pStrings, String str);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl,
CharSet = CharSet.Ansi)]
internal static extern IntPtr curl_shim_get_string_from_slist(
IntPtr pSlist, ref IntPtr pStr);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl,
CharSet = CharSet.Ansi)]
internal static extern IntPtr curl_shim_add_string(IntPtr pStrings, String str);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern void curl_shim_free_strings(IntPtr pStrings);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern int curl_shim_install_delegates(IntPtr pCurl, IntPtr pThis,
_ShimWriteCallback pWrite, _ShimReadCallback pRead,
_ShimProgressCallback pProgress, _ShimDebugCallback pDebug,
_ShimHeaderCallback pHeader, _ShimSslCtxCallback pCtx,
_ShimIoctlCallback pIoctl);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern void curl_shim_cleanup_delegates(IntPtr pThis);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern void curl_shim_get_file_time(int unixTime,
ref int yy, ref int mm, ref int dd, ref int hh, ref int mn, ref int ss);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern void curl_shim_free_slist(IntPtr p);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr curl_shim_alloc_fd_sets();
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern void curl_shim_free_fd_sets(IntPtr fdsets);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern CurlMultiCode curl_shim_multi_fdset(IntPtr multi,
IntPtr fdsets, ref int maxFD);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern int curl_shim_select(int maxFD, IntPtr fdsets,
int milliseconds);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr curl_shim_multi_info_read(IntPtr multi,
ref int nMsgs);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern void curl_shim_multi_info_free(IntPtr multiInfo);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern int curl_shim_formadd(IntPtr[] ppForms, IntPtr[] pParams, int nParams);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern int curl_shim_install_share_delegates(IntPtr pShare,
IntPtr pThis, _ShimLockCallback pLock, _ShimUnlockCallback pUnlock);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern void curl_shim_cleanup_share_delegates(IntPtr pShare);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern int curl_shim_get_version_int_value(IntPtr p, int offset);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr curl_shim_get_version_char_ptr(IntPtr p, int offset);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern int curl_shim_get_number_of_protocols(IntPtr p, int offset);
[DllImport(CURLSHIM_LIB, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr curl_shim_get_protocol_string(IntPtr p, int offset, int index);
internal delegate void _ShimLockCallback(int data, int access, IntPtr userPtr);
internal delegate void _ShimUnlockCallback(int data, IntPtr userPtr);
internal delegate int _ShimDebugCallback(CurlInfoType infoType, IntPtr msgBuf, int msgBufSize, IntPtr parm);
internal delegate int _ShimHeaderCallback(IntPtr buf, int sz, int nmemb, IntPtr stream);
internal delegate CurlIoError _ShimIoctlCallback(CurlIoCommand cmd, IntPtr parm);
internal delegate int _ShimProgressCallback(IntPtr parm, double dlTotal, double dlNow, double ulTotal, double ulNow);
internal delegate int _ShimReadCallback(IntPtr buf, int sz, int nmemb, IntPtr parm);
internal delegate int _ShimSslCtxCallback(IntPtr ctx, IntPtr parm);
internal delegate int _ShimWriteCallback(IntPtr buf, int sz, int nmemb, IntPtr parm);
#endif
}
}

View File

@@ -0,0 +1,22 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle ("CurlSharp")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("")]
[assembly: AssemblyCopyright ("max")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCulture ("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion ("1.0.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]

13
src/CurlSharp/SSLFix.cs Normal file
View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CurlSharp
{
public class SSLFix
{
public const string CipherList = "rsa_aes_128_sha,ecdhe_rsa_aes_256_sha,ecdhe_ecdsa_aes_128_sha";
}
}

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="AutoMapper" publicKeyToken="be96cd2c38ef1005" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -0,0 +1,69 @@
using CommandLine;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Jackett.Console
{
public class ConsoleOptions
{
[Option('i', "Install", HelpText = "Install Jackett windows service (Must be admin)")]
public bool Install { get; set; }
[Option('r', "ReserveUrls", HelpText = "(Re)Register windows port reservations (Required for listening on all interfaces).")]
public bool ReserveUrls { get; set; }
[Option('u', "Uninstall", HelpText = "Uninstall Jackett windows service (Must be admin).")]
public bool Uninstall { get; set; }
[Option('l', "Logging", HelpText = "Log all requests/responses to Jackett")]
public bool Logging { get; set; }
[Option('t', "Tracing", HelpText = "Enable tracing")]
public bool Tracing { get; set; }
[Option('c', "UseClient", HelpText = "Override web client selection. [automatic(Default)/libcurl/safecurl/httpclient]")]
public string Client { get; set; }
[Option('j', "ProxyConnection", HelpText = "use proxy - e.g. 127.0.0.1:8888")]
public string ProxyConnection { get; set; }
[Option('s', "Start", HelpText = "Start the Jacket Windows service (Must be admin)")]
public bool StartService { get; set; }
[Option('k', "Stop", HelpText = "Stop the Jacket Windows service (Must be admin)")]
public bool StopService { get; set; }
[Option('x', "ListenPublic", HelpText = "Listen publicly")]
public bool ListenPublic { get; set; }
[Option('z', "ListenPrivate", HelpText = "Only allow local access")]
public bool ListenPrivate { get; set; }
[Option('h', "Help", HelpText = "Show Help")]
public bool ShowHelp { get; set; }
[Option('v', "Version", HelpText = "Show Version")]
public bool ShowVersion { get; set; }
[Option('p', "Port", HelpText = "Web server port")]
public int Port { get; set; }
[Option('m', "MigrateSettings", HelpText = "Migrate settings manually (Must be admin on Windows)")]
public bool MigrateSettings { get; set; }
[Option('f', "SSLFix", HelpText = "[true/false] Linux Libcurl NSS Missing ECC Ciphers workaround (Use if you can't access some trackers) .")]
public bool? SSLFix { get; set; }
[Option('n', "IgnoreSslErrors", HelpText = "[true/false] Ignores invalid SSL certificates")]
public bool? IgnoreSslErrors { get; set; }
[Option('d', "DataFolder", HelpText = "Specify the location of the data folder (Must be admin on Windows) eg. --DataFolder=\"D:\\Your Data\\Jackett\\\"")]
public string DataFolder { get; set; }
[ParserState]
public IParserState LastParserState { get; set; }
}
}

View File

@@ -0,0 +1,180 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4E2A81DA-E235-4A88-AD20-38AABBFBF33C}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Jackett.Console</RootNamespace>
<AssemblyName>JackettConsole</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>jackett.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<StartupObject>JackettConsole.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Integration.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.Owin.3.1.0\lib\net45\Autofac.Integration.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Integration.WebApi, Version=3.4.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.WebApi2.3.4.0\lib\net45\Autofac.Integration.WebApi.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Integration.WebApi.Owin, Version=3.3.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.WebApi2.Owin.3.3.0\lib\net45\Autofac.Integration.WebApi.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="AutoMapper, Version=4.1.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
<HintPath>..\packages\AutoMapper.4.1.1\lib\net45\AutoMapper.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CommandLine, Version=1.9.71.2, Culture=neutral, PublicKeyToken=de6f01bd326f8c32, processorArchitecture=MSIL">
<HintPath>..\packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.FileSystems, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.FileSystems.3.0.1\lib\net45\Microsoft.Owin.FileSystems.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Host.HttpListener.3.0.1\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.Host.SystemWeb, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.3.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.Hosting, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Hosting.3.0.1\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.StaticFiles, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.StaticFiles.3.0.1\lib\net45\Microsoft.Owin.StaticFiles.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.3.7\lib\net45\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Http.Owin, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Owin.5.2.3\lib\net45\System.Web.Http.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Http.Tracing, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Tracing.5.2.3\lib\net45\System.Web.Http.Tracing.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ConsoleOptions.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CurlSharp\CurlSharp.csproj">
<Project>{74420a79-cc16-442c-8b1e-7c1b913844f0}</Project>
<Name>CurlSharp</Name>
</ProjectReference>
<ProjectReference Include="..\Jackett\Jackett.csproj">
<Project>{e636d5f8-68b4-4903-b4ed-ccfd9c9e899f}</Project>
<Name>Jackett</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="jackett.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,234 @@
using CommandLine;
using CommandLine.Text;
using Jackett;
using Jackett.Console;
using Jackett.Indexers;
using Jackett.Utils;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
namespace JackettConsole
{
public class Program
{
static void Main(string[] args)
{
try
{
var options = new ConsoleOptions();
if (!Parser.Default.ParseArguments(args, options) || options.ShowHelp == true)
{
if (options.LastParserState != null && options.LastParserState.Errors.Count > 0)
{
var help = new HelpText();
var errors = help.RenderParsingErrorsText(options, 2); // indent with two spaces
Console.WriteLine("Jackett v" + Engine.ConfigService.GetVersion());
Console.WriteLine("Switch error: " + errors);
Console.WriteLine("See --help for further details on switches.");
Environment.ExitCode = 1;
return;
}
else
{
var text = HelpText.AutoBuild(options, (HelpText current) => HelpText.DefaultParsingErrorsHandler(options, current));
text.Copyright = " ";
text.Heading = "Jackett v" + Engine.ConfigService.GetVersion() + " options:";
Console.WriteLine(text);
Environment.ExitCode = 1;
return;
}
}
else
{
if (options.ListenPublic && options.ListenPrivate)
{
Console.WriteLine("You can only use listen private OR listen publicly.");
Environment.ExitCode = 1;
return;
}
/* ====== Options ===== */
// SSL Fix
Startup.DoSSLFix = options.SSLFix;
// Use curl
if (options.Client != null)
Startup.ClientOverride = options.Client.ToLowerInvariant();
// Use Proxy
if (options.ProxyConnection != null)
{
Startup.ProxyConnection = options.ProxyConnection.ToLowerInvariant();
Engine.Logger.Info("Proxy enabled. " + Startup.ProxyConnection);
}
// Logging
if (options.Logging)
Startup.LogRequests = true;
// Tracing
if (options.Tracing)
Startup.TracingEnabled = true;
// Log after the fact as using the logger will cause the options above to be used
if (options.Logging)
Engine.Logger.Info("Logging enabled.");
if (options.Tracing)
Engine.Logger.Info("Tracing enabled.");
if (options.SSLFix == true)
Engine.Logger.Info("SSL ECC workaround enabled.");
else if (options.SSLFix == false)
Engine.Logger.Info("SSL ECC workaround has been disabled.");
// Ignore SSL errors on Curl
Startup.IgnoreSslErrors = options.IgnoreSslErrors;
if (options.IgnoreSslErrors == true)
{
Engine.Logger.Info("Jackett will ignore SSL certificate errors.");
}
// Choose Data Folder
if (!string.IsNullOrWhiteSpace(options.DataFolder))
{
Startup.CustomDataFolder = options.DataFolder.Replace("\"", string.Empty).Replace("'", string.Empty).Replace(@"\\", @"\");
Engine.Logger.Info("Jackett Data will be stored in: " + Startup.CustomDataFolder);
}
/* ====== Actions ===== */
// Install service
if (options.Install)
{
Engine.ServiceConfig.Install();
return;
}
// Uninstall service
if (options.Uninstall)
{
Engine.Server.ReserveUrls(doInstall: false);
Engine.ServiceConfig.Uninstall();
return;
}
// Reserve urls
if (options.ReserveUrls)
{
Engine.Server.ReserveUrls(doInstall: true);
return;
}
// Start Service
if (options.StartService)
{
if (!Engine.ServiceConfig.ServiceRunning())
{
Engine.ServiceConfig.Start();
}
return;
}
// Stop Service
if (options.StopService)
{
if (Engine.ServiceConfig.ServiceRunning())
{
Engine.ServiceConfig.Stop();
}
return;
}
// Migrate settings
if (options.MigrateSettings)
{
Engine.ConfigService.PerformMigration();
return;
}
// Show Version
if (options.ShowVersion)
{
Console.WriteLine("Jackett v" + Engine.ConfigService.GetVersion());
return;
}
/* ====== Overrides ===== */
// Override listen public
if (options.ListenPublic || options.ListenPrivate)
{
if (Engine.Server.Config.AllowExternal != options.ListenPublic)
{
Engine.Logger.Info("Overriding external access to " + options.ListenPublic);
Engine.Server.Config.AllowExternal = options.ListenPublic;
if (System.Environment.OSVersion.Platform != PlatformID.Unix)
{
if (ServerUtil.IsUserAdministrator())
{
Engine.Server.ReserveUrls(doInstall: true);
}
else
{
Engine.Logger.Error("Unable to switch to public listening without admin rights.");
Environment.ExitCode = 1;
return;
}
}
Engine.Server.SaveConfig();
}
}
// Override port
if (options.Port != 0)
{
if (Engine.Server.Config.Port != options.Port)
{
Engine.Logger.Info("Overriding port to " + options.Port);
Engine.Server.Config.Port = options.Port;
if (System.Environment.OSVersion.Platform != PlatformID.Unix)
{
if (ServerUtil.IsUserAdministrator())
{
Engine.Server.ReserveUrls(doInstall: true);
}
else
{
Engine.Logger.Error("Unable to switch ports when not running as administrator");
Environment.ExitCode = 1;
return;
}
}
Engine.Server.SaveConfig();
}
}
}
Engine.Server.Initalize();
Engine.Server.Start();
Engine.RunTime.Spin();
Engine.Logger.Info("Server thread exit");
}
catch (Exception e)
{
Engine.Logger.Error(e, "Top level exception");
}
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Jackett.Console")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Jackett.Console")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4e2a81da-e235-4a88-ad20-38aabbfbf33c")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("0.0.0.0")]

View File

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 361 KiB

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net45" />
<package id="Autofac.Owin" version="3.1.0" targetFramework="net45" />
<package id="Autofac.WebApi2" version="3.4.0" targetFramework="net45" />
<package id="Autofac.WebApi2.Owin" version="3.3.0" targetFramework="net45" />
<package id="AutoMapper" version="4.1.1" targetFramework="net45" />
<package id="CommandLineParser" version="1.9.71" targetFramework="net45" />
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Tracing" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net45" />
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.FileSystems" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Host.HttpListener" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Hosting" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.StaticFiles" version="3.0.1" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="NLog" version="4.3.7" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
</packages>

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{BF611F7B-4658-4CB8-AA9E-0736FADAA3BA}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Jackett.Service</RootNamespace>
<AssemblyName>JackettService</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>jackett.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Integration.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.Owin.3.1.0\lib\net45\Autofac.Integration.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Integration.WebApi, Version=3.4.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.WebApi2.3.4.0\lib\net45\Autofac.Integration.WebApi.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Integration.WebApi.Owin, Version=3.3.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.WebApi2.Owin.3.3.0\lib\net45\Autofac.Integration.WebApi.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.FileSystems, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.FileSystems.3.0.1\lib\net45\Microsoft.Owin.FileSystems.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Host.HttpListener.3.0.1\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.Hosting, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Hosting.3.0.1\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.StaticFiles, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.StaticFiles.3.0.1\lib\net45\Microsoft.Owin.StaticFiles.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.3.7\lib\net45\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Http.Owin, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Owin.5.2.3\lib\net45\System.Web.Http.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Http.Tracing, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Tracing.5.2.3\lib\net45\System.Web.Http.Tracing.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Service.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Service.Designer.cs">
<DependentUpon>Service.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="jackett.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CurlSharp\CurlSharp.csproj">
<Project>{74420a79-cc16-442c-8b1e-7c1b913844f0}</Project>
<Name>CurlSharp</Name>
</ProjectReference>
<ProjectReference Include="..\Jackett\Jackett.csproj">
<Project>{e636d5f8-68b4-4903-b4ed-ccfd9c9e899f}</Project>
<Name>Jackett</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading.Tasks;
namespace Jackett.Service
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new Service()
};
ServiceBase.Run(ServicesToRun);
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Jackett.Service")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Jackett.Service")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("bf611f7b-4658-4cb8-aa9e-0736fadaa3ba")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("0.0.0.0")]

37
src/Jackett.Service/Service.Designer.cs generated Normal file
View File

@@ -0,0 +1,37 @@
namespace Jackett.Service
{
partial class Service
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.ServiceName = "Jackett";
}
#endregion
}
}

View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading.Tasks;
namespace Jackett.Service
{
public partial class Service : ServiceBase
{
public Service()
{
InitializeComponent();
}
protected override void OnStart(string[] args)
{
Engine.Logger.Info("Service starting");
Engine.Server.Initalize();
Engine.Server.Start();
Engine.Logger.Info("Service started");
}
protected override void OnStop()
{
Engine.Logger.Info("Service stopping");
Engine.Server.Stop();
}
}
}

View File

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 361 KiB

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net45" />
<package id="Autofac.Owin" version="3.1.0" targetFramework="net45" />
<package id="Autofac.WebApi2" version="3.4.0" targetFramework="net45" />
<package id="Autofac.WebApi2.Owin" version="3.3.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Tracing" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net45" />
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.FileSystems" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Host.HttpListener" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Hosting" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.StaticFiles" version="3.0.1" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="NLog" version="4.3.7" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
</packages>

View File

@@ -0,0 +1,223 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{E75D4F15-5DA3-4332-ADB1-28FB673DAE56}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>JackettTest</RootNamespace>
<AssemblyName>JackettTest</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Integration.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.Owin.3.1.0\lib\net45\Autofac.Integration.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Integration.WebApi, Version=3.4.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.WebApi2.3.4.0\lib\net45\Autofac.Integration.WebApi.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Integration.WebApi.Owin, Version=3.3.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.WebApi2.Owin.3.3.0\lib\net45\Autofac.Integration.WebApi.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="AutoMapper, Version=4.1.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
<HintPath>..\packages\AutoMapper.4.1.1\lib\net45\AutoMapper.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CsQuery, Version=1.3.3.249, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\CsQuery.1.3.4\lib\net40\CsQuery.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentAssertions, Version=4.13.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.13.0\lib\net45\FluentAssertions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentAssertions.Core, Version=4.13.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.13.0\lib\net45\FluentAssertions.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Host.HttpListener.3.0.1\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.Hosting, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Hosting.3.0.1\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.3.7\lib\net45\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.core, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\nunit.core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.core.interfaces, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\nunit.core.interfaces.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=3.4.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.4.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.util, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\nunit.util.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NUnit.VisualStudio.TestAdapter, Version=2.0.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac, processorArchitecture=MSIL">
<HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\NUnit.VisualStudio.TestAdapter.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Http.Owin, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Owin.5.2.3\lib\net45\System.Web.Http.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<Choose>
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" />
</ItemGroup>
</Otherwise>
</Choose>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\ProtectionServiceTests.cs" />
<Compile Include="TestBase.cs" />
<Compile Include="TestIIndexerManagerServiceHelper.cs" />
<Compile Include="TestUtil.cs" />
<Compile Include="TestWebClient.cs" />
<Compile Include="Util\ParseUtilTests.cs" />
<Compile Include="Util\ServerUtilTests.cs" />
<Compile Include="Util\TvCategoryParserTests.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Jackett\Jackett.csproj">
<Project>{e636d5f8-68b4-4903-b4ed-ccfd9c9e899f}</Project>
<Name>Jackett</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Indexers\" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Util\Invalid-RSS.xml" />
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Jackett.Test")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Jackett.Test")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("e75d4f15-5da3-4332-adb1-28fb673dae56")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("0.0.0.0")]

View File

@@ -0,0 +1,30 @@
using Jackett.Services;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autofac;
namespace JackettTest.Services
{
[TestFixture]
class ProtectionServiceTests : TestBase
{
[Test]
public void Should_be_able_to_encrypt_and_decrypt()
{
var ss = TestUtil.Container.Resolve<IServerService>();
ss.Config.InstanceId = "12345678";
var ps = TestUtil.Container.Resolve<IProtectionService>();
var input = "test123";
var protectedInput = ps.Protect(input);
var output = ps.UnProtect(protectedInput);
Assert.AreEqual(output, input);
Assert.AreNotEqual(input, protectedInput);
}
}
}

View File

@@ -0,0 +1,18 @@
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JackettTest
{
abstract class TestBase
{
[SetUp]
public void Setup()
{
TestUtil.SetupContainer();
}
}
}

View File

@@ -0,0 +1,56 @@
using Jackett.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Jackett.Indexers;
using Newtonsoft.Json.Linq;
namespace JackettTest
{
class TestIndexerManagerServiceHelper : IIndexerManagerService
{
public JToken LastSavedConfig { get; set; }
public void DeleteIndexer(string name)
{
throw new NotImplementedException();
}
public IEnumerable<IIndexer> GetAllIndexers()
{
throw new NotImplementedException();
}
public IIndexer GetIndexer(string name)
{
throw new NotImplementedException();
}
public void InitIndexers()
{
throw new NotImplementedException();
}
public void SaveConfig(IIndexer indexer, JToken obj)
{
LastSavedConfig = obj;
}
public Task TestIndexer(string name)
{
throw new NotImplementedException();
}
public void InitCardigannIndexers(string path)
{
throw new NotImplementedException();
}
public void SortIndexers()
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,74 @@
using Autofac;
using Jackett;
using Jackett.Services;
using Jackett.Utils.Clients;
using NLog;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace JackettTest
{
class TestUtil
{
private static IContainer testContainer = null;
public static void SetupContainer()
{
var builder = new ContainerBuilder();
builder.RegisterModule<JackettModule>();
builder.RegisterType<TestWebClient>().As<IWebClient>().SingleInstance();
builder.RegisterInstance<Logger>(LogManager.GetCurrentClassLogger()).SingleInstance();
builder.RegisterType<TestIndexerManagerServiceHelper>().As<IIndexerManagerService>().SingleInstance();
testContainer = builder.Build();
// Register the container in itself to allow for late resolves
var secondaryBuilder = new ContainerBuilder();
secondaryBuilder.RegisterInstance<IContainer>(testContainer).SingleInstance();
secondaryBuilder.Update(testContainer);
}
public static TestIndexerManagerServiceHelper IndexManager
{
get
{
return testContainer.Resolve<IIndexerManagerService>() as TestIndexerManagerServiceHelper;
}
}
public static IContainer Container
{
get { return testContainer; }
}
public static void RegisterByteCall(WebRequest r, Func<WebRequest, WebClientByteResult> f)
{
var client = testContainer.Resolve<IWebClient>() as TestWebClient;
client.RegisterByteCall(r, f);
}
public static void RegisterStringCall(WebRequest r, Func<WebRequest, WebClientStringResult> f)
{
var client = testContainer.Resolve<IWebClient>() as TestWebClient;
client.RegisterStringCall(r, f);
}
public static string GetResource(string item)
{
var assembly = Assembly.GetExecutingAssembly();
var resourceName = "JackettTest." + item.Replace('/','.');
using (Stream stream = assembly.GetManifestResourceStream(resourceName))
{
using (StreamReader reader = new StreamReader(stream))
{
return reader.ReadToEnd();
}
}
}
}
}

View File

@@ -0,0 +1,49 @@
using Jackett.Services;
using Jackett.Utils.Clients;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JackettTest
{
public class TestWebClient : IWebClient
{
private Dictionary<WebRequest, Func<WebRequest, WebClientByteResult>> byteCallbacks = new Dictionary<WebRequest, Func<WebRequest, WebClientByteResult>>();
private Dictionary<WebRequest, Func<WebRequest, WebClientStringResult>> stringCallbacks = new Dictionary<WebRequest, Func<WebRequest, WebClientStringResult>>();
public TestWebClient(IProcessService p, Logger l, IConfigurationService c)
: base(p: p,
l: l,
c: c)
{
}
public void RegisterByteCall(WebRequest req, Func<WebRequest, WebClientByteResult> f)
{
byteCallbacks.Add(req, f);
}
public void RegisterStringCall(WebRequest req, Func<WebRequest, WebClientStringResult> f)
{
stringCallbacks.Add(req, f);
}
override public Task<WebClientByteResult> GetBytes(WebRequest request)
{
return Task.FromResult< WebClientByteResult>(byteCallbacks.Where(r => r.Key.Equals(request)).First().Value.Invoke(request));
}
override public Task<WebClientStringResult> GetString(WebRequest request)
{
return Task.FromResult<WebClientStringResult>(stringCallbacks.Where(r => r.Key.Equals(request)).First().Value.Invoke(request));
}
override public void Init()
{
}
}
}

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>RSS Syndicator</title>
<link>http://somewebsite.com</link>
<description>
&lt;br /&gt;
Enjoy!&lt;br /&gt;
&lt;br /&gt;
-&lt;br /&gt;
&lt;br /&gt;
 group info&lt;br /&gt;
&lt;br /&gt;
Know Your Role and Shut Your Mouth!&lt;br /&gt;
&lt;br /&gt;
 we are now looking for...&lt;br /&gt;
&lt;br /&gt;
</description>
</channel>
</rss>

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using System.Xml.XPath;
using FluentAssertions;
using Jackett.Utils;
using NUnit.Framework;
namespace JackettTest.Util
{
[TestFixture]
public class ParseUtilTests
{
private static string InvalidRssXml
{
get
{
var type = typeof(ParseUtilTests);
using (var resourceStream = type.Assembly.GetManifestResourceStream($"{type.Namespace}.Invalid-RSS.xml"))
using (var sr = new StreamReader(resourceStream))
{
return sr.ReadToEnd();
}
}
}
[Test]
public void Invalid_RSS_should_parse_after_removing_invalid_chars()
{
var invalidRss = InvalidRssXml;
Action parseAction = () => XDocument.Parse(invalidRss);
parseAction.ShouldThrow<Exception>().WithMessage("'\a', hexadecimal value 0x07, is an invalid character. Line 12, position 7.");
var validRSs = ParseUtil.RemoveInvalidXmlChars(invalidRss);
var rssDoc = XDocument.Parse(validRSs);
rssDoc.Root.Should().NotBeNull();
var description = rssDoc.Root.XPathSelectElement("//description");
description.Value.Should().Contain("Know Your Role and Shut Your Mouth!");
}
}
}

View File

@@ -0,0 +1,50 @@
using Jackett.Utils.Clients;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autofac;
using Jackett.Indexers;
using FluentAssertions;
using Newtonsoft.Json.Linq;
using Jackett;
using Newtonsoft.Json;
using Jackett.Utils;
namespace JackettTest.Indexers
{
[TestFixture]
class ServerUtilTests : TestBase
{
[Test]
public void ResureRedirectIsFullyQualified_makes_redicts_fully_qualified()
{
var res = new WebClientByteResult()
{
RedirectingTo = "list?p=1"
};
var req = new WebRequest()
{
Url = "http://my.domain.com/page.php"
};
// Not fully qualified requiring redirect
ServerUtil.ResureRedirectIsFullyQualified(req, res);
Assert.AreEqual(res.RedirectingTo, "http://my.domain.com/list?p=1");
// Fully qualified not needing modified
res.RedirectingTo = "http://a.domain/page.htm";
ServerUtil.ResureRedirectIsFullyQualified(req, res);
Assert.AreEqual(res.RedirectingTo, "http://a.domain/page.htm");
// Relative requiring redirect
req.Url = "http://my.domain.com/dir/page.php";
res.RedirectingTo = "a/dir/page.html";
ServerUtil.ResureRedirectIsFullyQualified(req, res);
Assert.AreEqual(res.RedirectingTo, "http://my.domain.com/dir/a/dir/page.html");
}
}
}

View File

@@ -0,0 +1,27 @@
using NUnit.Framework;
using Jackett.Utils;
namespace JackettTest.Util
{
[TestFixture]
internal class ParseTvShowQualityTest : TestBase
{
[TestCase("Chuck.S04E05.HDTV.XviD-LOL", 5030)]
[TestCase("Gold.Rush.S04E05.Garnets.or.Gold.REAL.REAL.PROPER.HDTV.x264-W4F", 5030)]
[TestCase("Chuck.S03E17.REAL.PROPER.720p.HDTV.x264-ORENJI-RP", 5040)]
[TestCase("Covert.Affairs.S05E09.REAL.PROPER.HDTV.x264-KILLERS", 5030)]
[TestCase("Mythbusters.S14E01.REAL.PROPER.720p.HDTV.x264-KILLERS", 5040)]
[TestCase("Orange.Is.the.New.Black.s02e06.real.proper.720p.webrip.x264-2hd", 5040)]
[TestCase("Top.Gear.S21E07.Super.Duper.Real.Proper.HDTV.x264-FTP", 5030)]
[TestCase("Top.Gear.S21E07.PROPER.HDTV.x264-RiVER-RP", 5030)]
[TestCase("House.S07E11.PROPER.REAL.RERIP.1080p.BluRay.x264-TENEIGHTY", 5040)]
[TestCase("The.Blacklist.S02E05", 5000)]
[TestCase("The.IT.Crowd.S01.DVD.REMUX.DD2.0.MPEG2-DTG", 5030)]
public void should_parse_quality_from_title(string title, int quality)
{
Assert.That(TvCategoryParser.ParseTvShowQuality(title), Is.EqualTo(quality));
}
}
}

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="AutoMapper" publicKeyToken="be96cd2c38ef1005" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup></configuration>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net45" />
<package id="Autofac.Owin" version="3.1.0" targetFramework="net45" />
<package id="Autofac.WebApi2" version="3.4.0" targetFramework="net45" />
<package id="Autofac.WebApi2.Owin" version="3.3.0" targetFramework="net45" />
<package id="AutoMapper" version="4.1.1" targetFramework="net45" />
<package id="CsQuery" version="1.3.4" targetFramework="net45" />
<package id="FluentAssertions" version="4.13.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net45" />
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Host.HttpListener" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Hosting" version="3.0.1" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="NLog" version="4.3.7" targetFramework="net45" />
<package id="NUnit" version="3.4.1" targetFramework="net45" />
<package id="NUnitTestAdapter" version="2.0.0" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
</packages>

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="AutoMapper" publicKeyToken="be96cd2c38ef1005" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -0,0 +1,204 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{FF9025B1-EC14-4AA9-8081-9F69C5E35B63}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Jackett.Tray</RootNamespace>
<AssemblyName>JackettTray</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>jackett.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Integration.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.Owin.3.1.0\lib\net45\Autofac.Integration.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Integration.WebApi, Version=3.4.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.WebApi2.3.4.0\lib\net45\Autofac.Integration.WebApi.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Integration.WebApi.Owin, Version=3.3.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.WebApi2.Owin.3.3.0\lib\net45\Autofac.Integration.WebApi.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="AutoMapper, Version=4.1.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
<HintPath>..\packages\AutoMapper.4.1.1\lib\net45\AutoMapper.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.FileSystems, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.FileSystems.3.0.1\lib\net45\Microsoft.Owin.FileSystems.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.Host.HttpListener, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Host.HttpListener.3.0.1\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.Hosting, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Hosting.3.0.1\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.StaticFiles, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.StaticFiles.3.0.1\lib\net45\Microsoft.Owin.StaticFiles.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.3.7\lib\net45\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Http.Owin, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Owin.5.2.3\lib\net45\System.Web.Http.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Http.Tracing, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Tracing.5.2.3\lib\net45\System.Web.Http.Tracing.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Main.Designer.cs">
<DependentUpon>Main.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Main.resx">
<DependentUpon>Main.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="jackett.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Jackett\Jackett.csproj">
<Project>{e636d5f8-68b4-4903-b4ed-ccfd9c9e899f}</Project>
<Name>Jackett</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<COMReference Include="IWshRuntimeLibrary">
<Guid>{F935DC20-1CF0-11D0-ADB9-00C04FD58A0B}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,4 +1,4 @@
namespace Jackett
namespace JackettTray
{
partial class Main
{
@@ -32,8 +32,12 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripMenuItemAutoStart = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItemWebUI = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.backgroundMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.serviceControlMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItemAutoStart = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItemShutdown = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
@@ -48,29 +52,59 @@
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItemAutoStart,
this.toolStripMenuItemWebUI,
this.toolStripSeparator1,
this.backgroundMenuItem,
this.serviceControlMenuItem,
this.toolStripSeparator2,
this.toolStripMenuItemAutoStart,
this.toolStripMenuItemShutdown});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(174, 92);
this.contextMenuStrip1.Size = new System.Drawing.Size(292, 148);
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
//
// toolStripMenuItemWebUI
//
this.toolStripMenuItemWebUI.Name = "toolStripMenuItemWebUI";
this.toolStripMenuItemWebUI.Size = new System.Drawing.Size(291, 22);
this.toolStripMenuItemWebUI.Text = "Open Web UI";
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(288, 6);
//
// backgroundMenuItem
//
this.backgroundMenuItem.Enabled = false;
this.backgroundMenuItem.Name = "backgroundMenuItem";
this.backgroundMenuItem.Size = new System.Drawing.Size(291, 22);
this.backgroundMenuItem.Text = "Jacket is running as a background service";
//
// serviceControlMenuItem
//
this.serviceControlMenuItem.Name = "serviceControlMenuItem";
this.serviceControlMenuItem.Size = new System.Drawing.Size(291, 22);
this.serviceControlMenuItem.Text = "Start Service";
this.serviceControlMenuItem.Click += new System.EventHandler(this.serviceControlMenuItem_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(288, 6);
//
// toolStripMenuItemAutoStart
//
this.toolStripMenuItemAutoStart.CheckOnClick = true;
this.toolStripMenuItemAutoStart.Name = "toolStripMenuItemAutoStart";
this.toolStripMenuItemAutoStart.Size = new System.Drawing.Size(173, 22);
this.toolStripMenuItemAutoStart.Size = new System.Drawing.Size(291, 22);
this.toolStripMenuItemAutoStart.Text = "Auto-start on boot";
//
// toolStripMenuItemWebUI
//
this.toolStripMenuItemWebUI.Name = "toolStripMenuItemWebUI";
this.toolStripMenuItemWebUI.Size = new System.Drawing.Size(173, 22);
this.toolStripMenuItemWebUI.Text = "Open Web UI";
this.toolStripMenuItemAutoStart.Visible = false;
//
// toolStripMenuItemShutdown
//
this.toolStripMenuItemShutdown.Name = "toolStripMenuItemShutdown";
this.toolStripMenuItemShutdown.Size = new System.Drawing.Size(173, 22);
this.toolStripMenuItemShutdown.Size = new System.Drawing.Size(291, 22);
this.toolStripMenuItemShutdown.Text = "Shutdown";
//
// Main
@@ -95,6 +129,9 @@
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemAutoStart;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemWebUI;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemShutdown;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem backgroundMenuItem;
private System.Windows.Forms.ToolStripMenuItem serviceControlMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
}
}

188
src/Jackett.Tray/Main.cs Normal file
View File

@@ -0,0 +1,188 @@
using Jackett;
using Jackett.Utils;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace JackettTray
{
public partial class Main : Form
{
public Main()
{
Hide();
InitializeComponent();
toolStripMenuItemAutoStart.Checked = AutoStart;
toolStripMenuItemAutoStart.CheckedChanged += toolStripMenuItemAutoStart_CheckedChanged;
toolStripMenuItemWebUI.Click += toolStripMenuItemWebUI_Click;
toolStripMenuItemShutdown.Click += toolStripMenuItemShutdown_Click;
#if __MonoCS__
// No shortcuts on linux
#else
toolStripMenuItemAutoStart.Visible = true;
#endif
Engine.Server.Initalize();
if (!Engine.ServiceConfig.ServiceExists())
{
// We are not installed as a service so just the web server too and run from the tray.
Engine.Logger.Info("Starting server from tray");
Engine.Server.Start();
}
Task.Factory.StartNew(WaitForEvent);
}
private void WaitForEvent()
{
Engine.LockService.WaitForSignal();
Application.Exit();
}
void toolStripMenuItemWebUI_Click(object sender, EventArgs e)
{
Process.Start("http://127.0.0.1:" + Engine.Server.Config.Port);
}
void toolStripMenuItemShutdown_Click(object sender, EventArgs e)
{
Process.GetCurrentProcess().Kill();
}
void toolStripMenuItemAutoStart_CheckedChanged(object sender, EventArgs e)
{
AutoStart = toolStripMenuItemAutoStart.Checked;
}
string ProgramTitle
{
get
{
return Assembly.GetExecutingAssembly().GetName().Name;
}
}
bool AutoStart
{
get
{
return File.Exists(ShortcutPath);
}
set
{
if (value && !AutoStart)
{
CreateShortcut();
}
else if (!value && AutoStart)
{
File.Delete(ShortcutPath);
}
}
}
public string ShortcutPath
{
get
{
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), "Jackett.lnk");
}
}
private void CreateShortcut()
{
#if __MonoCS__
// No shortcuts on linux
#else
var appPath = Assembly.GetExecutingAssembly().Location;
var shell = new IWshRuntimeLibrary.WshShell();
var shortcut = (IWshRuntimeLibrary.IWshShortcut)shell.CreateShortcut(ShortcutPath);
shortcut.Description = Assembly.GetExecutingAssembly().GetName().Name;
shortcut.TargetPath = appPath;
shortcut.Save();
#endif
}
private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)
{
if (Engine.ServiceConfig.ServiceExists())
{
backgroundMenuItem.Visible = true;
serviceControlMenuItem.Visible = true;
toolStripSeparator1.Visible = true;
toolStripSeparator2.Visible = true;
if (Engine.ServiceConfig.ServiceRunning())
{
serviceControlMenuItem.Text = "Stop background service";
} else
{
serviceControlMenuItem.Text = "Start background service";
}
toolStripMenuItemShutdown.Text = "Close tray icon";
} else
{
backgroundMenuItem.Visible = false;
serviceControlMenuItem.Visible = false;
toolStripSeparator1.Visible = false;
toolStripSeparator2.Visible = false;
toolStripMenuItemShutdown.Text = "Shutdown";
}
}
private void serviceControlMenuItem_Click(object sender, EventArgs e)
{
var consolePath = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "JackettConsole.exe");
if (Engine.ServiceConfig.ServiceRunning())
{
if (ServerUtil.IsUserAdministrator())
{
Engine.ServiceConfig.Stop();
} else
{
try
{
Engine.ProcessService.StartProcessAndLog(consolePath, "--Stop", true);
}
catch
{
MessageBox.Show("Failed to get admin rights to stop the service.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
else
{
if (ServerUtil.IsUserAdministrator())
{
Engine.ServiceConfig.Start();
}
else
{
try
{
Engine.ProcessService.StartProcessAndLog(consolePath, "--Start", true);
}
catch
{
MessageBox.Show("Failed to get admin rights to start the service.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace JackettTray
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Main());
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Jackett.Tray")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Jackett.Tray")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ff9025b1-ec14-4aa9-8081-9f69c5e35b63")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("0.0.0.0")]

View File

@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Jackett.Tray.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Jackett.Tray.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Jackett.Tray.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net45" />
<package id="Autofac.Owin" version="3.1.0" targetFramework="net45" />
<package id="Autofac.WebApi2" version="3.4.0" targetFramework="net45" />
<package id="Autofac.WebApi2.Owin" version="3.3.0" targetFramework="net45" />
<package id="AutoMapper" version="4.1.1" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Tracing" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net45" />
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.FileSystems" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Host.HttpListener" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Hosting" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.StaticFiles" version="3.0.1" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="NLog" version="4.3.7" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
</packages>

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A61E311A-6F8B-4497-B5E4-2EA8994C7BD8}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Jackett.Updater</RootNamespace>
<AssemblyName>JackettUpdater</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>jackett.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CommandLine, Version=1.9.71.2, Culture=neutral, PublicKeyToken=de6f01bd326f8c32, processorArchitecture=MSIL">
<HintPath>..\packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.3.7\lib\net45\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UpdaterConsoleOptions.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Jackett\Jackett.csproj">
<Project>{e636d5f8-68b4-4903-b4ed-ccfd9c9e899f}</Project>
<Name>Jackett</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="jackett.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,176 @@
using CommandLine;
using Jackett.Services;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Jackett.Updater
{
class Program
{
static void Main(string[] args)
{
new Program().Run(args);
}
private void Run(string[] args)
{
Engine.SetupLogging(null, "updater.txt");
Engine.Logger.Info("Jackett Updater v" + GetCurrentVersion());
Engine.Logger.Info("Options " + string.Join(" ", args));
try {
var options = new UpdaterConsoleOptions();
if (Parser.Default.ParseArguments(args, options))
{
ProcessUpdate(options);
}
else
{
Engine.Logger.Error("Failed to process update arguments!: " + string.Join(" ", args));
Console.ReadKey();
}
}
catch (Exception e)
{
Engine.Logger.Error(e, "Exception applying update!");
}
}
private string GetCurrentVersion()
{
var assembly = System.Reflection.Assembly.GetExecutingAssembly();
var fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
return fvi.FileVersion;
}
private void ProcessUpdate(UpdaterConsoleOptions options)
{
var updateLocation = GetUpdateLocation();
if(!(updateLocation.EndsWith("\\") || updateLocation.EndsWith("/")))
{
updateLocation += Path.DirectorySeparatorChar;
}
var isWindows = System.Environment.OSVersion.Platform != PlatformID.Unix;
var trayRunning = false;
var trayProcesses = Process.GetProcessesByName("JackettTray");
if (isWindows)
{
if (trayProcesses.Count() > 0)
{
foreach (var proc in trayProcesses)
{
try
{
Engine.Logger.Info("Killing tray process " + proc.Id);
proc.Kill();
trayRunning = true;
}
catch { }
}
}
}
Engine.Logger.Info("Waiting for Jackett to close..");
Thread.Sleep(2000);
Engine.Logger.Info("Finding files in: " + updateLocation);
var files = Directory.GetFiles(updateLocation, "*.*", SearchOption.AllDirectories);
foreach(var file in files)
{
var fileName = Path.GetFileName(file).ToLowerInvariant();
if (fileName.EndsWith(".zip") ||
fileName.EndsWith(".tar") ||
fileName.EndsWith(".gz"))
{
continue;
}
try {
Engine.Logger.Info("Copying " + fileName);
var dest = Path.Combine(options.Path, file.Substring(updateLocation.Length));
var destDir = Path.GetDirectoryName(dest);
if (!Directory.Exists(destDir))
{
Engine.Logger.Info("Creating directory " + destDir);
Directory.CreateDirectory(destDir);
}
File.Copy(file, dest, true);
}
catch(Exception e)
{
Engine.Logger.Error(e);
}
}
// delete old files
string[] oldDirs = new string[] { "Content/logos" };
foreach (var oldDir in oldDirs)
{
try
{
var deleteDir = Path.Combine(options.Path, oldDir);
if (Directory.Exists(deleteDir))
{
Engine.Logger.Info("Deleting directory " + deleteDir);
Directory.Delete(deleteDir, true);
}
}
catch (Exception e)
{
Engine.Logger.Error(e);
}
}
if (trayRunning)
{
var startInfo = new ProcessStartInfo()
{
Arguments = options.Args,
FileName = Path.Combine(options.Path, "JackettTray.exe"),
UseShellExecute = true
};
Process.Start(startInfo);
}
if(string.Equals(options.Type, "JackettService.exe", StringComparison.InvariantCultureIgnoreCase))
{
var serviceHelper = new ServiceConfigService(null, null);
if (serviceHelper.ServiceExists())
{
serviceHelper.Start();
}
} else
{
var startInfo = new ProcessStartInfo()
{
Arguments = options.Args,
FileName = Path.Combine(options.Path, "JackettConsole.exe"),
UseShellExecute = true
};
if (!isWindows)
{
startInfo.Arguments = startInfo.FileName + " " + startInfo.Arguments;
startInfo.FileName = "mono";
}
Engine.Logger.Info("Starting Jackett: " + startInfo.FileName + " " + startInfo.Arguments);
Process.Start(startInfo);
}
}
private string GetUpdateLocation()
{
var location = new Uri(Assembly.GetEntryAssembly().GetName().CodeBase);
return new FileInfo(location.AbsolutePath).DirectoryName;
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Jackett.Updater")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Jackett.Updater")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("a61e311a-6f8b-4497-b5e4-2ea8994c7bd8")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("0.0.0.0")]

View File

@@ -0,0 +1,21 @@
using CommandLine;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Jackett.Updater
{
public class UpdaterConsoleOptions
{
[Option('p', "Path", HelpText = "Install location")]
public string Path { get; set; }
[Option('t', "Type", HelpText = "Install type")]
public string Type { get; set; }
[Option('a', "Args", HelpText = "Launch arguments")]
public string Args { get; set; }
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net45" />
<package id="CommandLineParser" version="1.9.71" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net45" />
<package id="NLog" version="4.3.7" targetFramework="net45" />
</packages>

View File

@@ -1,22 +1,101 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jackett", "Jackett\Jackett.csproj", "{E636D5F8-68B4-4903-B4ED-CCFD9C9E899F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E636D5F8-68B4-4903-B4ED-CCFD9C9E899F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E636D5F8-68B4-4903-B4ED-CCFD9C9E899F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E636D5F8-68B4-4903-B4ED-CCFD9C9E899F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E636D5F8-68B4-4903-B4ED-CCFD9C9E899F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jackett", "Jackett\Jackett.csproj", "{E636D5F8-68B4-4903-B4ED-CCFD9C9E899F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CurlSharp", "CurlSharp\CurlSharp.csproj", "{74420A79-CC16-442C-8B1E-7C1B913844F0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BE7B0C8A-6144-47CD-821E-B09BA1B7BADE}"
ProjectSection(SolutionItems) = preProject
..\Build.bat = ..\Build.bat
..\Installer.iss = ..\Installer.iss
..\LICENSE = ..\LICENSE
..\README.md = ..\README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jackett.Console", "Jackett.Console\Jackett.Console.csproj", "{4E2A81DA-E235-4A88-AD20-38AABBFBF33C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jackett.Service", "Jackett.Service\Jackett.Service.csproj", "{BF611F7B-4658-4CB8-AA9E-0736FADAA3BA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jackett.Tray", "Jackett.Tray\Jackett.Tray.csproj", "{FF9025B1-EC14-4AA9-8081-9F69C5E35B63}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jackett.Test", "Jackett.Test\Jackett.Test.csproj", "{E75D4F15-5DA3-4332-ADB1-28FB673DAE56}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jackett.Updater", "Jackett.Updater\Jackett.Updater.csproj", "{A61E311A-6F8B-4497-B5E4-2EA8994C7BD8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E636D5F8-68B4-4903-B4ED-CCFD9C9E899F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E636D5F8-68B4-4903-B4ED-CCFD9C9E899F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E636D5F8-68B4-4903-B4ED-CCFD9C9E899F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E636D5F8-68B4-4903-B4ED-CCFD9C9E899F}.Release|Any CPU.Build.0 = Release|Any CPU
{74420A79-CC16-442C-8B1E-7C1B913844F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74420A79-CC16-442C-8B1E-7C1B913844F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74420A79-CC16-442C-8B1E-7C1B913844F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74420A79-CC16-442C-8B1E-7C1B913844F0}.Release|Any CPU.Build.0 = Release|Any CPU
{4E2A81DA-E235-4A88-AD20-38AABBFBF33C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E2A81DA-E235-4A88-AD20-38AABBFBF33C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E2A81DA-E235-4A88-AD20-38AABBFBF33C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E2A81DA-E235-4A88-AD20-38AABBFBF33C}.Release|Any CPU.Build.0 = Release|Any CPU
{BF611F7B-4658-4CB8-AA9E-0736FADAA3BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BF611F7B-4658-4CB8-AA9E-0736FADAA3BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BF611F7B-4658-4CB8-AA9E-0736FADAA3BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BF611F7B-4658-4CB8-AA9E-0736FADAA3BA}.Release|Any CPU.Build.0 = Release|Any CPU
{FF9025B1-EC14-4AA9-8081-9F69C5E35B63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF9025B1-EC14-4AA9-8081-9F69C5E35B63}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF9025B1-EC14-4AA9-8081-9F69C5E35B63}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF9025B1-EC14-4AA9-8081-9F69C5E35B63}.Release|Any CPU.Build.0 = Release|Any CPU
{E75D4F15-5DA3-4332-ADB1-28FB673DAE56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E75D4F15-5DA3-4332-ADB1-28FB673DAE56}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E75D4F15-5DA3-4332-ADB1-28FB673DAE56}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E75D4F15-5DA3-4332-ADB1-28FB673DAE56}.Release|Any CPU.Build.0 = Release|Any CPU
{A61E311A-6F8B-4497-B5E4-2EA8994C7BD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A61E311A-6F8B-4497-B5E4-2EA8994C7BD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A61E311A-6F8B-4497-B5E4-2EA8994C7BD8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A61E311A-6F8B-4497-B5E4-2EA8994C7BD8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
$0.TextStylePolicy = $1
$1.inheritsSet = VisualStudio
$1.inheritsScope = text/plain
$1.scope = text/x-csharp
$0.CSharpFormattingPolicy = $2
$2.IndentSwitchBody = True
$2.IndentBlocksInsideExpressions = True
$2.AnonymousMethodBraceStyle = NextLine
$2.PropertyBraceStyle = NextLine
$2.PropertyGetBraceStyle = NextLine
$2.PropertySetBraceStyle = NextLine
$2.EventBraceStyle = NextLine
$2.EventAddBraceStyle = NextLine
$2.EventRemoveBraceStyle = NextLine
$2.StatementBraceStyle = NextLine
$2.ElseNewLinePlacement = NewLine
$2.CatchNewLinePlacement = NewLine
$2.FinallyNewLinePlacement = NewLine
$2.WhileNewLinePlacement = DoNotCare
$2.ArrayInitializerWrapping = DoNotChange
$2.ArrayInitializerBraceStyle = NextLine
$2.BeforeMethodDeclarationParentheses = False
$2.BeforeMethodCallParentheses = False
$2.BeforeConstructorDeclarationParentheses = False
$2.NewLineBeforeConstructorInitializerColon = NewLine
$2.NewLineAfterConstructorInitializerColon = SameLine
$2.BeforeDelegateDeclarationParentheses = False
$2.NewParentheses = False
$2.SpacesBeforeBrackets = False
$2.inheritsSet = Mono
$2.inheritsScope = text/x-csharp
$2.scope = text/x-csharp
EndGlobalSection
EndGlobal

View File

@@ -1,31 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace Jackett
{
public class ApiKey
{
public static string CurrentKey;
const string chars = "abcdefghijklmnopqrstuvwxyz0123456789";
public static string Generate()
{
var randBytes = new byte[32];
var rngCsp = new RNGCryptoServiceProvider();
rngCsp.GetBytes(randBytes);
var key = "";
foreach (var b in randBytes)
{
key += chars[b % chars.Length];
}
return key;
}
}
}

View File

@@ -1,16 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace Jackett
{
class TVRage
class AuthenticationException : Exception
{
}
}

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http.Filters;
namespace Jackett
{
public class JackettAPINoCacheAttribute : System.Web.Http.Filters.ActionFilterAttribute
{
public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
{
if(null!= actionExecutedContext &&
null!= actionExecutedContext.Response &&
null!= actionExecutedContext.Response.Headers)
actionExecutedContext.Response.Headers.CacheControl = new System.Net.Http.Headers.CacheControlHeaderValue()
{
NoStore = true,
Private = true
};
base.OnActionExecuted(actionExecutedContext);
}
}
}

Some files were not shown because too many files have changed in this diff Show More