File tree Expand file tree Collapse file tree 16 files changed +1033
-4
lines changed
Expand file tree Collapse file tree 16 files changed +1033
-4
lines changed Original file line number Diff line number Diff line change @@ -512,6 +512,38 @@ const docTemplate = `{
512512 }
513513 }
514514 },
515+ "/torznab/search": {
516+ "get": {
517+ "description": "Makes a torznab search.",
518+ "produces": [
519+ "application/json"
520+ ],
521+ "tags": [
522+ "API"
523+ ],
524+ "summary": "Makes a torznab search",
525+ "parameters": [
526+ {
527+ "type": "string",
528+ "description": "Torznab query",
529+ "name": "query",
530+ "in": "query",
531+ "required": true
532+ }
533+ ],
534+ "responses": {
535+ "200": {
536+ "description": "Torznab torrent search result(s)",
537+ "schema": {
538+ "type": "array",
539+ "items": {
540+ "$ref": "#/definitions/models.TorrentDetails"
541+ }
542+ }
543+ }
544+ }
545+ }
546+ },
515547 "/viewed": {
516548 "post": {
517549 "description": "Allow to set, list or remove viewed torrents from server.",
@@ -721,6 +753,10 @@ const docTemplate = `{
721753 "description": "Rutor",
722754 "type": "boolean"
723755 },
756+ "enableTorznabSearch": {
757+ "description": "Torznab",
758+ "type": "boolean"
759+ },
724760 "forceEncrypt": {
725761 "description": "Torrent",
726762 "type": "boolean"
@@ -767,6 +803,12 @@ const docTemplate = `{
767803 "torrentsSavePath": {
768804 "type": "string"
769805 },
806+ "torznabUrls": {
807+ "type": "array",
808+ "items": {
809+ "$ref": "#/definitions/settings.TorznabConfig"
810+ }
811+ },
770812 "uploadRateLimit": {
771813 "description": "in kb, 0 - inf",
772814 "type": "integer"
@@ -777,6 +819,20 @@ const docTemplate = `{
777819 }
778820 }
779821 },
822+ "settings.TorznabConfig": {
823+ "type": "object",
824+ "properties": {
825+ "host": {
826+ "type": "string"
827+ },
828+ "key": {
829+ "type": "string"
830+ },
831+ "name": {
832+ "type": "string"
833+ }
834+ }
835+ },
780836 "settings.Viewed": {
781837 "type": "object",
782838 "properties": {
Original file line number Diff line number Diff line change 505505 }
506506 }
507507 },
508+ "/torznab/search" : {
509+ "get" : {
510+ "description" : " Makes a torznab search." ,
511+ "produces" : [
512+ " application/json"
513+ ],
514+ "tags" : [
515+ " API"
516+ ],
517+ "summary" : " Makes a torznab search" ,
518+ "parameters" : [
519+ {
520+ "type" : " string" ,
521+ "description" : " Torznab query" ,
522+ "name" : " query" ,
523+ "in" : " query" ,
524+ "required" : true
525+ }
526+ ],
527+ "responses" : {
528+ "200" : {
529+ "description" : " Torznab torrent search result(s)" ,
530+ "schema" : {
531+ "type" : " array" ,
532+ "items" : {
533+ "$ref" : " #/definitions/models.TorrentDetails"
534+ }
535+ }
536+ }
537+ }
538+ }
539+ },
508540 "/viewed" : {
509541 "post" : {
510542 "description" : " Allow to set, list or remove viewed torrents from server." ,
714746 "description" : " Rutor" ,
715747 "type" : " boolean"
716748 },
749+ "enableTorznabSearch" : {
750+ "description" : " Torznab" ,
751+ "type" : " boolean"
752+ },
717753 "forceEncrypt" : {
718754 "description" : " Torrent" ,
719755 "type" : " boolean"
760796 "torrentsSavePath" : {
761797 "type" : " string"
762798 },
799+ "torznabUrls" : {
800+ "type" : " array" ,
801+ "items" : {
802+ "$ref" : " #/definitions/settings.TorznabConfig"
803+ }
804+ },
763805 "uploadRateLimit" : {
764806 "description" : " in kb, 0 - inf" ,
765807 "type" : " integer"
770812 }
771813 }
772814 },
815+ "settings.TorznabConfig" : {
816+ "type" : " object" ,
817+ "properties" : {
818+ "host" : {
819+ "type" : " string"
820+ },
821+ "key" : {
822+ "type" : " string"
823+ },
824+ "name" : {
825+ "type" : " string"
826+ }
827+ }
828+ },
773829 "settings.Viewed" : {
774830 "type" : " object" ,
775831 "properties" : {
Original file line number Diff line number Diff line change @@ -114,6 +114,9 @@ definitions:
114114 enableRutorSearch :
115115 description : Rutor
116116 type : boolean
117+ enableTorznabSearch :
118+ description : Torznab
119+ type : boolean
117120 forceEncrypt :
118121 description : Torrent
119122 type : boolean
@@ -148,13 +151,26 @@ definitions:
148151 type : integer
149152 torrentsSavePath :
150153 type : string
154+ torznabUrls :
155+ items :
156+ $ref : ' #/definitions/settings.TorznabConfig'
157+ type : array
151158 uploadRateLimit :
152159 description : in kb, 0 - inf
153160 type : integer
154161 useDisk :
155162 description : Disk
156163 type : boolean
157164 type : object
165+ settings.TorznabConfig :
166+ properties :
167+ host :
168+ type : string
169+ key :
170+ type : string
171+ name :
172+ type : string
173+ type : object
158174 settings.Viewed :
159175 properties :
160176 file_index :
@@ -648,6 +664,27 @@ paths:
648664 summary : Handle torrents informations
649665 tags :
650666 - API
667+ /torznab/search :
668+ get :
669+ description : Makes a torznab search.
670+ parameters :
671+ - description : Torznab query
672+ in : query
673+ name : query
674+ required : true
675+ type : string
676+ produces :
677+ - application/json
678+ responses :
679+ " 200 " :
680+ description : Torznab torrent search result(s)
681+ schema :
682+ items :
683+ $ref : ' #/definitions/models.TorrentDetails'
684+ type : array
685+ summary : Makes a torznab search
686+ tags :
687+ - API
651688 /viewed :
652689 post :
653690 consumes :
Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ import (
1010 "server/log"
1111)
1212
13+ type TorznabConfig struct {
14+ Host string
15+ Key string
16+ Name string
17+ }
18+
1319type BTSets struct {
1420 // Cache
1521 CacheSize int64 // in byte, def 64 MB
@@ -34,6 +40,10 @@ type BTSets struct {
3440 // Rutor
3541 EnableRutorSearch bool
3642
43+ // Torznab
44+ EnableTorznabSearch bool
45+ TorznabUrls []TorznabConfig
46+
3747 // BT Config
3848 EnableIPv6 bool
3949 DisableTCP bool
Original file line number Diff line number Diff line change 1+ # Torznab Support for TorrServer
2+
3+ This package implements Torznab support for TorrServer, allowing integration with indexer managers like Jackett and Prowlarr.
4+
5+ ## Features
6+
7+ - ** Search Integration** : Search for torrents directly from supported Torznab indexers.
8+ - ** Aggregated Search** : Search across multiple configured indexers simultaneously.
9+
10+ ## Configuration
11+
12+ Torznab settings can be configured via the Web UI under ` Settings > Torznab ` .
13+
14+ ### Parameters
15+
16+ Each Torznab indexer requires the following:
17+
18+ - ** Host URL** : The full URL to the Torznab API endpoint.
19+ - Example: ` http://192.168.1.10:9117/api/v2.0/indexers/all/results/torznab/ ` (Jackett)
20+ - Example: ` http://localhost:9696/1/api ` (Prowlarr)
21+ - * Note* : Ensure the URL ends with ` / ` or ` /api ` as appropriate for your indexer manager, though the server attempts to handle pathing intelligently.
22+ - ** API Key** : The API key provided by your Torznab indexer manager.
23+
24+ ### enabling support
25+
26+ To enable Torznab search:
27+ 1 . Go to ** Settings** .
28+ 2 . Navigate to the ** Torznab** tab.
29+ 3 . Toggle ** Enable Torznab Search** .
30+ 4 . Add your indexers using the "Host URL" and "API Key" fields.
31+ 5 . Click ** Add Server** .
32+ 6 . ** Save** your settings.
You can’t perform that action at this time.
0 commit comments